OK, I've got several things I need to know.

#1: I need an algorithm for finding the inverse of a given matrix.

#2: I want to be able to modify OpenGL's projection matrix manually, instead of using glRotatef and glTranslatef. I know how to grab the matrix using glGetFloatv or something like that, but I don't know how to send the matrix back to replace the existing matrix.

Thanks