I'm trying to extract current orientation and position in opengl. I know it is wrapped in the GL_MODELVIEW matrix, but i am having trouble interpreting it.

Question: How do i extract current orientation and position in opengl?

Please note that I am having trouble after i use gluLookAt(), i have no trouble understanding the GL_MODELVIEW matrix before I use gluLookAt(), but after gluLookAt(), the matrix is distorted in a way that no longer makes sense to me. This is an advance opengl problem that I cannot find much information on the net. If you know any webpage that talks about what gluLookAt() does at the implementation level or know how to extract orientation/position in opengl, please help me. Any suggestion is appriciated.

I have to use gluLookAt() because, i need to render it on the screen, and I need to extract info so that i can do my own math to it and return the result into GL_MODELVIEW matrix.

I need help ASAP, for there is a deadline.