How do I set FBO so it renders depth and color buffer in two separate textures, in one rendering pass ?
Asked
Active
Viewed 257 times
1 Answers
3
Just attach a suitable texture to the FBOs depth attachment point:
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,GL_TEXTURE_2D, textureId, 0);
.. and another texture to the color attachment point. See this for more information.

Alexander Gessler
- 45,603
- 7
- 82
- 122