Restoring projection matrix
- by brainydexter
I am learning to use FBOs and one of the things that I need to do when rendering something onto user defined FBO, I have to setup the projection, modelview and viewport for it. Once I am done rendering to the FBO, I need to restore these matrices. I found:
glPushAttrib(GL_VIEWPORT_BIT);
glPopAttrib();
to restore the viewport to its old state. Is there a way to restore the projection and modelview matrix to whatever it was earlier ?
Tech: C++/OpenGL
Thanks!