   Help objects in openGL dissapear on rotation of camera
  We have been trying to fix a problem with our program with no success in hoping that you could enlighten us with the solution.Our main problem is that certain portions of objects in my file disappear at certain angles when we move around the object left and right. We initially thought that it was due to the fact that the depth buffer was never cleared but ended up adding it twice to be sure of it and still dissapearance was happening along the objects.Here is where the display function gets called everytime all my objects are beeing displayed:// This is the callback procedure for capturing OpenGL Display eventsvoid displayCallbackProc (void){glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glColor3f(1.0, 1.0, 1.0);glMatrixMode(GL_MODELVIEW);glLoadIdentity();glClear (GL_DEPTH_BUFFER_BIT);// Sets the camera position as captured by the polar coordinatesviewer[0] = rad_camera * sin(phi_camera) * sin(theta_camera);viewer[1] = rad_camera * cos(phi_camera);viewer[2] = rad_camera * sin(phi_camera) * cos(theta_camera);gluLookAt(viewer[0], viewer[1], viewer[2], center[0], center[1], center[2], up[0], up[1], up[2]);..........If anyone can figure it out that simply or would be able to help out if i send out the complete code (not that big) through a private msg, it would be really appreciated.   
  How are you setting up the projection matrix?   ;  the normal c++ trig functions use radians.  OpenGL uses degrees, so you have to convert from degrees to rads.  I've had the same thing happen to me; this mighht be your problem.   ;Quote:Original post by Anonymous Posterthe normal c++ trig functions use radians.  OpenGL uses degrees, so you have to convert from degrees to rads.  I've had the same thing happen to me; this mighht be your problem.He's using the C++ trig functions.   ;  I suspect the problem may be your up vector becoming parallel to the viewing direction.  Try printing out up and center - viewer (as vectors) to check.Enigma   ;  I would also suggest checking the size of your depth range, i.e. your near and far values.  I was just thinking that a long object rotated could cause portions of it to move out of range of the far/near settings if they are small.   ;I suspect the problem may be your up vector becoming parallel to the viewing direction. Try printing out up and center - viewer (as vectors) to check.EnigmaI print out my center and up vector positions and i get the following for each value:center[0]: 0.000000center[1]: 0.000000center[2]: 0.000000up[0]: 0.00000up[1]: 1.00000up[2]: 0.00000Every left and right movement gives me those values... I am kind of lost trying to see what is wrong...;Quote:Original post by eSCHEnI would also suggest checking the size of your depth range, i.e. your near and far values.  I was just thinking that a long object rotated could cause portions of it to move out of range of the far/near settings if they are small.I tried changing the values of Near and Far but with no success:#define NEAR_Z 1.0#define FAR_Z 100.0   