PDA

View Full Version : problems with depth



sigfriedmcwild
08-20-2003, 07:28 AM
I just started learning OpenGL. Made a simple test program where I render a cube (by drawing 6 quadrilaterals) with each face of a different colour. The problem is that the quads are drawn on the screen in the order they are drawn so the newer faces are drawn above the older ones even if their vertices are behind.
How do I solve this?

PanzerSchreck
08-20-2003, 07:33 AM
glEnable(GL_DEPTH_TEST);

sigfriedmcwild
08-20-2003, 07:44 AM
thanks