Rotations in NeHe tutorial
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 ;) )
July 18, 2000 10:49 PM
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement