Advertisement

dumb

Started by August 12, 2003 09:39 AM
0 comments, last by _ernie_ 21 years, 6 months ago
hi all, im new here as u can tell. i have a q. ive been looking at the tutorial by nehe and he never uses the glPopMatrix() and glPushMatrix() functions. And in other examples they do use them. Why? What are they for exactly?
It allows you to save and load matrices, for example if your current matrix mode is GL_MODEL_VIEW, you can call glPushMatrix() to save the current model view matrix, modify it (with rotations, translations ...) , and then call glPopMatrix() to get the model view matrix as it was before the glPushMatrix.
It''s very usefull when drawing "hierarchical" objects.
Sphax

This topic is closed to new replies.

Advertisement