应该如何将 x、y、z、sizeX、sizeY、sizeZ 值放在顶点上以制作立方体?
public static void cube(float x, float y, float z, float sx, float sy, float sz){
glPushMatrix();
{
glTranslatef(x, y, z);
//Just one side of the cube is given due to too much unnecessary code.
glBegin(GL_QUADS);
glVertex3f(-1, -1, 1);
glVertex3f(1, -1, 1);
glVertex3f(1, 1, 1);
glVertex3f(-1, 1, 1);
glEnd();
}
glPopMatrix();
}
谢谢。