PDA

View Full Version : Perspective problem



06-20-2003, 11:54 AM
Another beginner question here http://www.opengl.org/discussion_boards/ubb/smile.gif
I have a problem with the near clipping. I suspect that this problem has a correpond with perspective calculation. I usually calculate the perspective viewing on a resize function like this:
gluPerspective( 45.0, width/height, 1.0, 1000.0);
The problem is that the near clipping plane seems to be in front of the viewer, so, I can't get the objects a closer look, like i can get in the games.
Sorry if you confused with my English.
Thanks! (^_^)

Bob
06-20-2003, 03:38 PM
If the near clip plane is too far away, why don't you move it closer?

zeckensack
06-20-2003, 04:52 PM
Originally posted by anezch_x:
The problem is that the near clipping plane seems to be in front of the viewer, so, I can't get the objects a closer look, like i can get in the games.IMO your near plane distance is fine. Pulling it in will eventually create nasty z buffering problems.

If you want a genuine 'zoom' function like in Quake 3 (just one game ... http://www.opengl.org/discussion_boards/ubb/biggrin.gif), that's done by narrowing the fov. Ie, instead of 45 degrees, you go down to 12.5 degrees. For a smooth transition this must be animated, of course.