From 16c8dce363c3fd3384eb47ebb3ca90ab0e737fd0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 10 Aug 2004 15:36:31 +0000 Subject: [PATCH] use 'a' to toggle animation --- progs/demos/occlude.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/progs/demos/occlude.c b/progs/demos/occlude.c index e26446059b3..8f7b90984e0 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; -- 2.30.2