Jump to content
  • Advertisement
Sign in to follow this  

Render to texture while retain depth buffer

This topic is 1127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

No it is not.

But what you can do is to render everything onto Framebuffer objects (FBO) and only as last step copy the finale image to the default Framebuffer. In that case you may not even want to create a depth buffer for the default Framebuffer.

And FBOs can share a single depth buffer.

I don't know what GL version you target but note that GL_ARB_framebuffer_object (Core sinc 3.0) and the older GL_EXT_framebuffer_object behaves differently.
Especially in how you can share a depth buffer between different FBOs.

And I don't know how the GLES versions handle FBOs or what there limitations are.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!