Help on transformations

Hello guys!

I’m making an application and I’m using glRotatef, glTranslate …and so one, using this kind of function, I’m working with rotating the (lets say) the scene, and not taking my data (points, lines…) and applying a matrix to do this, but if I want to export the data (rotated), and simulate in the screen with the OpenGL, I need to apply exactly the same transformation to my vertexes…am I right ???..
So can someone give me help on doing this ? How is the matrix that OpenGL use for rotating, scaling and translating.

And if I’m wrong, and it is possible to do in a easy way, can some one explain me?

Thank you for the moment

Best regards


Yep, you’re correct. probably has the info on how to multiply matrices.

Simply get all applied matrices(or all matrices you want) from OpenGL with glGet(GL_???_MATRIX,Matrix) and multiply all vertices with all these matrices…