2 * \file screen-dump.hxx
3 * Dump a copy of the opengl screen buffer to a file.
6 // Contributed by Richard Kaszeta <bofh@me.umn.edu>, started October 1999.
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Library General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Library General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #ifndef SG_SCREEN_DUMP_HXX
25 #define SG_SCREEN_DUMP_HXX
27 #include <simgear/compiler.h>
32 * Dump the screen buffer to a PNG file.
33 * @param filename name of file
34 * @param win_width width of our opengl window
35 * @param win_height height of our opengl window
37 bool sg_glDumpWindow( const char *filename, int win_width, int win_height );
41 * Given a GLubyte *buffer, write it out to a ppm file.
42 * @param filename name of file
43 * @param buffer pointer to opengl buffer
44 * @param win_width width of buffer
45 * @param win_height height of buffer
46 * @param mode one of GL_RGBA, GL_RGB, etc.
48 bool sg_glWritePPMFile( const char *filename, GLubyte *buffer, int win_width,
49 int win_height, int mode);
51 #endif // of SG_SCREEN_DUMP_HXX