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