From 5295f9a033e958e144ac3f47e6146842cd7dff9c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 8 Dec 2008 15:42:54 -0700 Subject: 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. --- src/glut/glx/glut_init.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/glut/glx/glut_init.c') diff --git a/src/glut/glx/glut_init.c b/src/glut/glx/glut_init.c index b1a42a328d..78843e93bc 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 -- cgit v1.2.3