From: Brian Date: Fri, 16 Nov 2007 22:18:30 +0000 (-0700) Subject: added z/s keys to reset/step rotation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8211b200268888e3d853ab24a5e4ebabd713d2e8;p=mesa.git added z/s keys to reset/step rotation --- 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);