wikaman1
03-20-2012, 02:51 PM
Hi, I'm trying to create a skybox with a cube and depth testing. I'm getting a visual glitch that you can see in this picture http://s7.postimage.org/t4ct0rfwr/glitch.jpg
as you can see not all the skybox is drawn, just the part you're looking at directly, a section is cut off (this undrawn section moves when you turn)
this is my code:
glPushMatrix();
glDisable(GL_DEPTH_TEST);
glTranslatef(cam.fOrigin.x, cam.fOrigin.y, cam.fOrigin.z);
Draw_CUBE();
glPopMatrix();
glEnable(GL_DEPTH_TEST);
any ideas?
as you can see not all the skybox is drawn, just the part you're looking at directly, a section is cut off (this undrawn section moves when you turn)
this is my code:
glPushMatrix();
glDisable(GL_DEPTH_TEST);
glTranslatef(cam.fOrigin.x, cam.fOrigin.y, cam.fOrigin.z);
Draw_CUBE();
glPopMatrix();
glEnable(GL_DEPTH_TEST);
any ideas?