Mercurial > mplayer.hg
annotate libvo/gl_common.h @ 30085:69799b95e74e
Remove one more incorrect direct ass.h include.
author | reimar |
---|---|
date | Sun, 27 Dec 2009 14:35:09 +0000 |
parents | ba530eb3b2f7 |
children | 9d724e6def3e |
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. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28070
diff
changeset
|
17 */ |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28070
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_GL_COMMON_H |
20 #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
|
21 |
26162
0585db9f5b32
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
22 #include <stdio.h> |
26163
f3e72d1a2329
This header uses parts of stdint.h, so #include it.
diego
parents:
26162
diff
changeset
|
23 #include <stdint.h> |
26162
0585db9f5b32
Add missing header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
24 |
26203 | 25 #include "config.h" |
13843 | 26 #include "mp_msg.h" |
27 | |
28 #include "video_out.h" | |
29 | |
30023 | 30 #ifdef CONFIG_GL_WIN32 |
14142
f0c1ee83b216
Improving gl2 under windows, moving some functionality to gl_common
reimar
parents:
14078
diff
changeset
|
31 #include <windows.h> |
27845
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
32 #include <GL/gl.h> |
14142
f0c1ee83b216
Improving gl2 under windows, moving some functionality to gl_common
reimar
parents:
14078
diff
changeset
|
33 #include "w32_common.h" |
29938
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
34 #endif |
30023 | 35 #ifdef CONFIG_GL_X11 |
27845
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
36 #include <GL/gl.h> |
13843 | 37 #include <X11/Xlib.h> |
38 #include <GL/glx.h> | |
39 #include "x11_common.h" | |
40 #endif | |
13653
799f81d3cb19
added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff
changeset
|
41 |
17668
b822575a1140
workaround for gl.h variants that do not define APIENTRY
reimar
parents:
17566
diff
changeset
|
42 // workaround for some gl.h headers |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
43 #ifndef GLAPIENTRY |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
44 #ifdef APIENTRY |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
45 #define GLAPIENTRY APIENTRY |
30023 | 46 #elif defined(CONFIG_GL_WIN32) |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
47 #define GLAPIENTRY __stdcall |
17668
b822575a1140
workaround for gl.h variants that do not define APIENTRY
reimar
parents:
17566
diff
changeset
|
48 #else |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
49 #define GLAPIENTRY |
17668
b822575a1140
workaround for gl.h variants that do not define APIENTRY
reimar
parents:
17566
diff
changeset
|
50 #endif |
b822575a1140
workaround for gl.h variants that do not define APIENTRY
reimar
parents:
17566
diff
changeset
|
51 #endif |
b822575a1140
workaround for gl.h variants that do not define APIENTRY
reimar
parents:
17566
diff
changeset
|
52 |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
53 /** |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
54 * \defgroup glextdefines OpenGL extension defines |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28446
diff
changeset
|
55 * |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
56 * conditionally define all extension defines used. |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
57 * vendor specific extensions should be marked as such |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
58 * (e.g. _NV), _ARB is not used to ease readability. |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
59 * \{ |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
60 */ |
27845
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
61 #ifndef GL_TEXTURE_3D |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
62 #define GL_TEXTURE_3D 0x806F |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
63 #endif |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
64 #ifndef GL_TEXTURE_WRAP_R |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
65 #define GL_TEXTURE_WRAP_R 0x8072 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
66 #endif |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
67 #ifndef GL_CLAMP_TO_EDGE |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
68 #define GL_CLAMP_TO_EDGE 0x812F |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
69 #endif |
30032 | 70 #ifndef GL_GENERATE_MIPMAP |
71 #define GL_GENERATE_MIPMAP 0x8191 | |
72 #endif | |
16608 | 73 #ifndef GL_REGISTER_COMBINERS_NV |
74 #define GL_REGISTER_COMBINERS_NV 0x8522 | |
75 #endif | |
16488
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
76 #ifndef GL_MAX_GENERAL_COMBINERS_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
77 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
78 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
79 #ifndef GL_NUM_GENERAL_COMBINERS_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
80 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
81 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
82 #ifndef GL_CONSTANT_COLOR0_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
83 #define GL_CONSTANT_COLOR0_NV 0x852A |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
84 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
85 #ifndef GL_CONSTANT_COLOR1_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
86 #define GL_CONSTANT_COLOR1_NV 0x852B |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
87 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
88 #ifndef GL_COMBINER0_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
89 #define GL_COMBINER0_NV 0x8550 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
90 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
91 #ifndef GL_COMBINER1_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
92 #define GL_COMBINER1_NV 0x8551 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
93 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
94 #ifndef GL_VARIABLE_A_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
95 #define GL_VARIABLE_A_NV 0x8523 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
96 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
97 #ifndef GL_VARIABLE_B_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
98 #define GL_VARIABLE_B_NV 0x8524 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
99 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
100 #ifndef GL_VARIABLE_C_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
101 #define GL_VARIABLE_C_NV 0x8525 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
102 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
103 #ifndef GL_VARIABLE_D_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
104 #define GL_VARIABLE_D_NV 0x8526 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
105 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
106 #ifndef GL_UNSIGNED_INVERT_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
107 #define GL_UNSIGNED_INVERT_NV 0x8537 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
108 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
109 #ifndef GL_HALF_BIAS_NORMAL_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
110 #define GL_HALF_BIAS_NORMAL_NV 0x853A |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
111 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
112 #ifndef GL_SIGNED_IDENTITY_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
113 #define GL_SIGNED_IDENTITY_NV 0x853C |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
114 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
115 #ifndef GL_SCALE_BY_FOUR_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
116 #define GL_SCALE_BY_FOUR_NV 0x853F |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
117 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
118 #ifndef GL_DISCARD_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
119 #define GL_DISCARD_NV 0x8530 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
120 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
121 #ifndef GL_SPARE0_NV |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
122 #define GL_SPARE0_NV 0x852E |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
123 #endif |
16625 | 124 #ifndef GL_FRAGMENT_SHADER_ATI |
125 #define GL_FRAGMENT_SHADER_ATI 0x8920 | |
126 #endif | |
127 #ifndef GL_NUM_FRAGMENT_REGISTERS_ATI | |
128 #define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E | |
129 #endif | |
130 #ifndef GL_REG_0_ATI | |
131 #define GL_REG_0_ATI 0x8921 | |
132 #endif | |
133 #ifndef GL_REG_1_ATI | |
134 #define GL_REG_1_ATI 0x8922 | |
135 #endif | |
136 #ifndef GL_REG_2_ATI | |
137 #define GL_REG_2_ATI 0x8923 | |
138 #endif | |
139 #ifndef GL_CON_0_ATI | |
140 #define GL_CON_0_ATI 0x8941 | |
141 #endif | |
142 #ifndef GL_CON_1_ATI | |
143 #define GL_CON_1_ATI 0x8942 | |
144 #endif | |
145 #ifndef GL_ADD_ATI | |
146 #define GL_ADD_ATI 0x8963 | |
147 #endif | |
148 #ifndef GL_MUL_ATI | |
149 #define GL_MUL_ATI 0x8964 | |
150 #endif | |
151 #ifndef GL_MAD_ATI | |
152 #define GL_MAD_ATI 0x8968 | |
153 #endif | |
154 #ifndef GL_SWIZZLE_STR_ATI | |
155 #define GL_SWIZZLE_STR_ATI 0x8976 | |
156 #endif | |
157 #ifndef GL_4X_BIT_ATI | |
158 #define GL_4X_BIT_ATI 2 | |
159 #endif | |
160 #ifndef GL_BIAS_BIT_ATI | |
161 #define GL_BIAS_BIT_ATI 8 | |
162 #endif | |
16488
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
163 #ifndef GL_MAX_TEXTURE_UNITS |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
164 #define GL_MAX_TEXTURE_UNITS 0x84E2 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
165 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
166 #ifndef GL_TEXTURE0 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
167 #define GL_TEXTURE0 0x84C0 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
168 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
169 #ifndef GL_TEXTURE1 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
170 #define GL_TEXTURE1 0x84C1 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
171 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
172 #ifndef GL_TEXTURE2 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
173 #define GL_TEXTURE2 0x84C2 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
174 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
175 #ifndef GL_TEXTURE3 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
176 #define GL_TEXTURE3 0x84C3 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
177 #endif |
16099 | 178 #ifndef GL_TEXTURE_RECTANGLE |
179 #define GL_TEXTURE_RECTANGLE 0x84F5 | |
180 #endif | |
181 #ifndef GL_PIXEL_UNPACK_BUFFER | |
182 #define GL_PIXEL_UNPACK_BUFFER 0x88EC | |
183 #endif | |
184 #ifndef GL_STREAM_DRAW | |
185 #define GL_STREAM_DRAW 0x88E0 | |
186 #endif | |
16237
b951a75d4f83
Our buffer usage actually fits better to GL_DYNAMIC_DRAW than GL_STREAM_DRAW.
reimar
parents:
16233
diff
changeset
|
187 #ifndef GL_DYNAMIC_DRAW |
b951a75d4f83
Our buffer usage actually fits better to GL_DYNAMIC_DRAW than GL_STREAM_DRAW.
reimar
parents:
16233
diff
changeset
|
188 #define GL_DYNAMIC_DRAW 0x88E8 |
b951a75d4f83
Our buffer usage actually fits better to GL_DYNAMIC_DRAW than GL_STREAM_DRAW.
reimar
parents:
16233
diff
changeset
|
189 #endif |
16099 | 190 #ifndef GL_WRITE_ONLY |
191 #define GL_WRITE_ONLY 0x88B9 | |
192 #endif | |
16117 | 193 #ifndef GL_BGR |
194 #define GL_BGR 0x80E0 | |
195 #endif | |
196 #ifndef GL_BGRA | |
197 #define GL_BGRA 0x80E1 | |
198 #endif | |
199 #ifndef GL_UNSIGNED_BYTE_3_3_2 | |
200 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 | |
201 #endif | |
202 #ifndef GL_UNSIGNED_BYTE_2_3_3_REV | |
203 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 | |
204 #endif | |
27845
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
205 #ifndef GL_UNSIGNED_SHORT_4_4_4_4 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
206 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
207 #endif |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
208 #ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
209 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
210 #endif |
16117 | 211 #ifndef GL_UNSIGNED_SHORT_5_6_5 |
212 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 | |
213 #endif | |
27845
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
214 #ifndef GL_UNSIGNED_INT_8_8_8_8 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
215 #define GL_UNSIGNED_INT_8_8_8_8 0x8035 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
216 #endif |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
217 #ifndef GL_UNSIGNED_INT_8_8_8_8_REV |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
218 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
219 #endif |
16117 | 220 #ifndef GL_UNSIGNED_SHORT_5_6_5_REV |
221 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 | |
222 #endif | |
27845
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
223 #ifndef GL_UNSIGNED_INT_10_10_10_2 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
224 #define GL_UNSIGNED_INT_10_10_10_2 0x8036 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
225 #endif |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
226 #ifndef GL_UNSIGNED_INT_2_10_10_10_REV |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
227 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 |
dedacb09ed45
Change OpenGL support to work on unmodified MinGW64
reimar
parents:
27621
diff
changeset
|
228 #endif |
16117 | 229 #ifndef GL_UNSIGNED_SHORT_5_5_5_1 |
230 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 | |
231 #endif | |
232 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV | |
233 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 | |
234 #endif | |
28059
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
235 #ifndef GL_UNSIGNED_SHORT_8_8 |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
236 #define GL_UNSIGNED_SHORT_8_8 0x85BA |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
237 #endif |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
238 #ifndef GL_UNSIGNED_SHORT_8_8_REV |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
239 #define GL_UNSIGNED_SHORT_8_8_REV 0x85BB |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
240 #endif |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
241 #ifndef GL_YCBCR_MESA |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
242 #define GL_YCBCR_MESA 0x8757 |
8f43ff543dc6
Add support for YCBCR MESA texture format to vo_gl.
reimar
parents:
27865
diff
changeset
|
243 #endif |
18961 | 244 #ifndef GL_RGB32F |
245 #define GL_RGB32F 0x8815 | |
246 #endif | |
247 #ifndef GL_FLOAT_RGB32_NV | |
248 #define GL_FLOAT_RGB32_NV 0x8889 | |
249 #endif | |
28070
9c1fdc6420be
100l, forgot setting GL_UNPACK_CLIENT_STORAGE_APPLE for mesa-buffer mode.
reimar
parents:
28067
diff
changeset
|
250 #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE |
9c1fdc6420be
100l, forgot setting GL_UNPACK_CLIENT_STORAGE_APPLE for mesa-buffer mode.
reimar
parents:
28067
diff
changeset
|
251 #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 |
9c1fdc6420be
100l, forgot setting GL_UNPACK_CLIENT_STORAGE_APPLE for mesa-buffer mode.
reimar
parents:
28067
diff
changeset
|
252 #endif |
16488
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
253 #ifndef GL_FRAGMENT_PROGRAM |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
254 #define GL_FRAGMENT_PROGRAM 0x8804 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
255 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
256 #ifndef GL_PROGRAM_FORMAT_ASCII |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
257 #define GL_PROGRAM_FORMAT_ASCII 0x8875 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
258 #endif |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
259 #ifndef GL_PROGRAM_ERROR_POSITION |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
260 #define GL_PROGRAM_ERROR_POSITION 0x864B |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
261 #endif |
27865
428125c9e08e
For fragment programs, check GL_MAX_TEXTURE_IMAGE_UNITS instead of GL_MAX_TEXTURE_UNITS.
reimar
parents:
27845
diff
changeset
|
262 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS |
428125c9e08e
For fragment programs, check GL_MAX_TEXTURE_IMAGE_UNITS instead of GL_MAX_TEXTURE_UNITS.
reimar
parents:
27845
diff
changeset
|
263 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 |
428125c9e08e
For fragment programs, check GL_MAX_TEXTURE_IMAGE_UNITS instead of GL_MAX_TEXTURE_UNITS.
reimar
parents:
27845
diff
changeset
|
264 #endif |
18653
5af43a16abc3
loadGPUProgram function to load fragment program with error checking and statistics
reimar
parents:
18622
diff
changeset
|
265 #ifndef GL_PROGRAM_ERROR_STRING |
5af43a16abc3
loadGPUProgram function to load fragment program with error checking and statistics
reimar
parents:
18622
diff
changeset
|
266 #define GL_PROGRAM_ERROR_STRING 0x8874 |
5af43a16abc3
loadGPUProgram function to load fragment program with error checking and statistics
reimar
parents:
18622
diff
changeset
|
267 #endif |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
268 /** \} */ // end of glextdefines group |
16099 | 269 |
13653
799f81d3cb19
added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff
changeset
|
270 void glAdjustAlignment(int stride); |
799f81d3cb19
added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff
changeset
|
271 |
14078
c4033dcb986f
More similar code from gl and gl2 moved to gl_common
reimar
parents:
13921
diff
changeset
|
272 const char *glValName(GLint value); |
c4033dcb986f
More similar code from gl and gl2 moved to gl_common
reimar
parents:
13921
diff
changeset
|
273 |
16879
6ea220b10e8e
More consistent and sane types. Also avoids some gcc 4 warnings.
reimar
parents:
16625
diff
changeset
|
274 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
|
275 GLenum *gl_format, GLenum *gl_type); |
16117 | 276 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
|
277 void glCreateClearTex(GLenum target, GLenum fmt, GLenum format, GLenum type, GLint filter, |
16460 | 278 int w, int h, unsigned char val); |
16592 | 279 int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter, |
280 FILE *f, int *width, int *height, int *maxval); | |
16117 | 281 void glUploadTex(GLenum target, GLenum format, GLenum type, |
21201 | 282 const void *dataptr, int stride, |
16117 | 283 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
|
284 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
|
285 GLfloat tx, GLfloat ty, GLfloat tw, GLfloat th, |
17220 | 286 int sx, int sy, int rect_tex, int is_yv12, int flip); |
18653
5af43a16abc3
loadGPUProgram function to load fragment program with error checking and statistics
reimar
parents:
18622
diff
changeset
|
287 int loadGPUProgram(GLenum target, char *prog); |
16488
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
288 |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
289 /** \addtogroup glconversion |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
290 * \{ */ |
16488
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
291 //! 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
|
292 #define YUV_CONVERSION_NONE 0 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
293 //! use nVidia specific register combiners for YUV conversion |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
294 #define YUV_CONVERSION_COMBINERS 1 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
295 //! use a fragment program for YUV conversion |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
296 #define YUV_CONVERSION_FRAGMENT 2 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
297 //! 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
|
298 #define YUV_CONVERSION_FRAGMENT_POW 3 |
3191dcb27a12
hardware color-space conversion for vo_gl and vo_gl2
reimar
parents:
16460
diff
changeset
|
299 //! 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
|
300 #define YUV_CONVERSION_FRAGMENT_LOOKUP 4 |
16625 | 301 //! use ATI specific register combiners ("fragment program") |
302 #define YUV_CONVERSION_COMBINERS_ATI 5 | |
18655
6aa0b26d584b
Add yuv to rgb conversion using a 3D lookup texture
reimar
parents:
18653
diff
changeset
|
303 //! 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
|
304 #define YUV_CONVERSION_FRAGMENT_LOOKUP3D 6 |
18619
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
305 //! use normal bilinear scaling for textures |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
306 #define YUV_SCALER_BILIN 0 |
18622 | 307 //! use higher quality bicubic scaling for textures |
308 #define YUV_SCALER_BICUB 1 | |
22491 | 309 //! use cubic scaling in X and normal linear scaling in Y direction |
310 #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
|
311 //! 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
|
312 #define YUV_SCALER_BICUB_NOTEX 3 |
25729
9a96fd14d1c5
Add experimental unsharp-mask OpenGL scaler. Certainly not yet perfect.
reimar
parents:
25535
diff
changeset
|
313 #define YUV_SCALER_UNSHARP 4 |
25758 | 314 #define YUV_SCALER_UNSHARP2 5 |
18619
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
315 //! mask for conversion type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
316 #define YUV_CONVERSION_MASK 0xF |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
317 //! mask for scaler type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
318 #define YUV_SCALER_MASK 0xF |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
319 //! shift value for luminance scaler type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
320 #define YUV_LUM_SCALER_SHIFT 8 |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
321 //! shift value for chrominance scaler type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
322 #define YUV_CHROM_SCALER_SHIFT 12 |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
323 //! extract conversion out of type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
324 #define YUV_CONVERSION(t) (t & YUV_CONVERSION_MASK) |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
325 //! extract luminance scaler out of type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
326 #define YUV_LUM_SCALER(t) ((t >> YUV_LUM_SCALER_SHIFT) & YUV_SCALER_MASK) |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
327 //! extract chrominance scaler out of type |
106a0c366002
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
reimar
parents:
18578
diff
changeset
|
328 #define YUV_CHROM_SCALER(t) ((t >> YUV_CHROM_SCALER_SHIFT) & YUV_SCALER_MASK) |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
329 /** \} */ |
26835 | 330 typedef struct { |
331 GLenum target; | |
332 int type; | |
333 float brightness; | |
334 float contrast; | |
335 float hue; | |
336 float saturation; | |
337 float rgamma; | |
338 float ggamma; | |
339 float bgamma; | |
340 int texw; | |
341 int texh; | |
26836
ba086caf1230
Add a filter strength parameter for blurring/sharpening scalers.
reimar
parents:
26835
diff
changeset
|
342 float filter_strength; |
26835 | 343 } gl_conversion_params_t; |
344 | |
345 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
|
346 void glEnableYUVConversion(GLenum target, int type); |
01ca8a5fb8a6
minor fixes: get rid of pointless inline attributes and some additional checks
reimar
parents:
17688
diff
changeset
|
347 void glDisableYUVConversion(GLenum target, int type); |
14078
c4033dcb986f
More similar code from gl and gl2 moved to gl_common
reimar
parents:
13921
diff
changeset
|
348 |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
349 /** \addtogroup glcontext |
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
350 * \{ */ |
13843 | 351 //! could not set new window, will continue drawing into the old one. |
352 #define SET_WINDOW_FAILED -1 | |
353 //! new window is set, could even transfer the OpenGL context. | |
354 #define SET_WINDOW_OK 0 | |
355 //! new window is set, but the OpenGL context needs to be reinitialized. | |
356 #define SET_WINDOW_REINIT 1 | |
16595
b3a9fb41f475
fix/improve code doxumentation. Also group gl_common functions in several
reimar
parents:
16592
diff
changeset
|
357 /** \} */ |
13843 | 358 |
29938
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
359 enum MPGLType { |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
360 GLTYPE_W32, |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
361 GLTYPE_X11, |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
362 }; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
363 |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
364 typedef struct MPGLContext { |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
365 enum MPGLType type; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
366 union { |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
367 int w32; |
30023 | 368 #ifdef CONFIG_GL_X11 |
29938
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
369 XVisualInfo *x11; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
370 #endif |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
371 } vinfo; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
372 union { |
30023 | 373 #ifdef CONFIG_GL_WIN32 |
29938
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
374 HGLRC w32; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
375 #endif |
30023 | 376 #ifdef CONFIG_GL_X11 |
29938
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
377 GLXContext x11; |
13653
799f81d3cb19
added gl_common for code used by both vo_gl.c and vo_gl2.c.
reimar
parents:
diff
changeset
|
378 #endif |
29938
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
379 } context; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
380 int (*setGlWindow)(struct MPGLContext *); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
381 void (*releaseGlContext)(struct MPGLContext *); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
382 void (*swapGlBuffers)(struct MPGLContext *); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
383 void (*update_xinerama_info)(void); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
384 void (*border)(void); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
385 int (*check_events)(void); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
386 void (*fullscreen)(void); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
387 void (*ontop)(void); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
388 } MPGLContext; |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
389 |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
390 int init_mpglcontext(MPGLContext *ctx, enum MPGLType type); |
eb6c70e2cbea
Very preliminary code to allow selecting the OpenGL backend at runtime.
reimar
parents:
29263
diff
changeset
|
391 void uninit_mpglcontext(MPGLContext *ctx); |
13843 | 392 |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
393 extern void (GLAPIENTRY *Begin)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
394 extern void (GLAPIENTRY *End)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
395 extern void (GLAPIENTRY *Viewport)(GLint, GLint, GLsizei, GLsizei); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
396 extern void (GLAPIENTRY *MatrixMode)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
397 extern void (GLAPIENTRY *LoadIdentity)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
398 extern void (GLAPIENTRY *Scaled)(double, double, double); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
399 extern void (GLAPIENTRY *Ortho)(double, double, double, double, double, double); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
400 extern void (GLAPIENTRY *PushMatrix)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
401 extern void (GLAPIENTRY *PopMatrix)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
402 extern void (GLAPIENTRY *Clear)(GLbitfield); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
403 extern GLuint (GLAPIENTRY *GenLists)(GLsizei); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
404 extern void (GLAPIENTRY *DeleteLists)(GLuint, GLsizei); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
405 extern void (GLAPIENTRY *NewList)(GLuint, GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
406 extern void (GLAPIENTRY *EndList)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
407 extern void (GLAPIENTRY *CallList)(GLuint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
408 extern void (GLAPIENTRY *CallLists)(GLsizei, GLenum, const GLvoid *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
409 extern void (GLAPIENTRY *GenTextures)(GLsizei, GLuint *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
410 extern void (GLAPIENTRY *DeleteTextures)(GLsizei, const GLuint *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
411 extern void (GLAPIENTRY *TexEnvi)(GLenum, GLenum, GLint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
412 extern void (GLAPIENTRY *Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
413 extern void (GLAPIENTRY *Color3f)(GLfloat, GLfloat, GLfloat); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
414 extern void (GLAPIENTRY *ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
415 extern void (GLAPIENTRY *Enable)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
416 extern void (GLAPIENTRY *Disable)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
417 extern const GLubyte *(GLAPIENTRY *GetString)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
418 extern void (GLAPIENTRY *DrawBuffer)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
419 extern void (GLAPIENTRY *DepthMask)(GLboolean); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
420 extern void (GLAPIENTRY *BlendFunc)(GLenum, GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
421 extern void (GLAPIENTRY *Flush)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
422 extern void (GLAPIENTRY *Finish)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
423 extern void (GLAPIENTRY *PixelStorei)(GLenum, GLint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
424 extern void (GLAPIENTRY *TexImage1D)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
425 extern void (GLAPIENTRY *TexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
426 extern void (GLAPIENTRY *TexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
427 extern void (GLAPIENTRY *TexParameteri)(GLenum, GLenum, GLint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
428 extern void (GLAPIENTRY *TexParameterf)(GLenum, GLenum, GLfloat); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
429 extern void (GLAPIENTRY *TexParameterfv)(GLenum, GLenum, const GLfloat *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
430 extern void (GLAPIENTRY *TexCoord2f)(GLfloat, GLfloat); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
431 extern void (GLAPIENTRY *Vertex2f)(GLfloat, GLfloat); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
432 extern void (GLAPIENTRY *GetIntegerv)(GLenum, GLint *); |
29939
319b62d55feb
Pass all OpenGL functions through a function pointer indirection.
reimar
parents:
29938
diff
changeset
|
433 |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
434 extern void (GLAPIENTRY *GenBuffers)(GLsizei, GLuint *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
435 extern void (GLAPIENTRY *DeleteBuffers)(GLsizei, const GLuint *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
436 extern void (GLAPIENTRY *BindBuffer)(GLenum, GLuint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
437 extern GLvoid* (GLAPIENTRY *MapBuffer)(GLenum, GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
438 extern GLboolean (GLAPIENTRY *UnmapBuffer)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
439 extern void (GLAPIENTRY *BufferData)(GLenum, intptr_t, const GLvoid *, GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
440 extern void (GLAPIENTRY *CombinerParameterfv)(GLenum, const GLfloat *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
441 extern void (GLAPIENTRY *CombinerParameteri)(GLenum, GLint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
442 extern void (GLAPIENTRY *CombinerInput)(GLenum, GLenum, GLenum, GLenum, GLenum, |
16099 | 443 GLenum); |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
444 extern void (GLAPIENTRY *CombinerOutput)(GLenum, GLenum, GLenum, GLenum, GLenum, |
16099 | 445 GLenum, GLenum, GLboolean, GLboolean, |
446 GLboolean); | |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
447 extern void (GLAPIENTRY *BeginFragmentShader)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
448 extern void (GLAPIENTRY *EndFragmentShader)(void); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
449 extern void (GLAPIENTRY *SampleMap)(GLuint, GLuint, GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
450 extern void (GLAPIENTRY *ColorFragmentOp2)(GLenum, GLuint, GLuint, GLuint, GLuint, |
16625 | 451 GLuint, GLuint, GLuint, GLuint, GLuint); |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
452 extern void (GLAPIENTRY *ColorFragmentOp3)(GLenum, GLuint, GLuint, GLuint, GLuint, |
16625 | 453 GLuint, GLuint, GLuint, GLuint, GLuint, |
454 GLuint, GLuint, GLuint); | |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
455 extern void (GLAPIENTRY *SetFragmentShaderConstant)(GLuint, const GLfloat *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
456 extern void (GLAPIENTRY *ActiveTexture)(GLenum); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
457 extern void (GLAPIENTRY *BindTexture)(GLenum, GLuint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
458 extern void (GLAPIENTRY *MultiTexCoord2f)(GLenum, GLfloat, GLfloat); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
459 extern void (GLAPIENTRY *GenPrograms)(GLsizei, GLuint *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
460 extern void (GLAPIENTRY *DeletePrograms)(GLsizei, const GLuint *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
461 extern void (GLAPIENTRY *BindProgram)(GLenum, GLuint); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
462 extern void (GLAPIENTRY *ProgramString)(GLenum, GLenum, GLsizei, const GLvoid *); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
463 extern void (GLAPIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat, |
16099 | 464 GLfloat, GLfloat); |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
465 extern int (GLAPIENTRY *SwapInterval)(int); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
466 extern void (GLAPIENTRY *TexImage3D)(GLenum, GLint, GLenum, GLsizei, GLsizei, |
18578 | 467 GLsizei, GLint, GLenum, GLenum, const GLvoid *); |
29941
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
468 extern void* (GLAPIENTRY *AllocateMemoryMESA)(void *, int, size_t, float, float, float); |
092c1689c9df
Prefer GLAPIENTRY over APIENTRY, it is the better name and used more by OpenGL headers.
reimar
parents:
29939
diff
changeset
|
469 extern void (GLAPIENTRY *FreeMemoryMESA)(void *, int, void *); |
16099 | 470 |
26029 | 471 #endif /* MPLAYER_GL_COMMON_H */ |