我正在尝试使用 slick util 在屏幕中央显示徽标。
texture.bind();
glBegin(GL11.GL_QUADS);
glTexCoord2f(0, 0);
glVertex2f(x, y);
glTexCoord2f(1, 0);
glVertex2f(x + texture.getTextureWidth(), y);
glTexCoord2f(1, 1);
glVertex2f(x + texture.getTextureWidth(), y + texture.getTextureHeight());
glTexCoord2f(0, 1);
glVertex2f(x, y + texture.getTextureHeight());
glEnd();
但是当它渲染时,纹理没有居中,并且在右侧绘制了一条随机线。我不知道为什么。谢谢。