Jump to content
  • Advertisement

Archived

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

Aman

glLookAt or trasnlate/rotate view/model?

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

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.

Share this post


Link to post
Share on other sites
Advertisement
they all basically achieve the same thing thus choose the one u feel most comfortable with

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
>>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

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!