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