Elegant way to find current FBO GLuint?

Started by
1 comment, last by all_names_taken 16 years, 10 months ago
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.
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.
Oh ok, thanks a lot

This topic is closed to new replies.

Advertisement