added a proper idle() function
This commit is contained in:
parent
eb326f5f01
commit
e188b6e1f1
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue