diff options
author | Brian Paul <[email protected]> | 2008-12-08 15:42:54 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-12-09 10:23:14 -0700 |
commit | 5295f9a033e958e144ac3f47e6146842cd7dff9c (patch) | |
tree | b7bbfa74cb102ebcc43bcf4f951fb8eb5910c632 /src/glut/glx/glut_swap.c | |
parent | a0d5c3cfe6582f8294154f6877319193458158a2 (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_swap.c')
-rw-r--r-- | src/glut/glx/glut_swap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glut/glx/glut_swap.c b/src/glut/glx/glut_swap.c index 4831b8eb351..07a2da88a2c 100644 --- a/src/glut/glx/glut_swap.c +++ b/src/glut/glx/glut_swap.c @@ -18,6 +18,10 @@ glutSwapBuffers(void) { GLUTwindow *window = __glutCurrentWindow; + if (__glutPPMFile) { + __glutWritePPMFile(); + } + if (window->renderWin == window->win) { if (__glutCurrentWindow->treatAsSingle) { /* Pretend the double buffered window is single buffered, |