Rotations in NeHe tutorial

Started by
1 comment, last by phueppl1 23 years, 9 months ago
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
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
Advertisement
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.
Thx alot,

that helped...

cya,

Phil
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )

This topic is closed to new replies.

Advertisement