Restoring projection matrix

Posted by brainydexter on Game Development See other posts from Game Development or by brainydexter
Published on 2011-02-21T19:29:08Z Indexed on 2011/02/21 23:34 UTC
Read the original article Hit count: 367

Filed under:
|
|

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!

© Game Development or respective owner

Related posts about opengl

Related posts about matrix