projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8a804d
)
Update the glut idle function after a new window is created
author
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 25 Aug 2005 17:46:04 +0000
(17:46 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 25 Aug 2005 17:46:04 +0000
(17:46 +0000)
progs/demos/reflect.c
patch
|
blob
|
history
diff --git
a/progs/demos/reflect.c
b/progs/demos/reflect.c
index
9a41a86
..
8929304
100644
(file)
--- a/
progs/demos/reflect.c
+++ b/
progs/demos/reflect.c
@@
-410,6
+410,15
@@
Idle(void)
static void
+UpdateIdleFunc(void)
+{
+ if (AnyAnimating())
+ glutIdleFunc(Idle);
+ else
+ glutIdleFunc(NULL);
+}
+
+static void
Key(unsigned char key, int x, int y)
{
struct window *w = CurrentWindow();
@@
-436,14
+445,12
@@
Key(unsigned char key, int x, int y)
case ' ':
w->anim = !w->anim;
w->t0 = -1;
- if (AnyAnimating())
- glutIdleFunc(Idle);
- else
- glutIdleFunc(NULL);
+ UpdateIdleFunc();
glutPostRedisplay();
break;
case 'n':
CreateWindow();
+ UpdateIdleFunc();
break;
case 'k':
KillWindow(w);