Mercurial > mplayer.hg
comparison libvo/gl_compat.h @ 35886:4921bccc0968
Split out defines for compatibility between different GL headers.
This file will probably have to grow quite a bit to allow
compiling only against e.g. GLES headers.
author | reimar |
---|---|
date | Sat, 16 Mar 2013 14:32:59 +0000 |
parents | |
children | f464ea910bd2 |
comparison
equal
deleted
inserted
replaced
35885:3389262720da | 35886:4921bccc0968 |
---|---|
1 /* | |
2 * This file is part of MPlayer. | |
3 * | |
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. | |
8 * | |
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. | |
13 * | |
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. | |
17 * | |
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. | |
22 */ | |
23 | |
24 #ifndef MPLAYER_GL_COMPAT_H | |
25 #define MPLAYER_GL_COMPAT_H | |
26 | |
27 // workaround for some gl.h headers | |
28 #ifndef GLAPIENTRY | |
29 #ifdef APIENTRY | |
30 #define GLAPIENTRY APIENTRY | |
31 #elif defined(CONFIG_GL_WIN32) | |
32 #define GLAPIENTRY __stdcall | |
33 #else | |
34 #define GLAPIENTRY | |
35 #endif | |
36 #endif | |
37 | |
38 /** | |
39 * \defgroup glextdefines OpenGL extension defines | |
40 * | |
41 * conditionally define all extension defines used. | |
42 * vendor specific extensions should be marked as such | |
43 * (e.g. _NV), _ARB is not used to ease readability. | |
44 * \{ | |
45 */ | |
46 #ifndef GL_TEXTURE_3D | |
47 #define GL_TEXTURE_3D 0x806F | |
48 #endif | |
49 #ifndef GL_TEXTURE_WRAP_R | |
50 #define GL_TEXTURE_WRAP_R 0x8072 | |
51 #endif | |
52 #ifndef GL_CLAMP_TO_EDGE | |
53 #define GL_CLAMP_TO_EDGE 0x812F | |
54 #endif | |
55 #ifndef GL_GENERATE_MIPMAP | |
56 #define GL_GENERATE_MIPMAP 0x8191 | |
57 #endif | |
58 #ifndef GL_TEXT_FRAGMENT_SHADER_ATI | |
59 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 | |
60 #endif | |
61 #ifndef GL_REGISTER_COMBINERS_NV | |
62 #define GL_REGISTER_COMBINERS_NV 0x8522 | |
63 #endif | |
64 #ifndef GL_MAX_GENERAL_COMBINERS_NV | |
65 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D | |
66 #endif | |
67 #ifndef GL_NUM_GENERAL_COMBINERS_NV | |
68 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E | |
69 #endif | |
70 #ifndef GL_CONSTANT_COLOR0_NV | |
71 #define GL_CONSTANT_COLOR0_NV 0x852A | |
72 #endif | |
73 #ifndef GL_CONSTANT_COLOR1_NV | |
74 #define GL_CONSTANT_COLOR1_NV 0x852B | |
75 #endif | |
76 #ifndef GL_COMBINER0_NV | |
77 #define GL_COMBINER0_NV 0x8550 | |
78 #endif | |
79 #ifndef GL_COMBINER1_NV | |
80 #define GL_COMBINER1_NV 0x8551 | |
81 #endif | |
82 #ifndef GL_VARIABLE_A_NV | |
83 #define GL_VARIABLE_A_NV 0x8523 | |
84 #endif | |
85 #ifndef GL_VARIABLE_B_NV | |
86 #define GL_VARIABLE_B_NV 0x8524 | |
87 #endif | |
88 #ifndef GL_VARIABLE_C_NV | |
89 #define GL_VARIABLE_C_NV 0x8525 | |
90 #endif | |
91 #ifndef GL_VARIABLE_D_NV | |
92 #define GL_VARIABLE_D_NV 0x8526 | |
93 #endif | |
94 #ifndef GL_UNSIGNED_INVERT_NV | |
95 #define GL_UNSIGNED_INVERT_NV 0x8537 | |
96 #endif | |
97 #ifndef GL_HALF_BIAS_NORMAL_NV | |
98 #define GL_HALF_BIAS_NORMAL_NV 0x853A | |
99 #endif | |
100 #ifndef GL_SIGNED_IDENTITY_NV | |
101 #define GL_SIGNED_IDENTITY_NV 0x853C | |
102 #endif | |
103 #ifndef GL_SCALE_BY_FOUR_NV | |
104 #define GL_SCALE_BY_FOUR_NV 0x853F | |
105 #endif | |
106 #ifndef GL_DISCARD_NV | |
107 #define GL_DISCARD_NV 0x8530 | |
108 #endif | |
109 #ifndef GL_SPARE0_NV | |
110 #define GL_SPARE0_NV 0x852E | |
111 #endif | |
112 #ifndef GL_FRAGMENT_SHADER_ATI | |
113 #define GL_FRAGMENT_SHADER_ATI 0x8920 | |
114 #endif | |
115 #ifndef GL_NUM_FRAGMENT_REGISTERS_ATI | |
116 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E | |
117 #endif | |
118 #ifndef GL_REG_0_ATI | |
119 #define GL_REG_0_ATI 0x8921 | |
120 #endif | |
121 #ifndef GL_REG_1_ATI | |
122 #define GL_REG_1_ATI 0x8922 | |
123 #endif | |
124 #ifndef GL_REG_2_ATI | |
125 #define GL_REG_2_ATI 0x8923 | |
126 #endif | |
127 #ifndef GL_CON_0_ATI | |
128 #define GL_CON_0_ATI 0x8941 | |
129 #endif | |
130 #ifndef GL_CON_1_ATI | |
131 #define GL_CON_1_ATI 0x8942 | |
132 #endif | |
133 #ifndef GL_CON_2_ATI | |
134 #define GL_CON_2_ATI 0x8943 | |
135 #endif | |
136 #ifndef GL_CON_3_ATI | |
137 #define GL_CON_3_ATI 0x8944 | |
138 #endif | |
139 #ifndef GL_ADD_ATI | |
140 #define GL_ADD_ATI 0x8963 | |
141 #endif | |
142 #ifndef GL_MUL_ATI | |
143 #define GL_MUL_ATI 0x8964 | |
144 #endif | |
145 #ifndef GL_MAD_ATI | |
146 #define GL_MAD_ATI 0x8968 | |
147 #endif | |
148 #ifndef GL_SWIZZLE_STR_ATI | |
149 #define GL_SWIZZLE_STR_ATI 0x8976 | |
150 #endif | |
151 #ifndef GL_4X_BIT_ATI | |
152 #define GL_4X_BIT_ATI 2 | |
153 #endif | |
154 #ifndef GL_8X_BIT_ATI | |
155 #define GL_8X_BIT_ATI 4 | |
156 #endif | |
157 #ifndef GL_BIAS_BIT_ATI | |
158 #define GL_BIAS_BIT_ATI 8 | |
159 #endif | |
160 #ifndef GL_MAX_TEXTURE_UNITS | |
161 #define GL_MAX_TEXTURE_UNITS 0x84E2 | |
162 #endif | |
163 #ifndef GL_TEXTURE0 | |
164 #define GL_TEXTURE0 0x84C0 | |
165 #endif | |
166 #ifndef GL_TEXTURE1 | |
167 #define GL_TEXTURE1 0x84C1 | |
168 #endif | |
169 #ifndef GL_TEXTURE2 | |
170 #define GL_TEXTURE2 0x84C2 | |
171 #endif | |
172 #ifndef GL_TEXTURE3 | |
173 #define GL_TEXTURE3 0x84C3 | |
174 #endif | |
175 #ifndef GL_TEXTURE_RECTANGLE | |
176 #define GL_TEXTURE_RECTANGLE 0x84F5 | |
177 #endif | |
178 #ifndef GL_PIXEL_UNPACK_BUFFER | |
179 #define GL_PIXEL_UNPACK_BUFFER 0x88EC | |
180 #endif | |
181 #ifndef GL_STREAM_DRAW | |
182 #define GL_STREAM_DRAW 0x88E0 | |
183 #endif | |
184 #ifndef GL_DYNAMIC_DRAW | |
185 #define GL_DYNAMIC_DRAW 0x88E8 | |
186 #endif | |
187 #ifndef GL_WRITE_ONLY | |
188 #define GL_WRITE_ONLY 0x88B9 | |
189 #endif | |
190 #ifndef GL_BGR | |
191 #define GL_BGR 0x80E0 | |
192 #endif | |
193 #ifndef GL_BGRA | |
194 #define GL_BGRA 0x80E1 | |
195 #endif | |
196 #ifndef GL_UNSIGNED_BYTE_3_3_2 | |
197 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 | |
198 #endif | |
199 #ifndef GL_UNSIGNED_BYTE_2_3_3_REV | |
200 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 | |
201 #endif | |
202 #ifndef GL_UNSIGNED_SHORT_4_4_4_4 | |
203 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 | |
204 #endif | |
205 #ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV | |
206 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 | |
207 #endif | |
208 #ifndef GL_UNSIGNED_SHORT_5_6_5 | |
209 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 | |
210 #endif | |
211 #ifndef GL_UNSIGNED_INT_8_8_8_8 | |
212 #define GL_UNSIGNED_INT_8_8_8_8 0x8035 | |
213 #endif | |
214 #ifndef GL_UNSIGNED_INT_8_8_8_8_REV | |
215 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 | |
216 #endif | |
217 #ifndef GL_UNSIGNED_SHORT_5_6_5_REV | |
218 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 | |
219 #endif | |
220 #ifndef GL_UNSIGNED_INT_10_10_10_2 | |
221 #define GL_UNSIGNED_INT_10_10_10_2 0x8036 | |
222 #endif | |
223 #ifndef GL_UNSIGNED_INT_2_10_10_10_REV | |
224 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 | |
225 #endif | |
226 #ifndef GL_UNSIGNED_SHORT_5_5_5_1 | |
227 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 | |
228 #endif | |
229 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV | |
230 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 | |
231 #endif | |
232 #ifndef GL_UNSIGNED_SHORT_8_8 | |
233 #define GL_UNSIGNED_SHORT_8_8 0x85BA | |
234 #endif | |
235 #ifndef GL_UNSIGNED_SHORT_8_8_REV | |
236 #define GL_UNSIGNED_SHORT_8_8_REV 0x85BB | |
237 #endif | |
238 #ifndef GL_YCBCR_422_APPLE | |
239 #define GL_YCBCR_422_APPLE 0x85B9 | |
240 #endif | |
241 #ifndef GL_YCBCR_MESA | |
242 #define GL_YCBCR_MESA 0x8757 | |
243 #endif | |
244 #ifndef GL_RGB32F | |
245 #define GL_RGB32F 0x8815 | |
246 #endif | |
247 #ifndef GL_FLOAT_RGB32_NV | |
248 #define GL_FLOAT_RGB32_NV 0x8889 | |
249 #endif | |
250 #ifndef GL_LUMINANCE16 | |
251 #define GL_LUMINANCE16 0x8042 | |
252 #endif | |
253 #ifndef GL_DEPTH_COMPONENT | |
254 #define GL_DEPTH_COMPONENT 0x1902 | |
255 #endif | |
256 #ifndef GL_DEPTH_COMPONENT16 | |
257 #define GL_DEPTH_COMPONENT16 0x81A5 | |
258 #endif | |
259 #ifndef GL_TEXTURE_LUMINANCE_SIZE | |
260 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060 | |
261 #endif | |
262 #ifndef GL_DEPTH_TEXTURE_MODE | |
263 #define GL_DEPTH_TEXTURE_MODE 0x884B | |
264 #endif | |
265 #ifndef GL_TEXTURE_COMPARE_MODE | |
266 #define GL_TEXTURE_COMPARE_MODE 0x884C | |
267 #endif | |
268 #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE | |
269 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 | |
270 #endif | |
271 #ifndef GL_TEXTURE_STORAGE_HINT_APPLE | |
272 #define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC | |
273 #endif | |
274 #ifndef GL_STORAGE_CACHED_APPLE | |
275 #define GL_STORAGE_CACHED_APPLE 0x85BE | |
276 #endif | |
277 #ifndef GL_FRAGMENT_PROGRAM | |
278 #define GL_FRAGMENT_PROGRAM 0x8804 | |
279 #endif | |
280 #ifndef GL_PROGRAM_FORMAT_ASCII | |
281 #define GL_PROGRAM_FORMAT_ASCII 0x8875 | |
282 #endif | |
283 #ifndef GL_PROGRAM_ERROR_POSITION | |
284 #define GL_PROGRAM_ERROR_POSITION 0x864B | |
285 #endif | |
286 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS | |
287 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 | |
288 #endif | |
289 #ifndef GL_PROGRAM_ERROR_STRING | |
290 #define GL_PROGRAM_ERROR_STRING 0x8874 | |
291 #endif | |
292 /** \} */ // end of glextdefines group | |
293 | |
294 #endif /* MPLAYER_GL_COMPAT_H */ |