summaryrefslogtreecommitdiff
path: root/progs/glsl/trirast.c
diff options
context:
space:
mode:
authorjoukj <joukj@tarantella.(none)>2007-11-30 11:12:41 +0100
committerjoukj <joukj@tarantella.(none)>2007-11-30 11:12:41 +0100
commit86f3135fbd9db9ca08a6c0bfc620345c8a8e3f04 (patch)
tree586dca229d09fb523554dd07ad39c9bf422ab927 /progs/glsl/trirast.c
parentd1414da8f9dbf3c27cf05509be51e8c70ed1185d (diff)
parentd2540e6d4bdcfcda195f6dcf43f75b810001c227 (diff)
Merge branch 'master' of git+ssh://joukj@git.freedesktop.org/git/mesa/mesa
Diffstat (limited to 'progs/glsl/trirast.c')
-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);