HI,
The following code with TAO framework for OpenGL with VB.NET works well and draws a triangle:
Gl.glLoadIdentity()
Gl.glTranslatef(0, 0, 0)
Gl.glBegin(Gl.GL_TRIANGLES)
Gl.glVertex3f(0.2, 0.2, 1)
Gl.glVertex3f(0.7, 0.7, 1)
Gl.glVertex3f(0.8, 0, 1)
Gl.glEnd()
But when changing the z component of the gltranslatef function even by 0.1, nothing is drawn!
The following code draws nothing:
Gl.glLoadIdentity()
Gl.glTranslatef(0, 0, 0.1)
Gl.glBegin(Gl.GL_TRIANGLES)
Gl.glVertex3f(0.2, 0.2, 1)
Gl.glVertex3f(0.7, 0.7, 1)
Gl.glVertex3f(0.8, 0, 1)
Gl.glEnd()
I want to change the z component of the gltranslatef in order to move forward or backward.
gltranslatef works good with x and y axes; the problem is only with the z-axis.
Thanks to any help.