projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb69fe5
)
added z/s keys to reset/step rotation
author
Brian
<brian.paul@tungstengraphics.com>
Fri, 16 Nov 2007 22:18:30 +0000
(15:18 -0700)
committer
Brian
<brian.paul@tungstengraphics.com>
Fri, 16 Nov 2007 22:19:05 +0000
(15:19 -0700)
progs/glsl/trirast.c
patch
|
blob
|
history
diff --git
a/progs/glsl/trirast.c
b/progs/glsl/trirast.c
index e4325deb1f3f6dbbe00d34fde76c5d2b32cc7fad..2842755447e5da00a4665eea84260c516261f8f7 100644
(file)
--- 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);