+const Texture *Framebuffer::get_attachment(FrameAttachment attch) const
+{
+ if(attachments.empty())
+ return 0;
+
+ int i = format.index(attch);
+ return (i>=0 ? attachments[i].tex : 0);
+}
+
+const Texture *Framebuffer::get_attachment(unsigned i) const
+{
+ return (i<attachments.size() ? attachments[i].tex : 0);
+}
+