Using matrix stack transformations

Hello all,

For my purposes, I need to store a transformation matrix for each object in my 3D world. I’ve written code to multiply matrices and perform rotations, translations etc… myself but I would like to use the existing matrix stack within JOGL to do the work for me by using glRotated, glTranslated and then retrieving the resulting matrix. I know within non-java OpenGL you can use methods like glGetMatrixd to retrieve the current matrix on the stack. I did not see an equivalent method in the JOGL API. Any suggestions?

Thanks!

ALL of the base-opengl functions are also available within jogl.

if you want to get the current modelview matrix you need to do seomthing like

gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, model_matrix);

Thanks very much for the reply. It worked great!