Jump to content
  • Advertisement
Sign in to follow this  
Nairou

Bind back buffer to FBO?

This topic is 2508 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

I'm trying to get some ambient lighting working in my deferred renderer. As MJP suggested, I need to include the final render target in the FBO, and render the ambient scene directly to that when I do my main geometry pass.

However, my lighting pass currently renders directly to the back buffer (after the geometry pass is finished and the FBO is disabled), not to a secondary render target. So I would need to either bind the back buffer to the FBO as a render target, to pre-populate it with ambient values, or else render everything to a separate render target, and then blit that final image to the back buffer.

I'm hoping to avoid doing the extra blit, but so far I haven't seen how to bind an existing back buffer to a FBO. Is there a way to create a render target, and designate it as the new back buffer? Or am I stuck with doing a blit from my final render target to the back buffer? What is the best way to accomplish this?

Share this post


Link to post
Share on other sites
Advertisement
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!