aboutsummaryrefslogtreecommitdiffstats
path: root/src/glut/glx/glut_init.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-12-08 15:42:54 -0700
committerBrian Paul <[email protected]>2008-12-15 18:19:05 -0700
commit12219210af0bd2ec888c1cbcb3621237368fe4e8 (patch)
treee08401821db8daf4ac4a0e332f4ebfdb7479b4eb /src/glut/glx/glut_init.c
parentdc58da3e063d2a4018eea9149b43a3656a93a7ca (diff)
glut: added GLUT_PPM_FILE env var to dump first frame to a PPM file
Set GLUT_PPM_FILE to the desired filename. The first frame rendered will be written to that file.
Diffstat (limited to 'src/glut/glx/glut_init.c')
-rw-r--r--src/glut/glx/glut_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glut/glx/glut_init.c b/src/glut/glx/glut_init.c
index b1a42a328dc..78843e93bc2 100644
--- a/src/glut/glx/glut_init.c
+++ b/src/glut/glx/glut_init.c
@@ -51,6 +51,7 @@ int __glutInitX = -1, __glutInitY = -1;
GLboolean __glutForceDirect = GL_FALSE,
__glutTryDirect = GL_TRUE;
Atom __glutWMDeleteWindow;
+char *__glutPPMFile = NULL;
/* *INDENT-ON* */
#ifdef _WIN32
@@ -341,6 +342,9 @@ glutInit(int *argcp, char **argv)
__glutFPS = 5000; /* 5000 milliseconds */
}
}
+
+ /* check if GLUT_PPM_FILE env var is set */
+ __glutPPMFile = getenv("GLUT_PPM_FILE");
}
#ifdef _WIN32