when im using glortho, the depth check doesnt work.
Code: Select all
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, 640, 0, 480, -10, 10);
glMatrixMode(GL_MODELVIEW);
glEnable(GL_DEPTH_TEST);
glDepthFunk(GL_LESS);
glLoadIdentity();
i changed on to 30x30 and now its displayed behind the background.
if i use gluPerspective(...) Depth test is working fine.
do i have a mistake in my code or forgot somthing?
does anyone uses glortho in his code and its working there?
im using kos 2.0
i also used glortho with older Kos version i think 1.3 (around 15 years old)
in at this time it works