Skip to main content
gamedev.net
🔒 Locked

basic gluPrespective question

Started by sfx81 1 reply 1.2k views
Original Post
sfx81
sfx81
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
Brother Bob
Brother Bob
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.
V-man
V-man
You should apply gluLookAt to your modelview matrix otherwise lighting will not look correct. Also, it effect glTexGen and other things.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.