Jump to content
  • Advertisement
Sign in to follow this  
sfx81

basic gluPrespective question

This topic is 3635 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. In gluPrespective, does direction of camera should change near and far clip ?. e.g as shown below if camera is looking down -z axis, near clip could be -0.01 and -10.f, but when I rotate the camera so that its looking down +z axis, then should I change mNearClip and mFarClip to +0.01, and +10.0f; gluPerspective (mFovH, mAspectRatio, mNearClip, mFarClip); gluLookAt(eyePos.x, eyePos.y, eyePos.z, dir.x, dir.y, dir.z, upvec.x, upvec.y, upvec.z); Any help will be appreciated. Regards

Share this post


Link to post
Share on other sites
Advertisement
Assume what you're saying is correct, what would be the values when looking down the Y-axis?

No, the values you pass are the distances from the viewpoint to the near and far clip planes.

Share this post


Link to post
Share on other sites
You should apply gluLookAt to your modelview matrix otherwise lighting will not look correct. Also, it effect glTexGen and other things.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!