Advertisement

strange perspective effects

Started by February 05, 2003 08:45 AM
3 comments, last by bacco 22 years ago
when I move an object far away in the screen, its borders became dentate... like this: http://www.arconews.it/terminal/other/dist.jpg perspective is set to nicest (or at least I think the line "glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);" means this) since this isn''t really good looking, is there any way to fix it? O_o
You mean the teeth ? Depth buffer problem ;-)
The depth value is computed acording to near and far plane.
Also the size of the object does metter.
And the number of bits you use for the depth buffer.
If you are using 16b depth buffer, you can try 24b and this
error will propably disapear. However you''d better play with
near and far planes.
Advertisement
mm, what is the function to do this? O_o
void gluPerspective(
GLdouble fovy,
GLdouble aspect,
GLdouble zNear,
GLdouble zFar
);

change zNear, zFar

the depth bits are set in the PIXELFORMATDESCRIPTOR, where you''re creating your window
if I use this before declaring lights, everything is black. cool :D
well, thank you

[edited by - bacco on February 5, 2003 11:44:53 AM]

This topic is closed to new replies.

Advertisement