3

How do I set FBO so it renders depth and color buffer in two separate textures, in one rendering pass ?

Pythagoras of Samos
  • 3,051
  • 5
  • 29
  • 51

1 Answers1

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