diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-12-08 15:42:54 -0700 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-11 20:05:23 +0100 |
commit | dd5f3ac5040a64578d69a9532f7491253d8364b6 (patch) | |
tree | d7defecf6723dffaf42567e5ad1bfe2270727ecf /src/glut/glx/glut_swap.c | |
parent | 61e9e50309a3fdf3e553080d9d9584a1ddf73dae (diff) | |
download | glut-dd5f3ac5040a64578d69a9532f7491253d8364b6.tar.gz |
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 4831b8e..07a2da8 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, |