PDA

View Full Version : Depth Test not getting enabled



jojo555
03-19-2004, 02:41 AM
Hi.
In my application, i have enabled the depth test using
glEnable(),as:

glutInitDisplayMode(GLUT_DEPTH | GLUT_RGB | GLUT_DOUBLE);
glEnable(GL_DEPTH_TEST);

Right after that, i check whether it is enabled :

if(glIsEnabled(GL_DEPTH_TEST) == GL_TRUE)
printf("Depth Enabled");

But it is not getting enabled, and i am not getting an output.
Can someone explain to me what the problem is?
Thanks.

Sumpfratte
03-19-2004, 02:54 AM
i had the same problems and after several testings i found out, that i forgot the call "glutCreateWindow"

try this :

glutInit();

glutInitDisplayMode(GLUT_DEPTH | GLUT_RGB | GLUT_DOUBLE);

glutCreateWindow("");

glEnable(GL_DEPTH_TEST);

jojo555
03-19-2004, 05:19 AM
Thanks! Problem solved!!