Saving the matrix

How can I save an object into a file. I made the Rubik cube and now I want to sacve the position of the matrix an the position of every little cube. IS there a function as glSAve MAtrix?

Your information was very vague,
but I will try to help you anyway.
I guess you have made Rotations/Transes
of different squares and wants to save
the current matrix to a file, yes?

float dst[4][4];
glGetFloatv(GL_MODELVIEW_MATRIX, (float*)dst);

The above to lines retrieves the current matrix and puts it in the dst array.
Just save the array to a file.

Good luck.

Marcus “Cruxis” Lenngren - Nopp.