added a proper idle() function
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 21 Oct 2000 04:29:02 +0000 (04:29 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 21 Oct 2000 04:29:02 +0000 (04:29 +0000)
progs/demos/fire.c

index 52ea8683021e9960933a1e83c25f93a030cb7515..100df8156514135b7a58dd57c79f1d63d50c279e 100644 (file)
@@ -493,6 +493,13 @@ drawfire(void)
 }
 
 
+static void
+idle(void)
+{
+   glutPostRedisplay();
+}
+
+
 static void
 special(int key, int x, int y)
 {
@@ -720,7 +727,7 @@ main(int ac, char **av)
    glutKeyboardFunc(key);
    glutSpecialFunc(special);
    glutDisplayFunc(drawfire);
-   glutIdleFunc(drawfire);
+   glutIdleFunc(idle);
    glutReshapeFunc(reshape);
    glutMainLoop();