diff options
Diffstat (limited to 'progs/glsl')
-rw-r--r-- | progs/glsl/trirast.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/progs/glsl/trirast.c b/progs/glsl/trirast.c index e4325deb1f..2842755447 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); |