• Advertisement

Archived

This topic is now archived and is closed to further replies.

dumb

This topic is 5275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites

  • Advertisement