From 8211b200268888e3d853ab24a5e4ebabd713d2e8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 16 Nov 2007 15:18:30 -0700 Subject: added z/s keys to reset/step rotation --- progs/glsl/trirast.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/progs/glsl/trirast.c b/progs/glsl/trirast.c index e4325deb1f3..2842755447e 100644 --- a/progs/glsl/trirast.c +++ b/progs/glsl/trirast.c @@ -106,8 +106,12 @@ Redisplay(void) static void Idle(void) { - Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.0005; - glutPostRedisplay(); + if (anim) { + Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.0005; + glutPostRedisplay(); + } + else + abort(); } @@ -149,6 +153,12 @@ Key(unsigned char key, int x, int y) else glutIdleFunc(NULL); break; + case 'z': + Zrot = 0; + break; + case 's': + Zrot += 0.05; + break; case 27: CleanUp(); exit(0); -- cgit v1.2.3