2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 * You can alternatively redistribute this file and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
24 // workaround for some gl.h headers
27 #define GLAPIENTRY APIENTRY
28 #elif defined(CONFIG_GL_WIN32)
29 #define GLAPIENTRY __stdcall
36 * \defgroup glextdefines OpenGL extension defines
38 * conditionally define all extension defines used.
39 * vendor specific extensions should be marked as such
40 * (e.g. _NV), _ARB is not used to ease readability.
44 #define GL_TEXTURE_3D 0x806F
46 #ifndef GL_TEXTURE_WRAP_R
47 #define GL_TEXTURE_WRAP_R 0x8072
49 #ifndef GL_CLAMP_TO_EDGE
50 #define GL_CLAMP_TO_EDGE 0x812F
52 #ifndef GL_GENERATE_MIPMAP
53 #define GL_GENERATE_MIPMAP 0x8191
55 #ifndef GL_TEXT_FRAGMENT_SHADER_ATI
56 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
58 #ifndef GL_FRAGMENT_SHADER_ATI
59 #define GL_FRAGMENT_SHADER_ATI 0x8920
61 #ifndef GL_NUM_FRAGMENT_REGISTERS_ATI
62 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
65 #define GL_REG_0_ATI 0x8921
68 #define GL_REG_1_ATI 0x8922
71 #define GL_REG_2_ATI 0x8923
74 #define GL_CON_0_ATI 0x8941
77 #define GL_CON_1_ATI 0x8942
80 #define GL_CON_2_ATI 0x8943
83 #define GL_CON_3_ATI 0x8944
86 #define GL_ADD_ATI 0x8963
89 #define GL_MUL_ATI 0x8964
92 #define GL_MAD_ATI 0x8968
94 #ifndef GL_SWIZZLE_STR_ATI
95 #define GL_SWIZZLE_STR_ATI 0x8976
98 #define GL_4X_BIT_ATI 2
100 #ifndef GL_8X_BIT_ATI
101 #define GL_8X_BIT_ATI 4
103 #ifndef GL_BIAS_BIT_ATI
104 #define GL_BIAS_BIT_ATI 8
106 #ifndef GL_MAX_TEXTURE_UNITS
107 #define GL_MAX_TEXTURE_UNITS 0x84E2
110 #define GL_TEXTURE0 0x84C0
113 #define GL_TEXTURE1 0x84C1
116 #define GL_TEXTURE2 0x84C2
119 #define GL_TEXTURE3 0x84C3
121 #ifndef GL_TEXTURE_RECTANGLE
122 #define GL_TEXTURE_RECTANGLE 0x84F5
124 #ifndef GL_PIXEL_UNPACK_BUFFER
125 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
127 #ifndef GL_STREAM_DRAW
128 #define GL_STREAM_DRAW 0x88E0
130 #ifndef GL_DYNAMIC_DRAW
131 #define GL_DYNAMIC_DRAW 0x88E8
133 #ifndef GL_WRITE_ONLY
134 #define GL_WRITE_ONLY 0x88B9
137 #define GL_BGR 0x80E0
140 #define GL_BGRA 0x80E1
142 #ifndef GL_UNSIGNED_BYTE_3_3_2
143 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
145 #ifndef GL_UNSIGNED_BYTE_2_3_3_REV
146 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
148 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
149 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
151 #ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV
152 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
154 #ifndef GL_UNSIGNED_SHORT_5_6_5
155 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
157 #ifndef GL_UNSIGNED_INT_8_8_8_8
158 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
160 #ifndef GL_UNSIGNED_INT_8_8_8_8_REV
161 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
163 #ifndef GL_UNSIGNED_SHORT_5_6_5_REV
164 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
166 #ifndef GL_UNSIGNED_INT_10_10_10_2
167 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
169 #ifndef GL_UNSIGNED_INT_2_10_10_10_REV
170 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
172 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
173 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
175 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
176 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
178 #ifndef GL_UNSIGNED_SHORT_8_8
179 #define GL_UNSIGNED_SHORT_8_8 0x85BA
181 #ifndef GL_UNSIGNED_SHORT_8_8_REV
182 #define GL_UNSIGNED_SHORT_8_8_REV 0x85BB
184 #ifndef GL_YCBCR_MESA
185 #define GL_YCBCR_MESA 0x8757
188 #define GL_RGB32F 0x8815
190 #ifndef GL_FLOAT_RGB32_NV
191 #define GL_FLOAT_RGB32_NV 0x8889
193 #ifndef GL_LUMINANCE16
194 #define GL_LUMINANCE16 0x8042
197 #define GL_R16 0x822A
199 #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE
200 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
202 #ifndef GL_FRAGMENT_PROGRAM
203 #define GL_FRAGMENT_PROGRAM 0x8804
205 #ifndef GL_PROGRAM_FORMAT_ASCII
206 #define GL_PROGRAM_FORMAT_ASCII 0x8875
208 #ifndef GL_PROGRAM_ERROR_POSITION
209 #define GL_PROGRAM_ERROR_POSITION 0x864B
211 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
212 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
214 #ifndef GL_PROGRAM_ERROR_STRING
215 #define GL_PROGRAM_ERROR_STRING 0x8874
217 /** \} */ // end of glextdefines group
220 #if defined(CONFIG_GL_WIN32) && !defined(WGL_CONTEXT_MAJOR_VERSION_ARB)
221 /* these are supposed to be defined in wingdi.h but mingw's is too old */
222 /* only the bits actually used by mplayer are defined */
223 /* reference: http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt */
225 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
226 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
227 #define WGL_CONTEXT_FLAGS_ARB 0x2094
228 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
229 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
230 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001