-1
큐브를 만들기 위해 x, y, z, sizeX, sizeY, sizeZ 값을 꼭지점에 넣는 방법은 무엇입니까?OpenGL에서 큐브를 만드는 방법
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();
}
감사합니다.