title: Display glutDisplayFunc function in loop
body: <p>I want to call the glutDisplayFunc function again in loop but it's error. How to solve this problem?</p>
  
  <pre><code>    glutInit(&amp;argc, argv);
      glutInitDisplayMode(GLUT_RGB);
      glutInitWindowSize(1000, 1000);
      glutInitWindowPosition(0, 0);
      glutCreateWindow("simple");
      for (int m = 0; m &lt;= l; m++) {
          cout &lt;&lt; "Please enter a stage: ";
          cin &gt;&gt; num;
          glutDisplayFunc(display);
      }
      initializeGL();
      glutMainLoop();
  </code></pre>