From dd5f3ac5040a64578d69a9532f7491253d8364b6 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_swap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/glut/glx/glut_swap.c') 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, -- cgit v1.2.1