added a proper idle() function
This commit is contained in:
+8
-1
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user