Advertisement

To Rotate or not to rotate ?

Started by January 04, 2001 08:19 AM
3 comments, last by Tony798 23 years, 10 months ago
Hi, I''ve noticed that in many quake style engines ppl use rotations when the users'' view point is changed by keyboard and mouse input. Others, however, simply modify the LookAt() values. Which tehnique is better ? Cheer me'' dears Tony
It doesn''t really matter. They both do exactly the same thing to OpenGL.

Pete
Advertisement
Well, since they are the same, i find the gluLookAt function much easier to understand than performing all the rotations myself. Im not sure about you, but for me, it is so much easier to think that the world does not move around you, but you move around the world. And gluLookAt only takes 3 simple parameters to set the camera''s position, what it''s looking at & what it''s up vector is.

You sortof answered your own question when you said:

"many quake style engines ppl use rotations when the users'' view point is changed by keyboard and mouse input. Others, however, _simply_ modify the LookAt() values"

- Wav
As gluLookAt uses the opengl glRotate and glTranslate commands
it will be hardware accelerated on nvidia cards etc.So in those
instances it would be quicker.
as this is gonna only be modified once per loop there will be bugger all performance difference between the two. so choose the one u feel most comfotable with.
i reckon gluLookAt basically just calls glLoadMatrix(..) anyways

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement