]> git.tdb.fi Git - libs/gl.git/blobdiff - source/framebuffer.cpp
Move some member functions to more logical positions
[libs/gl.git] / source / framebuffer.cpp
index 8806ea6c4956d980dafd2b72419050e78813c2d8..c4f714c64b7768e74989602ac023ce3e14655159 100644 (file)
@@ -106,6 +106,15 @@ void Framebuffer::check_size()
                }
 }
 
+unsigned Framebuffer::get_attachment_index(FramebufferAttachment attch)
+{
+       for(unsigned i=0; i<attachments.size(); ++i)
+               if(attachments[i].attachment==attch)
+                       return i;
+       attachments.push_back(Attachment(attch));
+       return attachments.size()-1;
+}
+
 void Framebuffer::attach(FramebufferAttachment attch, Renderbuffer &rbuf)
 {
        if(!id)
@@ -228,15 +237,6 @@ Framebuffer &Framebuffer::system()
        return sys_framebuf;
 }
 
-unsigned Framebuffer::get_attachment_index(FramebufferAttachment attch)
-{
-       for(unsigned i=0; i<attachments.size(); ++i)
-               if(attachments[i].attachment==attch)
-                       return i;
-       attachments.push_back(Attachment(attch));
-       return attachments.size()-1;
-}
-
 
 Framebuffer::Attachment::Attachment(FramebufferAttachment a):
        attachment(a),