glLookAt or trasnlate/rotate view/model?

Started by
3 comments, last by Aman 23 years, 2 months ago
OK a quick OPGL question. As far as moving through a 3d world for FPS type game what is the best approach? 1.) glLookAt 2.) translate/rotate the view 3.) translate/rotate the world around the view? What is your opinion and why? Thanks up front, .Aman.
Its better to be silent and thought a foolthen to speak and remove all doubt.
Advertisement
they all basically achieve the same thing thus choose the one u feel most comfortable with

http://members.xoom.com/myBollux
Thanks,

Let me ask this then...which produces
the best frame rates? If all in all they
are equal then glLookAt would be the easiest
to manipulate.

Thanks again,
.Aman.
Its better to be silent and thought a foolthen to speak and remove all doubt.
what I would do (and did) was make a c++ camera class. have two vectors in the class that would store the camera position and the point that your tracking (possibly the position of the main character, or object) and every time you draw a frame call the SetCameraPosition() function and have it use the glLookat.
-Pac "The thing I like about friends in my classes is that they can't access my private members directly." "When listening to some one tell about their problem (whether it's code or not), don't listen to what went right or wrong, but what they assumed....."
>>Let me ask this then...which produces
the best frame rates? If all in all they
are equal then glLookAt would be the easiest
to manipulate.<<

it doesnt matter they all take less than 0.000001 fps to do.
and since youre only doing this once per frame speed isn''t important.
if u were doing this once per vertex or triangle thats a different story.
choose solely on what u feel most comfortable with

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement