summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-11-28 16:19:10 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2008-11-28 16:19:10 +0000
commitc4c86bbd16688ee4a0afb32efa27ba52abceb1ca (patch)
tree6b16fae74e49122a86ecf18b4a427b80d5a8e812 /progs
parent5b714723895d321db753f896576de5e2c27778c3 (diff)
parentc303e7299b5f95d4728c3710c56f50b1fefca09d (diff)
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'progs')
-rw-r--r--progs/demos/fbo_firecube.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/progs/demos/fbo_firecube.c b/progs/demos/fbo_firecube.c
index ed87dd133c..f5ee82a2f1 100644
--- a/progs/demos/fbo_firecube.c
+++ b/progs/demos/fbo_firecube.c
@@ -154,6 +154,7 @@ static GLuint TexObj;
static GLuint MyFB;
static GLuint DepthRB;
static GLboolean WireFrame = GL_FALSE;
+static GLboolean Anim = GL_TRUE;
static GLint texType = 0;
static GLint T0 = 0;
@@ -163,6 +164,11 @@ static GLint Win = 0;
static GLfloat ViewRotX = 20.0, ViewRotY = 30.0, ViewRotZ = 0.0;
static GLfloat CubeRot = 0.0;
+
+static void
+idle(void);
+
+
static void
CheckError(int line)
{
@@ -561,7 +567,7 @@ drawfire(void)
printstring(GLUT_BITMAP_HELVETICA_18, texNames[texType]);
glColor3f(1.0, 0.0, 0.0);
glRasterPos2i(10, 470);
- printstring(GLUT_BITMAP_HELVETICA_10,
+ printstring(GLUT_BITMAP_HELVETICA_10,
"Fire V1.5 Written by David Bucciarelli (tech.hmw@plus.it)");
if (help)
@@ -605,7 +611,10 @@ key(unsigned char key, int x, int y)
cleanup();
exit(0);
break;
-
+ case ' ':
+ Anim = !Anim;
+ glutIdleFunc(Anim ? idle : NULL);
+ break;
case 'a':
v += 0.0005;
break;
@@ -1013,7 +1022,7 @@ static void
visible(int vis)
{
if (vis == GLUT_VISIBLE)
- glutIdleFunc(idle);
+ glutIdleFunc(Anim ? idle : NULL);
else
glutIdleFunc(NULL);
}