Currently I am rendering some stuff to a FBO with an attached depth render buffer.
However, after I am done with the render buffer, the depth information is pretty much lost.
How can I copy the data from the render buffer to the fixed function depth buffer?
You can use glBlitFramebuffer, enabling the
GL_DEPTH_BUFFER_BITflag.Example code:
This will copy only the depth buffer.