trackball

I am having a problem to return to last 3-d position of my object. I would like to have the same 3-d view when I exit and return back to the program.

glMatrixMode GL_MODELVIEW
glGetFloatv GL_MODELVIEW_MATRIX, objectXform
glLoadIdentity
glRotatef d_X, 0, 1, 0
glRotatef d_Y, 1, 0, 0
glMultMatrixf objectXform
Form_Paint

Is there a way to save the current transformation matrix in a file and bring it back up?

Hi !

I am not sure what you are trying to do, the glGetFloatv( GL_MODELVIEW_MATRIX, p) will return the current matrix as 16 floating point values, you can save this if you want and later restore it with glLoadMatrixf()

Mikael

I am just starting with OpenGL. This is the answer I need. It works!