Does anyone know about an example, preferably using glut that uses the FBO to render depth to a texture which is then rendered onto the framebuffer? (attached to a quad for example, just to see the content of the depth buffer).
I can get the COLOR buffer result, but when I also attach a depth buffer, all I get in the render target (texture) for the GL_DEPTH_ATTACHMENT_EXT is black texture.
I have tried with setting up the depth target texture as: GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_2D etc..
but nothing works...
Im using a Geforce 6200 FX go so it should support all of the required functionality.
So, does anyone know of working code for this?