Stellarium 0.12.3
StelGLCompatibility.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2012 Ferdinand Majerech
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _STELGLCOMPATIBILITY_HPP_
21 #define _STELGLCOMPATIBILITY_HPP_
22 
23 
24 // Some glext definitions not available on every platforms.
25 // We do this to avoid needing to bundle our own glext.h
26 // (which would result in preprocessor redefinitions).
27 //
28 // If Qt provides these in the future, we can remove this
29 // (try doing that after we move to Qt 5.x!)
30 
31 #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
32  #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
33 #endif
34 
35 #ifndef GL_RGBA32F
36  #ifdef GL_RGBA32F_ARB
37  #define GL_RGBA32F GL_RGBA32F_ARB
38  #else
39  #define GL_RGBA32F 0x8814
40  #endif
41 #endif
42 
43 #ifndef GL_MULTISAMPLE
44  #ifdef GL_MULTISAMPLE_ARB
45  #define GL_MULTISAMPLE GL_MULTISAMPLE_ARB
46  #else
47  #define GL_MULTISAMPLE 0x809D
48  #endif
49 #endif
50 
51 #ifndef GL_MAX_TEXTURE_UNITS
52  #ifdef GL_MAX_TEXTURE_UNITS_ARB
53  #define GL_MAX_TEXTURE_UNITS GL_MAX_TEXTURE_UNITS_ARB
54  #else
55  #define GL_MAX_TEXTURE_UNITS 0x84E2
56  #endif
57 #endif
58 
59 #ifndef GL_CLAMP_TO_EDGE
60  #define GL_CLAMP_TO_EDGE 0x812F
61 #endif
62 
63 #endif // _STELGLCOMPATIBILITY_HPP_