   Framebuffer and it's attachments help
  If you use gl_color_attachment0 for your fbo and use and r32f format texture so that you can render directly into the texture will it take the depth into account?I've tried using those constants to make my fbo to use for a cubemap shadow data. It didn't work completely so I ended up using a depth texture for the cubemap instead which worked. Though I got it working I would really like to know what up with the color attachment ignoring the depth test.I'm using a nvidia 9500 gt with the most recent drivers.[Edited by - Asem on May 4, 2010 3:37:00 AM]
  If you want to use depth testing I think you have to attach a depth buffer as well as a color buffer. If you only attach a color buffer to the FBO it won't save any depth information.   