PDA

View Full Version : Rendering in Framebuffer does not effect while GL_DEPTH_TEST enabled



rakeshmalik91
08-07-2013, 10:47 AM
I am trying to render everything in a frame buffer.

So i made a framebuffer with depth texture and color texture attached as shown here : http://www.opengl.org/wiki/Framebuffer_Object_Examples#Color_texture.2C_Depth _texture

But nothing is rendered if GL_DEPTH_TEST is enabled. What am i doing wrong?

carsten neumann
08-07-2013, 12:05 PM
Do you clear the depth buffer (attachment) before rendering?

rakeshmalik91
08-07-2013, 01:06 PM
Thanks it works