}
}
+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)
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),