Original Post
Where is my logic wrong? near plane = -2 far plane = 2 clear depth = farthest away = 2 Now I want quads with smaller z values to appear in front, so i choose GL_LESS. ""Passes if the incoming z value is less than the stored z value."" But the quad at z=1 appears in front of the quad with z=0!
glClearDepth( 2.0f );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( -15.0f, 115.0f, 0.0f, 100.0f, -2.0f, 2.0f );
glEnable( GL_DEPTH_TEST );
glDepthFunc( GL_LEQUAL );