我在矩形多边形上绘制纹理时遇到问题。
这是我当前的代码。
texture.bind();
GL11.glBegin(GL11.GL_QUADS);
GL11.glColor3d(255, 255, 255);
//Top
GL11.glTexCoord2f(0,0); GL11.glVertex3f(x1, y1, z1);
GL11.glTexCoord2f(0,1); GL11.glVertex3f(x1+width, y1, z1);
GL11.glTexCoord2f(1,1); GL11.glVertex3f(x1+width, y1, z1+length);
GL11.glTexCoord2f(1,0); GL11.glVertex3f(x1, y1, z1+length);
GL11.glTexCoord3f(1, 1, 1);
//Bottom
GL11.glTexCoord2f(0,0); GL11.glVertex3f(x1, y1+height, z1);
GL11.glTexCoord2f(0,1); GL11.glVertex3f(x1+width, y1+height, z1);
GL11.glTexCoord2f(1,1); GL11.glVertex3f(x1+width, y1+height, z1+length);
GL11.glTexCoord2f(1,0); GL11.glVertex3f(x1, y1+height, z1+length);
//Front
GL11.glTexCoord2f(0,0); GL11.glVertex3f(x1, y1, z1);
GL11.glTexCoord2f(0,1); GL11.glVertex3f(x1+width, y1, z1);
GL11.glTexCoord2f(1,1); GL11.glVertex3f(x1+width, y1+height, z1);
GL11.glTexCoord2f(1,0); GL11.glVertex3f(x1, y1+height, z1);
//Back
GL11.glTexCoord2f(0,0); GL11.glVertex3f(x1, y1, z1+length);
GL11.glTexCoord2f(0,1); GL11.glVertex3f(x1+width, y1, z1+length);
GL11.glTexCoord2f(1,1); GL11.glVertex3f(x1+width, y1+height, z1+length);
GL11.glTexCoord2f(1,0); GL11.glVertex3f(x1, y1+height, z1+length);
//Left side
GL11.glTexCoord2f(0,0); GL11.glVertex3f(x1, y1, z1);
GL11.glTexCoord2f(0,1); GL11.glVertex3f(x1, y1, z1+length);
GL11.glTexCoord2f(1,1); GL11.glVertex3f(x1, y1+height, z1+length);
GL11.glTexCoord2f(1,0); GL11.glVertex3f(x1, y1+height, z1);
//Right side
GL11.glTexCoord2f(0,0); GL11.glVertex3f(x1+width, y1, z1);
GL11.glTexCoord2f(0,1); GL11.glVertex3f(x1+width, y1, z1+length);
GL11.glTexCoord2f(1,1); GL11.glVertex3f(x1+width, y1+height, z1+length);
GL11.glTexCoord2f(1,0); GL11.glVertex3f(x1+width, y1+height, z1);
GL11.glEnd();
它似乎并没有画出来,只是在街区周围有一个很薄的东西。有谁知道我将如何解决这个问题?