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();
}
Is there a way that i can get the GLTranslatef to randomise the location of the cube each time a new one is drawn?