PDA

View Full Version : FBO, 1 depth buffer



V-man
09-04-2008, 12:32 PM
I would like to create 1 depth render buffer and bind it to many FBOs. Would that work or would I have to bind the depth render buffer each time I want to render to some FBO.

Also, I still haven't figured out how to unbind a texture from a FBO. I call
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, FBO_FrameBufferID);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, 0, 0, 0);

and it throws a GL_INVALID_ENUM

arekkusu
09-04-2008, 01:44 PM
Yes, you can bind a single renderbuffer to many FBOs. You just need to make sure each FBO is complete, with whatever other attachments you bind.

Your second problem sounds like a driver bug. The spec says:
"if <texture> is zero, then <textarget>, <level>, and <zoffset> are ignored."
You should file a bug. And stick a valid textarget in there to work around their bug in the meantime.