codecs.conf: remove yuv422 format from VDPAU section
[mplayer/glamo.git] / libvo / gl_common.h
blob65741c899b84d6f8ede9604ba12f821562a12a69
1 /*
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.
19 #ifndef MPLAYER_GL_COMMON_H
20 #define MPLAYER_GL_COMMON_H
22 #include <stdio.h>
23 #include <stdint.h>
25 #include "config.h"
26 #include "mp_msg.h"
28 #include "video_out.h"
29 #include "csputils.h"
31 #ifdef CONFIG_GL_WIN32
32 #include <windows.h>
33 #include "w32_common.h"
34 #endif
35 #ifdef CONFIG_GL_X11
36 #include <X11/Xlib.h>
37 #include <GL/glx.h>
38 #include "x11_common.h"
39 // This old-vo wrapper macro would conflict with the struct member
40 #undef update_xinerama_info
41 #endif
42 #include <GL/gl.h>
44 // workaround for some gl.h headers
45 #ifndef GLAPIENTRY
46 #ifdef APIENTRY
47 #define GLAPIENTRY APIENTRY
48 #elif defined(CONFIG_GL_WIN32)
49 #define GLAPIENTRY __stdcall
50 #else
51 #define GLAPIENTRY
52 #endif
53 #endif
55 /**
56 * \defgroup glextdefines OpenGL extension defines
58 * conditionally define all extension defines used.
59 * vendor specific extensions should be marked as such
60 * (e.g. _NV), _ARB is not used to ease readability.
61 * \{
63 #ifndef GL_TEXTURE_3D
64 #define GL_TEXTURE_3D 0x806F
65 #endif
66 #ifndef GL_TEXTURE_WRAP_R
67 #define GL_TEXTURE_WRAP_R 0x8072
68 #endif
69 #ifndef GL_CLAMP_TO_EDGE
70 #define GL_CLAMP_TO_EDGE 0x812F
71 #endif
72 #ifndef GL_GENERATE_MIPMAP
73 #define GL_GENERATE_MIPMAP 0x8191
74 #endif
75 #ifndef GL_TEXT_FRAGMENT_SHADER_ATI
76 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
77 #endif
78 #ifndef GL_REGISTER_COMBINERS_NV
79 #define GL_REGISTER_COMBINERS_NV 0x8522
80 #endif
81 #ifndef GL_MAX_GENERAL_COMBINERS_NV
82 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D
83 #endif
84 #ifndef GL_NUM_GENERAL_COMBINERS_NV
85 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E
86 #endif
87 #ifndef GL_CONSTANT_COLOR0_NV
88 #define GL_CONSTANT_COLOR0_NV 0x852A
89 #endif
90 #ifndef GL_CONSTANT_COLOR1_NV
91 #define GL_CONSTANT_COLOR1_NV 0x852B
92 #endif
93 #ifndef GL_COMBINER0_NV
94 #define GL_COMBINER0_NV 0x8550
95 #endif
96 #ifndef GL_COMBINER1_NV
97 #define GL_COMBINER1_NV 0x8551
98 #endif
99 #ifndef GL_VARIABLE_A_NV
100 #define GL_VARIABLE_A_NV 0x8523
101 #endif
102 #ifndef GL_VARIABLE_B_NV
103 #define GL_VARIABLE_B_NV 0x8524
104 #endif
105 #ifndef GL_VARIABLE_C_NV
106 #define GL_VARIABLE_C_NV 0x8525
107 #endif
108 #ifndef GL_VARIABLE_D_NV
109 #define GL_VARIABLE_D_NV 0x8526
110 #endif
111 #ifndef GL_UNSIGNED_INVERT_NV
112 #define GL_UNSIGNED_INVERT_NV 0x8537
113 #endif
114 #ifndef GL_HALF_BIAS_NORMAL_NV
115 #define GL_HALF_BIAS_NORMAL_NV 0x853A
116 #endif
117 #ifndef GL_SIGNED_IDENTITY_NV
118 #define GL_SIGNED_IDENTITY_NV 0x853C
119 #endif
120 #ifndef GL_SCALE_BY_FOUR_NV
121 #define GL_SCALE_BY_FOUR_NV 0x853F
122 #endif
123 #ifndef GL_DISCARD_NV
124 #define GL_DISCARD_NV 0x8530
125 #endif
126 #ifndef GL_SPARE0_NV
127 #define GL_SPARE0_NV 0x852E
128 #endif
129 #ifndef GL_FRAGMENT_SHADER_ATI
130 #define GL_FRAGMENT_SHADER_ATI 0x8920
131 #endif
132 #ifndef GL_NUM_FRAGMENT_REGISTERS_ATI
133 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
134 #endif
135 #ifndef GL_REG_0_ATI
136 #define GL_REG_0_ATI 0x8921
137 #endif
138 #ifndef GL_REG_1_ATI
139 #define GL_REG_1_ATI 0x8922
140 #endif
141 #ifndef GL_REG_2_ATI
142 #define GL_REG_2_ATI 0x8923
143 #endif
144 #ifndef GL_CON_0_ATI
145 #define GL_CON_0_ATI 0x8941
146 #endif
147 #ifndef GL_CON_1_ATI
148 #define GL_CON_1_ATI 0x8942
149 #endif
150 #ifndef GL_CON_2_ATI
151 #define GL_CON_2_ATI 0x8943
152 #endif
153 #ifndef GL_CON_3_ATI
154 #define GL_CON_3_ATI 0x8944
155 #endif
156 #ifndef GL_ADD_ATI
157 #define GL_ADD_ATI 0x8963
158 #endif
159 #ifndef GL_MUL_ATI
160 #define GL_MUL_ATI 0x8964
161 #endif
162 #ifndef GL_MAD_ATI
163 #define GL_MAD_ATI 0x8968
164 #endif
165 #ifndef GL_SWIZZLE_STR_ATI
166 #define GL_SWIZZLE_STR_ATI 0x8976
167 #endif
168 #ifndef GL_4X_BIT_ATI
169 #define GL_4X_BIT_ATI 2
170 #endif
171 #ifndef GL_8X_BIT_ATI
172 #define GL_8X_BIT_ATI 4
173 #endif
174 #ifndef GL_BIAS_BIT_ATI
175 #define GL_BIAS_BIT_ATI 8
176 #endif
177 #ifndef GL_MAX_TEXTURE_UNITS
178 #define GL_MAX_TEXTURE_UNITS 0x84E2
179 #endif
180 #ifndef GL_TEXTURE0
181 #define GL_TEXTURE0 0x84C0
182 #endif
183 #ifndef GL_TEXTURE1
184 #define GL_TEXTURE1 0x84C1
185 #endif
186 #ifndef GL_TEXTURE2
187 #define GL_TEXTURE2 0x84C2
188 #endif
189 #ifndef GL_TEXTURE3
190 #define GL_TEXTURE3 0x84C3
191 #endif
192 #ifndef GL_TEXTURE_RECTANGLE
193 #define GL_TEXTURE_RECTANGLE 0x84F5
194 #endif
195 #ifndef GL_PIXEL_UNPACK_BUFFER
196 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
197 #endif
198 #ifndef GL_STREAM_DRAW
199 #define GL_STREAM_DRAW 0x88E0
200 #endif
201 #ifndef GL_DYNAMIC_DRAW
202 #define GL_DYNAMIC_DRAW 0x88E8
203 #endif
204 #ifndef GL_WRITE_ONLY
205 #define GL_WRITE_ONLY 0x88B9
206 #endif
207 #ifndef GL_BGR
208 #define GL_BGR 0x80E0
209 #endif
210 #ifndef GL_BGRA
211 #define GL_BGRA 0x80E1
212 #endif
213 #ifndef GL_UNSIGNED_BYTE_3_3_2
214 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
215 #endif
216 #ifndef GL_UNSIGNED_BYTE_2_3_3_REV
217 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
218 #endif
219 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
220 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
221 #endif
222 #ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV
223 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
224 #endif
225 #ifndef GL_UNSIGNED_SHORT_5_6_5
226 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
227 #endif
228 #ifndef GL_UNSIGNED_INT_8_8_8_8
229 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
230 #endif
231 #ifndef GL_UNSIGNED_INT_8_8_8_8_REV
232 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
233 #endif
234 #ifndef GL_UNSIGNED_SHORT_5_6_5_REV
235 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
236 #endif
237 #ifndef GL_UNSIGNED_INT_10_10_10_2
238 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
239 #endif
240 #ifndef GL_UNSIGNED_INT_2_10_10_10_REV
241 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
242 #endif
243 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
244 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
245 #endif
246 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
247 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
248 #endif
249 #ifndef GL_UNSIGNED_SHORT_8_8
250 #define GL_UNSIGNED_SHORT_8_8 0x85BA
251 #endif
252 #ifndef GL_UNSIGNED_SHORT_8_8_REV
253 #define GL_UNSIGNED_SHORT_8_8_REV 0x85BB
254 #endif
255 #ifndef GL_YCBCR_MESA
256 #define GL_YCBCR_MESA 0x8757
257 #endif
258 #ifndef GL_RGB32F
259 #define GL_RGB32F 0x8815
260 #endif
261 #ifndef GL_FLOAT_RGB32_NV
262 #define GL_FLOAT_RGB32_NV 0x8889
263 #endif
264 #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE
265 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
266 #endif
267 #ifndef GL_FRAGMENT_PROGRAM
268 #define GL_FRAGMENT_PROGRAM 0x8804
269 #endif
270 #ifndef GL_PROGRAM_FORMAT_ASCII
271 #define GL_PROGRAM_FORMAT_ASCII 0x8875
272 #endif
273 #ifndef GL_PROGRAM_ERROR_POSITION
274 #define GL_PROGRAM_ERROR_POSITION 0x864B
275 #endif
276 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
277 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
278 #endif
279 #ifndef GL_PROGRAM_ERROR_STRING
280 #define GL_PROGRAM_ERROR_STRING 0x8874
281 #endif
282 /** \} */ // end of glextdefines group
284 void glAdjustAlignment(int stride);
286 const char *glValName(GLint value);
288 int glFindFormat(uint32_t format, int *bpp, GLint *gl_texfmt,
289 GLenum *gl_format, GLenum *gl_type);
290 int glFmt2bpp(GLenum format, GLenum type);
291 void glCreateClearTex(GLenum target, GLenum fmt, GLenum format, GLenum type, GLint filter,
292 int w, int h, unsigned char val);
293 int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
294 FILE *f, int *width, int *height, int *maxval);
295 void glUploadTex(GLenum target, GLenum format, GLenum type,
296 const void *dataptr, int stride,
297 int x, int y, int w, int h, int slice);
298 void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
299 GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,
300 int sx, int sy, int rect_tex, int is_yv12, int flip);
301 int loadGPUProgram(GLenum target, char *prog);
303 /** \addtogroup glconversion
304 * \{ */
305 //! do not use YUV conversion, this should always stay 0
306 #define YUV_CONVERSION_NONE 0
307 //! use nVidia specific register combiners for YUV conversion
308 #define YUV_CONVERSION_COMBINERS 1
309 //! use a fragment program for YUV conversion
310 #define YUV_CONVERSION_FRAGMENT 2
311 //! use a fragment program for YUV conversion with gamma using POW
312 #define YUV_CONVERSION_FRAGMENT_POW 3
313 //! use a fragment program with additional table lookup for YUV conversion
314 #define YUV_CONVERSION_FRAGMENT_LOOKUP 4
315 //! use ATI specific register combiners ("fragment program")
316 #define YUV_CONVERSION_COMBINERS_ATI 5
317 //! use a fragment program with 3D table lookup for YUV conversion
318 #define YUV_CONVERSION_FRAGMENT_LOOKUP3D 6
319 //! use ATI specific "text" register combiners ("fragment program")
320 #define YUV_CONVERSION_TEXT_FRAGMENT 7
321 //! use normal bilinear scaling for textures
322 #define YUV_SCALER_BILIN 0
323 //! use higher quality bicubic scaling for textures
324 #define YUV_SCALER_BICUB 1
325 //! use cubic scaling in X and normal linear scaling in Y direction
326 #define YUV_SCALER_BICUB_X 2
327 //! use cubic scaling without additional lookup texture
328 #define YUV_SCALER_BICUB_NOTEX 3
329 #define YUV_SCALER_UNSHARP 4
330 #define YUV_SCALER_UNSHARP2 5
331 //! mask for conversion type
332 #define YUV_CONVERSION_MASK 0xF
333 //! mask for scaler type
334 #define YUV_SCALER_MASK 0xF
335 //! shift value for luminance scaler type
336 #define YUV_LUM_SCALER_SHIFT 8
337 //! shift value for chrominance scaler type
338 #define YUV_CHROM_SCALER_SHIFT 12
339 //! extract conversion out of type
340 #define YUV_CONVERSION(t) (t & YUV_CONVERSION_MASK)
341 //! extract luminance scaler out of type
342 #define YUV_LUM_SCALER(t) ((t >> YUV_LUM_SCALER_SHIFT) & YUV_SCALER_MASK)
343 //! extract chrominance scaler out of type
344 #define YUV_CHROM_SCALER(t) ((t >> YUV_CHROM_SCALER_SHIFT) & YUV_SCALER_MASK)
345 /** \} */
347 typedef struct {
348 GLenum target;
349 int type;
350 struct mp_csp_params csp_params;
351 int texw;
352 int texh;
353 int chrom_texw;
354 int chrom_texh;
355 float filter_strength;
356 } gl_conversion_params_t;
358 int glAutodetectYUVConversion(void);
359 void glSetupYUVConversion(gl_conversion_params_t *params);
360 void glEnableYUVConversion(GLenum target, int type);
361 void glDisableYUVConversion(GLenum target, int type);
363 /** \addtogroup glcontext
364 * \{ */
365 //! could not set new window, will continue drawing into the old one.
366 #define SET_WINDOW_FAILED -1
367 //! new window is set, could even transfer the OpenGL context.
368 #define SET_WINDOW_OK 0
369 //! new window is set, but the OpenGL context needs to be reinitialized.
370 #define SET_WINDOW_REINIT 1
371 /** \} */
373 enum MPGLType {
374 GLTYPE_AUTO,
375 GLTYPE_W32,
376 GLTYPE_X11,
377 GLTYPE_SDL,
380 typedef struct MPGLContext {
381 enum MPGLType type;
382 union {
383 int w32;
384 #ifdef CONFIG_GL_X11
385 XVisualInfo *x11;
386 #endif
387 } vinfo;
388 union {
389 #ifdef CONFIG_GL_WIN32
390 HGLRC w32;
391 #endif
392 #ifdef CONFIG_GL_X11
393 GLXContext x11;
394 #endif
395 } context;
396 int (*setGlWindow)(struct MPGLContext *);
397 void (*releaseGlContext)(struct MPGLContext *);
398 void (*swapGlBuffers)(struct MPGLContext *);
399 void (*update_xinerama_info)(void);
400 void (*border)(void);
401 int (*check_events)(void);
402 void (*fullscreen)(void);
403 void (*ontop)(void);
404 } MPGLContext;
406 int init_mpglcontext(MPGLContext *ctx, enum MPGLType type);
407 void uninit_mpglcontext(MPGLContext *ctx);
409 extern void (GLAPIENTRY *mpglBegin)(GLenum);
410 extern void (GLAPIENTRY *mpglEnd)(void);
411 extern void (GLAPIENTRY *mpglViewport)(GLint, GLint, GLsizei, GLsizei);
412 extern void (GLAPIENTRY *mpglMatrixMode)(GLenum);
413 extern void (GLAPIENTRY *mpglLoadIdentity)(void);
414 extern void (GLAPIENTRY *mpglTranslated)(double, double, double);
415 extern void (GLAPIENTRY *mpglScaled)(double, double, double);
416 extern void (GLAPIENTRY *mpglOrtho)(double, double, double, double, double, double);
417 extern void (GLAPIENTRY *mpglFrustum)(double, double, double, double, double, double);
418 extern void (GLAPIENTRY *mpglPushMatrix)(void);
419 extern void (GLAPIENTRY *mpglPopMatrix)(void);
420 extern void (GLAPIENTRY *mpglClear)(GLbitfield);
421 extern GLuint (GLAPIENTRY *mpglGenLists)(GLsizei);
422 extern void (GLAPIENTRY *mpglDeleteLists)(GLuint, GLsizei);
423 extern void (GLAPIENTRY *mpglNewList)(GLuint, GLenum);
424 extern void (GLAPIENTRY *mpglEndList)(void);
425 extern void (GLAPIENTRY *mpglCallList)(GLuint);
426 extern void (GLAPIENTRY *mpglCallLists)(GLsizei, GLenum, const GLvoid *);
427 extern void (GLAPIENTRY *mpglGenTextures)(GLsizei, GLuint *);
428 extern void (GLAPIENTRY *mpglDeleteTextures)(GLsizei, const GLuint *);
429 extern void (GLAPIENTRY *mpglTexEnvf)(GLenum, GLenum, GLfloat);
430 extern void (GLAPIENTRY *mpglTexEnvi)(GLenum, GLenum, GLint);
431 extern void (GLAPIENTRY *mpglColor4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
432 extern void (GLAPIENTRY *mpglColor3f)(GLfloat, GLfloat, GLfloat);
433 extern void (GLAPIENTRY *mpglColor4f)(GLfloat, GLfloat, GLfloat, GLfloat);
434 extern void (GLAPIENTRY *mpglClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
435 extern void (GLAPIENTRY *mpglClearDepth)(GLclampd);
436 extern void (GLAPIENTRY *mpglDepthFunc)(GLenum);
437 extern void (GLAPIENTRY *mpglEnable)(GLenum);
438 extern void (GLAPIENTRY *mpglDisable)(GLenum);
439 extern const GLubyte *(GLAPIENTRY *mpglGetString)(GLenum);
440 extern void (GLAPIENTRY *mpglDrawBuffer)(GLenum);
441 extern void (GLAPIENTRY *mpglDepthMask)(GLboolean);
442 extern void (GLAPIENTRY *mpglBlendFunc)(GLenum, GLenum);
443 extern void (GLAPIENTRY *mpglFlush)(void);
444 extern void (GLAPIENTRY *mpglFinish)(void);
445 extern void (GLAPIENTRY *mpglPixelStorei)(GLenum, GLint);
446 extern void (GLAPIENTRY *mpglTexImage1D)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
447 extern void (GLAPIENTRY *mpglTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
448 extern void (GLAPIENTRY *mpglTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
449 extern void (GLAPIENTRY *mpglTexParameteri)(GLenum, GLenum, GLint);
450 extern void (GLAPIENTRY *mpglTexParameterf)(GLenum, GLenum, GLfloat);
451 extern void (GLAPIENTRY *mpglTexParameterfv)(GLenum, GLenum, const GLfloat *);
452 extern void (GLAPIENTRY *mpglTexCoord2f)(GLfloat, GLfloat);
453 extern void (GLAPIENTRY *mpglVertex2f)(GLfloat, GLfloat);
454 extern void (GLAPIENTRY *mpglVertex3f)(GLfloat, GLfloat, GLfloat);
455 extern void (GLAPIENTRY *mpglNormal3f)(GLfloat, GLfloat, GLfloat);
456 extern void (GLAPIENTRY *mpglLightfv)(GLenum, GLenum, const GLfloat *);
457 extern void (GLAPIENTRY *mpglColorMaterial)(GLenum, GLenum);
458 extern void (GLAPIENTRY *mpglShadeModel)(GLenum);
459 extern void (GLAPIENTRY *mpglGetIntegerv)(GLenum, GLint *);
461 extern void (GLAPIENTRY *mpglGenBuffers)(GLsizei, GLuint *);
462 extern void (GLAPIENTRY *mpglDeleteBuffers)(GLsizei, const GLuint *);
463 extern void (GLAPIENTRY *mpglBindBuffer)(GLenum, GLuint);
464 extern GLvoid* (GLAPIENTRY *mpglMapBuffer)(GLenum, GLenum);
465 extern GLboolean (GLAPIENTRY *mpglUnmapBuffer)(GLenum);
466 extern void (GLAPIENTRY *mpglBufferData)(GLenum, intptr_t, const GLvoid *, GLenum);
467 extern void (GLAPIENTRY *mpglCombinerParameterfv)(GLenum, const GLfloat *);
468 extern void (GLAPIENTRY *mpglCombinerParameteri)(GLenum, GLint);
469 extern void (GLAPIENTRY *mpglCombinerInput)(GLenum, GLenum, GLenum, GLenum, GLenum,
470 GLenum);
471 extern void (GLAPIENTRY *mpglCombinerOutput)(GLenum, GLenum, GLenum, GLenum, GLenum,
472 GLenum, GLenum, GLboolean, GLboolean,
473 GLboolean);
474 extern void (GLAPIENTRY *mpglBeginFragmentShader)(void);
475 extern void (GLAPIENTRY *mpglEndFragmentShader)(void);
476 extern void (GLAPIENTRY *mpglSampleMap)(GLuint, GLuint, GLenum);
477 extern void (GLAPIENTRY *mpglColorFragmentOp2)(GLenum, GLuint, GLuint, GLuint, GLuint,
478 GLuint, GLuint, GLuint, GLuint, GLuint);
479 extern void (GLAPIENTRY *mpglColorFragmentOp3)(GLenum, GLuint, GLuint, GLuint, GLuint,
480 GLuint, GLuint, GLuint, GLuint, GLuint,
481 GLuint, GLuint, GLuint);
482 extern void (GLAPIENTRY *mpglSetFragmentShaderConstant)(GLuint, const GLfloat *);
483 extern void (GLAPIENTRY *mpglActiveTexture)(GLenum);
484 extern void (GLAPIENTRY *mpglBindTexture)(GLenum, GLuint);
485 extern void (GLAPIENTRY *mpglMultiTexCoord2f)(GLenum, GLfloat, GLfloat);
486 extern void (GLAPIENTRY *mpglGenPrograms)(GLsizei, GLuint *);
487 extern void (GLAPIENTRY *mpglDeletePrograms)(GLsizei, const GLuint *);
488 extern void (GLAPIENTRY *mpglBindProgram)(GLenum, GLuint);
489 extern void (GLAPIENTRY *mpglProgramString)(GLenum, GLenum, GLsizei, const GLvoid *);
490 extern void (GLAPIENTRY *mpglProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
491 GLfloat, GLfloat);
492 extern int (GLAPIENTRY *mpglSwapInterval)(int);
493 extern void (GLAPIENTRY *mpglTexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei,
494 GLsizei, GLint, GLenum, GLenum, const GLvoid *);
495 extern void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, float);
496 extern void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *);
498 #endif /* MPLAYER_GL_COMMON_H */