for (int i = 0; i < 5; i++)
{
glTranslatef(0.0f, 0.0f, 5.0f);
glRotatef(rotation, 5.0f, 0.0f, 0.0f);
glBegin(GL_POLYGON); //Starts to draw a polygon
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
cube->Draw();
glEnd(); //Ends the polygon draw
glPopMatrix();
}
有没有一种方法可以让GLTranslatef在每次绘制新的立方体时随机化多维数据集的位置?