summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-16 15:18:30 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-16 15:19:05 -0700
commit8211b200268888e3d853ab24a5e4ebabd713d2e8 (patch)
tree69bf6e95c04bf08ced9f2bf41e4e5657135004b3 /progs
parentfb69fe58a0a04779bbaebfa38f002c04a6bc9d85 (diff)
added z/s keys to reset/step rotation
Diffstat (limited to 'progs')
-rw-r--r--progs/glsl/trirast.c14
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);