   opengl heightmap z buffer issue
  Hi,I have a heightmap terrain generator. The camera is at (0, 0, 3). If the camera is facing straight to the negative Z-axis direction, z buffer works fine. If I rotate the terrain or the camera around so that the camera is now facing other direction (like 3, 0, 1), I will see the terrain blend in front of one another or polygon will bleed through one another (right terminology here?).  Same things goes with rotating the terrain, it will also mess up the z buffer. Any ideas?   
  have u turned on depthtest, something likeglEnable( GL_DEPTH_TEST );glDepthFunc( GL_LEQUAL );glDepthWrite(GL_TRUE );   ;  Yes, I have tried them and enabled z buffer.   ;  Could you post us a couple of screenshots? We might be able to help you better if we can see it ourselves.   ;  Ok, here is when the camera is looking straight at negative z-axis direction. Everything is fine.This is when I rotate the camera, notice the missing edge on mountain hills.;  Not entirely sure. But it looks like some of the polygon's are being culled.Are you sure that the order your draw each vertex is Anti-Clockwise for each polygon?   ;  um...probably not. I migrate from DirectX, so far most codes I just directly convert it into OpenGL. Is there like a function to change the culling direction?   ;  Yeah, glCullFace() if I recall the name correctly, but I think you should just make sure that the polygons have the proper winding instead of changing the culling depending on the polygon (or disabling culling).   ;  Firstly though, tryglDisable(GL_CULL_FACE);If this solves the problem then you know that your polygon windings are incorrect.   ;  I tried to add glDisable(GL_CULL_FACE); but the problem still persists.Thank you guys for your helps so far btw :)   