vo_corevideo: restructure this video output
[mplayer.git] / libvo / gl_common.h
blobb02e1d2b8db260d9dd0e5af6250060ff7b712fca
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.
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 #ifndef MPLAYER_GL_COMMON_H
25 #define MPLAYER_GL_COMMON_H
27 #include <stdio.h>
28 #include <stdint.h>
30 #include "config.h"
31 #include "mp_msg.h"
33 #include "video_out.h"
34 #include "csputils.h"
36 #ifdef CONFIG_GL_WIN32
37 #include <windows.h>
38 #include "w32_common.h"
39 #endif
40 #ifdef CONFIG_GL_X11
41 #include <X11/Xlib.h>
42 #include <GL/glx.h>
43 #include "x11_common.h"
44 // This old-vo wrapper macro would conflict with the struct member
45 #undef update_xinerama_info
46 #endif
47 #include <GL/gl.h>
49 // workaround for some gl.h headers
50 #ifndef GLAPIENTRY
51 #ifdef APIENTRY
52 #define GLAPIENTRY APIENTRY
53 #elif defined(CONFIG_GL_WIN32)
54 #define GLAPIENTRY __stdcall
55 #else
56 #define GLAPIENTRY
57 #endif
58 #endif
60 /**
61 * \defgroup glextdefines OpenGL extension defines
63 * conditionally define all extension defines used.
64 * vendor specific extensions should be marked as such
65 * (e.g. _NV), _ARB is not used to ease readability.
66 * \{
68 #ifndef GL_TEXTURE_3D
69 #define GL_TEXTURE_3D 0x806F
70 #endif
71 #ifndef GL_TEXTURE_WRAP_R
72 #define GL_TEXTURE_WRAP_R 0x8072
73 #endif
74 #ifndef GL_CLAMP_TO_EDGE
75 #define GL_CLAMP_TO_EDGE 0x812F
76 #endif
77 #ifndef GL_GENERATE_MIPMAP
78 #define GL_GENERATE_MIPMAP 0x8191
79 #endif
80 #ifndef GL_TEXT_FRAGMENT_SHADER_ATI
81 #define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
82 #endif
83 #ifndef GL_FRAGMENT_SHADER_ATI
84 #define GL_FRAGMENT_SHADER_ATI 0x8920
85 #endif
86 #ifndef GL_NUM_FRAGMENT_REGISTERS_ATI
87 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
88 #endif
89 #ifndef GL_REG_0_ATI
90 #define GL_REG_0_ATI 0x8921
91 #endif
92 #ifndef GL_REG_1_ATI
93 #define GL_REG_1_ATI 0x8922
94 #endif
95 #ifndef GL_REG_2_ATI
96 #define GL_REG_2_ATI 0x8923
97 #endif
98 #ifndef GL_CON_0_ATI
99 #define GL_CON_0_ATI 0x8941
100 #endif
101 #ifndef GL_CON_1_ATI
102 #define GL_CON_1_ATI 0x8942
103 #endif
104 #ifndef GL_CON_2_ATI
105 #define GL_CON_2_ATI 0x8943
106 #endif
107 #ifndef GL_CON_3_ATI
108 #define GL_CON_3_ATI 0x8944
109 #endif
110 #ifndef GL_ADD_ATI
111 #define GL_ADD_ATI 0x8963
112 #endif
113 #ifndef GL_MUL_ATI
114 #define GL_MUL_ATI 0x8964
115 #endif
116 #ifndef GL_MAD_ATI
117 #define GL_MAD_ATI 0x8968
118 #endif
119 #ifndef GL_SWIZZLE_STR_ATI
120 #define GL_SWIZZLE_STR_ATI 0x8976
121 #endif
122 #ifndef GL_4X_BIT_ATI
123 #define GL_4X_BIT_ATI 2
124 #endif
125 #ifndef GL_8X_BIT_ATI
126 #define GL_8X_BIT_ATI 4
127 #endif
128 #ifndef GL_BIAS_BIT_ATI
129 #define GL_BIAS_BIT_ATI 8
130 #endif
131 #ifndef GL_MAX_TEXTURE_UNITS
132 #define GL_MAX_TEXTURE_UNITS 0x84E2
133 #endif
134 #ifndef GL_TEXTURE0
135 #define GL_TEXTURE0 0x84C0
136 #endif
137 #ifndef GL_TEXTURE1
138 #define GL_TEXTURE1 0x84C1
139 #endif
140 #ifndef GL_TEXTURE2
141 #define GL_TEXTURE2 0x84C2
142 #endif
143 #ifndef GL_TEXTURE3
144 #define GL_TEXTURE3 0x84C3
145 #endif
146 #ifndef GL_TEXTURE_RECTANGLE
147 #define GL_TEXTURE_RECTANGLE 0x84F5
148 #endif
149 #ifndef GL_PIXEL_UNPACK_BUFFER
150 #define GL_PIXEL_UNPACK_BUFFER 0x88EC
151 #endif
152 #ifndef GL_STREAM_DRAW
153 #define GL_STREAM_DRAW 0x88E0
154 #endif
155 #ifndef GL_DYNAMIC_DRAW
156 #define GL_DYNAMIC_DRAW 0x88E8
157 #endif
158 #ifndef GL_WRITE_ONLY
159 #define GL_WRITE_ONLY 0x88B9
160 #endif
161 #ifndef GL_BGR
162 #define GL_BGR 0x80E0
163 #endif
164 #ifndef GL_BGRA
165 #define GL_BGRA 0x80E1
166 #endif
167 #ifndef GL_UNSIGNED_BYTE_3_3_2
168 #define GL_UNSIGNED_BYTE_3_3_2 0x8032
169 #endif
170 #ifndef GL_UNSIGNED_BYTE_2_3_3_REV
171 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
172 #endif
173 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
174 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
175 #endif
176 #ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV
177 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
178 #endif
179 #ifndef GL_UNSIGNED_SHORT_5_6_5
180 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
181 #endif
182 #ifndef GL_UNSIGNED_INT_8_8_8_8
183 #define GL_UNSIGNED_INT_8_8_8_8 0x8035
184 #endif
185 #ifndef GL_UNSIGNED_INT_8_8_8_8_REV
186 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
187 #endif
188 #ifndef GL_UNSIGNED_SHORT_5_6_5_REV
189 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
190 #endif
191 #ifndef GL_UNSIGNED_INT_10_10_10_2
192 #define GL_UNSIGNED_INT_10_10_10_2 0x8036
193 #endif
194 #ifndef GL_UNSIGNED_INT_2_10_10_10_REV
195 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
196 #endif
197 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
198 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
199 #endif
200 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
201 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
202 #endif
203 #ifndef GL_UNSIGNED_SHORT_8_8
204 #define GL_UNSIGNED_SHORT_8_8 0x85BA
205 #endif
206 #ifndef GL_UNSIGNED_SHORT_8_8_REV
207 #define GL_UNSIGNED_SHORT_8_8_REV 0x85BB
208 #endif
209 #ifndef GL_YCBCR_MESA
210 #define GL_YCBCR_MESA 0x8757
211 #endif
212 #ifndef GL_RGB32F
213 #define GL_RGB32F 0x8815
214 #endif
215 #ifndef GL_FLOAT_RGB32_NV
216 #define GL_FLOAT_RGB32_NV 0x8889
217 #endif
218 #ifndef GL_LUMINANCE16
219 #define GL_LUMINANCE16 0x8042
220 #endif
221 #ifndef GL_R16
222 #define GL_R16 0x822A
223 #endif
224 #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE
225 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
226 #endif
227 #ifndef GL_FRAGMENT_PROGRAM
228 #define GL_FRAGMENT_PROGRAM 0x8804
229 #endif
230 #ifndef GL_PROGRAM_FORMAT_ASCII
231 #define GL_PROGRAM_FORMAT_ASCII 0x8875
232 #endif
233 #ifndef GL_PROGRAM_ERROR_POSITION
234 #define GL_PROGRAM_ERROR_POSITION 0x864B
235 #endif
236 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
237 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
238 #endif
239 #ifndef GL_PROGRAM_ERROR_STRING
240 #define GL_PROGRAM_ERROR_STRING 0x8874
241 #endif
242 /** \} */ // end of glextdefines group
244 struct GL;
245 typedef struct GL GL;
247 void glAdjustAlignment(GL *gl, int stride);
249 const char *glValName(GLint value);
251 int glFindFormat(uint32_t format, int have_texture_rg, int *bpp,
252 GLint *gl_texfmt, GLenum *gl_format, GLenum *gl_type);
253 int glFmt2bpp(GLenum format, GLenum type);
254 void glCreateClearTex(GL *gl, GLenum target, GLenum fmt, GLenum format,
255 GLenum type, GLint filter, int w, int h,
256 unsigned char val);
257 int glCreatePPMTex(GL *gl, GLenum target, GLenum fmt, GLint filter,
258 FILE *f, int *width, int *height, int *maxval);
259 void glUploadTex(GL *gl, GLenum target, GLenum format, GLenum type,
260 const void *dataptr, int stride,
261 int x, int y, int w, int h, int slice);
262 void glDownloadTex(GL *gl, GLenum target, GLenum format, GLenum type,
263 void *dataptr, int stride);
264 void glDrawTex(GL *gl, GLfloat x, GLfloat y, GLfloat w, GLfloat h,
265 GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,
266 int sx, int sy, int rect_tex, int is_yv12, int flip);
267 int loadGPUProgram(GL *gl, GLenum target, char *prog);
269 /** \addtogroup glconversion
270 * \{ */
271 //! do not use YUV conversion, this should always stay 0
272 #define YUV_CONVERSION_NONE 0
273 //! use nVidia specific register combiners for YUV conversion
274 //! implementation has been removed
275 #define YUV_CONVERSION_COMBINERS 1
276 //! use a fragment program for YUV conversion
277 #define YUV_CONVERSION_FRAGMENT 2
278 //! use a fragment program for YUV conversion with gamma using POW
279 #define YUV_CONVERSION_FRAGMENT_POW 3
280 //! use a fragment program with additional table lookup for YUV conversion
281 #define YUV_CONVERSION_FRAGMENT_LOOKUP 4
282 //! use ATI specific register combiners ("fragment program")
283 #define YUV_CONVERSION_COMBINERS_ATI 5
284 //! use a fragment program with 3D table lookup for YUV conversion
285 #define YUV_CONVERSION_FRAGMENT_LOOKUP3D 6
286 //! use ATI specific "text" register combiners ("fragment program")
287 #define YUV_CONVERSION_TEXT_FRAGMENT 7
288 //! use normal bilinear scaling for textures
289 #define YUV_SCALER_BILIN 0
290 //! use higher quality bicubic scaling for textures
291 #define YUV_SCALER_BICUB 1
292 //! use cubic scaling in X and normal linear scaling in Y direction
293 #define YUV_SCALER_BICUB_X 2
294 //! use cubic scaling without additional lookup texture
295 #define YUV_SCALER_BICUB_NOTEX 3
296 #define YUV_SCALER_UNSHARP 4
297 #define YUV_SCALER_UNSHARP2 5
298 //! mask for conversion type
299 #define YUV_CONVERSION_MASK 0xF
300 //! mask for scaler type
301 #define YUV_SCALER_MASK 0xF
302 //! shift value for luminance scaler type
303 #define YUV_LUM_SCALER_SHIFT 8
304 //! shift value for chrominance scaler type
305 #define YUV_CHROM_SCALER_SHIFT 12
306 //! extract conversion out of type
307 #define YUV_CONVERSION(t) ((t) & YUV_CONVERSION_MASK)
308 //! extract luminance scaler out of type
309 #define YUV_LUM_SCALER(t) (((t) >> YUV_LUM_SCALER_SHIFT) & YUV_SCALER_MASK)
310 //! extract chrominance scaler out of type
311 #define YUV_CHROM_SCALER(t) (((t) >> YUV_CHROM_SCALER_SHIFT) & YUV_SCALER_MASK)
312 #define SET_YUV_CONVERSION(c) ((c) & YUV_CONVERSION_MASK)
313 #define SET_YUV_LUM_SCALER(s) (((s) & YUV_SCALER_MASK) << YUV_LUM_SCALER_SHIFT)
314 #define SET_YUV_CHROM_SCALER(s) (((s) & YUV_SCALER_MASK) << YUV_CHROM_SCALER_SHIFT)
315 //! returns whether the yuv conversion supports large brightness range etc.
316 static inline int glYUVLargeRange(int conv)
318 switch (conv) {
319 case YUV_CONVERSION_NONE:
320 case YUV_CONVERSION_COMBINERS_ATI:
321 case YUV_CONVERSION_FRAGMENT_LOOKUP3D:
322 case YUV_CONVERSION_TEXT_FRAGMENT:
323 return 0;
325 return 1;
327 /** \} */
329 typedef struct {
330 GLenum target;
331 int type;
332 struct mp_csp_params csp_params;
333 int texw;
334 int texh;
335 int chrom_texw;
336 int chrom_texh;
337 float filter_strength;
338 } gl_conversion_params_t;
340 int glAutodetectYUVConversion(GL *gl);
341 void glSetupYUVConversion(GL *gl, gl_conversion_params_t *params);
342 void glEnableYUVConversion(GL *gl, GLenum target, int type);
343 void glDisableYUVConversion(GL *gl, GLenum target, int type);
345 #define GL_3D_RED_CYAN 1
346 #define GL_3D_GREEN_MAGENTA 2
347 #define GL_3D_QUADBUFFER 3
349 void glEnable3DLeft(GL *gl, int type);
350 void glEnable3DRight(GL *gl, int type);
351 void glDisable3D(GL *gl, int type);
353 /** \addtogroup glcontext
354 * \{ */
355 //! could not set new window, will continue drawing into the old one.
356 #define SET_WINDOW_FAILED -1
357 //! new window is set, could even transfer the OpenGL context.
358 #define SET_WINDOW_OK 0
359 //! new window is set, but the OpenGL context needs to be reinitialized.
360 #define SET_WINDOW_REINIT 1
361 /** \} */
363 enum MPGLType {
364 GLTYPE_AUTO,
365 GLTYPE_COCOA,
366 GLTYPE_W32,
367 GLTYPE_X11,
368 GLTYPE_SDL,
371 typedef struct MPGLContext {
372 GL *gl;
373 enum MPGLType type;
374 struct vo *vo;
375 union {
376 int w32;
377 #ifdef CONFIG_GL_X11
378 XVisualInfo *x11;
379 #endif
380 } vinfo;
381 union {
382 #ifdef CONFIG_GL_WIN32
383 HGLRC w32;
384 #endif
385 #ifdef CONFIG_GL_X11
386 GLXContext x11;
387 #endif
388 } context;
389 int (*create_window)(struct MPGLContext *ctx, uint32_t d_width,
390 uint32_t d_height, uint32_t flags);
391 int (*setGlWindow)(struct MPGLContext *);
392 void (*releaseGlContext)(struct MPGLContext *);
393 void (*swapGlBuffers)(struct MPGLContext *);
394 void (*update_xinerama_info)(struct vo *vo);
395 void (*border)(struct vo *vo);
396 int (*check_events)(struct vo *vo);
397 void (*fullscreen)(struct vo *vo);
398 void (*ontop)(struct vo *vo);
399 } MPGLContext;
401 MPGLContext *init_mpglcontext(enum MPGLType type, struct vo *vo);
402 void uninit_mpglcontext(MPGLContext *ctx);
404 //function pointers loaded from the OpenGL library
405 struct GL {
406 void (GLAPIENTRY *Begin)(GLenum);
407 void (GLAPIENTRY *End)(void);
408 void (GLAPIENTRY *Viewport)(GLint, GLint, GLsizei, GLsizei);
409 void (GLAPIENTRY *MatrixMode)(GLenum);
410 void (GLAPIENTRY *LoadIdentity)(void);
411 void (GLAPIENTRY *Translated)(double, double, double);
412 void (GLAPIENTRY *Scaled)(double, double, double);
413 void (GLAPIENTRY *Ortho)(double, double, double, double, double,double);
414 void (GLAPIENTRY *Frustum)(double, double, double, double, double, double);
415 void (GLAPIENTRY *PushMatrix)(void);
416 void (GLAPIENTRY *PopMatrix)(void);
417 void (GLAPIENTRY *Clear)(GLbitfield);
418 GLuint (GLAPIENTRY *GenLists)(GLsizei);
419 void (GLAPIENTRY *DeleteLists)(GLuint, GLsizei);
420 void (GLAPIENTRY *NewList)(GLuint, GLenum);
421 void (GLAPIENTRY *EndList)(void);
422 void (GLAPIENTRY *CallList)(GLuint);
423 void (GLAPIENTRY *CallLists)(GLsizei, GLenum, const GLvoid *);
424 void (GLAPIENTRY *GenTextures)(GLsizei, GLuint *);
425 void (GLAPIENTRY *DeleteTextures)(GLsizei, const GLuint *);
426 void (GLAPIENTRY *TexEnvf)(GLenum, GLenum, GLfloat);
427 void (GLAPIENTRY *TexEnvi)(GLenum, GLenum, GLint);
428 void (GLAPIENTRY *Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
429 void (GLAPIENTRY *Color3f)(GLfloat, GLfloat, GLfloat);
430 void (GLAPIENTRY *Color4f)(GLfloat, GLfloat, GLfloat, GLfloat);
431 void (GLAPIENTRY *ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
432 void (GLAPIENTRY *ClearDepth)(GLclampd);
433 void (GLAPIENTRY *DepthFunc)(GLenum);
434 void (GLAPIENTRY *Enable)(GLenum);
435 void (GLAPIENTRY *Disable)(GLenum);
436 const GLubyte *(GLAPIENTRY * GetString)(GLenum);
437 void (GLAPIENTRY *DrawBuffer)(GLenum);
438 void (GLAPIENTRY *DepthMask)(GLboolean);
439 void (GLAPIENTRY *BlendFunc)(GLenum, GLenum);
440 void (GLAPIENTRY *Flush)(void);
441 void (GLAPIENTRY *Finish)(void);
442 void (GLAPIENTRY *PixelStorei)(GLenum, GLint);
443 void (GLAPIENTRY *TexImage1D)(GLenum, GLint, GLint, GLsizei, GLint,
444 GLenum, GLenum, const GLvoid *);
445 void (GLAPIENTRY *TexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei,
446 GLint, GLenum, GLenum, const GLvoid *);
447 void (GLAPIENTRY *TexSubImage2D)(GLenum, GLint, GLint, GLint,
448 GLsizei, GLsizei, GLenum, GLenum,
449 const GLvoid *);
450 void (GLAPIENTRY *GetTexImage)(GLenum, GLint, GLenum, GLenum, GLvoid *);
451 void (GLAPIENTRY *TexParameteri)(GLenum, GLenum, GLint);
452 void (GLAPIENTRY *TexParameterf)(GLenum, GLenum, GLfloat);
453 void (GLAPIENTRY *TexParameterfv)(GLenum, GLenum, const GLfloat *);
454 void (GLAPIENTRY *TexCoord2f)(GLfloat, GLfloat);
455 void (GLAPIENTRY *TexCoord2fv)(const GLfloat *);
456 void (GLAPIENTRY *Vertex2f)(GLfloat, GLfloat);
457 void (GLAPIENTRY *Vertex3f)(GLfloat, GLfloat, GLfloat);
458 void (GLAPIENTRY *Normal3f)(GLfloat, GLfloat, GLfloat);
459 void (GLAPIENTRY *Lightfv)(GLenum, GLenum, const GLfloat *);
460 void (GLAPIENTRY *ColorMaterial)(GLenum, GLenum);
461 void (GLAPIENTRY *ShadeModel)(GLenum);
462 void (GLAPIENTRY *GetIntegerv)(GLenum, GLint *);
463 void (GLAPIENTRY *ColorMask)(GLboolean, GLboolean, GLboolean, GLboolean);
464 void (GLAPIENTRY *ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum,
465 GLenum, GLvoid *);
466 void (GLAPIENTRY *ReadBuffer)(GLenum);
468 // OpenGL extension functions
469 void (GLAPIENTRY *GenBuffers)(GLsizei, GLuint *);
470 void (GLAPIENTRY *DeleteBuffers)(GLsizei, const GLuint *);
471 void (GLAPIENTRY *BindBuffer)(GLenum, GLuint);
472 GLvoid * (GLAPIENTRY * MapBuffer)(GLenum, GLenum);
473 GLboolean (GLAPIENTRY *UnmapBuffer)(GLenum);
474 void (GLAPIENTRY *BufferData)(GLenum, intptr_t, const GLvoid *, GLenum);
475 void (GLAPIENTRY *BeginFragmentShader)(void);
476 void (GLAPIENTRY *EndFragmentShader)(void);
477 void (GLAPIENTRY *SampleMap)(GLuint, GLuint, GLenum);
478 void (GLAPIENTRY *ColorFragmentOp2)(GLenum, GLuint, GLuint, GLuint, GLuint,
479 GLuint, GLuint, GLuint, GLuint, GLuint);
480 void (GLAPIENTRY *ColorFragmentOp3)(GLenum, GLuint, GLuint, GLuint, GLuint,
481 GLuint, GLuint, GLuint, GLuint, GLuint,
482 GLuint, GLuint, GLuint);
483 void (GLAPIENTRY *SetFragmentShaderConstant)(GLuint, const GLfloat *);
484 void (GLAPIENTRY *ActiveTexture)(GLenum);
485 void (GLAPIENTRY *BindTexture)(GLenum, GLuint);
486 void (GLAPIENTRY *MultiTexCoord2f)(GLenum, GLfloat, GLfloat);
487 void (GLAPIENTRY *GenPrograms)(GLsizei, GLuint *);
488 void (GLAPIENTRY *DeletePrograms)(GLsizei, const GLuint *);
489 void (GLAPIENTRY *BindProgram)(GLenum, GLuint);
490 void (GLAPIENTRY *ProgramString)(GLenum, GLenum, GLsizei, const GLvoid *);
491 void (GLAPIENTRY *GetProgramiv)(GLenum, GLenum, GLint *);
492 void (GLAPIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
493 GLfloat, GLfloat);
494 int (GLAPIENTRY *SwapInterval)(int);
495 void (GLAPIENTRY *TexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei,
496 GLsizei, GLint, GLenum, GLenum,
497 const GLvoid *);
500 #endif /* MPLAYER_GL_COMMON_H */