View Full Version : Image disappearing with depth

03-15-2002, 03:26 AM
I went to this link http://www.codeguru.com/opengl/oglwrapperclass.shtml
and downloaded the demo project. I then went to the function OnDrawGL() which is a member of the class CTestGLView. Right after the command glPushMatrix(); I added the command glTranslatef(0, 0, -6); to make my image appear farther into the screen. I noticed now that when I run the program, and rotate the image by dragging with the mouse, some of the image disappears when it goes beyond a certain depth. Why does that happen, and how can I stop it?

Andrea Rossini
03-15-2002, 03:50 AM
Maybe your Far clipping plane is not so "far".
You can set the view distance with:

void gluPerspective(
GLdouble fovy,
GLdouble aspect,
GLdouble zNear,
GLdouble zFar

where zFar and zNear set the distance from the viewer of the clipplanes.

Get more info on msdn or another guide.