]> git.mxchange.org Git - simgear.git/blob - simgear/screen/screen-dump.hxx
Comment out GLX code for MacOS and (hopefully) add some MacOS AGL compattible code...
[simgear.git] / simgear / screen / screen-dump.hxx
1 /**
2  * \file screen-dump.hxx
3  * Dump a copy of the opengl screen buffer to a file.
4  */
5
6 // Contributed by Richard Kaszeta <bofh@me.umn.edu>, started October 1999.
7 //
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.
12 //
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.
17 //
18 // You should have received a copy of the GNU Library General Public
19 // License along with this library; if not, write to the
20 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 // Boston, MA  02111-1307, USA.
22 //
23 // $Id$
24
25 #include <simgear/compiler.h>
26
27 #include SG_GL_H
28
29 /**
30  * Dump the screen buffer to a ppm file.
31  * @param filename name of file
32  * @param win_width width of our opengl window
33  * @param win_height height of our opengl window
34  */
35 bool sg_glDumpWindow( const char *filename, int win_width, int win_height );
36
37
38 /**
39  * Given a GLubyte *buffer, write it out to a ppm file.
40  * @param filename name of file
41  * @param buffer pointer to opengl buffer
42  * @param win_width width of buffer
43  * @param win_height height of buffer
44  * @param mode one of GL_RGBA, GL_RGB, etc.
45  */
46 bool sg_glWritePPMFile( const char *filename, GLubyte *buffer, int win_width, 
47                         int win_height, int mode);