widl: Remove '\n' from yyerror calls.
[wine/multimedia.git] / dlls / d3d8 / d3dcore_gl.h
blob9fa8cd9a6e8fc9ea43538aba0b73f5a411edf983
1 /*
2 * Direct3D gl definitions
4 * Copyright 2003-2004 Raphael Junqueira
5 * Copyright 2004 Christian Costa
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __WINE_D3DCORE_GL_H
23 #define __WINE_D3DCORE_GL_H
25 #undef APIENTRY
26 #define APIENTRY
28 /**********************************
29 * OpenGL Extensions (EXT and ARB)
30 * defines and functions pointer
33 /* GL_ARB_point_parameters */
34 #ifndef GL_ARB_point_parameters
35 #define GL_ARB_point_parameters 1
36 #define GL_POINT_SIZE_MIN_ARB 0x8126
37 #define GL_POINT_SIZE_MAX_ARB 0x8127
38 #define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
39 #define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
40 #endif
41 typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
42 typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
43 /* GL_ARB_vertex_blend */
44 #ifndef GL_ARB_vertex_blend
45 #define GL_ARB_vertex_blend 1
46 #define GL_MAX_VERTEX_UNITS_ARB 0x86A4
47 #define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
48 #define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
49 #define GL_VERTEX_BLEND_ARB 0x86A7
50 #define GL_CURRENT_WEIGHT_ARB 0x86A8
51 #define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
52 #define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
53 #define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
54 #define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
55 #define GL_WEIGHT_ARRAY_ARB 0x86AD
56 #define GL_MODELVIEW0_ARB 0x1700
57 #define GL_MODELVIEW1_ARB 0x850A
58 #define GL_MODELVIEW2_ARB 0x8722
59 #define GL_MODELVIEW3_ARB 0x8723
60 #define GL_MODELVIEW4_ARB 0x8724
61 #define GL_MODELVIEW5_ARB 0x8725
62 #define GL_MODELVIEW6_ARB 0x8726
63 #define GL_MODELVIEW7_ARB 0x8727
64 #define GL_MODELVIEW8_ARB 0x8728
65 #define GL_MODELVIEW9_ARB 0x8729
66 #define GL_MODELVIEW10_ARB 0x872A
67 #define GL_MODELVIEW11_ARB 0x872B
68 #define GL_MODELVIEW12_ARB 0x872C
69 #define GL_MODELVIEW13_ARB 0x872D
70 #define GL_MODELVIEW14_ARB 0x872E
71 #define GL_MODELVIEW15_ARB 0x872F
72 #define GL_MODELVIEW16_ARB 0x8730
73 #define GL_MODELVIEW17_ARB 0x8731
74 #define GL_MODELVIEW18_ARB 0x8732
75 #define GL_MODELVIEW19_ARB 0x8733
76 #define GL_MODELVIEW20_ARB 0x8734
77 #define GL_MODELVIEW21_ARB 0x8735
78 #define GL_MODELVIEW22_ARB 0x8736
79 #define GL_MODELVIEW23_ARB 0x8737
80 #define GL_MODELVIEW24_ARB 0x8738
81 #define GL_MODELVIEW25_ARB 0x8739
82 #define GL_MODELVIEW26_ARB 0x873A
83 #define GL_MODELVIEW27_ARB 0x873B
84 #define GL_MODELVIEW28_ARB 0x873C
85 #define GL_MODELVIEW29_ARB 0x873D
86 #define GL_MODELVIEW30_ARB 0x873E
87 #define GL_MODELVIEW31_ARB 0x873F
88 #endif
89 /* GL_EXT_secondary_color */
90 #ifndef GL_EXT_secondary_color
91 #define GL_EXT_secondary_color 1
92 #define GL_COLOR_SUM_EXT 0x8458
93 #define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
94 #define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
95 #define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
96 #define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
97 #define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
98 #define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
99 #endif
100 typedef void (APIENTRY * PGLFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
101 typedef void (APIENTRY * PGLFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
102 typedef void (APIENTRY * PGLFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
103 typedef void (APIENTRY * PGLFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
104 /* GL_EXT_paletted_texture */
105 #ifndef GL_EXT_paletted_texture
106 #define GL_EXT_paletted_texture 1
107 #define GL_COLOR_INDEX1_EXT 0x80E2
108 #define GL_COLOR_INDEX2_EXT 0x80E3
109 #define GL_COLOR_INDEX4_EXT 0x80E4
110 #define GL_COLOR_INDEX8_EXT 0x80E5
111 #define GL_COLOR_INDEX12_EXT 0x80E6
112 #define GL_COLOR_INDEX16_EXT 0x80E7
113 #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
114 #endif
115 typedef void (APIENTRY * PGLFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
116 /* GL_EXT_point_parameters */
117 #ifndef GL_EXT_point_parameters
118 #define GL_EXT_point_parameters 1
119 #define GL_POINT_SIZE_MIN_EXT 0x8126
120 #define GL_POINT_SIZE_MAX_EXT 0x8127
121 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
122 #define GL_DISTANCE_ATTENUATION_EXT 0x8129
123 #endif
124 typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
125 typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
126 /* GL_EXT_texture_env_combine */
127 #ifndef GL_EXT_texture_env_combine
128 #define GL_EXT_texture_env_combine 1
129 #define GL_COMBINE_EXT 0x8570
130 #define GL_COMBINE_RGB_EXT 0x8571
131 #define GL_COMBINE_ALPHA_EXT 0x8572
132 #define GL_RGB_SCALE_EXT 0x8573
133 #define GL_ADD_SIGNED_EXT 0x8574
134 #define GL_INTERPOLATE_EXT 0x8575
135 #define GL_SUBTRACT_EXT 0x84E7
136 #define GL_CONSTANT_EXT 0x8576
137 #define GL_PRIMARY_COLOR_EXT 0x8577
138 #define GL_PREVIOUS_EXT 0x8578
139 #define GL_SOURCE0_RGB_EXT 0x8580
140 #define GL_SOURCE1_RGB_EXT 0x8581
141 #define GL_SOURCE2_RGB_EXT 0x8582
142 #define GL_SOURCE3_RGB_EXT 0x8583
143 #define GL_SOURCE4_RGB_EXT 0x8584
144 #define GL_SOURCE5_RGB_EXT 0x8585
145 #define GL_SOURCE6_RGB_EXT 0x8586
146 #define GL_SOURCE7_RGB_EXT 0x8587
147 #define GL_SOURCE0_ALPHA_EXT 0x8588
148 #define GL_SOURCE1_ALPHA_EXT 0x8589
149 #define GL_SOURCE2_ALPHA_EXT 0x858A
150 #define GL_SOURCE3_ALPHA_EXT 0x858B
151 #define GL_SOURCE4_ALPHA_EXT 0x858C
152 #define GL_SOURCE5_ALPHA_EXT 0x858D
153 #define GL_SOURCE6_ALPHA_EXT 0x858E
154 #define GL_SOURCE7_ALPHA_EXT 0x858F
155 #define GL_OPERAND0_RGB_EXT 0x8590
156 #define GL_OPERAND1_RGB_EXT 0x8591
157 #define GL_OPERAND2_RGB_EXT 0x8592
158 #define GL_OPERAND3_RGB_EXT 0x8593
159 #define GL_OPERAND4_RGB_EXT 0x8594
160 #define GL_OPERAND5_RGB_EXT 0x8595
161 #define GL_OPERAND6_RGB_EXT 0x8596
162 #define GL_OPERAND7_RGB_EXT 0x8597
163 #define GL_OPERAND0_ALPHA_EXT 0x8598
164 #define GL_OPERAND1_ALPHA_EXT 0x8599
165 #define GL_OPERAND2_ALPHA_EXT 0x859A
166 #define GL_OPERAND3_ALPHA_EXT 0x859B
167 #define GL_OPERAND4_ALPHA_EXT 0x859C
168 #define GL_OPERAND5_ALPHA_EXT 0x859D
169 #define GL_OPERAND6_ALPHA_EXT 0x859E
170 #define GL_OPERAND7_ALPHA_EXT 0x859F
171 #endif
172 /* GL_EXT_texture_env_dot3 */
173 #ifndef GL_EXT_texture_env_dot3
174 #define GL_EXT_texture_env_dot3 1
175 #define GL_DOT3_RGB_EXT 0x8740
176 #define GL_DOT3_RGBA_EXT 0x8741
177 #endif
178 /* GL_EXT_texture_lod_bias */
179 #ifndef GL_EXT_texture_lod_bias
180 #define GL_EXT_texture_lod_bias 1
181 #define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
182 #define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
183 #define GL_TEXTURE_LOD_BIAS_EXT 0x8501
184 #endif
185 /* GL_ARB_texture_border_clamp */
186 #ifndef GL_ARB_texture_border_clamp
187 #define GL_ARB_texture_border_clamp 1
188 #define GL_CLAMP_TO_BORDER_ARB 0x812D
189 #endif
190 /* GL_ARB_texture_mirrored_repeat (full support GL1.4) */
191 #ifndef GL_ARB_texture_mirrored_repeat
192 #define GL_ARB_texture_mirrored_repeat 1
193 #define GL_MIRRORED_REPEAT_ARB 0x8370
194 #endif
195 /* GL_ATI_texture_mirror_once */
196 #ifndef GL_ATI_texture_mirror_once
197 #define GL_ATI_texture_mirror_once 1
198 #define GL_MIRROR_CLAMP_ATI 0x8742
199 #define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
200 #endif
201 /* GL_ARB_texture_env_dot3 */
202 #ifndef GL_ARB_texture_env_dot3
203 #define GL_ARB_texture_env_dot3 1
204 #define GL_DOT3_RGB_ARB 0x86AE
205 #define GL_DOT3_RGBA_ARB 0x86AF
206 #endif
207 /* GL_EXT_texture_env_dot3 */
208 #ifndef GL_EXT_texture_env_dot3
209 #define GL_EXT_texture_env_dot3 1
210 #define GL_DOT3_RGB_EXT 0x8740
211 #define GL_DOT3_RGBA_EXT 0x8741
212 #endif
213 /* GL_ARB_vertex_program */
214 #ifndef GL_ARB_vertex_program
215 #define GL_ARB_vertex_program 1
216 #define GL_VERTEX_PROGRAM_ARB 0x8620
217 #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
218 #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
219 #define GL_COLOR_SUM_ARB 0x8458
220 #define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
221 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
222 #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
223 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
224 #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
225 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
226 #define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
227 #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
228 #define GL_PROGRAM_LENGTH_ARB 0x8627
229 #define GL_PROGRAM_FORMAT_ARB 0x8876
230 #define GL_PROGRAM_BINDING_ARB 0x8677
231 #define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
232 #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
233 #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
234 #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
235 #define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
236 #define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
237 #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
238 #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
239 #define GL_PROGRAM_PARAMETERS_ARB 0x88A8
240 #define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
241 #define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
242 #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
243 #define GL_PROGRAM_ATTRIBS_ARB 0x88AC
244 #define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
245 #define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
246 #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
247 #define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
248 #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
249 #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
250 #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
251 #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
252 #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
253 #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
254 #define GL_PROGRAM_STRING_ARB 0x8628
255 #define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
256 #define GL_CURRENT_MATRIX_ARB 0x8641
257 #define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
258 #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
259 #define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
260 #define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
261 #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
262 #define GL_PROGRAM_ERROR_STRING_ARB 0x8874
263 #define GL_MATRIX0_ARB 0x88C0
264 #define GL_MATRIX1_ARB 0x88C1
265 #define GL_MATRIX2_ARB 0x88C2
266 #define GL_MATRIX3_ARB 0x88C3
267 #define GL_MATRIX4_ARB 0x88C4
268 #define GL_MATRIX5_ARB 0x88C5
269 #define GL_MATRIX6_ARB 0x88C6
270 #define GL_MATRIX7_ARB 0x88C7
271 #define GL_MATRIX8_ARB 0x88C8
272 #define GL_MATRIX9_ARB 0x88C9
273 #define GL_MATRIX10_ARB 0x88CA
274 #define GL_MATRIX11_ARB 0x88CB
275 #define GL_MATRIX12_ARB 0x88CC
276 #define GL_MATRIX13_ARB 0x88CD
277 #define GL_MATRIX14_ARB 0x88CE
278 #define GL_MATRIX15_ARB 0x88CF
279 #define GL_MATRIX16_ARB 0x88D0
280 #define GL_MATRIX17_ARB 0x88D1
281 #define GL_MATRIX18_ARB 0x88D2
282 #define GL_MATRIX19_ARB 0x88D3
283 #define GL_MATRIX20_ARB 0x88D4
284 #define GL_MATRIX21_ARB 0x88D5
285 #define GL_MATRIX22_ARB 0x88D6
286 #define GL_MATRIX23_ARB 0x88D7
287 #define GL_MATRIX24_ARB 0x88D8
288 #define GL_MATRIX25_ARB 0x88D9
289 #define GL_MATRIX26_ARB 0x88DA
290 #define GL_MATRIX27_ARB 0x88DB
291 #define GL_MATRIX28_ARB 0x88DC
292 #define GL_MATRIX29_ARB 0x88DD
293 #define GL_MATRIX30_ARB 0x88DE
294 #define GL_MATRIX31_ARB 0x88DF
295 #endif
296 typedef void (APIENTRY * PGLFNVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
297 typedef void (APIENTRY * PGLFNVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
298 typedef void (APIENTRY * PGLFNVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
299 typedef void (APIENTRY * PGLFNVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
300 typedef void (APIENTRY * PGLFNVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
301 typedef void (APIENTRY * PGLFNVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
302 typedef void (APIENTRY * PGLFNVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
303 typedef void (APIENTRY * PGLFNVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
304 typedef void (APIENTRY * PGLFNVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
305 typedef void (APIENTRY * PGLFNVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
306 typedef void (APIENTRY * PGLFNVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
307 typedef void (APIENTRY * PGLFNVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
308 typedef void (APIENTRY * PGLFNVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
309 typedef void (APIENTRY * PGLFNVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
310 typedef void (APIENTRY * PGLFNVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
311 typedef void (APIENTRY * PGLFNVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
312 typedef void (APIENTRY * PGLFNVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
313 typedef void (APIENTRY * PGLFNVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
314 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
315 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
316 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
317 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
318 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
319 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
320 typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
321 typedef void (APIENTRY * PGLFNVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
322 typedef void (APIENTRY * PGLFNVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
323 typedef void (APIENTRY * PGLFNVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
324 typedef void (APIENTRY * PGLFNVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
325 typedef void (APIENTRY * PGLFNVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
326 typedef void (APIENTRY * PGLFNVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
327 typedef void (APIENTRY * PGLFNVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
328 typedef void (APIENTRY * PGLFNVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
329 typedef void (APIENTRY * PGLFNVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
330 typedef void (APIENTRY * PGLFNVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
331 typedef void (APIENTRY * PGLFNVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
332 typedef void (APIENTRY * PGLFNVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
333 typedef void (APIENTRY * PGLFNENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
334 typedef void (APIENTRY * PGLFNDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
335 typedef void (APIENTRY * PGLFNPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
336 typedef void (APIENTRY * PGLFNBINDPROGRAMARBPROC) (GLenum target, GLuint program);
337 typedef void (APIENTRY * PGLFNDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
338 typedef void (APIENTRY * PGLFNGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
339 typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
340 typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
341 typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
342 typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
343 typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
344 typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
345 typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
346 typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
347 typedef void (APIENTRY * PGLFNGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
348 typedef void (APIENTRY * PGLFNGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
349 typedef void (APIENTRY * PGLFNGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
350 typedef void (APIENTRY * PGLFNGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
351 typedef void (APIENTRY * PGLFNGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
352 typedef void (APIENTRY * PGLFNGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
353 typedef void (APIENTRY * PGLFNGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
354 typedef void (APIENTRY * PGLFNGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
355 typedef void (APIENTRY * PGLFNGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
356 typedef void (APIENTRY * PGLFNGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
357 typedef GLboolean (APIENTRY * PGLFNISPROGRAMARBPROC) (GLuint program);
358 #ifndef GL_ARB_fragment_program
359 #define GL_ARB_fragment_program 1
360 #define GL_FRAGMENT_PROGRAM_ARB 0x8804
361 #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
362 #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
363 #define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
364 #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
365 #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
366 #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
367 #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
368 #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
369 #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
370 #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
371 #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
372 #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
373 #define GL_MAX_TEXTURE_COORDS_ARB 0x8871
374 #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
375 /* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
376 #endif
377 /* GL_EXT_texture_compression_s3tc */
378 #ifndef GL_EXT_texture_compression_s3tc
379 #define GL_EXT_texture_compression_s3tc 1
380 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
381 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
382 #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
383 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
384 #endif
385 typedef void (APIENTRY * PGLFNCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
386 typedef void (APIENTRY * PGLFNCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
387 typedef void (APIENTRY * PGLFNCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
388 typedef void (APIENTRY * PGLFNCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
389 typedef void (APIENTRY * PGLFNCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
390 typedef void (APIENTRY * PGLFNCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
391 typedef void (APIENTRY * PGLFNGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
392 /* GL_EXT_stencil_wrap */
393 #ifndef GL_EXT_stencil_wrap
394 #define GL_EXT_stencil_wrap 1
395 #define GL_INCR_WRAP_EXT 0x8507
396 #define GL_DECR_WRAP_EXT 0x8508
397 #endif
398 /* GL_NV_fog_distance */
399 #ifndef GL_NV_fog_distance
400 #define GL_NV_fog_distance 1
401 #define GL_FOG_DISTANCE_MODE_NV 0x855A
402 #define GL_EYE_RADIAL_NV 0x855B
403 #define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
404 /* reuse GL_EYE_PLANE */
405 #endif
406 /* GL_NV_texgen_reflection */
407 #ifndef GL_NV_texgen_reflection
408 #define GL_NV_texgen_reflection 1
409 #define GL_NORMAL_MAP_NV 0x8511
410 #define GL_REFLECTION_MAP_NV 0x8512
411 #endif
412 /* GL_NV_register_combiners */
413 #ifndef GL_NV_register_combiners
414 #define GL_NV_register_combiners 1
415 #define GL_REGISTER_COMBINERS_NV 0x8522
416 #define GL_VARIABLE_A_NV 0x8523
417 #define GL_VARIABLE_B_NV 0x8524
418 #define GL_VARIABLE_C_NV 0x8525
419 #define GL_VARIABLE_D_NV 0x8526
420 #define GL_VARIABLE_E_NV 0x8527
421 #define GL_VARIABLE_F_NV 0x8528
422 #define GL_VARIABLE_G_NV 0x8529
423 #define GL_CONSTANT_COLOR0_NV 0x852A
424 #define GL_CONSTANT_COLOR1_NV 0x852B
425 #define GL_PRIMARY_COLOR_NV 0x852C
426 #define GL_SECONDARY_COLOR_NV 0x852D
427 #define GL_SPARE0_NV 0x852E
428 #define GL_SPARE1_NV 0x852F
429 #define GL_DISCARD_NV 0x8530
430 #define GL_E_TIMES_F_NV 0x8531
431 #define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
432 #define GL_UNSIGNED_IDENTITY_NV 0x8536
433 #define GL_UNSIGNED_INVERT_NV 0x8537
434 #define GL_EXPAND_NORMAL_NV 0x8538
435 #define GL_EXPAND_NEGATE_NV 0x8539
436 #define GL_HALF_BIAS_NORMAL_NV 0x853A
437 #define GL_HALF_BIAS_NEGATE_NV 0x853B
438 #define GL_SIGNED_IDENTITY_NV 0x853C
439 #define GL_SIGNED_NEGATE_NV 0x853D
440 #define GL_SCALE_BY_TWO_NV 0x853E
441 #define GL_SCALE_BY_FOUR_NV 0x853F
442 #define GL_SCALE_BY_ONE_HALF_NV 0x8540
443 #define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
444 #define GL_COMBINER_INPUT_NV 0x8542
445 #define GL_COMBINER_MAPPING_NV 0x8543
446 #define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
447 #define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
448 #define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
449 #define GL_COMBINER_MUX_SUM_NV 0x8547
450 #define GL_COMBINER_SCALE_NV 0x8548
451 #define GL_COMBINER_BIAS_NV 0x8549
452 #define GL_COMBINER_AB_OUTPUT_NV 0x854A
453 #define GL_COMBINER_CD_OUTPUT_NV 0x854B
454 #define GL_COMBINER_SUM_OUTPUT_NV 0x854C
455 #define GL_MAX_GENERAL_COMBINERS_NV 0x854D
456 #define GL_NUM_GENERAL_COMBINERS_NV 0x854E
457 #define GL_COLOR_SUM_CLAMP_NV 0x854F
458 #define GL_COMBINER0_NV 0x8550
459 #define GL_COMBINER1_NV 0x8551
460 #define GL_COMBINER2_NV 0x8552
461 #define GL_COMBINER3_NV 0x8553
462 #define GL_COMBINER4_NV 0x8554
463 #define GL_COMBINER5_NV 0x8555
464 #define GL_COMBINER6_NV 0x8556
465 #define GL_COMBINER7_NV 0x8557
466 /* reuse GL_TEXTURE0_ARB */
467 /* reuse GL_TEXTURE1_ARB */
468 /* reuse GL_ZERO */
469 /* reuse GL_NONE */
470 /* reuse GL_FOG */
471 #endif
472 typedef void (APIENTRY * PGLFNCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
473 typedef void (APIENTRY * PGLFNCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
474 typedef void (APIENTRY * PGLFNCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
475 typedef void (APIENTRY * PGLFNCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
476 typedef void (APIENTRY * PGLFNCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
477 typedef void (APIENTRY * PGLFNCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
478 typedef void (APIENTRY * PGLFNFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
479 typedef void (APIENTRY * PGLFNGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
480 typedef void (APIENTRY * PGLFNGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
481 typedef void (APIENTRY * PGLFNGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
482 typedef void (APIENTRY * PGLFNGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
483 typedef void (APIENTRY * PGLFNGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
484 typedef void (APIENTRY * PGLFNGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
485 /* GL_NV_register_combiners2 */
486 #ifndef GL_NV_register_combiners2
487 #define GL_NV_register_combiners2 1
488 #define GL_PER_STAGE_CONSTANTS_NV 0x8535
489 #endif
490 typedef void (APIENTRY * PGLFNCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
491 typedef void (APIENTRY * PGLFNGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
492 /* GL_NV_texture_shader */
493 #ifndef GL_NV_texture_shader
494 #define GL_NV_texture_shader 1
495 #define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
496 #define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
497 #define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
498 #define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
499 #define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
500 #define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
501 #define GL_DSDT_MAG_INTENSITY_NV 0x86DC
502 #define GL_SHADER_CONSISTENT_NV 0x86DD
503 #define GL_TEXTURE_SHADER_NV 0x86DE
504 #define GL_SHADER_OPERATION_NV 0x86DF
505 #define GL_CULL_MODES_NV 0x86E0
506 #define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
507 #define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
508 #define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
509 #define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
510 #define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
511 #define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
512 #define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
513 #define GL_CONST_EYE_NV 0x86E5
514 #define GL_PASS_THROUGH_NV 0x86E6
515 #define GL_CULL_FRAGMENT_NV 0x86E7
516 #define GL_OFFSET_TEXTURE_2D_NV 0x86E8
517 #define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
518 #define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
519 #define GL_DOT_PRODUCT_NV 0x86EC
520 #define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
521 #define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
522 #define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
523 #define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
524 #define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
525 #define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
526 #define GL_HILO_NV 0x86F4
527 #define GL_DSDT_NV 0x86F5
528 #define GL_DSDT_MAG_NV 0x86F6
529 #define GL_DSDT_MAG_VIB_NV 0x86F7
530 #define GL_HILO16_NV 0x86F8
531 #define GL_SIGNED_HILO_NV 0x86F9
532 #define GL_SIGNED_HILO16_NV 0x86FA
533 #define GL_SIGNED_RGBA_NV 0x86FB
534 #define GL_SIGNED_RGBA8_NV 0x86FC
535 #define GL_SIGNED_RGB_NV 0x86FE
536 #define GL_SIGNED_RGB8_NV 0x86FF
537 #define GL_SIGNED_LUMINANCE_NV 0x8701
538 #define GL_SIGNED_LUMINANCE8_NV 0x8702
539 #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
540 #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
541 #define GL_SIGNED_ALPHA_NV 0x8705
542 #define GL_SIGNED_ALPHA8_NV 0x8706
543 #define GL_SIGNED_INTENSITY_NV 0x8707
544 #define GL_SIGNED_INTENSITY8_NV 0x8708
545 #define GL_DSDT8_NV 0x8709
546 #define GL_DSDT8_MAG8_NV 0x870A
547 #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
548 #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
549 #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
550 #define GL_HI_SCALE_NV 0x870E
551 #define GL_LO_SCALE_NV 0x870F
552 #define GL_DS_SCALE_NV 0x8710
553 #define GL_DT_SCALE_NV 0x8711
554 #define GL_MAGNITUDE_SCALE_NV 0x8712
555 #define GL_VIBRANCE_SCALE_NV 0x8713
556 #define GL_HI_BIAS_NV 0x8714
557 #define GL_LO_BIAS_NV 0x8715
558 #define GL_DS_BIAS_NV 0x8716
559 #define GL_DT_BIAS_NV 0x8717
560 #define GL_MAGNITUDE_BIAS_NV 0x8718
561 #define GL_VIBRANCE_BIAS_NV 0x8719
562 #define GL_TEXTURE_BORDER_VALUES_NV 0x871A
563 #define GL_TEXTURE_HI_SIZE_NV 0x871B
564 #define GL_TEXTURE_LO_SIZE_NV 0x871C
565 #define GL_TEXTURE_DS_SIZE_NV 0x871D
566 #define GL_TEXTURE_DT_SIZE_NV 0x871E
567 #define GL_TEXTURE_MAG_SIZE_NV 0x871F
568 #endif
569 /* GL_NV_texture_shader2 */
570 #ifndef GL_NV_texture_shader2
571 #define GL_NV_texture_shader2 1
572 #define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
573 #endif
574 /* GL_NV_texture_shader3 */
575 #ifndef GL_NV_texture_shader3
576 #define GL_NV_texture_shader3 1
577 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
578 #define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
579 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
580 #define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
581 #define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
582 #define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
583 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
584 #define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
585 #define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
586 #define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
587 #define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
588 #define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
589 #define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
590 #define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
591 #define GL_HILO8_NV 0x885E
592 #define GL_SIGNED_HILO8_NV 0x885F
593 #define GL_FORCE_BLUE_TO_ONE_NV 0x8860
594 #endif
595 /* GL_ATI_texture_env_combine3 */
596 #ifndef GL_ATI_texture_env_combine3
597 #define GL_ATI_texture_env_combine3 1
598 #define GL_MODULATE_ADD_ATI 0x8744
599 #define GL_MODULATE_SIGNED_ADD_ATI 0x8745
600 #define GL_MODULATE_SUBTRACT_ATI 0x8746
601 /* #define ONE */
602 /* #define ZERO */
603 #endif
605 /* GL_ARB_point_sprite */
606 #ifndef GL_ARB_point_sprite
607 #define GL_ARB_point_sprite 1
608 #define GL_POINT_SPRITE_ARB 0x8861
609 #define GL_COORD_REPLACE_ARB 0x8862
610 #endif
612 /* GL_ARB_multisample */
613 #ifndef GL_ARB_multisample
614 #define GL_ARB_multisample 1
615 #define GL_MULTISAMPLE_ARB 0x809D
616 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
617 #define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
618 #define GL_SAMPLE_COVERAGE_ARB 0x80A0
619 #define GL_SAMPLE_BUFFERS_ARB 0x80A8
620 #define GL_SAMPLES_ARB 0x80A9
621 #define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
622 #define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
623 #define GL_MULTISAMPLE_BIT_ARB 0x20000000
624 #endif
625 typedef void (APIENTRY * PGLFNSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
627 /*******
628 * OpenGL Official Version
629 * defines
632 /* GL_VERSION_1_3 */
633 #if !defined(GL_DOT3_RGBA)
634 # define GL_DOT3_RGBA 0x8741
635 #endif
636 #if !defined(GL_SUBTRACT)
637 # define GL_SUBTRACT 0x84E7
638 #endif
641 /*********************************
642 * OpenGL GLX Extensions
643 * defines and functions pointer
648 /*********************************
649 * OpenGL GLX Official Version
650 * defines and functions pointer
653 /* GLX_VERSION_1_3 */
654 typedef GLXFBConfig * (APIENTRY * PGLXFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
655 typedef GLXFBConfig * (APIENTRY * PGLXFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
656 typedef int (APIENTRY * PGLXFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
657 typedef XVisualInfo * (APIENTRY * PGLXFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
658 typedef GLXWindow (APIENTRY * PGLXFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
659 typedef void (APIENTRY * PGLXFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
660 typedef GLXPixmap (APIENTRY * PGLXFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
661 typedef void (APIENTRY * PGLXFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
662 typedef GLXPbuffer (APIENTRY * PGLXFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
663 typedef void (APIENTRY * PGLXFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
664 typedef void (APIENTRY * PGLXFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
665 typedef GLXContext (APIENTRY * PGLXFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
666 typedef Bool (APIENTRY * PGLXFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
667 typedef GLXDrawable (APIENTRY * PGLXFNGLXGETCURRENTREADDRAWABLEPROC) (void);
668 typedef Display * (APIENTRY * PGLXFNGLXGETCURRENTDISPLAYPROC) (void);
669 typedef int (APIENTRY * PGLXFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
670 typedef void (APIENTRY * PGLXFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
671 typedef void (APIENTRY * PGLXFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
674 /********************************************
675 * OpenGL Supported Extensions (ARB and EXT)
678 typedef enum _GL_SupportedExt {
679 /* ARB */
680 ARB_FRAGMENT_PROGRAM,
681 ARB_MULTISAMPLE,
682 ARB_MULTITEXTURE,
683 ARB_POINT_PARAMETERS,
684 ARB_POINT_SPRITE,
685 ARB_TEXTURE_COMPRESSION,
686 ARB_TEXTURE_CUBE_MAP,
687 ARB_TEXTURE_ENV_ADD,
688 ARB_TEXTURE_ENV_COMBINE,
689 ARB_TEXTURE_ENV_DOT3,
690 ARB_TEXTURE_BORDER_CLAMP,
691 ARB_TEXTURE_MIRRORED_REPEAT,
692 ARB_VERTEX_PROGRAM,
693 ARB_VERTEX_BLEND,
694 /* EXT */
695 EXT_FOG_COORD,
696 EXT_PALETTED_TEXTURE,
697 EXT_POINT_PARAMETERS,
698 EXT_SECONDARY_COLOR,
699 EXT_STENCIL_WRAP,
700 EXT_TEXTURE_COMPRESSION_S3TC,
701 EXT_TEXTURE_FILTER_ANISOTROPIC,
702 EXT_TEXTURE_LOD,
703 EXT_TEXTURE_LOD_BIAS,
704 EXT_TEXTURE_ENV_ADD,
705 EXT_TEXTURE_ENV_COMBINE,
706 EXT_TEXTURE_ENV_DOT3,
707 EXT_VERTEX_WEIGHTING,
708 /* NVIDIA */
709 NV_FOG_DISTANCE,
710 NV_FRAGMENT_PROGRAM,
711 NV_REGISTER_COMBINERS,
712 NV_REGISTER_COMBINERS2,
713 NV_TEXGEN_REFLECTION,
714 NV_TEXTURE_ENV_COMBINE4,
715 NV_TEXTURE_SHADER,
716 NV_TEXTURE_SHADER2,
717 NV_TEXTURE_SHADER3,
718 NV_VERTEX_PROGRAM,
719 /* ATI */
720 ATI_TEXTURE_ENV_COMBINE3,
721 ATI_TEXTURE_MIRROR_ONCE,
722 EXT_VERTEX_SHADER,
724 OPENGL_SUPPORTED_EXT_END
725 } GL_SupportedExt;
727 typedef enum _GL_Vendors {
728 VENDOR_WINE = 0x0,
729 VENDOR_MESA = 0x1,
730 VENDOR_ATI = 0x1002,
731 VENDOR_NVIDIA = 0x10de
732 } GL_Vendors;
734 typedef enum _GL_Cards {
735 CARD_WINE = 0x0,
736 CARD_ATI_RADEON_8500 = 0x514c,
737 CARD_ATI_RADEON_9700PRO = 0x4e44,
738 CARD_ATI_RADEON_9800PRO = 0x4e48,
739 CARD_NVIDIA_GEFORCE4_TI4600 = 0x0250,
740 CARD_NVIDIA_GEFORCEFX_5900ULTRA = 0x0330
741 } GL_Cards;
743 typedef enum _GL_VSVersion {
744 VS_VERSION_NOT_SUPPORTED = 0x0,
745 VS_VERSION_10 = 0x10,
746 VS_VERSION_11 = 0x11,
747 VS_VERSION_20 = 0x20,
748 VS_VERSION_30 = 0x30,
749 /*Force 32-bits*/
750 VS_VERSION_FORCE_DWORD = 0x7FFFFFFF
751 } GL_VSVersion;
753 typedef enum _GL_PSVersion {
754 PS_VERSION_NOT_SUPPORTED = 0x0,
755 PS_VERSION_10 = 0x10,
756 PS_VERSION_11 = 0x11,
757 PS_VERSION_12 = 0x12,
758 PS_VERSION_13 = 0x13,
759 PS_VERSION_14 = 0x14,
760 PS_VERSION_20 = 0x20,
761 PS_VERSION_30 = 0x30,
762 /*Force 32-bits*/
763 PS_VERSION_FORCE_DWORD = 0x7FFFFFFF
764 } GL_PSVersion;
766 #define MAKEDWORD_VERSION(maj, min) ((maj & 0x0000FFFF) << 16) | (min & 0x0000FFFF)
768 #define GL_EXT_FUNCS_GEN \
769 /** ARB Extensions **/ \
770 /* GL_ARB_point_parameters */ \
771 USE_GL_FUNC(PGLFNGLPOINTPARAMETERFARBPROC, glPointParameterfARB); \
772 USE_GL_FUNC(PGLFNGLPOINTPARAMETERFVARBPROC, glPointParameterfvARB); \
773 /* GL_ARB_texture_compression */ \
774 USE_GL_FUNC(PGLFNCOMPRESSEDTEXIMAGE2DPROC, glCompressedTexImage2DARB); \
775 USE_GL_FUNC(PGLFNCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3DARB); \
776 USE_GL_FUNC(PGLFNCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2DARB); \
777 USE_GL_FUNC(PGLFNCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3DARB); \
778 /** EXT Extensions **/ \
779 /* GL_EXT_fog_coord */ \
780 /* GL_EXT_paletted_texture */ \
781 USE_GL_FUNC(PGLFNGLCOLORTABLEEXTPROC, glColorTableEXT); \
782 /* GL_EXT_point_parameters */ \
783 USE_GL_FUNC(PGLFNGLPOINTPARAMETERFEXTPROC, glPointParameterfEXT); \
784 USE_GL_FUNC(PGLFNGLPOINTPARAMETERFVEXTPROC, glPointParameterfvEXT); \
785 /* GL_EXT_secondary_color */ \
786 USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3UBEXTPROC, glSecondaryColor3ubEXT); \
787 USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FEXTPROC, glSecondaryColor3fEXT); \
788 USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FVEXTPROC, glSecondaryColor3fvEXT); \
789 USE_GL_FUNC(PGLFNGLSECONDARYCOLORPOINTEREXTPROC, glSecondaryColorPointerEXT); \
790 /* GL_EXT_secondary_color */ \
791 USE_GL_FUNC(PGLFNGENPROGRAMSARBPROC, glGenProgramsARB); \
792 USE_GL_FUNC(PGLFNBINDPROGRAMARBPROC, glBindProgramARB); \
793 USE_GL_FUNC(PGLFNPROGRAMSTRINGARBPROC, glProgramStringARB); \
794 USE_GL_FUNC(PGLFNDELETEPROGRAMSARBPROC, glDeleteProgramsARB); \
795 USE_GL_FUNC(PGLFNPROGRAMENVPARAMETER4FVARBPROC, glProgramEnvParameter4fvARB); \
796 USE_GL_FUNC(PGLFNVERTEXATTRIBPOINTERARBPROC, glVertexAttribPointerARB); \
797 USE_GL_FUNC(PGLFNENABLEVERTEXATTRIBARRAYARBPROC, glEnableVertexAttribArrayARB); \
798 USE_GL_FUNC(PGLFNDISABLEVERTEXATTRIBARRAYARBPROC, glDisableVertexAttribArrayARB); \
800 #define GLX_EXT_FUNCS_GEN \
801 /** GLX_VERSION_1_3 **/ \
802 USE_GL_FUNC(PGLXFNGLXCREATEPBUFFERPROC, glXCreatePbuffer); \
803 USE_GL_FUNC(PGLXFNGLXDESTROYPBUFFERPROC, glXDestroyPbuffer); \
804 USE_GL_FUNC(PGLXFNGLXCREATEPIXMAPPROC, glXCreatePixmap); \
805 USE_GL_FUNC(PGLXFNGLXDESTROYPIXMAPPROC, glXDestroyPixmap); \
806 USE_GL_FUNC(PGLXFNGLXCREATENEWCONTEXTPROC, glXCreateNewContext); \
807 USE_GL_FUNC(PGLXFNGLXMAKECONTEXTCURRENTPROC, glXMakeContextCurrent); \
808 USE_GL_FUNC(PGLXFNGLXCHOOSEFBCONFIGPROC, glXChooseFBConfig); \
810 #undef APIENTRY
811 #undef CALLBACK
812 #undef WINAPI
814 /* Redefines the constants */
815 #define CALLBACK __stdcall
816 #define WINAPI __stdcall
817 #define APIENTRY WINAPI
819 /* Routine common to the draw primitive and draw indexed primitive routines */
820 void drawPrimitive(LPDIRECT3DDEVICE8 iface,
821 int PrimitiveType,
822 long NumPrimitives,
824 /* for Indexed: */
825 long StartVertexIndex,
826 long StartIdx,
827 short idxBytes,
828 const void *idxData,
829 int minIndex);
832 /*****************************************
833 * Structures required to draw primitives
836 typedef struct Direct3DStridedData {
837 BYTE *lpData; /* Pointer to start of data */
838 DWORD dwStride; /* Stride between occurances of this data */
839 DWORD dwType; /* Type (as in D3DVSDT_TYPE) */
840 } Direct3DStridedData;
842 typedef struct Direct3DVertexStridedData {
843 union {
844 struct {
845 Direct3DStridedData position;
846 Direct3DStridedData blendWeights;
847 Direct3DStridedData blendMatrixIndices;
848 Direct3DStridedData normal;
849 Direct3DStridedData pSize;
850 Direct3DStridedData diffuse;
851 Direct3DStridedData specular;
852 Direct3DStridedData texCoords[8];
853 } s;
854 Direct3DStridedData input[16]; /* Indexed by constants in D3DVSDE_REGISTER */
855 } u;
856 } Direct3DVertexStridedData;
858 typedef struct _WineD3D_GLContext {
859 GLXContext glCtx;
860 XVisualInfo* visInfo;
861 Display* display;
862 Drawable drawable;
863 DWORD ref;
864 } WineD3D_Context;
866 #define USE_GL_FUNC(type, pfn) type pfn;
867 typedef struct _GL_Info {
868 unsigned bIsFilled;
870 DWORD glx_version;
871 DWORD gl_version;
873 GL_Vendors gl_vendor;
874 GL_Cards gl_card;
875 DWORD gl_driver_version;
876 CHAR gl_renderer[255];
877 /**
878 * CAPS Constants
880 UINT max_lights;
881 UINT max_textures;
882 UINT max_clipplanes;
884 GL_PSVersion ps_arb_version;
885 GL_PSVersion ps_nv_version;
887 GL_VSVersion vs_arb_version;
888 GL_VSVersion vs_nv_version;
889 GL_VSVersion vs_ati_version;
891 BOOL supported[50];
893 /** OpenGL EXT and ARB functions ptr */
894 GL_EXT_FUNCS_GEN;
895 /** OpenGL GLX functions ptr */
896 GLX_EXT_FUNCS_GEN;
897 /**/
898 } GL_Info;
899 #undef USE_GL_FUNC
902 #endif /* __WINE_D3DCORE_GL_H */