Jump to content
  • Advertisement


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


Rotations in NeHe tutorial

This topic is 6698 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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!