I've enabled gl_depth_test, gl_cull_face, disabled blending, and when i try to display few objects placed one after another i have no depth testing at all. Here is the screenshot :

Why? Here is my code :
Code: Select all
glEnable(GL_LIGHTING);
	glEnable(GL_DEPTH_TEST);
	glEnable(GL_CULL_FACE);
	glShadeModel(GL_FLAT);	
	glColor4f(1,1,1,1);
	glDepthFunc(GL_LESS);
	glDisable(GL_BLEND);
	glBindTexture(GL_TEXTURE_2D,mojetekstury[4]);	
	
	glPushMatrix();		
		glRotatef(ile,0,0,1);
		glColor4f(1,1,1,1);		
		glPushMatrix();
			glTranslatef(0,2,0);
			glRotatef(-ile*4,1,0,0);	
			for (float a=0;a<10;a++)
			{
			glPushMatrix();				
				glRotatef(360.0 * float(a) / 10.f,1,0,0);	
				glTranslatef(0,2,0);
				Tube01();
			glPopMatrix();
			}
		glPopMatrix();
	glPopMatrix();	
Can anyone knows why i dont have eny depth testing?
/lar
