LWJGL Forum

Programming => OpenGL => Topic started by: Trudko on February 08, 2007, 07:48:46

Title: What is this
Post by: Trudko on February 08, 2007, 07:48:46
Looak at this picture and looak at the cubes which are on right.
(http://www.asdfasdf.borec.cz/obrazok.jpg) Why are they so weird?
Btw obviously they are  3D model and I'am using perspective projecton to render it. Here is code:

GL11.glLoadIdentity();
GL11.glColor3f(1.0f,1.0f,1.0f);
GL11.glTranslatef(-34f,-24f,-70);
cubeRender();

CubeRender method:

GL11.glPushMatrix();
                float positionX = indexX*2.2f; [i]// Index are position of cube in txt file(Iam using tilemap)[/i]
           float positionY = indexY*2.2f;
GL11.glTranslatef(positionX,positionY,0f);
GL11.glRotatef(90,1,0,0);
GL11.glScalef(0.01f,0.01f,0.01f);
     
cubeTexture.bind();
           cubeModel.render();
GL11.glPopMatrix();
Title: Re: What is this
Post by: HopeDagger on February 08, 2007, 13:59:27
They look like they are overlapping eachother. Did you enable the depth buffer via glEnable(GL_DEPTH_TEST)?