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