hi,
i have a very basic problem . i'm trying to draw a simple 3d cube to the screen. however whenever i use the gluPerspective() there is no output; i have only drawn the one side at the moment but will add the others later
i am using the LWJGL but the code is all opengl
here is my init code
Code :glEnable(GL_DEPTH_TEST); /* Setup the view of the cube. */ glMatrixMode(GL_PROJECTION); gluPerspective(50, (float)WIDTH/(float)HEIGHT, 0, 100); glMatrixMode(GL_MODELVIEW);
and here is my loop code
Code :glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glLoadIdentity(); glColor3f(0f, 1f, 1f); glBegin(GL_QUADS); { glVertex3i(10, 10, z); glVertex3i(10+10, 10, z); glVertex3i(10+10, 10+10, z); glVertex3i(10, 10+10, z); } glEnd(); glFlush();
does anyone know where im going wrong?
-James





