diff options
author | Brian <[email protected]> | 2007-11-16 15:18:30 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-16 15:19:05 -0700 |
commit | 8211b200268888e3d853ab24a5e4ebabd713d2e8 (patch) | |
tree | 69bf6e95c04bf08ced9f2bf41e4e5657135004b3 /progs | |
parent | fb69fe58a0a04779bbaebfa38f002c04a6bc9d85 (diff) |
added z/s keys to reset/step rotation
Diffstat (limited to 'progs')
-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 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); |