summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-08-10 15:36:31 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-08-10 15:36:31 +0000
commit16c8dce363c3fd3384eb47ebb3ca90ab0e737fd0 (patch)
tree63e457ed6bc2d4590bf801ef4bc02b6834644ed3 /progs
parent47a6749b33ab945018599dee96296668fa1a9813 (diff)
downloadexternal_mesa3d-16c8dce363c3fd3384eb47ebb3ca90ab0e737fd0.zip
external_mesa3d-16c8dce363c3fd3384eb47ebb3ca90ab0e737fd0.tar.gz
external_mesa3d-16c8dce363c3fd3384eb47ebb3ca90ab0e737fd0.tar.bz2
use 'a' to toggle animation
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/occlude.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/progs/demos/occlude.c b/progs/demos/occlude.c
index e264460..8f7b909 100644
--- a/progs/demos/occlude.c
+++ b/progs/demos/occlude.c
@@ -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;