Hey guys,
I’m having an issue where the 3 lines that I draw disapear as I rotate the scene. It’s a pretty simple model of 3 lines(think x-y-z axis), but sometimes I have all 3 show up and sometimes only 1, 2 or none show up. It all depends how I rotated it. The code bellow shows the code:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0, 1.0, 0.0001, 100000.0);
glMatrixMode(GL.GL_MODELVIEW);
glLoadIdentity();
glTranslatef(x, y, z);
glRotatef(rotx, 1.0f, 0.0f, 0.0f);
glRotatef(rotz, 0.0f, 0.0f, 1.0f);
glLineWidth(5.0f);
glColor3f(1,0,0);
glBegin(GL.GL_LINES);
glVertex3f(x1, y1, z1);
glVertex3f(x2, y1, z1);
glVertex3f(x1, y1, z1);
glVertex3f(x1, y2, z1);
glVertex3f(x1, y1, z1);
glVertex3f(x1, y1, z2);
gl.glEnd();
Can anyone see anything wrong with this?