mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
use 'a' to toggle animation
This commit is contained in:
parent
47a6749b33
commit
16c8dce363
1 changed files with 8 additions and 0 deletions
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
|
||||
static GLfloat Xpos = 0;
|
||||
static GLboolean Anim = GL_TRUE;
|
||||
|
||||
|
||||
static void
|
||||
|
|
@ -171,6 +172,13 @@ static void Key( unsigned char key, int x, int y )
|
|||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case 'a':
|
||||
Anim = !Anim;
|
||||
if (Anim)
|
||||
glutIdleFunc( Idle );
|
||||
else
|
||||
glutIdleFunc( NULL );
|
||||
break;
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue