I changed the near to .00001…etc.
I also moved the rotation to the XZ axis.
However, when I put gl_less it always puts the last object drawn behind the other objects even if it’s closer. Using Gl_greater I don’t see anything at all…same with gl_equal.
I’m putting the related code in here, maybe someone can spot what’s wrong.
It’s in VB
This is called first, everytime anything changes…
Public Sub Reshape(p As Object, cc As Single)
Dim W As GLfloat
Dim h As GLfloat
W = p.ScaleWidth
h = p.ScaleHeight
glViewport 0, 0, W, h
glMatrixMode GL_PROJECTION
glLoad
gluPerspective 45, W / h, 5,0.00000000001
glMatrixMode GL_MODELVIEW
glLoadIdentity
End Sub
glEnable (GL_CULL_FACE)
glFrontFace (GL_CCW)
psphere = gluNewQuadric()
gluQuadricDrawStyle psphere, GLU_FILL
gluQuadricNormals psphere, qnSmooth
gluQuadricTexture psphere, GLU_TRUE
glTexEnvi GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, tepModulate
glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR
glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR
glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT
glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT
glCullFace faceFront
glFrontFace ffCW
glDepthFunc GL_LESS
glClearDepth 1
glEnable GL_DEPTH_TEST
glShadeModel smSmooth
glEnable GL_NORMALIZE