I can’t attach any depth rbo to my fbo.
Here is what I’ve done:
create one rbo with depth storage, create one fbo attaching the rbo and also attaching some textures. I don’t attach any color buffer (but also tried it). I tried to attach just one cubemap texture but also the 6 ones without success.
The FBO is only complete when I do not attach any depth rbo. Any hints on how to attach it ?
EDIT: Well, maybe that could help a bit as FBO seems sensitive to drivers and graphic cards: Linux, Geforce FX 5600, nvidia driver 7667 - didn’t tried out 8xxx yet.
This ought to work:
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, Tex, 0);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, width, height);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, RB);
I think that’s very similar to what’s in the spec and probably not too different from what you have already. If that doesn’t work… try updating drivers?
I got it to work and the rendering is even faster than without FBO on the lastest drivers (8174). It was about 147 fps before and now is about 180 fps !