Fbo and stencil?

Originally posted by Mars_9999:
I don’t want to hijack this thread, but after reading the spec is this the only way to get a true 24bit depth buffer is by using the EXT_packed_depth_stencil extension? So the usage example they show by making a texture bound to both the depth and stencil buffers how do I just get the depth portion of the buffer then? I have FBO’s working now and they work fine, but would like to have a bit more precision sometimes than 16bit… The ATI cards all but I think x1600 don’t support 24bit depth buffers…
Your card needs to support EXT_packed_depth_stencil. Then you create texture with internal format GL_DEPTH24_STENCIL8_EXT. Then you bind it (Eric Lengyel’s example creates a render buffer, NOT a texture!)
then render and now you have a depth texture. The stencil part will be ignored.

The first example in the spec shows how to do this and it does say you can use it as a depth texture.