title: Multiple objects in GLUT
body: <p>I want to multiply an object(cube) to a certain number, in this case let's say 25, and I do have the code for one cube, and it works, but I can't figure out how to make more. I am a new-comer to GLUT.</p>
  
  <pre><code>#include &lt;GL/gl.h&gt;
  #include &lt;GL/glut.h&gt;
  #include &lt;stdlib.h&gt;
  
  void initGL(int width, int height)
  {
  
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,2.0f, 100.0f);
   glMatrixMode(GL_MODELVIEW);
  }
  static void display(void)
  {
  
  glLoadIdentity();
  glPushMatrix();
      glTranslatef(0.0,0.0,-10);
      glRotatef(60,1,0,0);
      glRotatef(60,0,1,0);
      glutSolidCube(2);
  glPopMatrix();
  
  glFlush();
  }
  
  static void idle(void)
  {
  glutPostRedisplay();
  }
  
  int main(int argc, char *argv[])
  {
  
  int width = 640;
  int height = 480;
  
  glutInit(&amp;argc, argv);
  glutInitWindowSize(width, height);
  glutInitWindowPosition(10,10);
  glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
  
  glutCreateWindow("GLUT cube");
  
  glutDisplayFunc(display);
  glutIdleFunc(idle);
  
  initGL(width, height);
  
  glutMainLoop();
  
  return EXIT_SUCCESS;
  
  }
  </code></pre>
  
  <p>And if there is a more detailed guide on how to, I'd be more than thankful if you share.</p>