summaryrefslogtreecommitdiffstats
path: root/src/glut/glx/glut_swap.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_swap.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_swap.c')
-rw-r--r--src/glut/glx/glut_swap.c4
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,