Skip to main content
2 of 2
added 2 characters in body
Branan
  • 211
  • 2
  • 6

You should be able to create a texture (instead of a RenderBuffer) using the GL_DEPTH_STENCIL format. I'm not sure of the exact process for using depth from such a texture in a shader program (which I assume you're using, since you're using FBOs), but the OpenGL spec should specify which color channels get which values (my guess would be that R,G, and B all get set to depth and A gets set to stencil).

I target OpenGL 3.2 these days, so you may need to verify that texture format is workable for you. I can never remember which versions introduce different features.

Branan
  • 211
  • 2
  • 6