projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
781fb93
)
space bar to toggle animation
author
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 28 Aug 2003 03:07:49 +0000
(
03:07
+0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 28 Aug 2003 03:07:49 +0000
(
03:07
+0000)
progs/demos/texcyl.c
patch
|
blob
|
history
diff --git
a/progs/demos/texcyl.c
b/progs/demos/texcyl.c
index 61c8d908b06b4b47f1aff081c41aa324f1eb8497..52f7da0af205b264d17c28bfceb112589f3580b9 100644
(file)
--- a/
progs/demos/texcyl.c
+++ b/
progs/demos/texcyl.c
@@
-115,6
+115,10
@@
static void ModeMenu(int entry)
{
if (entry==ANIMATE) {
Animate = !Animate;
+ if (Animate)
+ glutIdleFunc(Idle);
+ else
+ glutIdleFunc(NULL);
}
else if (entry==POINT_FILTER) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
@@
-139,6
+143,13
@@
static void Key( unsigned char key, int x, int y )
(void) x;
(void) y;
switch (key) {
+ case ' ':
+ Animate = !Animate;
+ if (Animate)
+ glutIdleFunc(Idle);
+ else
+ glutIdleFunc(NULL);
+ break;
case 27:
exit(0);
break;