I'm having problems to setup the camera and perspective matrices, using my own algorithms, not GLUT's ones. I would like to compare the matrices produced by gluLookAt() and gluPerspective(), but I don't know how to retrieve them. I know how to setup a matrix using glMatrixMode() and glLoadMatrix(), but is there something like a glSaveMatrix()?

As always thanks for your help.