annotate libvo/gl_common.h @ 36571:689594b793f7

demux_mov: Initialize "version" variable. The AMR cases leave it uninitialized otherwise.
author reimar
date Mon, 20 Jan 2014 22:08:36 +0000
parents 673719da1a92
children 61a9df2e25d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28446
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
1 /*
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
2 * This file is part of MPlayer.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
3 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
5 * it under the terms of the GNU General Public License as published by
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
7 * (at your option) any later version.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
8 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
12 * GNU General Public License for more details.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
13 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
14 * You should have received a copy of the GNU General Public License along
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
31309
1a35ec7c45e0 Dual-license gl_common and vo_gl under the LGPL v2.1 or later as
reimar
parents: 31065
diff changeset
17 *
1a35ec7c45e0 Dual-license gl_common and vo_gl under the LGPL v2.1 or later as
reimar
parents: 31065
diff changeset
18 * You can alternatively redistribute this file and/or
1a35ec7c45e0 Dual-license gl_common and vo_gl under the LGPL v2.1 or later as
reimar
parents: 31065
diff changeset
19 * modify it under the terms of the GNU Lesser General Public
1a35ec7c45e0 Dual-license gl_common and vo_gl under the LGPL v2.1 or later as
reimar
parents: 31065
diff changeset
20 * License as published by the Free Software Foundation; either
1a35ec7c45e0 Dual-license gl_common and vo_gl under the LGPL v2.1 or later as
reimar
parents: 31065
diff changeset
21 * version 2.1 of the License, or (at your option) any later version.
28446
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
22 */
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 28070
diff changeset
23
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25758
diff changeset
24 #ifndef MPLAYER_GL_COMMON_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25758
diff changeset
25 #define MPLAYER_GL_COMMON_H
13653
799f81d3cb19 added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff changeset
26
26162
0585db9f5b32 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
27 #include <stdio.h>
26163
f3e72d1a2329 This header uses parts of stdint.h, so #include it.
diego
parents: 26162
diff changeset
28 #include <stdint.h>
26162
0585db9f5b32 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
29
26203
0d255d03016f #include config.h before all other headers.
diego
parents: 26163
diff changeset
30 #include "config.h"
13843
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
31 #include "video_out.h"
30108
0898adc64a6f Extract functions to generate yuv->rgb matrices and lookup tables into a
reimar
parents: 30107
diff changeset
32 #include "csputils.h"
13843
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
33
30023
b7a703cf9178 Rename GL_* defines to CONFIG_GL_*
reimar
parents: 30021
diff changeset
34 #ifdef CONFIG_GL_WIN32
14142
f0c1ee83b216 Improving gl2 under windows, moving some functionality to gl_common
reimar
parents: 14078
diff changeset
35 #include <windows.h>
f0c1ee83b216 Improving gl2 under windows, moving some functionality to gl_common
reimar
parents: 14078
diff changeset
36 #include "w32_common.h"
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
37 #endif
30023
b7a703cf9178 Rename GL_* defines to CONFIG_GL_*
reimar
parents: 30021
diff changeset
38 #ifdef CONFIG_GL_X11
13843
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
39 #include <X11/Xlib.h>
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
40 #include <GL/glx.h>
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
41 #include "x11_common.h"
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
42 #endif
34338
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
43 #ifdef CONFIG_GL_EGL_X11
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
44 #include <EGL/egl.h>
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
45 #include "x11_common.h"
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
46 #endif
35089
a87c434ecaa3 Allow compiling -vo gl with OSX backend even if X11 and SDL are not available.
reimar
parents: 35087
diff changeset
47 #ifdef CONFIG_GL_OSX
35087
078a00af881c Use OSX common layer in -vo gl.
reimar
parents: 35005
diff changeset
48 #include "osx_common.h"
35811
2ce01f3d3b37 Switch from OpenGL.h to gl.h
reimar
parents: 35089
diff changeset
49 #include <OpenGL/gl.h>
35889
a51578d7e264 Add (hackish) support for OpenGL on Android.
reimar
parents: 35888
diff changeset
50 #elif defined(CONFIG_GL_EGL_ANDROID)
a51578d7e264 Add (hackish) support for OpenGL on Android.
reimar
parents: 35888
diff changeset
51 #include <EGL/egl.h>
a51578d7e264 Add (hackish) support for OpenGL on Android.
reimar
parents: 35888
diff changeset
52 #include <GLES/gl.h>
35089
a87c434ecaa3 Allow compiling -vo gl with OSX backend even if X11 and SDL are not available.
reimar
parents: 35087
diff changeset
53 #else
a87c434ecaa3 Allow compiling -vo gl with OSX backend even if X11 and SDL are not available.
reimar
parents: 35087
diff changeset
54 #include <GL/gl.h>
35087
078a00af881c Use OSX common layer in -vo gl.
reimar
parents: 35005
diff changeset
55 #endif
13653
799f81d3cb19 added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff changeset
56
35886
4921bccc0968 Split out defines for compatibility between different GL headers.
reimar
parents: 35811
diff changeset
57 #include "gl_compat.h"
16099
629c54dc7e0d support for rectangular and streaming textures.
reimar
parents: 14142
diff changeset
58
13653
799f81d3cb19 added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff changeset
59 void glAdjustAlignment(int stride);
799f81d3cb19 added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff changeset
60
14078
c4033dcb986f More similar code from gl and gl2 moved to gl_common
reimar
parents: 13921
diff changeset
61 const char *glValName(GLint value);
c4033dcb986f More similar code from gl and gl2 moved to gl_common
reimar
parents: 13921
diff changeset
62
16879
6ea220b10e8e More consistent and sane types. Also avoids some gcc 4 warnings.
reimar
parents: 16625
diff changeset
63 int glFindFormat(uint32_t format, int *bpp, GLint *gl_texfmt,
14078
c4033dcb986f More similar code from gl and gl2 moved to gl_common
reimar
parents: 13921
diff changeset
64 GLenum *gl_format, GLenum *gl_type);
16117
d280ec2b9e63 More helper functions/defines and bugfixes
reimar
parents: 16109
diff changeset
65 int glFmt2bpp(GLenum format, GLenum type);
27621
53b5cf466361 Change glCreateClearTex to use the same host data format as later uploads.
reimar
parents: 27306
diff changeset
66 void glCreateClearTex(GLenum target, GLenum fmt, GLenum format, GLenum type, GLint filter,
16460
ec7036dedee4 Fix border color (forgot to divide by 255.0).
reimar
parents: 16303
diff changeset
67 int w, int h, unsigned char val);
16592
1bb2b2696451 support loading a texture from a PPM file
reimar
parents: 16586
diff changeset
68 int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
1bb2b2696451 support loading a texture from a PPM file
reimar
parents: 16586
diff changeset
69 FILE *f, int *width, int *height, int *maxval);
16117
d280ec2b9e63 More helper functions/defines and bugfixes
reimar
parents: 16109
diff changeset
70 void glUploadTex(GLenum target, GLenum format, GLenum type,
21201
2c1b7fe05973 Avoid void * arithmetic
reimar
parents: 18961
diff changeset
71 const void *dataptr, int stride,
16117
d280ec2b9e63 More helper functions/defines and bugfixes
reimar
parents: 16109
diff changeset
72 int x, int y, int w, int h, int slice);
16214
ede5b4afd262 Helper function for drawing texture and general cleanup of vo_gl2.c
reimar
parents: 16117
diff changeset
73 void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
ede5b4afd262 Helper function for drawing texture and general cleanup of vo_gl2.c
reimar
parents: 16117
diff changeset
74 GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th,
34983
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
75 int sx, int sy, int rect_tex, int is_yv12, int flip,
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
76 int use_stipple);
18653
5af43a16abc3 loadGPUProgram function to load fragment program with error checking and statistics
reimar
parents: 18622
diff changeset
77 int loadGPUProgram(GLenum target, char *prog);
16488
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
78
16595
b3a9fb41f475 fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents: 16592
diff changeset
79 /** \addtogroup glconversion
b3a9fb41f475 fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents: 16592
diff changeset
80 * \{ */
16488
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
81 //! do not use YUV conversion, this should always stay 0
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
82 #define YUV_CONVERSION_NONE 0
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
83 //! use nVidia specific register combiners for YUV conversion
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
84 #define YUV_CONVERSION_COMBINERS 1
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
85 //! use a fragment program for YUV conversion
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
86 #define YUV_CONVERSION_FRAGMENT 2
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
87 //! use a fragment program for YUV conversion with gamma using POW
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
88 #define YUV_CONVERSION_FRAGMENT_POW 3
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
89 //! use a fragment program with additional table lookup for YUV conversion
3191dcb27a12 hardware color-space conversion for vo_gl and vo_gl2
reimar
parents: 16460
diff changeset
90 #define YUV_CONVERSION_FRAGMENT_LOOKUP 4
16625
6b0dc40bf961 Support for ATI specific YUV->RGB conversion.
reimar
parents: 16608
diff changeset
91 //! use ATI specific register combiners ("fragment program")
6b0dc40bf961 Support for ATI specific YUV->RGB conversion.
reimar
parents: 16608
diff changeset
92 #define YUV_CONVERSION_COMBINERS_ATI 5
18655
6aa0b26d584b Add yuv to rgb conversion using a 3D lookup texture
reimar
parents: 18653
diff changeset
93 //! use a fragment program with 3D table lookup for YUV conversion
6aa0b26d584b Add yuv to rgb conversion using a 3D lookup texture
reimar
parents: 18653
diff changeset
94 #define YUV_CONVERSION_FRAGMENT_LOOKUP3D 6
30951
e76a4f6bfc8d Implement OpenGL-based YUV to RGB version for Radeon 9200 class
reimar
parents: 30945
diff changeset
95 //! use ATI specific "text" register combiners ("fragment program")
e76a4f6bfc8d Implement OpenGL-based YUV to RGB version for Radeon 9200 class
reimar
parents: 30945
diff changeset
96 #define YUV_CONVERSION_TEXT_FRAGMENT 7
36126
fd34a83228ca Switch OpenGL ES renderer to 2.0.
reimar
parents: 36125
diff changeset
97 #define YUV_CONVERSION_SL_PROGRAM 8
18619
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
98 //! use normal bilinear scaling for textures
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
99 #define YUV_SCALER_BILIN 0
18622
dd9a6e8005f3 Add bicubic texture scaling
reimar
parents: 18619
diff changeset
100 //! use higher quality bicubic scaling for textures
dd9a6e8005f3 Add bicubic texture scaling
reimar
parents: 18619
diff changeset
101 #define YUV_SCALER_BICUB 1
22491
1f873be15855 forgotten lscale=2 part for gl_common.h
reimar
parents: 21201
diff changeset
102 //! use cubic scaling in X and normal linear scaling in Y direction
1f873be15855 forgotten lscale=2 part for gl_common.h
reimar
parents: 21201
diff changeset
103 #define YUV_SCALER_BICUB_X 2
24318
e6e8bf060dae Add a bicubic scaler that needs a lot more instruction but no
reimar
parents: 23689
diff changeset
104 //! use cubic scaling without additional lookup texture
e6e8bf060dae Add a bicubic scaler that needs a lot more instruction but no
reimar
parents: 23689
diff changeset
105 #define YUV_SCALER_BICUB_NOTEX 3
25729
9a96fd14d1c5 Add experimental unsharp-mask OpenGL scaler. Certainly not yet perfect.
reimar
parents: 25535
diff changeset
106 #define YUV_SCALER_UNSHARP 4
25758
2ee33590afe6 Add a fragment program for 5x5 unsharp masking
reimar
parents: 25729
diff changeset
107 #define YUV_SCALER_UNSHARP2 5
18619
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
108 //! mask for conversion type
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
109 #define YUV_CONVERSION_MASK 0xF
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
110 //! mask for scaler type
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
111 #define YUV_SCALER_MASK 0xF
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
112 //! shift value for luminance scaler type
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
113 #define YUV_LUM_SCALER_SHIFT 8
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
114 //! shift value for chrominance scaler type
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
115 #define YUV_CHROM_SCALER_SHIFT 12
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
116 //! extract conversion out of type
31675
a40db79e6672 Add () around macro arguments.
reimar
parents: 31567
diff changeset
117 #define YUV_CONVERSION(t) ((t) & YUV_CONVERSION_MASK)
18619
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
118 //! extract luminance scaler out of type
31675
a40db79e6672 Add () around macro arguments.
reimar
parents: 31567
diff changeset
119 #define YUV_LUM_SCALER(t) (((t) >> YUV_LUM_SCALER_SHIFT) & YUV_SCALER_MASK)
18619
106a0c366002 Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents: 18578
diff changeset
120 //! extract chrominance scaler out of type
31675
a40db79e6672 Add () around macro arguments.
reimar
parents: 31567
diff changeset
121 #define YUV_CHROM_SCALER(t) (((t) >> YUV_CHROM_SCALER_SHIFT) & YUV_SCALER_MASK)
31676
a0a48c62bb8c Helper macros to build the yuv conversion type number.
reimar
parents: 31675
diff changeset
122 #define SET_YUV_CONVERSION(c) ((c) & YUV_CONVERSION_MASK)
a0a48c62bb8c Helper macros to build the yuv conversion type number.
reimar
parents: 31675
diff changeset
123 #define SET_YUV_LUM_SCALER(s) (((s) & YUV_SCALER_MASK) << YUV_LUM_SCALER_SHIFT)
a0a48c62bb8c Helper macros to build the yuv conversion type number.
reimar
parents: 31675
diff changeset
124 #define SET_YUV_CHROM_SCALER(s) (((s) & YUV_SCALER_MASK) << YUV_CHROM_SCALER_SHIFT)
33414
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
125 //! returns whether the yuv conversion supports large brightness range etc.
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
126 static inline int glYUVLargeRange(int conv)
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
127 {
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
128 switch (conv)
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
129 {
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
130 case YUV_CONVERSION_NONE:
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
131 case YUV_CONVERSION_COMBINERS:
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
132 case YUV_CONVERSION_COMBINERS_ATI:
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
133 case YUV_CONVERSION_FRAGMENT_LOOKUP3D:
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
134 case YUV_CONVERSION_TEXT_FRAGMENT:
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
135 return 0;
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
136 }
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
137 return 1;
9bc9e1851a13 Support 9- and 10-bit YUV input for OpenGL vos.
reimar
parents: 33366
diff changeset
138 }
34983
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
139
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
140 static inline int glYUVSupportsAlphaTex(int conv)
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
141 {
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
142 switch (conv)
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
143 {
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
144 case YUV_CONVERSION_COMBINERS:
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
145 case YUV_CONVERSION_COMBINERS_ATI:
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
146 case YUV_CONVERSION_TEXT_FRAGMENT:
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
147 return 0;
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
148 }
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
149 return 1;
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
150 }
16595
b3a9fb41f475 fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents: 16592
diff changeset
151 /** \} */
30107
11e3ee8cd05e Put the colourspace-related variables into a separate struct to ease
reimar
parents: 30097
diff changeset
152
11e3ee8cd05e Put the colourspace-related variables into a separate struct to ease
reimar
parents: 30097
diff changeset
153 typedef struct {
11e3ee8cd05e Put the colourspace-related variables into a separate struct to ease
reimar
parents: 30097
diff changeset
154 GLenum target;
11e3ee8cd05e Put the colourspace-related variables into a separate struct to ease
reimar
parents: 30097
diff changeset
155 int type;
11e3ee8cd05e Put the colourspace-related variables into a separate struct to ease
reimar
parents: 30097
diff changeset
156 struct mp_csp_params csp_params;
26835
315e911d5762 Forgotten changes to gl_common.h
reimar
parents: 26203
diff changeset
157 int texw;
315e911d5762 Forgotten changes to gl_common.h
reimar
parents: 26203
diff changeset
158 int texh;
30097
9d724e6def3e Support all planar YUV formats in OpenGL vos.
reimar
parents: 30032
diff changeset
159 int chrom_texw;
9d724e6def3e Support all planar YUV formats in OpenGL vos.
reimar
parents: 30032
diff changeset
160 int chrom_texh;
36111
55bd3eed6c9a Add xyz support for -vo gl.
reimar
parents: 35890
diff changeset
161 int is_planar;
26836
ba086caf1230 Add a filter strength parameter for blurring/sharpening scalers.
reimar
parents: 26835
diff changeset
162 float filter_strength;
33927
9bb97722d8c7 Hook up -vo gl noise support.
reimar
parents: 33414
diff changeset
163 float noise_strength;
34983
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
164 int has_alpha_tex;
26835
315e911d5762 Forgotten changes to gl_common.h
reimar
parents: 26203
diff changeset
165 } gl_conversion_params_t;
315e911d5762 Forgotten changes to gl_common.h
reimar
parents: 26203
diff changeset
166
30964
a5c6b37b3af6 Factor out the YUV->RGB conversion auto-selection and also
reimar
parents: 30951
diff changeset
167 int glAutodetectYUVConversion(void);
26835
315e911d5762 Forgotten changes to gl_common.h
reimar
parents: 26203
diff changeset
168 void glSetupYUVConversion(gl_conversion_params_t *params);
18175
01ca8a5fb8a6 minor fixes: get rid of pointless inline attributes and some additional checks
reimar
parents: 17688
diff changeset
169 void glEnableYUVConversion(GLenum target, int type);
01ca8a5fb8a6 minor fixes: get rid of pointless inline attributes and some additional checks
reimar
parents: 17688
diff changeset
170 void glDisableYUVConversion(GLenum target, int type);
14078
c4033dcb986f More similar code from gl and gl2 moved to gl_common
reimar
parents: 13921
diff changeset
171
34375
5b44af093b2a vo_gl stereo: allow swapping left and right view.
reimar
parents: 34350
diff changeset
172 #define GL_3D_SWAP 32
31567
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
173 #define GL_3D_RED_CYAN 1
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
174 #define GL_3D_GREEN_MAGENTA 2
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
175 #define GL_3D_QUADBUFFER 3
34983
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
176 #define GL_3D_STIPPLE 4
31567
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
177
34983
0034a2bf7b42 Support interleaving the two frame halves from a 3D video
reimar
parents: 34973
diff changeset
178 void glSetupAlphaStippleTex(unsigned pattern);
31567
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
179 void glEnable3DLeft(int type);
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
180 void glEnable3DRight(int type);
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
181 void glDisable3D(int type);
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
182
16595
b3a9fb41f475 fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents: 16592
diff changeset
183 /** \addtogroup glcontext
b3a9fb41f475 fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents: 16592
diff changeset
184 * \{ */
13843
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
185 //! could not set new window, will continue drawing into the old one.
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
186 #define SET_WINDOW_FAILED -1
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
187 //! new window is set, could even transfer the OpenGL context.
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
188 #define SET_WINDOW_OK 0
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
189 //! new window is set, but the OpenGL context needs to be reinitialized.
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
190 #define SET_WINDOW_REINIT 1
16595
b3a9fb41f475 fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents: 16592
diff changeset
191 /** \} */
13843
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
192
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
193 enum MPGLType {
34350
27dead7f2593 Add a suboption to allow forcing use of e.g. OpenGL ES to -vo gl.
reimar
parents: 34338
diff changeset
194 GLTYPE_AUTO = -1,
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
195 GLTYPE_W32,
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
196 GLTYPE_X11,
31020
529614f44431 First steps to support -vo gl with SDL-based Window handling.
reimar
parents: 30985
diff changeset
197 GLTYPE_SDL,
34338
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
198 GLTYPE_EGL_X11,
35087
078a00af881c Use OSX common layer in -vo gl.
reimar
parents: 35005
diff changeset
199 GLTYPE_OSX,
35889
a51578d7e264 Add (hackish) support for OpenGL on Android.
reimar
parents: 35888
diff changeset
200 GLTYPE_EGL_ANDROID,
34350
27dead7f2593 Add a suboption to allow forcing use of e.g. OpenGL ES to -vo gl.
reimar
parents: 34338
diff changeset
201 GLTYPE_COUNT
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
202 };
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
203
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
204 typedef struct MPGLContext {
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
205 enum MPGLType type;
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
206 union {
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
207 int w32;
30023
b7a703cf9178 Rename GL_* defines to CONFIG_GL_*
reimar
parents: 30021
diff changeset
208 #ifdef CONFIG_GL_X11
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
209 XVisualInfo *x11;
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
210 #endif
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
211 } vinfo;
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
212 union {
30023
b7a703cf9178 Rename GL_* defines to CONFIG_GL_*
reimar
parents: 30021
diff changeset
213 #ifdef CONFIG_GL_WIN32
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
214 HGLRC w32;
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
215 #endif
30023
b7a703cf9178 Rename GL_* defines to CONFIG_GL_*
reimar
parents: 30021
diff changeset
216 #ifdef CONFIG_GL_X11
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
217 GLXContext x11;
13653
799f81d3cb19 added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff changeset
218 #endif
35889
a51578d7e264 Add (hackish) support for OpenGL on Android.
reimar
parents: 35888
diff changeset
219 #if defined(CONFIG_GL_EGL_X11) || defined(CONFIG_GL_EGL_ANDROID)
34338
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
220 EGLContext egl;
4a507d3a039a Add highly experimental support for OpenGL ES.
reimar
parents: 34337
diff changeset
221 #endif
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
222 } context;
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
223 int (*setGlWindow)(struct MPGLContext *);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
224 void (*releaseGlContext)(struct MPGLContext *);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
225 void (*swapGlBuffers)(struct MPGLContext *);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
226 void (*update_xinerama_info)(void);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
227 void (*border)(void);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
228 int (*check_events)(void);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
229 void (*fullscreen)(void);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
230 void (*ontop)(void);
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
231 } MPGLContext;
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
232
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
233 int init_mpglcontext(MPGLContext *ctx, enum MPGLType type);
36219
673719da1a92 Extract window creation code to common file.
reimar
parents: 36130
diff changeset
234 int mpglcontext_create_window(MPGLContext *ctx, uint32_t d_width, uint32_t d_height, uint32_t flags, const char *title);
29938
eb6c70e2cbea Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents: 29263
diff changeset
235 void uninit_mpglcontext(MPGLContext *ctx);
13843
3f28d2a56758 fullscreen fixes and GUI support for vo_gl
reimar
parents: 13653
diff changeset
236
34841
4e749c1bbf49 Make a glGetError function pointer available.
reimar
parents: 34375
diff changeset
237 extern GLenum (GLAPIENTRY *mpglGetError)(void);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
238 extern void (GLAPIENTRY *mpglBegin)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
239 extern void (GLAPIENTRY *mpglEnd)(void);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
240 extern void (GLAPIENTRY *mpglViewport)(GLint, GLint, GLsizei, GLsizei);
36126
fd34a83228ca Switch OpenGL ES renderer to 2.0.
reimar
parents: 36125
diff changeset
241 extern void (GLAPIENTRY *mpglLoadMatrixf)(const float *);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
242 extern void (GLAPIENTRY *mpglClear)(GLbitfield);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
243 extern GLuint (GLAPIENTRY *mpglGenLists)(GLsizei);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
244 extern void (GLAPIENTRY *mpglDeleteLists)(GLuint, GLsizei);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
245 extern void (GLAPIENTRY *mpglNewList)(GLuint, GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
246 extern void (GLAPIENTRY *mpglEndList)(void);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
247 extern void (GLAPIENTRY *mpglCallList)(GLuint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
248 extern void (GLAPIENTRY *mpglCallLists)(GLsizei, GLenum, const GLvoid *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
249 extern void (GLAPIENTRY *mpglGenTextures)(GLsizei, GLuint *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
250 extern void (GLAPIENTRY *mpglDeleteTextures)(GLsizei, const GLuint *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
251 extern void (GLAPIENTRY *mpglTexEnvi)(GLenum, GLenum, GLint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
252 extern void (GLAPIENTRY *mpglColor4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
253 extern void (GLAPIENTRY *mpglClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
35890
3be8afb83629 Switch back to glClearDepth.
reimar
parents: 35889
diff changeset
254 extern void (GLAPIENTRY *mpglClearDepth)(double);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
255 extern void (GLAPIENTRY *mpglDepthFunc)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
256 extern void (GLAPIENTRY *mpglEnable)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
257 extern void (GLAPIENTRY *mpglDisable)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
258 extern const GLubyte *(GLAPIENTRY *mpglGetString)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
259 extern void (GLAPIENTRY *mpglDrawBuffer)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
260 extern void (GLAPIENTRY *mpglDepthMask)(GLboolean);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
261 extern void (GLAPIENTRY *mpglBlendFunc)(GLenum, GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
262 extern void (GLAPIENTRY *mpglFlush)(void);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
263 extern void (GLAPIENTRY *mpglFinish)(void);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
264 extern void (GLAPIENTRY *mpglPixelStorei)(GLenum, GLint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
265 extern void (GLAPIENTRY *mpglTexImage1D)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
266 extern void (GLAPIENTRY *mpglTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
267 extern void (GLAPIENTRY *mpglTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
268 extern void (GLAPIENTRY *mpglTexParameteri)(GLenum, GLenum, GLint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
269 extern void (GLAPIENTRY *mpglTexParameterf)(GLenum, GLenum, GLfloat);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
270 extern void (GLAPIENTRY *mpglTexParameterfv)(GLenum, GLenum, const GLfloat *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
271 extern void (GLAPIENTRY *mpglTexCoord2f)(GLfloat, GLfloat);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
272 extern void (GLAPIENTRY *mpglVertex2f)(GLfloat, GLfloat);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
273 extern void (GLAPIENTRY *mpglVertex3f)(GLfloat, GLfloat, GLfloat);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
274 extern void (GLAPIENTRY *mpglNormal3f)(GLfloat, GLfloat, GLfloat);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
275 extern void (GLAPIENTRY *mpglLightfv)(GLenum, GLenum, const GLfloat *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
276 extern void (GLAPIENTRY *mpglColorMaterial)(GLenum, GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
277 extern void (GLAPIENTRY *mpglShadeModel)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
278 extern void (GLAPIENTRY *mpglGetIntegerv)(GLenum, GLint *);
31567
0ffe9f97fc9f Add initial stereo support to -vo gl.
reimar
parents: 31309
diff changeset
279 extern void (GLAPIENTRY *mpglColorMask)(GLboolean, GLboolean, GLboolean, GLboolean);
29939
319b62d55feb Pass all OpenGL functions through a function pointer indirection.
reimar
parents: 29938
diff changeset
280
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
281 extern void (GLAPIENTRY *mpglGenBuffers)(GLsizei, GLuint *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
282 extern void (GLAPIENTRY *mpglDeleteBuffers)(GLsizei, const GLuint *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
283 extern void (GLAPIENTRY *mpglBindBuffer)(GLenum, GLuint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
284 extern GLvoid* (GLAPIENTRY *mpglMapBuffer)(GLenum, GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
285 extern GLboolean (GLAPIENTRY *mpglUnmapBuffer)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
286 extern void (GLAPIENTRY *mpglBufferData)(GLenum, intptr_t, const GLvoid *, GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
287 extern void (GLAPIENTRY *mpglCombinerParameterfv)(GLenum, const GLfloat *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
288 extern void (GLAPIENTRY *mpglCombinerParameteri)(GLenum, GLint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
289 extern void (GLAPIENTRY *mpglCombinerInput)(GLenum, GLenum, GLenum, GLenum, GLenum,
16099
629c54dc7e0d support for rectangular and streaming textures.
reimar
parents: 14142
diff changeset
290 GLenum);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
291 extern void (GLAPIENTRY *mpglCombinerOutput)(GLenum, GLenum, GLenum, GLenum, GLenum,
16099
629c54dc7e0d support for rectangular and streaming textures.
reimar
parents: 14142
diff changeset
292 GLenum, GLenum, GLboolean, GLboolean,
629c54dc7e0d support for rectangular and streaming textures.
reimar
parents: 14142
diff changeset
293 GLboolean);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
294 extern void (GLAPIENTRY *mpglBeginFragmentShader)(void);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
295 extern void (GLAPIENTRY *mpglEndFragmentShader)(void);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
296 extern void (GLAPIENTRY *mpglSampleMap)(GLuint, GLuint, GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
297 extern void (GLAPIENTRY *mpglColorFragmentOp2)(GLenum, GLuint, GLuint, GLuint, GLuint,
16625
6b0dc40bf961 Support for ATI specific YUV->RGB conversion.
reimar
parents: 16608
diff changeset
298 GLuint, GLuint, GLuint, GLuint, GLuint);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
299 extern void (GLAPIENTRY *mpglColorFragmentOp3)(GLenum, GLuint, GLuint, GLuint, GLuint,
16625
6b0dc40bf961 Support for ATI specific YUV->RGB conversion.
reimar
parents: 16608
diff changeset
300 GLuint, GLuint, GLuint, GLuint, GLuint,
6b0dc40bf961 Support for ATI specific YUV->RGB conversion.
reimar
parents: 16608
diff changeset
301 GLuint, GLuint, GLuint);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
302 extern void (GLAPIENTRY *mpglSetFragmentShaderConstant)(GLuint, const GLfloat *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
303 extern void (GLAPIENTRY *mpglActiveTexture)(GLenum);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
304 extern void (GLAPIENTRY *mpglBindTexture)(GLenum, GLuint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
305 extern void (GLAPIENTRY *mpglMultiTexCoord2f)(GLenum, GLfloat, GLfloat);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
306 extern void (GLAPIENTRY *mpglGenPrograms)(GLsizei, GLuint *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
307 extern void (GLAPIENTRY *mpglDeletePrograms)(GLsizei, const GLuint *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
308 extern void (GLAPIENTRY *mpglBindProgram)(GLenum, GLuint);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
309 extern void (GLAPIENTRY *mpglProgramString)(GLenum, GLenum, GLsizei, const GLvoid *);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
310 extern void (GLAPIENTRY *mpglProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat,
16099
629c54dc7e0d support for rectangular and streaming textures.
reimar
parents: 14142
diff changeset
311 GLfloat, GLfloat);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
312 extern int (GLAPIENTRY *mpglSwapInterval)(int);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
313 extern void (GLAPIENTRY *mpglTexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei,
18578
eef0850d4a4b add (currently unused) lookup for glTexImage3D
reimar
parents: 18175
diff changeset
314 GLsizei, GLint, GLenum, GLenum, const GLvoid *);
30945
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
315 extern void* (GLAPIENTRY *mpglAllocateMemoryMESA)(void *, int, size_t, float, float, float);
55917a674d7d Add mpgl prefix to all OpenGL-related function pointers.
reimar
parents: 30137
diff changeset
316 extern void (GLAPIENTRY *mpglFreeMemoryMESA)(void *, int, void *);
16099
629c54dc7e0d support for rectangular and streaming textures.
reimar
parents: 14142
diff changeset
317
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25758
diff changeset
318 #endif /* MPLAYER_GL_COMMON_H */