/[pkgs]/devel/8Kingdoms/extgl.h
ViewVC logotype

Contents of /devel/8Kingdoms/extgl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Tue Dec 11 11:34:11 2007 UTC (23 months, 2 weeks ago) by jwrdegoede
Branch: MAIN
CVS Tags: Kingdoms-1_1_0-6_fc9, Kingdoms-1_1_0-3_fc9, Kingdoms-1_1_0-5_fc9, F-10-split, Kingdoms-1_1_0-7_fc11, Kingdoms-1_1_0-4_fc9, F-9-split, Kingdoms-1_1_0-2_fc9, HEAD
File MIME type: text/x-csrc
initial 8Kingdoms import
1 /* Most parts copyright (c) 2001-2002 Lev Povalahev under this lisence: */
2
3 /* ----------------------------------------------------------------------------
4 Copyright (c) 2002, Lev Povalahev
5 All rights reserved.
6
7 Redistribution and use in source and binary forms, with or without modification,
8 are permitted provided that the following conditions are met:
9
10 * Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12 * Redistributions in binary form must reproduce the above copyright notice,
13 this list of conditions and the following disclaimer in the documentation
14 and/or other materials provided with the distribution.
15 * The name of the author may not be used to endorse or promote products
16 derived from this software without specific prior written permission.
17
18 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 THE POSSIBILITY OF SUCH DAMAGE.
28 ------------------------------------------------------------------------------*/
29 /*
30 GL_draw_range_elements support added by Benjamin Karaban
31
32 Lev Povalahev contact information:
33
34 levp@gmx.net
35
36 http://www.levp.de/3d/
37 */
38 /* These extensions are supported:
39 GL_ARB_depth_texture
40 GL_ARB_fragment_program
41 GL_ARB_imaging
42 GL_ARB_matrix_palette
43 GL_ARB_multisample
44 GL_ARB_multitexture
45 GL_ARB_point_parameters
46 GL_ARB_shadow
47 GL_ARB_shadow_ambient
48 GL_ARB_texture_compression
49 GL_ARB_texture_env_add
50 GL_ARB_texture_env_dot3
51 GL_ARB_texture_env_combine
52 GL_ARB_texture_env_crossbar
53 GL_ARB_texture_border_clamp
54 GL_ARB_texture_cube_map
55 GL_ARB_texture_mirrored_repeat
56 GL_ARB_transpose_matrix
57 GL_ARB_vertex_blend
58 GL_ARB_vertex_buffer_object
59 GL_ARB_vertex_program
60 GL_ARB_window_pos
61 GL_EXT_abgr
62 GL_EXT_bgra
63 GL_EXT_blend_color
64 GL_EXT_blend_func_separate
65 GL_EXT_blend_minmax
66 GL_EXT_blend_subtract
67 GL_EXT_compiled_vertex_array
68 GL_EXT_cull_vertex
69 GL_EXT_depth_bounds_test
70 GL_EXT_draw_range_elements
71 GL_EXT_fog_coord
72 GL_EXT_multi_draw_arrays
73 GL_EXT_point_parameters
74 GL_EXT_secondary_color
75 GL_EXT_separate_specular_color
76 GL_EXT_shadow_funcs
77 GL_EXT_stencil_two_side
78 GL_EXT_stencil_wrap
79 GL_EXT_texture_compression_s3tc
80 GL_EXT_texture_filter_anisotropic
81 GL_EXT_texture_lod_bias
82 GL_EXT_texture_rectangle
83 GL_EXT_vertex_shader
84 GL_EXT_vertex_weighting
85 GL_ATI_draw_buffers
86 GL_ATI_element_array
87 GL_ATI_envmap_bumpmap
88 GL_ATI_fragment_shader
89 GL_ATI_map_object_buffer
90 GL_ATI_pn_triangles
91 GL_ATI_separate_stencil
92 GL_ATI_text_fragment_shader
93 GL_ATI_texture_env_combine3
94 GL_ATI_texture_float
95 GL_ATI_texture_mirror_once
96 GL_ATI_vertex_array_object;
97 GL_ATI_vertex_attrib_array_object
98 GL_ATI_vertex_streams
99 GL_ATIX_point_sprites
100 GL_ATIX_texture_env_route
101 GL_HP_occlusion_test
102 GL_NV_blend_square
103 GL_NV_copy_depth_to_color
104 GL_NV_depth_clamp
105 GL_NV_element_array
106 GL_NV_evaluators
107 GL_NV_fence
108 GL_NV_float_buffer
109 GL_NV_fog_distance
110 GL_NV_fragment_program
111 GL_NV_half_float
112 GL_NV_light_max_exponent
113 GL_NV_occlusion_query
114 GL_NV_packed_depth_stencil
115 GL_NV_pixel_data_range
116 GL_NV_point_sprite
117 GL_NV_primitive_restart
118 GL_NV_register_combiners
119 GL_NV_register_combiners2
120 GL_NV_texgen_reflection
121 GL_NV_texture_env_combine4
122 GL_NV_texture_expand_normal
123 GL_NV_texture_rectangle
124 GL_NV_texture_shader
125 GL_NV_texture_shader2
126 GL_NV_texture_shader3
127 GL_NV_vertex_array_range
128 GL_NV_vertex_array_range2
129 GL_NV_vertex_program
130 GL_NV_vertex_program1_1
131 GL_NV_vertex_program2
132 GL_SGIS_generate_mipmap
133 GL_SGIX_shadow
134 GL_SGIX_depth_texture
135 WGL_ARB_buffer_region
136 WGL_ARB_extensions_string
137 WGL_ARB_make_current_read;
138 WGL_ARB_multisample
139 WGL_ARB_pbuffer
140 WGL_ARB_pixel_format
141 WGL_ARB_render_texture
142 WGL_ATI_pixel_format_float
143 WGL_EXT_extensions_string
144 WGL_EXT_swap_control
145 WGL_NV_render_depth_texture
146 WGL_NV_render_texture_rectangle
147 */
148
149 /* VERSION 1.04 */
150
151 /*
152 CHANGES
153
154 08.06.03 Added GL_EXT_depth_bounds_test
155
156 01.06.03 Added GL_EXT_texture_rectangle
157
158 13.04.03 Fixed a typo in ARBvbo
159
160 24.03.03 I'm starting version numbering and protocolling the changes here from this release on.
161 This version will be 1.01. The additions in this version will be
162 ARB_vertex_buffer_object and hopefully cygwin support. Fixed a typo in a license.
163 */
164 #ifndef __EXTGL_H__
165 #define __EXTGL_H__
166
167 /*-----------------------------------------*/
168
169 #ifdef __gl_h_
170 #error extgl.h should be included before gl.h
171 #endif
172 #ifdef __GL_H_
173 #error extgl.h should be included before gl.h
174 #endif
175
176 #define __glext_h_
177 #define __GLEXT_H_
178
179 #define __gl_h_
180 #define __GL_H__
181
182 #ifndef APIENTRY
183 #define APIENTRY
184 #endif
185
186 #define GLAPI extern
187 #define GLAPIENTRY __stdcall
188
189 #ifdef __cplusplus
190 extern "C" {
191 #endif
192
193 /* stuff for NV_half_float extension (datatype and conversion functions)
194 I hope this type will be reused for other 2 byte float extensions */
195
196 union ieee_half /* ieee-like 16 bit float */
197 {
198 unsigned short bits;
199 struct
200 {
201 unsigned long m : 10; /* mantissa */
202 unsigned long e : 5; /* exponent */
203 unsigned long s : 1; /* sign */
204 } ieee;
205 };
206
207 union ieee_single /* ieee-754 single floating point type */
208 {
209 float f;
210 struct
211 {
212 unsigned long m : 23; /* mantissa */
213 unsigned long e : 8; /* exponent */
214 unsigned long s : 1; /* sign */
215 } ieee;
216 };
217
218 /* the actual typedef */
219
220 typedef unsigned short GLhalf;
221
222 /* conversion functions */
223
224 /* half to float */
225 __inline static float htof(GLhalf val)
226 {
227 union ieee_half h;
228 union ieee_single sng;
229 h.bits = val;
230 sng.ieee.s = h.ieee.s;
231
232 /* special cases */
233 if ((h.ieee.e==0) && (h.ieee.m==0))
234 { /* zero */
235 sng.ieee.m=0;
236 sng.ieee.e=0;
237 }
238 else if ((h.ieee.e==0) && (h.ieee.m!=0))
239 { /* denorm -- denorm half will fit in non-denorm single */
240 const float half_denorm = (1.0f/16384.0f); // 2^-14
241 float mantissa = ((float)(h.ieee.m)) / 1024.0f;
242 float sgn = (h.ieee.s)? -1.0f :1.0f;
243 sng.f = sgn*mantissa*half_denorm;
244 }
245 else if ((h.ieee.e==31) && (h.ieee.m==0))
246 { /* infinity */
247 sng.ieee.e = 0xff;
248 sng.ieee.m = 0;
249 }
250 else if ((h.ieee.e==31) && (h.ieee.m!=0))
251 { /* NaN */
252 sng.ieee.e = 0xff;
253 sng.ieee.m = 1;
254 }
255 else
256 {
257 sng.ieee.e = h.ieee.e+112;
258 sng.ieee.m = (h.ieee.m << 13);
259 }
260
261 return sng.f;
262 }
263
264 /* float to half */
265 __inline static GLhalf ftoh(float val)
266 {
267 union ieee_single f;
268 union ieee_half h;
269 f.f = val;
270
271 h.ieee.s = f.ieee.s;
272
273 /* special cases */
274
275
276 if ((f.ieee.e==0) && (f.ieee.m==0))
277 { /* zero */
278 h.ieee.m = 0;
279 h.ieee.e = 0;
280 }
281 else if ((f.ieee.e==0) && (f.ieee.m!=0))
282 { /* denorm -- denorm float maps to 0 half */
283 h.ieee.m = 0;
284 h.ieee.e = 0;
285 }
286 else if ((f.ieee.e==0xff) && (f.ieee.m==0))
287 { /* infinity */
288 h.ieee.m = 0;
289 h.ieee.e = 31;
290 }
291 else if ((f.ieee.e==0xff) && (f.ieee.m!=0))
292 { /* NaN */
293 h.ieee.m = 1;
294 h.ieee.e = 31;
295 }
296 else
297 { /* normal case */
298 int new_exp = f.ieee.e-127;
299 if (new_exp<-24)
300 { /* half can't map such numbers */
301 h.ieee.m = 0;
302 h.ieee.e = 0;
303 }
304
305 if (new_exp<-14)
306 { /* this maps to a denorm */
307 unsigned int exp_val = (unsigned int) (-14 - new_exp); // 2^-exp_val
308 h.ieee.e = 0;
309 switch (exp_val)
310 {
311 case 0: h.ieee.m = 0; break; /* logical error */
312 case 1: h.ieee.m = 512 + (f.ieee.m>>14); break;
313 case 2: h.ieee.m = 256 + (f.ieee.m>>15); break;
314 case 3: h.ieee.m = 128 + (f.ieee.m>>16); break;
315 case 4: h.ieee.m = 64 + (f.ieee.m>>17); break;
316 case 5: h.ieee.m = 32 + (f.ieee.m>>18); break;
317 case 6: h.ieee.m = 16 + (f.ieee.m>>19); break;
318 case 7: h.ieee.m = 8 + (f.ieee.m>>20); break;
319 case 8: h.ieee.m = 4 + (f.ieee.m>>21); break;
320 case 9: h.ieee.m = 2 + (f.ieee.m>>22); break;
321 case 10: h.ieee.m = 1; break;
322 }
323 }
324 else if (new_exp>15)
325 { /* map this value to infinity */
326 h.ieee.m = 0;
327 h.ieee.e = 31;
328 }
329 else
330 {
331 h.ieee.e = new_exp+15;
332 h.ieee.m = (f.ieee.m >> 13);
333 }
334 }
335 return h.bits;
336 }
337
338 /* OpenGL 1.1 - 1.3 definitions and prototypes below were taken from Mesa,
339 licence: */
340
341 /*
342 * Mesa 3-D graphics library
343 * Version: 7.0
344 *
345 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
346 *
347 * Permission is hereby granted, free of charge, to any person obtaining a
348 * copy of this software and associated documentation files (the "Software"),
349 * to deal in the Software without restriction, including without limitation
350 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
351 * and/or sell copies of the Software, and to permit persons to whom the
352 * Software is furnished to do so, subject to the following conditions:
353 *
354 * The above copyright notice and this permission notice shall be included
355 * in all copies or substantial portions of the Software.
356 *
357 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
358 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
359 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
360 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
361 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
362 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
363 */
364
365 #define GL_VERSION_1_1 1
366 #define GL_VERSION_1_2 1
367 #define GL_VERSION_1_3 1
368 #define GL_ARB_imaging 1
369
370
371 /*
372 * Datatypes
373 */
374 typedef unsigned int GLenum;
375 typedef unsigned char GLboolean;
376 typedef unsigned int GLbitfield;
377 typedef void GLvoid;
378 typedef signed char GLbyte; /* 1-byte signed */
379 typedef short GLshort; /* 2-byte signed */
380 typedef int GLint; /* 4-byte signed */
381 typedef unsigned char GLubyte; /* 1-byte unsigned */
382 typedef unsigned short GLushort; /* 2-byte unsigned */
383 typedef unsigned int GLuint; /* 4-byte unsigned */
384 typedef int GLsizei; /* 4-byte signed */
385 typedef float GLfloat; /* single precision float */
386 typedef float GLclampf; /* single precision float in [0,1] */
387 typedef double GLdouble; /* double precision float */
388 typedef double GLclampd; /* double precision float in [0,1] */
389
390
391
392 /*
393 * Constants
394 */
395
396 /* Boolean values */
397 #define GL_FALSE 0x0
398 #define GL_TRUE 0x1
399
400 /* Data types */
401 #define GL_BYTE 0x1400
402 #define GL_UNSIGNED_BYTE 0x1401
403 #define GL_SHORT 0x1402
404 #define GL_UNSIGNED_SHORT 0x1403
405 #define GL_INT 0x1404
406 #define GL_UNSIGNED_INT 0x1405
407 #define GL_FLOAT 0x1406
408 #define GL_2_BYTES 0x1407
409 #define GL_3_BYTES 0x1408
410 #define GL_4_BYTES 0x1409
411 #define GL_DOUBLE 0x140A
412
413 /* Primitives */
414 #define GL_POINTS 0x0000
415 #define GL_LINES 0x0001
416 #define GL_LINE_LOOP 0x0002
417 #define GL_LINE_STRIP 0x0003
418 #define GL_TRIANGLES 0x0004
419 #define GL_TRIANGLE_STRIP 0x0005
420 #define GL_TRIANGLE_FAN 0x0006
421 #define GL_QUADS 0x0007
422 #define GL_QUAD_STRIP 0x0008
423 #define GL_POLYGON 0x0009
424
425 /* Vertex Arrays */
426 #define GL_VERTEX_ARRAY 0x8074
427 #define GL_NORMAL_ARRAY 0x8075
428 #define GL_COLOR_ARRAY 0x8076
429 #define GL_INDEX_ARRAY 0x8077
430 #define GL_TEXTURE_COORD_ARRAY 0x8078
431 #define GL_EDGE_FLAG_ARRAY 0x8079
432 #define GL_VERTEX_ARRAY_SIZE 0x807A
433 #define GL_VERTEX_ARRAY_TYPE 0x807B
434 #define GL_VERTEX_ARRAY_STRIDE 0x807C
435 #define GL_NORMAL_ARRAY_TYPE 0x807E
436 #define GL_NORMAL_ARRAY_STRIDE 0x807F
437 #define GL_COLOR_ARRAY_SIZE 0x8081
438 #define GL_COLOR_ARRAY_TYPE 0x8082
439 #define GL_COLOR_ARRAY_STRIDE 0x8083
440 #define GL_INDEX_ARRAY_TYPE 0x8085
441 #define GL_INDEX_ARRAY_STRIDE 0x8086
442 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
443 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
444 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
445 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
446 #define GL_VERTEX_ARRAY_POINTER 0x808E
447 #define GL_NORMAL_ARRAY_POINTER 0x808F
448 #define GL_COLOR_ARRAY_POINTER 0x8090
449 #define GL_INDEX_ARRAY_POINTER 0x8091
450 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
451 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
452 #define GL_V2F 0x2A20
453 #define GL_V3F 0x2A21
454 #define GL_C4UB_V2F 0x2A22
455 #define GL_C4UB_V3F 0x2A23
456 #define GL_C3F_V3F 0x2A24
457 #define GL_N3F_V3F 0x2A25
458 #define GL_C4F_N3F_V3F 0x2A26
459 #define GL_T2F_V3F 0x2A27
460 #define GL_T4F_V4F 0x2A28
461 #define GL_T2F_C4UB_V3F 0x2A29
462 #define GL_T2F_C3F_V3F 0x2A2A
463 #define GL_T2F_N3F_V3F 0x2A2B
464 #define GL_T2F_C4F_N3F_V3F 0x2A2C
465 #define GL_T4F_C4F_N3F_V4F 0x2A2D
466
467 /* Matrix Mode */
468 #define GL_MATRIX_MODE 0x0BA0
469 #define GL_MODELVIEW 0x1700
470 #define GL_PROJECTION 0x1701
471 #define GL_TEXTURE 0x1702
472
473 /* Points */
474 #define GL_POINT_SMOOTH 0x0B10
475 #define GL_POINT_SIZE 0x0B11
476 #define GL_POINT_SIZE_GRANULARITY 0x0B13
477 #define GL_POINT_SIZE_RANGE 0x0B12
478
479 /* Lines */
480 #define GL_LINE_SMOOTH 0x0B20
481 #define GL_LINE_STIPPLE 0x0B24
482 #define GL_LINE_STIPPLE_PATTERN 0x0B25
483 #define GL_LINE_STIPPLE_REPEAT 0x0B26
484 #define GL_LINE_WIDTH 0x0B21
485 #define GL_LINE_WIDTH_GRANULARITY 0x0B23
486 #define GL_LINE_WIDTH_RANGE 0x0B22
487
488 /* Polygons */
489 #define GL_POINT 0x1B00
490 #define GL_LINE 0x1B01
491 #define GL_FILL 0x1B02
492 #define GL_CW 0x0900
493 #define GL_CCW 0x0901
494 #define GL_FRONT 0x0404
495 #define GL_BACK 0x0405
496 #define GL_POLYGON_MODE 0x0B40
497 #define GL_POLYGON_SMOOTH 0x0B41
498 #define GL_POLYGON_STIPPLE 0x0B42
499 #define GL_EDGE_FLAG 0x0B43
500 #define GL_CULL_FACE 0x0B44
501 #define GL_CULL_FACE_MODE 0x0B45
502 #define GL_FRONT_FACE 0x0B46
503 #define GL_POLYGON_OFFSET_FACTOR 0x8038
504 #define GL_POLYGON_OFFSET_UNITS 0x2A00
505 #define GL_POLYGON_OFFSET_POINT 0x2A01
506 #define GL_POLYGON_OFFSET_LINE 0x2A02
507 #define GL_POLYGON_OFFSET_FILL 0x8037
508
509 /* Display Lists */
510 #define GL_COMPILE 0x1300
511 #define GL_COMPILE_AND_EXECUTE 0x1301
512 #define GL_LIST_BASE 0x0B32
513 #define GL_LIST_INDEX 0x0B33
514 #define GL_LIST_MODE 0x0B30
515
516 /* Depth buffer */
517 #define GL_NEVER 0x0200
518 #define GL_LESS 0x0201
519 #define GL_EQUAL 0x0202
520 #define GL_LEQUAL 0x0203
521 #define GL_GREATER 0x0204
522 #define GL_NOTEQUAL 0x0205
523 #define GL_GEQUAL 0x0206
524 #define GL_ALWAYS 0x0207
525 #define GL_DEPTH_TEST 0x0B71
526 #define GL_DEPTH_BITS 0x0D56
527 #define GL_DEPTH_CLEAR_VALUE 0x0B73
528 #define GL_DEPTH_FUNC 0x0B74
529 #define GL_DEPTH_RANGE 0x0B70
530 #define GL_DEPTH_WRITEMASK 0x0B72
531 #define GL_DEPTH_COMPONENT 0x1902
532
533 /* Lighting */
534 #define GL_LIGHTING 0x0B50
535 #define GL_LIGHT0 0x4000
536 #define GL_LIGHT1 0x4001
537 #define GL_LIGHT2 0x4002
538 #define GL_LIGHT3 0x4003
539 #define GL_LIGHT4 0x4004
540 #define GL_LIGHT5 0x4005
541 #define GL_LIGHT6 0x4006
542 #define GL_LIGHT7 0x4007
543 #define GL_SPOT_EXPONENT 0x1205
544 #define GL_SPOT_CUTOFF 0x1206
545 #define GL_CONSTANT_ATTENUATION 0x1207
546 #define GL_LINEAR_ATTENUATION 0x1208
547 #define GL_QUADRATIC_ATTENUATION 0x1209
548 #define GL_AMBIENT 0x1200
549 #define GL_DIFFUSE 0x1201
550 #define GL_SPECULAR 0x1202
551 #define GL_SHININESS 0x1601
552 #define GL_EMISSION 0x1600
553 #define GL_POSITION 0x1203
554 #define GL_SPOT_DIRECTION 0x1204
555 #define GL_AMBIENT_AND_DIFFUSE 0x1602
556 #define GL_COLOR_INDEXES 0x1603
557 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
558 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
559 #define GL_LIGHT_MODEL_AMBIENT 0x0B53
560 #define GL_FRONT_AND_BACK 0x0408
561 #define GL_SHADE_MODEL 0x0B54
562 #define GL_FLAT 0x1D00
563 #define GL_SMOOTH 0x1D01
564 #define GL_COLOR_MATERIAL 0x0B57
565 #define GL_COLOR_MATERIAL_FACE 0x0B55
566 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
567 #define GL_NORMALIZE 0x0BA1
568
569 /* User clipping planes */
570 #define GL_CLIP_PLANE0 0x3000
571 #define GL_CLIP_PLANE1 0x3001
572 #define GL_CLIP_PLANE2 0x3002
573 #define GL_CLIP_PLANE3 0x3003
574 #define GL_CLIP_PLANE4 0x3004
575 #define GL_CLIP_PLANE5 0x3005
576
577 /* Accumulation buffer */
578 #define GL_ACCUM_RED_BITS 0x0D58
579 #define GL_ACCUM_GREEN_BITS 0x0D59
580 #define GL_ACCUM_BLUE_BITS 0x0D5A
581 #define GL_ACCUM_ALPHA_BITS 0x0D5B
582 #define GL_ACCUM_CLEAR_VALUE 0x0B80
583 #define GL_ACCUM 0x0100
584 #define GL_ADD 0x0104
585 #define GL_LOAD 0x0101
586 #define GL_MULT 0x0103
587 #define GL_RETURN 0x0102
588
589 /* Alpha testing */
590 #define GL_ALPHA_TEST 0x0BC0
591 #define GL_ALPHA_TEST_REF 0x0BC2
592 #define GL_ALPHA_TEST_FUNC 0x0BC1
593
594 /* Blending */
595 #define GL_BLEND 0x0BE2
596 #define GL_BLEND_SRC 0x0BE1
597 #define GL_BLEND_DST 0x0BE0
598 #define GL_ZERO 0x0
599 #define GL_ONE 0x1
600 #define GL_SRC_COLOR 0x0300
601 #define GL_ONE_MINUS_SRC_COLOR 0x0301
602 #define GL_SRC_ALPHA 0x0302
603 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
604 #define GL_DST_ALPHA 0x0304
605 #define GL_ONE_MINUS_DST_ALPHA 0x0305
606 #define GL_DST_COLOR 0x0306
607 #define GL_ONE_MINUS_DST_COLOR 0x0307
608 #define GL_SRC_ALPHA_SATURATE 0x0308
609
610 /* Render Mode */
611 #define GL_FEEDBACK 0x1C01
612 #define GL_RENDER 0x1C00
613 #define GL_SELECT 0x1C02
614
615 /* Feedback */
616 #define GL_2D 0x0600
617 #define GL_3D 0x0601
618 #define GL_3D_COLOR 0x0602
619 #define GL_3D_COLOR_TEXTURE 0x0603
620 #define GL_4D_COLOR_TEXTURE 0x0604
621 #define GL_POINT_TOKEN 0x0701
622 #define GL_LINE_TOKEN 0x0702
623 #define GL_LINE_RESET_TOKEN 0x0707
624 #define GL_POLYGON_TOKEN 0x0703
625 #define GL_BITMAP_TOKEN 0x0704
626 #define GL_DRAW_PIXEL_TOKEN 0x0705
627 #define GL_COPY_PIXEL_TOKEN 0x0706
628 #define GL_PASS_THROUGH_TOKEN 0x0700
629 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
630 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
631 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
632
633 /* Selection */
634 #define GL_SELECTION_BUFFER_POINTER 0x0DF3
635 #define GL_SELECTION_BUFFER_SIZE 0x0DF4
636
637 /* Fog */
638 #define GL_FOG 0x0B60
639 #define GL_FOG_MODE 0x0B65
640 #define GL_FOG_DENSITY 0x0B62
641 #define GL_FOG_COLOR 0x0B66
642 #define GL_FOG_INDEX 0x0B61
643 #define GL_FOG_START 0x0B63
644 #define GL_FOG_END 0x0B64
645 #define GL_LINEAR 0x2601
646 #define GL_EXP 0x0800
647 #define GL_EXP2 0x0801
648
649 /* Logic Ops */
650 #define GL_LOGIC_OP 0x0BF1
651 #define GL_INDEX_LOGIC_OP 0x0BF1
652 #define GL_COLOR_LOGIC_OP 0x0BF2
653 #define GL_LOGIC_OP_MODE 0x0BF0
654 #define GL_CLEAR 0x1500
655 #define GL_SET 0x150F
656 #define GL_COPY 0x1503
657 #define GL_COPY_INVERTED 0x150C
658 #define GL_NOOP 0x1505
659 #define GL_INVERT 0x150A
660 #define GL_AND 0x1501
661 #define GL_NAND 0x150E
662 #define GL_OR 0x1507
663 #define GL_NOR 0x1508
664 #define GL_XOR 0x1506
665 #define GL_EQUIV 0x1509
666 #define GL_AND_REVERSE 0x1502
667 #define GL_AND_INVERTED 0x1504
668 #define GL_OR_REVERSE 0x150B
669 #define GL_OR_INVERTED 0x150D
670
671 /* Stencil */
672 #define GL_STENCIL_BITS 0x0D57
673 #define GL_STENCIL_TEST 0x0B90
674 #define GL_STENCIL_CLEAR_VALUE 0x0B91
675 #define GL_STENCIL_FUNC 0x0B92
676 #define GL_STENCIL_VALUE_MASK 0x0B93
677 #define GL_STENCIL_FAIL 0x0B94
678 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
679 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
680 #define GL_STENCIL_REF 0x0B97
681 #define GL_STENCIL_WRITEMASK 0x0B98
682 #define GL_STENCIL_INDEX 0x1901
683 #define GL_KEEP 0x1E00
684 #define GL_REPLACE 0x1E01
685 #define GL_INCR 0x1E02
686 #define GL_DECR 0x1E03
687
688 /* Buffers, Pixel Drawing/Reading */
689 #define GL_NONE 0x0
690 #define GL_LEFT 0x0406
691 #define GL_RIGHT 0x0407
692 /*GL_FRONT 0x0404 */
693 /*GL_BACK 0x0405 */
694 /*GL_FRONT_AND_BACK 0x0408 */
695 #define GL_FRONT_LEFT 0x0400
696 #define GL_FRONT_RIGHT 0x0401
697 #define GL_BACK_LEFT 0x0402
698 #define GL_BACK_RIGHT 0x0403
699 #define GL_AUX0 0x0409
700 #define GL_AUX1 0x040A
701 #define GL_AUX2 0x040B
702 #define GL_AUX3 0x040C
703 #define GL_COLOR_INDEX 0x1900
704 #define GL_RED 0x1903
705 #define GL_GREEN 0x1904
706 #define GL_BLUE 0x1905
707 #define GL_ALPHA 0x1906
708 #define GL_LUMINANCE 0x1909
709 #define GL_LUMINANCE_ALPHA 0x190A
710 #define GL_ALPHA_BITS 0x0D55
711 #define GL_RED_BITS 0x0D52
712 #define GL_GREEN_BITS 0x0D53
713 #define GL_BLUE_BITS 0x0D54
714 #define GL_INDEX_BITS 0x0D51
715 #define GL_SUBPIXEL_BITS 0x0D50
716 #define GL_AUX_BUFFERS 0x0C00
717 #define GL_READ_BUFFER 0x0C02
718 #define GL_DRAW_BUFFER 0x0C01
719 #define GL_DOUBLEBUFFER 0x0C32
720 #define GL_STEREO 0x0C33
721 #define GL_BITMAP 0x1A00
722 #define GL_COLOR 0x1800
723 #define GL_DEPTH 0x1801
724 #define GL_STENCIL 0x1802
725 #define GL_DITHER 0x0BD0
726 #define GL_RGB 0x1907
727 #define GL_RGBA 0x1908
728
729 /* Implementation limits */
730 #define GL_MAX_LIST_NESTING 0x0B31
731 #define GL_MAX_EVAL_ORDER 0x0D30
732 #define GL_MAX_LIGHTS 0x0D31
733 #define GL_MAX_CLIP_PLANES 0x0D32
734 #define GL_MAX_TEXTURE_SIZE 0x0D33
735 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34
736 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
737 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
738 #define GL_MAX_NAME_STACK_DEPTH 0x0D37
739 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
740 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
741 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
742 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
743
744 /* Gets */
745 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
746 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
747 #define GL_COLOR_CLEAR_VALUE 0x0C22
748 #define GL_COLOR_WRITEMASK 0x0C23
749 #define GL_CURRENT_INDEX 0x0B01
750 #define GL_CURRENT_COLOR 0x0B00
751 #define GL_CURRENT_NORMAL 0x0B02
752 #define GL_CURRENT_RASTER_COLOR 0x0B04
753 #define GL_CURRENT_RASTER_DISTANCE 0x0B09
754 #define GL_CURRENT_RASTER_INDEX 0x0B05
755 #define GL_CURRENT_RASTER_POSITION 0x0B07
756 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
757 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
758 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
759 #define GL_INDEX_CLEAR_VALUE 0x0C20
760 #define GL_INDEX_MODE 0x0C30
761 #define GL_INDEX_WRITEMASK 0x0C21
762 #define GL_MODELVIEW_MATRIX 0x0BA6
763 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
764 #define GL_NAME_STACK_DEPTH 0x0D70
765 #define GL_PROJECTION_MATRIX 0x0BA7
766 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
767 #define GL_RENDER_MODE 0x0C40
768 #define GL_RGBA_MODE 0x0C31
769 #define GL_TEXTURE_MATRIX 0x0BA8
770 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
771 #define GL_VIEWPORT 0x0BA2
772
773 /* Evaluators */
774 #define GL_AUTO_NORMAL 0x0D80
775 #define GL_MAP1_COLOR_4 0x0D90
776 #define GL_MAP1_INDEX 0x0D91
777 #define GL_MAP1_NORMAL 0x0D92
778 #define GL_MAP1_TEXTURE_COORD_1 0x0D93
779 #define GL_MAP1_TEXTURE_COORD_2 0x0D94
780 #define GL_MAP1_TEXTURE_COORD_3 0x0D95
781 #define GL_MAP1_TEXTURE_COORD_4 0x0D96
782 #define GL_MAP1_VERTEX_3 0x0D97
783 #define GL_MAP1_VERTEX_4 0x0D98
784 #define GL_MAP2_COLOR_4 0x0DB0
785 #define GL_MAP2_INDEX 0x0DB1
786 #define GL_MAP2_NORMAL 0x0DB2
787 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3
788 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4
789 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5
790 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6
791 #define GL_MAP2_VERTEX_3 0x0DB7
792 #define GL_MAP2_VERTEX_4 0x0DB8
793 #define GL_MAP1_GRID_DOMAIN 0x0DD0
794 #define GL_MAP1_GRID_SEGMENTS 0x0DD1
795 #define GL_MAP2_GRID_DOMAIN 0x0DD2
796 #define GL_MAP2_GRID_SEGMENTS 0x0DD3
797 #define GL_COEFF 0x0A00
798 #define GL_ORDER 0x0A01
799 #define GL_DOMAIN 0x0A02
800
801 /* Hints */
802 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
803 #define GL_POINT_SMOOTH_HINT 0x0C51
804 #define GL_LINE_SMOOTH_HINT 0x0C52
805 #define GL_POLYGON_SMOOTH_HINT 0x0C53
806 #define GL_FOG_HINT 0x0C54
807 #define GL_DONT_CARE 0x1100
808 #define GL_FASTEST 0x1101
809 #define GL_NICEST 0x1102
810
811 /* Scissor box */
812 #define GL_SCISSOR_BOX 0x0C10
813 #define GL_SCISSOR_TEST 0x0C11
814
815 /* Pixel Mode / Transfer */
816 #define GL_MAP_COLOR 0x0D10
817 #define GL_MAP_STENCIL 0x0D11
818 #define GL_INDEX_SHIFT 0x0D12
819 #define GL_INDEX_OFFSET 0x0D13
820 #define GL_RED_SCALE 0x0D14
821 #define GL_RED_BIAS 0x0D15
822 #define GL_GREEN_SCALE 0x0D18
823 #define GL_GREEN_BIAS 0x0D19
824 #define GL_BLUE_SCALE 0x0D1A
825 #define GL_BLUE_BIAS 0x0D1B
826 #define GL_ALPHA_SCALE 0x0D1C
827 #define GL_ALPHA_BIAS 0x0D1D
828 #define GL_DEPTH_SCALE 0x0D1E
829 #define GL_DEPTH_BIAS 0x0D1F
830 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
831 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
832 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
833 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
834 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
835 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
836 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
837 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
838 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
839 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
840 #define GL_PIXEL_MAP_S_TO_S 0x0C71
841 #define GL_PIXEL_MAP_I_TO_I 0x0C70
842 #define GL_PIXEL_MAP_I_TO_R 0x0C72
843 #define GL_PIXEL_MAP_I_TO_G 0x0C73
844 #define GL_PIXEL_MAP_I_TO_B 0x0C74
845 #define GL_PIXEL_MAP_I_TO_A 0x0C75
846 #define GL_PIXEL_MAP_R_TO_R 0x0C76
847 #define GL_PIXEL_MAP_G_TO_G 0x0C77
848 #define GL_PIXEL_MAP_B_TO_B 0x0C78
849 #define GL_PIXEL_MAP_A_TO_A 0x0C79
850 #define GL_PACK_ALIGNMENT 0x0D05
851 #define GL_PACK_LSB_FIRST 0x0D01
852 #define GL_PACK_ROW_LENGTH 0x0D02
853 #define GL_PACK_SKIP_PIXELS 0x0D04
854 #define GL_PACK_SKIP_ROWS 0x0D03
855 #define GL_PACK_SWAP_BYTES 0x0D00
856 #define GL_UNPACK_ALIGNMENT 0x0CF5
857 #define GL_UNPACK_LSB_FIRST 0x0CF1
858 #define GL_UNPACK_ROW_LENGTH 0x0CF2
859 #define GL_UNPACK_SKIP_PIXELS 0x0CF4
860 #define GL_UNPACK_SKIP_ROWS 0x0CF3
861 #define GL_UNPACK_SWAP_BYTES 0x0CF0
862 #define GL_ZOOM_X 0x0D16
863 #define GL_ZOOM_Y 0x0D17
864
865 /* Texture mapping */
866 #define GL_TEXTURE_ENV 0x2300
867 #define GL_TEXTURE_ENV_MODE 0x2200
868 #define GL_TEXTURE_1D 0x0DE0
869 #define GL_TEXTURE_2D 0x0DE1
870 #define GL_TEXTURE_WRAP_S 0x2802
871 #define GL_TEXTURE_WRAP_T 0x2803
872 #define GL_TEXTURE_MAG_FILTER 0x2800
873 #define GL_TEXTURE_MIN_FILTER 0x2801
874 #define GL_TEXTURE_ENV_COLOR 0x2201
875 #define GL_TEXTURE_GEN_S 0x0C60
876 #define GL_TEXTURE_GEN_T 0x0C61
877 #define GL_TEXTURE_GEN_MODE 0x2500
878 #define GL_TEXTURE_BORDER_COLOR 0x1004
879 #define GL_TEXTURE_WIDTH 0x1000
880 #define GL_TEXTURE_HEIGHT 0x1001
881 #define GL_TEXTURE_BORDER 0x1005
882 #define GL_TEXTURE_COMPONENTS 0x1003
883 #define GL_TEXTURE_RED_SIZE 0x805C
884 #define GL_TEXTURE_GREEN_SIZE 0x805D
885 #define GL_TEXTURE_BLUE_SIZE 0x805E
886 #define GL_TEXTURE_ALPHA_SIZE 0x805F
887 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
888 #define GL_TEXTURE_INTENSITY_SIZE 0x8061
889 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
890 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
891 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
892 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
893 #define GL_OBJECT_LINEAR 0x2401
894 #define GL_OBJECT_PLANE 0x2501
895 #define GL_EYE_LINEAR 0x2400
896 #define GL_EYE_PLANE 0x2502
897 #define GL_SPHERE_MAP 0x2402
898 #define GL_DECAL 0x2101
899 #define GL_MODULATE 0x2100
900 #define GL_NEAREST 0x2600
901 #define GL_REPEAT 0x2901
902 #define GL_CLAMP 0x2900
903 #define GL_S 0x2000
904 #define GL_T 0x2001
905 #define GL_R 0x2002
906 #define GL_Q 0x2003
907 #define GL_TEXTURE_GEN_R 0x0C62
908 #define GL_TEXTURE_GEN_Q 0x0C63
909
910 /* Utility */
911 #define GL_VENDOR 0x1F00
912 #define GL_RENDERER 0x1F01
913 #define GL_VERSION 0x1F02
914 #define GL_EXTENSIONS 0x1F03
915
916 /* Errors */
917 #define GL_NO_ERROR 0x0
918 #define GL_INVALID_ENUM 0x0500
919 #define GL_INVALID_VALUE 0x0501
920 #define GL_INVALID_OPERATION 0x0502
921 #define GL_STACK_OVERFLOW 0x0503
922 #define GL_STACK_UNDERFLOW 0x0504
923 #define GL_OUT_OF_MEMORY 0x0505
924
925 /* glPush/PopAttrib bits */
926 #define GL_CURRENT_BIT 0x00000001
927 #define GL_POINT_BIT 0x00000002
928 #define GL_LINE_BIT 0x00000004
929 #define GL_POLYGON_BIT 0x00000008
930 #define GL_POLYGON_STIPPLE_BIT 0x00000010
931 #define GL_PIXEL_MODE_BIT 0x00000020
932 #define GL_LIGHTING_BIT 0x00000040
933 #define GL_FOG_BIT 0x00000080
934 #define GL_DEPTH_BUFFER_BIT 0x00000100
935 #define GL_ACCUM_BUFFER_BIT 0x00000200
936 #define GL_STENCIL_BUFFER_BIT 0x00000400
937 #define GL_VIEWPORT_BIT 0x00000800
938 #define GL_TRANSFORM_BIT 0x00001000
939 #define GL_ENABLE_BIT 0x00002000
940 #define GL_COLOR_BUFFER_BIT 0x00004000
941 #define GL_HINT_BIT 0x00008000
942 #define GL_EVAL_BIT 0x00010000
943 #define GL_LIST_BIT 0x00020000
944 #define GL_TEXTURE_BIT 0x00040000
945 #define GL_SCISSOR_BIT 0x00080000
946 #define GL_ALL_ATTRIB_BITS 0x000FFFFF
947
948
949 /* OpenGL 1.1 */
950 #define GL_PROXY_TEXTURE_1D 0x8063
951 #define GL_PROXY_TEXTURE_2D 0x8064
952 #define GL_TEXTURE_PRIORITY 0x8066
953 #define GL_TEXTURE_RESIDENT 0x8067
954 #define GL_TEXTURE_BINDING_1D 0x8068
955 #define GL_TEXTURE_BINDING_2D 0x8069
956 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
957 #define GL_ALPHA4 0x803B
958 #define GL_ALPHA8 0x803C
959 #define GL_ALPHA12 0x803D
960 #define GL_ALPHA16 0x803E
961 #define GL_LUMINANCE4 0x803F
962 #define GL_LUMINANCE8 0x8040
963 #define GL_LUMINANCE12 0x8041
964 #define GL_LUMINANCE16 0x8042
965 #define GL_LUMINANCE4_ALPHA4 0x8043
966 #define GL_LUMINANCE6_ALPHA2 0x8044
967 #define GL_LUMINANCE8_ALPHA8 0x8045
968 #define GL_LUMINANCE12_ALPHA4 0x8046
969 #define GL_LUMINANCE12_ALPHA12 0x8047
970 #define GL_LUMINANCE16_ALPHA16 0x8048
971 #define GL_INTENSITY 0x8049
972 #define GL_INTENSITY4 0x804A
973 #define GL_INTENSITY8 0x804B
974 #define GL_INTENSITY12 0x804C
975 #define GL_INTENSITY16 0x804D
976 #define GL_R3_G3_B2 0x2A10
977 #define GL_RGB4 0x804F
978 #define GL_RGB5 0x8050
979 #define GL_RGB8 0x8051
980 #define GL_RGB10 0x8052
981 #define GL_RGB12 0x8053
982 #define GL_RGB16 0x8054
983 #define GL_RGBA2 0x8055
984 #define GL_RGBA4 0x8056
985 #define GL_RGB5_A1 0x8057
986 #define GL_RGBA8 0x8058
987 #define GL_RGB10_A2 0x8059
988 #define GL_RGBA12 0x805A
989 #define GL_RGBA16 0x805B
990 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
991 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
992 #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
993 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
994
995
996
997 /*
998 * Miscellaneous
999 */
1000
1001 GLAPI void GLAPIENTRY glClearIndex( GLfloat c );
1002
1003 GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
1004
1005 GLAPI void GLAPIENTRY glClear( GLbitfield mask );
1006
1007 GLAPI void GLAPIENTRY glIndexMask( GLuint mask );
1008
1009 GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
1010
1011 GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );
1012
1013 GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
1014
1015 GLAPI void GLAPIENTRY glLogicOp( GLenum opcode );
1016
1017 GLAPI void GLAPIENTRY glCullFace( GLenum mode );
1018
1019 GLAPI void GLAPIENTRY glFrontFace( GLenum mode );
1020
1021 GLAPI void GLAPIENTRY glPointSize( GLfloat size );
1022
1023 GLAPI void GLAPIENTRY glLineWidth( GLfloat width );
1024
1025 GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );
1026
1027 GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );
1028
1029 GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
1030
1031 GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );
1032
1033 GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );
1034
1035 GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );
1036
1037 GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );
1038
1039 GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
1040
1041 GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
1042
1043 GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
1044
1045 GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );
1046
1047 GLAPI void GLAPIENTRY glReadBuffer( GLenum mode );
1048
1049 GLAPI void GLAPIENTRY glEnable( GLenum cap );
1050
1051 GLAPI void GLAPIENTRY glDisable( GLenum cap );
1052
1053 GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );
1054
1055
1056 GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
1057
1058 GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
1059
1060
1061 GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
1062
1063 GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );
1064
1065 GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );
1066
1067 GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );
1068
1069
1070 GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );
1071
1072 GLAPI void GLAPIENTRY glPopAttrib( void );
1073
1074
1075 GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
1076
1077 GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */
1078
1079
1080 GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );
1081
1082 GLAPI GLenum GLAPIENTRY glGetError( void );
1083
1084 GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );
1085
1086 GLAPI void GLAPIENTRY glFinish( void );
1087
1088 GLAPI void GLAPIENTRY glFlush( void );
1089
1090 GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );
1091
1092
1093 /*
1094 * Depth Buffer
1095 */
1096
1097 GLAPI void GLAPIENTRY glClearDepth( GLclampd depth );
1098
1099 GLAPI void GLAPIENTRY glDepthFunc( GLenum func );
1100
1101 GLAPI void GLAPIENTRY glDepthMask( GLboolean flag );
1102
1103 GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
1104
1105
1106 /*
1107 * Accumulation Buffer
1108 */
1109
1110 GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
1111
1112 GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );
1113
1114
1115 /*
1116 * Transformation
1117 */
1118
1119 GLAPI void GLAPIENTRY glMatrixMode( GLenum mode );
1120
1121 GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,
1122 GLdouble bottom, GLdouble top,
1123 GLdouble near_val, GLdouble far_val );
1124
1125 GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,
1126 GLdouble bottom, GLdouble top,
1127 GLdouble near_val, GLdouble far_val );
1128
1129 GLAPI void GLAPIENTRY glViewport( GLint x, GLint y,
1130 GLsizei width, GLsizei height );
1131
1132 GLAPI void GLAPIENTRY glPushMatrix( void );
1133
1134 GLAPI void GLAPIENTRY glPopMatrix( void );
1135
1136 GLAPI void GLAPIENTRY glLoadIdentity( void );
1137
1138 GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );
1139 GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );
1140
1141 GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );
1142 GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );
1143
1144 GLAPI void GLAPIENTRY glRotated( GLdouble angle,
1145 GLdouble x, GLdouble y, GLdouble z );
1146 GLAPI void GLAPIENTRY glRotatef( GLfloat angle,
1147 GLfloat x, GLfloat y, GLfloat z );
1148
1149 GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
1150 GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
1151
1152 GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
1153 GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
1154
1155
1156 /*
1157 * Display Lists
1158 */
1159
1160 GLAPI GLboolean GLAPIENTRY glIsList( GLuint list );
1161
1162 GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );
1163
1164 GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );
1165
1166 GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );
1167
1168 GLAPI void GLAPIENTRY glEndList( void );
1169
1170 GLAPI void GLAPIENTRY glCallList( GLuint list );
1171
1172 GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,
1173 const GLvoid *lists );
1174
1175 GLAPI void GLAPIENTRY glListBase( GLuint base );
1176
1177
1178 /*
1179 * Drawing Functions
1180 */
1181
1182 GLAPI void GLAPIENTRY glBegin( GLenum mode );
1183
1184 GLAPI void GLAPIENTRY glEnd( void );
1185
1186
1187 GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );
1188 GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );
1189 GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );
1190 GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );
1191
1192 GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
1193 GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
1194 GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );
1195 GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
1196
1197 GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1198 GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1199 GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
1200 GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
1201
1202 GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );
1203 GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );
1204 GLAPI void GLAPIENTRY glVertex2iv( const GLint *v );
1205 GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );
1206
1207 GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );
1208 GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );
1209 GLAPI void GLAPIENTRY glVertex3iv( const GLint *v );
1210 GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );
1211
1212 GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );
1213 GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );
1214 GLAPI void GLAPIENTRY glVertex4iv( const GLint *v );
1215 GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );
1216
1217
1218 GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
1219 GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
1220 GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
1221 GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
1222 GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
1223
1224 GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );
1225 GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );
1226 GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );
1227 GLAPI void GLAPIENTRY glNormal3iv( const GLint *v );
1228 GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );
1229
1230
1231 GLAPI void GLAPIENTRY glIndexd( GLdouble c );
1232 GLAPI void GLAPIENTRY glIndexf( GLfloat c );
1233 GLAPI void GLAPIENTRY glIndexi( GLint c );
1234 GLAPI void GLAPIENTRY glIndexs( GLshort c );
1235 GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */
1236
1237 GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );
1238 GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );
1239 GLAPI void GLAPIENTRY glIndexiv( const GLint *c );
1240 GLAPI void GLAPIENTRY glIndexsv( const GLshort *c );
1241 GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
1242
1243 GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
1244 GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
1245 GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
1246 GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );
1247 GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
1248 GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
1249 GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
1250 GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
1251
1252 GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,
1253 GLbyte blue, GLbyte alpha );
1254 GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,
1255 GLdouble blue, GLdouble alpha );
1256 GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,
1257 GLfloat blue, GLfloat alpha );
1258 GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,
1259 GLint blue, GLint alpha );
1260 GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,
1261 GLshort blue, GLshort alpha );
1262 GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,
1263 GLubyte blue, GLubyte alpha );
1264 GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,
1265 GLuint blue, GLuint alpha );
1266 GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,
1267 GLushort blue, GLushort alpha );
1268
1269
1270 GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );
1271 GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );
1272 GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );
1273 GLAPI void GLAPIENTRY glColor3iv( const GLint *v );
1274 GLAPI void GLAPIENTRY glColor3sv( const GLshort *v );
1275 GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );
1276 GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );
1277 GLAPI void GLAPIENTRY glColor3usv( const GLushort *v );
1278
1279 GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );
1280 GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );
1281 GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );
1282 GLAPI void GLAPIENTRY glColor4iv( const GLint *v );
1283 GLAPI void GLAPIENTRY glColor4sv( const GLshort *v );
1284 GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );
1285 GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );
1286 GLAPI void GLAPIENTRY glColor4usv( const GLushort *v );
1287
1288
1289 GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );
1290 GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );
1291 GLAPI void GLAPIENTRY glTexCoord1i( GLint s );
1292 GLAPI void GLAPIENTRY glTexCoord1s( GLshort s );
1293
1294 GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );
1295 GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );
1296 GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );
1297 GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );
1298
1299 GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
1300 GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
1301 GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
1302 GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
1303
1304 GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
1305 GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
1306 GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
1307 GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
1308
1309 GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );
1310 GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );
1311 GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );
1312 GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );
1313
1314 GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );
1315 GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );
1316 GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );
1317 GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );
1318
1319 GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );
1320 GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );
1321 GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );
1322 GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );
1323
1324 GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );
1325 GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );
1326 GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );
1327 GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );
1328
1329
1330 GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );
1331 GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );
1332 GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );
1333 GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );
1334
1335 GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
1336 GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
1337 GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
1338 GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
1339
1340 GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
1341 GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1342 GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
1343 GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
1344
1345 GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );
1346 GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );
1347 GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );
1348 GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );
1349
1350 GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );
1351 GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );
1352 GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );
1353 GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );
1354
1355 GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );
1356 GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );
1357 GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );
1358 GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );
1359
1360
1361 GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
1362 GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
1363 GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
1364 GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
1365
1366
1367 GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
1368 GLAPI void GLAPIENTRY