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