Jump to content
  • Advertisement

Archived

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

Silence_sws

OpenGL Camera MOvement in Opengl (improving accuracy)

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

Hi I am trying to move the camera in open gl using the gluLookAt function. However this function takes parameters as doubles and so if I try to load in 2.334 as the x or y dimension to look at the number gets rounded to 2. this means my world does not rotate in the view as expected and it looks awful. Is there any other way of directing the view which could take a float as its parameters Thanks in advance You cannot see what does not want to be seen.

Share this post


Link to post
Share on other sites
Advertisement
Setup your own viewing matrix and translation vector.
Then feed those to GL the first thing you do during rendering (right after the glLoadIdentity()).

For more info find some tutorial on the basics of 3D graphics, and perspective projection in particular.

Share this post


Link to post
Share on other sites
quote:

However this function takes parameters as doubles and so if I try to load in 2.334 as the x or y dimension to look at the number gets rounded to 2.



Huh? Since when doubles are rounded? You''re confusing with integers, and gluLookAt doesn''t take integeres as parameters.

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!