Archived

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

Rotations in NeHe tutorial

This topic is 6356 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 Everybody... I started reading NeHe''s Tutorials on Opengl today... Everything was clear (if u leave the setup out ;-) up to the tutorial where u start to rotate the triangle and the quad... Am I right, if i think that u turn the whole koordinate system and then draw the triangle, then jump back to the position it was before, then rotate for the quad, jump to the position of the quad, draw it and then jump back again and "take the picture"? If someone got another good explanation for me, i really could use that... thx in advance... Phil

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The rotation threw me off for a while...but my belief on how it works is... everything drawn after the rotate command is rotated by the. If you place another rotate command after the first one...they both take place in the order the are called. If at anytime your call glLoadIdentity() it basically turns off any previous rotations/translations, so anything you draw after that is not affected by your rotation call. However the objects before the glLoadIdentity and after the rotate call are still in there rotated position.
Man its hard to explain it....hope you understrand what im saying.. to summarize: everything drawn after a rotate call is rotated until you hit a glLoadIdentity() and everything after that is not affected.

Share this post


Link to post
Share on other sites