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 52ea868..100df81 100644 (file)
@@ -494,6 +494,13 @@ drawfire(void)
 
 
 static void
+idle(void)
+{
+   glutPostRedisplay();
+}
+
+
+static void
 special(int key, int x, int y)
 {
    switch (key) {
@@ -720,7 +727,7 @@ main(int ac, char **av)
    glutKeyboardFunc(key);
    glutSpecialFunc(special);
    glutDisplayFunc(drawfire);
-   glutIdleFunc(drawfire);
+   glutIdleFunc(idle);
    glutReshapeFunc(reshape);
    glutMainLoop();