With GL_RGBA8 and GL_DEPTH24_STENCIL8_EXT, I have an error GL_FRAMEBUFFER_UNSUPPORTED_EXT !
However, with Glew, it is OK :
if(!GLEW_EXT_framebuffer_object)
throw (…)
if(!GLEW_EXT_packed_depth_stencil)
throw (…)
I have a GeForce Go 7600 with the last driver on Linux and driver 6.14.10.9424 on Windows.
And the “OpenGL Extention Viewer” software says to me that I have the extention GL_EXT_FRAMEBUFFER_OBJECT and GL_EXT_PACKED_DEPTH_STECIL !
You need to support the EXT_packed_depth_stencil. Use GL_DEPTH_STENCIL_EXT when making your render buffer, and attach the render buffer to both the depth and stencil attachments of your FBO.
zenux: With GL_RGBA8 and GL_DEPTH24_STENCIL8_EXT, I have an error GL_FRAMEBUFFER_UNSUPPORTED_EXT !
Odd. Works fine for me. NVidia GeForce 6800 Ultra on Linux, 1.0-100.14.09 drivers.
Here’s an example that comes with the spec.
You probably did not bind the depth buffer or didn’t bind the stencil buffer.
The same depth_stencil needs to be bound as depth and then as stencil render buffer.
But I would like that the FBO reads (I don’t need to write) in the back depth buffer (GL_BACK) and not in its depth buffer ! Is it possible ?
No. FBO’s cannot use parts of the regular default framebuffer, and vice-versa. Once you bind an FBO, it turns off all parts of the standard framebuffer.
Zenux: He just meant, you should stop apologizing. It is OK to apologize once, that your english is not that good, but writing it in every post is really not necessary.
And, by the way, your english is not that bad. Many people, who post on these boards, have much worse english skills.