Advertisement Jump to content
Sign in to follow this  
all_names_taken

OpenGL Elegant way to find current FBO GLuint?

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

Is there any elegant way of querying from OpenGL the GLuint of the last framebufferobject to be set with a "glBindFramebufferEXT" call? This would make it easier to reuse classes. For instance, upon entering the render() function of an effect that requires multiple render targets, I would store what the current framebuffer was, and upon exiting the render() function I would bind that framebuffer again. Alternatively, a POP/PUSH pair of functions for this would also work. Or is it necessary to solve this manually in a less elegant and less extensible way? I couldn't find anything in the documentation.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by all_names_taken
Is there any elegant way of querying from OpenGL the GLuint of the last framebufferobject to be set with a "glBindFramebufferEXT" call?
...
Alternatively, a POP/PUSH pair of functions for this would also work.
From the FBO spec...
Quote:
The current FRAMEBUFFER_EXT binding can be queried using GetIntegerv(FRAMEBUFFER_BINDING_EXT).

...

(70) With which, if any, attribute bit does the framebuffer binding push and pop? The same question applies to the current renderbuffer?

RESOLUTION: resolved, don't push/pop framebuffer binding bit for now. If desired, we may add this in the ARB/core update of this spec.

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!