1 #ifndef __GL__H__
2 #define __GL__H__
4 #ifdef __cplusplus
6 #endif
26 /* Boolean values */
27 #define GL_FALSE 0x0
28 #define GL_TRUE 0x1
30 /* Data types */
31 #define GL_BYTE 0x1400
32 #define GL_UNSIGNED_BYTE 0x1401
33 #define GL_SHORT 0x1402
34 #define GL_UNSIGNED_SHORT 0x1403
35 #define GL_INT 0x1404
36 #define GL_UNSIGNED_INT 0x1405
37 #define GL_FLOAT 0x1406
38 #define GL_2_BYTES 0x1407
39 #define GL_3_BYTES 0x1408
40 #define GL_4_BYTES 0x1409
41 #define GL_DOUBLE 0x140A
43 /* StringName */
44 #define GL_VENDOR 0x1F00
45 #define GL_RENDERER 0x1F01
46 #define GL_VERSION 0x1F02
47 #define GL_EXTENSIONS 0x1F03
49 /* TextureEnvMode */
50 #define GL_MODULATE 0x2100
51 #define GL_DECAL 0x2101
52 /* GL_BLEND */
53 #define GL_ADD 0x0104
54 /* GL_REPLACE */
57 /* Primitives */
58 #define GL_POINTS 0x0000
59 #define GL_LINES 0x0001
60 #define GL_LINE_LOOP 0x0002
61 #define GL_LINE_STRIP 0x0003
62 #define GL_TRIANGLES 0x0004
63 #define GL_TRIANGLE_STRIP 0x0005
64 #define GL_TRIANGLE_FAN 0x0006
65 #define GL_QUADS 0x0007
66 #define GL_QUAD_STRIP 0x0008
67 #define GL_POLYGON 0x0009
69 /* EnableCap */
70 #define GL_FOG 0x0B60
71 #define GL_LIGHTING 0x0B50
72 #define GL_TEXTURE_2D 0x0DE1
73 #define GL_CULL_FACE 0x0B44
74 #define GL_ALPHA_TEST 0x0BC0
75 #define GL_BLEND 0x0BE2
76 #define GL_COLOR_LOGIC_OP 0x0BF2
77 #define GL_DITHER 0x0BD0
78 #define GL_STENCIL_TEST 0x0B90
79 #define GL_DEPTH_TEST 0x0B71
80 /* GL_LIGHT0 */
81 /* GL_LIGHT1 */
82 /* GL_LIGHT2 */
83 /* GL_LIGHT3 */
84 /* GL_LIGHT4 */
85 /* GL_LIGHT5 */
86 /* GL_LIGHT6 */
87 /* GL_LIGHT7 */
88 #define GL_POINT_SMOOTH 0x0B10
89 #define GL_LINE_SMOOTH 0x0B20
90 #define GL_SCISSOR_TEST 0x0C11
91 #define GL_COLOR_MATERIAL 0x0B57
92 #define GL_NORMALIZE 0x0BA1
93 #define GL_RESCALE_NORMAL 0x803A
94 #define GL_POLYGON_OFFSET_FILL 0x8037
95 #define GL_VERTEX_ARRAY 0x8074
96 #define GL_NORMAL_ARRAY 0x8075
97 #define GL_COLOR_ARRAY 0x8076
98 #define GL_TEXTURE_COORD_ARRAY 0x8078
99 #define GL_MULTISAMPLE 0x809D
100 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
101 #define GL_SAMPLE_ALPHA_TO_ONE 0x809F
102 #define GL_SAMPLE_COVERAGE 0x80A0
105 /* Texture mapping */
106 #define GL_TEXTURE_ENV 0x2300
107 #define GL_TEXTURE_ENV_MODE 0x2200
108 #define GL_TEXTURE_1D 0x0DE0
109 #define GL_TEXTURE_2D 0x0DE1
110 #define GL_TEXTURE_WRAP_S 0x2802
111 #define GL_TEXTURE_WRAP_T 0x2803
112 #define GL_TEXTURE_MAG_FILTER 0x2800
113 #define GL_TEXTURE_MIN_FILTER 0x2801
114 #define GL_TEXTURE_ENV_COLOR 0x2201
115 #define GL_TEXTURE_GEN_S 0x0C60
116 #define GL_TEXTURE_GEN_T 0x0C61
117 #define GL_TEXTURE_GEN_MODE 0x2500
118 #define GL_TEXTURE_BORDER_COLOR 0x1004
119 #define GL_TEXTURE_WIDTH 0x1000
120 #define GL_TEXTURE_HEIGHT 0x1001
121 #define GL_TEXTURE_BORDER 0x1005
122 #define GL_TEXTURE_COMPONENTS 0x1003
123 #define GL_TEXTURE_RED_SIZE 0x805C
124 #define GL_TEXTURE_GREEN_SIZE 0x805D
125 #define GL_TEXTURE_BLUE_SIZE 0x805E
126 #define GL_TEXTURE_ALPHA_SIZE 0x805F
127 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060
128 #define GL_TEXTURE_INTENSITY_SIZE 0x8061
129 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
130 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
131 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
132 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
133 #define GL_OBJECT_LINEAR 0x2401
134 #define GL_OBJECT_PLANE 0x2501
135 #define GL_EYE_LINEAR 0x2400
136 #define GL_EYE_PLANE 0x2502
137 #define GL_SPHERE_MAP 0x2402
138 #define GL_DECAL 0x2101
139 #define GL_MODULATE 0x2100
140 #define GL_NEAREST 0x2600
141 #define GL_REPEAT 0x2901
142 #define GL_CLAMP 0x2900
143 #define GL_S 0x2000
144 #define GL_T 0x2001
145 #define GL_R 0x2002
146 #define GL_Q 0x2003
147 #define GL_TEXTURE_GEN_R 0x0C62
148 #define GL_TEXTURE_GEN_Q 0x0C63
149 #define GL_CLAMP_TO_EDGE 0x812F
151 /* Matrix Mode */
152 #define GL_MATRIX_MODE 0x0BA0
153 #define GL_MODELVIEW 0x1700
154 #define GL_PROJECTION 0x1701
155 #define GL_TEXTURE 0x1702
157 /* Buffers, Pixel Drawing/Reading */
158 #define GL_NONE 0x0
159 #define GL_LEFT 0x0406
160 #define GL_RIGHT 0x0407
161 /*GL_FRONT 0x0404 */
162 /*GL_BACK 0x0405 */
163 /*GL_FRONT_AND_BACK 0x0408 */
164 #define GL_FRONT_LEFT 0x0400
165 #define GL_FRONT_RIGHT 0x0401
166 #define GL_BACK_LEFT 0x0402
167 #define GL_BACK_RIGHT 0x0403
168 #define GL_AUX0 0x0409
169 #define GL_AUX1 0x040A
170 #define GL_AUX2 0x040B
171 #define GL_AUX3 0x040C
172 #define GL_COLOR_INDEX 0x1900
173 #define GL_RED 0x1903
174 #define GL_GREEN 0x1904
175 #define GL_BLUE 0x1905
176 #define GL_ALPHA 0x1906
177 #define GL_LUMINANCE 0x1909
178 #define GL_LUMINANCE_ALPHA 0x190A
179 #define GL_ALPHA_BITS 0x0D55
180 #define GL_RED_BITS 0x0D52
181 #define GL_GREEN_BITS 0x0D53
182 #define GL_BLUE_BITS 0x0D54
183 #define GL_INDEX_BITS 0x0D51
184 #define GL_SUBPIXEL_BITS 0x0D50
185 #define GL_AUX_BUFFERS 0x0C00
186 #define GL_READ_BUFFER 0x0C02
187 #define GL_DRAW_BUFFER 0x0C01
188 #define GL_DOUBLEBUFFER 0x0C32
189 #define GL_STEREO 0x0C33
190 #define GL_BITMAP 0x1A00
191 #define GL_COLOR 0x1800
192 #define GL_DEPTH 0x1801
193 #define GL_STENCIL 0x1802
194 #define GL_DITHER 0x0BD0
195 #define GL_RGB 0x1907
196 #define GL_RGBA 0x1908
198 /* Fog */
199 #define GL_FOG 0x0B60
200 #define GL_FOG_MODE 0x0B65
201 #define GL_FOG_DENSITY 0x0B62
202 #define GL_FOG_COLOR 0x0B66
203 #define GL_FOG_INDEX 0x0B61
204 #define GL_FOG_START 0x0B63
205 #define GL_FOG_END 0x0B64
206 #define GL_LINEAR 0x2601
207 #define GL_EXP 0x0800
208 #define GL_EXP2 0x0801
210 /* Polygons */
211 #define GL_POINT 0x1B00
212 #define GL_LINE 0x1B01
213 #define GL_FILL 0x1B02
214 #define GL_CW 0x0900
215 #define GL_CCW 0x0901
216 #define GL_FRONT 0x0404
217 #define GL_BACK 0x0405
218 #define GL_POLYGON_MODE 0x0B40
219 #define GL_POLYGON_SMOOTH 0x0B41
220 #define GL_POLYGON_STIPPLE 0x0B42
221 #define GL_EDGE_FLAG 0x0B43
222 #define GL_CULL_FACE 0x0B44
223 #define GL_CULL_FACE_MODE 0x0B45
224 #define GL_FRONT_FACE 0x0B46
225 #define GL_POLYGON_OFFSET_FACTOR 0x8038
226 #define GL_POLYGON_OFFSET_UNITS 0x2A00
227 #define GL_POLYGON_OFFSET_POINT 0x2A01
228 #define GL_POLYGON_OFFSET_LINE 0x2A02
229 #define GL_POLYGON_OFFSET_FILL 0x8037
231 /* Lighting */
232 #define GL_LIGHTING 0x0B50
233 #define GL_LIGHT0 0x4000
234 #define GL_LIGHT1 0x4001
235 #define GL_LIGHT2 0x4002
236 #define GL_LIGHT3 0x4003
237 #define GL_LIGHT4 0x4004
238 #define GL_LIGHT5 0x4005
239 #define GL_LIGHT6 0x4006
240 #define GL_LIGHT7 0x4007
241 #define GL_SPOT_EXPONENT 0x1205
242 #define GL_SPOT_CUTOFF 0x1206
243 #define GL_CONSTANT_ATTENUATION 0x1207
244 #define GL_LINEAR_ATTENUATION 0x1208
245 #define GL_QUADRATIC_ATTENUATION 0x1209
246 #define GL_AMBIENT 0x1200
247 #define GL_DIFFUSE 0x1201
248 #define GL_SPECULAR 0x1202
249 #define GL_SHININESS 0x1601
250 #define GL_EMISSION 0x1600
251 #define GL_POSITION 0x1203
252 #define GL_SPOT_DIRECTION 0x1204
253 #define GL_AMBIENT_AND_DIFFUSE 0x1602
254 #define GL_COLOR_INDEXES 0x1603
255 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
256 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
257 #define GL_LIGHT_MODEL_AMBIENT 0x0B53
258 #define GL_FRONT_AND_BACK 0x0408
259 #define GL_SHADE_MODEL 0x0B54
260 #define GL_FLAT 0x1D00
261 #define GL_SMOOTH 0x1D01
262 #define GL_COLOR_MATERIAL 0x0B57
263 #define GL_COLOR_MATERIAL_FACE 0x0B55
264 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56
265 #define GL_NORMALIZE 0x0BA1
267 /* Blending */
268 #define GL_BLEND 0x0BE2
269 #define GL_BLEND_SRC 0x0BE1
270 #define GL_BLEND_DST 0x0BE0
271 #define GL_ZERO 0x0
272 #define GL_ONE 0x1
273 #define GL_SRC_COLOR 0x0300
274 #define GL_ONE_MINUS_SRC_COLOR 0x0301
275 #define GL_SRC_ALPHA 0x0302
276 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
277 #define GL_DST_ALPHA 0x0304
278 #define GL_ONE_MINUS_DST_ALPHA 0x0305
279 #define GL_DST_COLOR 0x0306
280 #define GL_ONE_MINUS_DST_COLOR 0x0307
281 #define GL_SRC_ALPHA_SATURATE 0x0308
283 /* ClipPlaneName */
284 #define GL_CLIP_PLANE0 0x3000
285 #define GL_CLIP_PLANE1 0x3001
286 #define GL_CLIP_PLANE2 0x3002
287 #define GL_CLIP_PLANE3 0x3003
288 #define GL_CLIP_PLANE4 0x3004
289 #define GL_CLIP_PLANE5 0x3005
292 /* OpenGL 1.1 */
293 #define GL_PROXY_TEXTURE_1D 0x8063
294 #define GL_PROXY_TEXTURE_2D 0x8064
295 #define GL_TEXTURE_PRIORITY 0x8066
296 #define GL_TEXTURE_RESIDENT 0x8067
297 #define GL_TEXTURE_BINDING_1D 0x8068
298 #define GL_TEXTURE_BINDING_2D 0x8069
299 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003
300 #define GL_ALPHA4 0x803B
301 #define GL_ALPHA8 0x803C
302 #define GL_ALPHA12 0x803D
303 #define GL_ALPHA16 0x803E
304 #define GL_LUMINANCE4 0x803F
305 #define GL_LUMINANCE8 0x8040
306 #define GL_LUMINANCE12 0x8041
307 #define GL_LUMINANCE16 0x8042
308 #define GL_LUMINANCE4_ALPHA4 0x8043
309 #define GL_LUMINANCE6_ALPHA2 0x8044
310 #define GL_LUMINANCE8_ALPHA8 0x8045
311 #define GL_LUMINANCE12_ALPHA4 0x8046
312 #define GL_LUMINANCE12_ALPHA12 0x8047
313 #define GL_LUMINANCE16_ALPHA16 0x8048
314 #define GL_INTENSITY 0x8049
315 #define GL_INTENSITY4 0x804A
316 #define GL_INTENSITY8 0x804B
317 #define GL_INTENSITY12 0x804C
318 #define GL_INTENSITY16 0x804D
319 #define GL_R3_G3_B2 0x2A10
320 #define GL_RGB4 0x804F
321 #define GL_RGB5 0x8050
322 #define GL_RGB8 0x8051
323 #define GL_RGB10 0x8052
324 #define GL_RGB12 0x8053
325 #define GL_RGB16 0x8054
326 #define GL_RGBA2 0x8055
327 #define GL_RGBA4 0x8056
328 #define GL_RGB5_A1 0x8057
329 #define GL_RGBA8 0x8058
330 #define GL_RGB10_A2 0x8059
331 #define GL_RGBA12 0x805A
332 #define GL_RGBA16 0x805B
333 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
334 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
335 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
338 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
339 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
340 #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
341 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
343 /* Stencil */
344 #define GL_STENCIL_TEST 0x0B90
345 #define GL_STENCIL_WRITEMASK 0x0B98
346 #define GL_STENCIL_BITS 0x0D57
347 #define GL_STENCIL_FUNC 0x0B92
348 #define GL_STENCIL_VALUE_MASK 0x0B93
349 #define GL_STENCIL_REF 0x0B97
350 #define GL_STENCIL_FAIL 0x0B94
351 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
352 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
353 #define GL_STENCIL_CLEAR_VALUE 0x0B91
354 #define GL_STENCIL_INDEX 0x1901
355 #define GL_KEEP 0x1E00
356 #define GL_REPLACE 0x1E01
357 #define GL_INCR 0x1E02
358 #define GL_DECR 0x1E03
360 /* Hints */
361 #define GL_FOG_HINT 0x0C54
362 #define GL_LINE_SMOOTH_HINT 0x0C52
363 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
364 #define GL_POINT_SMOOTH_HINT 0x0C51
365 #define GL_POLYGON_SMOOTH_HINT 0x0C53
366 #define GL_DONT_CARE 0x1100
367 #define GL_FASTEST 0x1101
368 #define GL_NICEST 0x1102
370 /* Gets */
371 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
372 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
373 #define GL_COLOR_CLEAR_VALUE 0x0C22
374 #define GL_COLOR_WRITEMASK 0x0C23
375 #define GL_CURRENT_INDEX 0x0B01
376 #define GL_CURRENT_COLOR 0x0B00
377 #define GL_CURRENT_NORMAL 0x0B02
378 #define GL_CURRENT_RASTER_COLOR 0x0B04
379 #define GL_CURRENT_RASTER_DISTANCE 0x0B09
380 #define GL_CURRENT_RASTER_INDEX 0x0B05
381 #define GL_CURRENT_RASTER_POSITION 0x0B07
382 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
383 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
384 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
385 #define GL_INDEX_CLEAR_VALUE 0x0C20
386 #define GL_INDEX_MODE 0x0C30
387 #define GL_INDEX_WRITEMASK 0x0C21
388 #define GL_MODELVIEW_MATRIX 0x0BA6
389 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
390 #define GL_NAME_STACK_DEPTH 0x0D70
391 #define GL_PROJECTION_MATRIX 0x0BA7
392 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
393 #define GL_RENDER_MODE 0x0C40
394 #define GL_RGBA_MODE 0x0C31
395 #define GL_TEXTURE_MATRIX 0x0BA8
396 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
397 #define GL_VIEWPORT 0x0BA2
399 /* glPush/PopAttrib bits */
400 #define GL_CURRENT_BIT 0x00000001
401 #define GL_POINT_BIT 0x00000002
402 #define GL_LINE_BIT 0x00000004
403 #define GL_POLYGON_BIT 0x00000008
404 #define GL_POLYGON_STIPPLE_BIT 0x00000010
405 #define GL_PIXEL_MODE_BIT 0x00000020
406 #define GL_LIGHTING_BIT 0x00000040
407 #define GL_FOG_BIT 0x00000080
408 #define GL_DEPTH_BUFFER_BIT 0x00000100
409 #define GL_ACCUM_BUFFER_BIT 0x00000200
410 #define GL_STENCIL_BUFFER_BIT 0x00000400
411 #define GL_VIEWPORT_BIT 0x00000800
412 #define GL_TRANSFORM_BIT 0x00001000
413 #define GL_ENABLE_BIT 0x00002000
414 #define GL_COLOR_BUFFER_BIT 0x00004000
415 #define GL_HINT_BIT 0x00008000
416 #define GL_EVAL_BIT 0x00010000
417 #define GL_LIST_BIT 0x00020000
418 #define GL_TEXTURE_BIT 0x00040000
419 #define GL_SCISSOR_BIT 0x00080000
420 #define GL_ALL_ATTRIB_BITS 0x000FFFFF
422 /* Depth buffer */
423 #define GL_NEVER 0x0200
424 #define GL_LESS 0x0201
425 #define GL_EQUAL 0x0202
426 #define GL_LEQUAL 0x0203
427 #define GL_GREATER 0x0204
428 #define GL_NOTEQUAL 0x0205
429 #define GL_GEQUAL 0x0206
430 #define GL_ALWAYS 0x0207
431 #define GL_DEPTH_TEST 0x0B71
432 #define GL_DEPTH_BITS 0x0D56
433 #define GL_DEPTH_CLEAR_VALUE 0x0B73
434 #define GL_DEPTH_FUNC 0x0B74
435 #define GL_DEPTH_RANGE 0x0B70
436 #define GL_DEPTH_WRITEMASK 0x0B72
437 #define GL_DEPTH_COMPONENT 0x1902
439 /* TextureUnit */
440 #define GL_TEXTURE0 0x84C0
441 #define GL_TEXTURE1 0x84C1
442 #define GL_TEXTURE2 0x84C2
443 #define GL_TEXTURE3 0x84C3
444 #define GL_TEXTURE4 0x84C4
445 #define GL_TEXTURE5 0x84C5
446 #define GL_TEXTURE6 0x84C6
447 #define GL_TEXTURE7 0x84C7
448 #define GL_TEXTURE8 0x84C8
449 #define GL_TEXTURE9 0x84C9
450 #define GL_TEXTURE10 0x84CA
451 #define GL_TEXTURE11 0x84CB
452 #define GL_TEXTURE12 0x84CC
453 #define GL_TEXTURE13 0x84CD
454 #define GL_TEXTURE14 0x84CE
455 #define GL_TEXTURE15 0x84CF
456 #define GL_TEXTURE16 0x84D0
457 #define GL_TEXTURE17 0x84D1
458 #define GL_TEXTURE18 0x84D2
459 #define GL_TEXTURE19 0x84D3
460 #define GL_TEXTURE20 0x84D4
461 #define GL_TEXTURE21 0x84D5
462 #define GL_TEXTURE22 0x84D6
463 #define GL_TEXTURE23 0x84D7
464 #define GL_TEXTURE24 0x84D8
465 #define GL_TEXTURE25 0x84D9
466 #define GL_TEXTURE26 0x84DA
467 #define GL_TEXTURE27 0x84DB
468 #define GL_TEXTURE28 0x84DC
469 #define GL_TEXTURE29 0x84DD
470 #define GL_TEXTURE30 0x84DE
471 #define GL_TEXTURE31 0x84DF
472 #define GL_ACTIVE_TEXTURE 0x84E0
473 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
475 /* GetPName */
476 #define GL_CURRENT_COLOR 0x0B00
477 #define GL_CURRENT_NORMAL 0x0B02
478 #define GL_CURRENT_TEXTURE_COORDS 0x0B03
479 #define GL_POINT_SIZE 0x0B11
480 #define GL_POINT_SIZE_MIN 0x8126
481 #define GL_POINT_SIZE_MAX 0x8127
482 #define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
483 #define GL_POINT_DISTANCE_ATTENUATION 0x8129
484 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
485 #define GL_LINE_WIDTH 0x0B21
486 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
487 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
488 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
489 #define GL_CULL_FACE_MODE 0x0B45
490 #define GL_FRONT_FACE 0x0B46
491 #define GL_SHADE_MODEL 0x0B54
492 #define GL_DEPTH_RANGE 0x0B70
493 #define GL_DEPTH_WRITEMASK 0x0B72
494 #define GL_DEPTH_CLEAR_VALUE 0x0B73
495 #define GL_DEPTH_FUNC 0x0B74
496 #define GL_STENCIL_CLEAR_VALUE 0x0B91
497 #define GL_STENCIL_FUNC 0x0B92
498 #define GL_STENCIL_VALUE_MASK 0x0B93
499 #define GL_STENCIL_FAIL 0x0B94
500 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
501 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
502 #define GL_STENCIL_REF 0x0B97
503 #define GL_STENCIL_WRITEMASK 0x0B98
504 #define GL_MATRIX_MODE 0x0BA0
505 #define GL_VIEWPORT 0x0BA2
506 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3
507 #define GL_PROJECTION_STACK_DEPTH 0x0BA4
508 #define GL_TEXTURE_STACK_DEPTH 0x0BA5
509 #define GL_MODELVIEW_MATRIX 0x0BA6
510 #define GL_PROJECTION_MATRIX 0x0BA7
511 #define GL_TEXTURE_MATRIX 0x0BA8
512 #define GL_ALPHA_TEST_FUNC 0x0BC1
513 #define GL_ALPHA_TEST_REF 0x0BC2
514 #define GL_BLEND_DST 0x0BE0
515 #define GL_BLEND_SRC 0x0BE1
516 #define GL_LOGIC_OP_MODE 0x0BF0
517 #define GL_SCISSOR_BOX 0x0C10
518 #define GL_SCISSOR_TEST 0x0C11
519 #define GL_COLOR_CLEAR_VALUE 0x0C22
520 #define GL_COLOR_WRITEMASK 0x0C23
521 #define GL_UNPACK_ALIGNMENT 0x0CF5
522 #define GL_PACK_ALIGNMENT 0x0D05
523 #define GL_MAX_LIGHTS 0x0D31
524 #define GL_MAX_CLIP_PLANES 0x0D32
525 #define GL_MAX_TEXTURE_SIZE 0x0D33
526 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
527 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
528 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
529 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
530 #define GL_MAX_ELEMENTS_VERTICES 0x80E8
531 #define GL_MAX_ELEMENTS_INDICES 0x80E9
532 #define GL_MAX_TEXTURE_UNITS 0x84E2
533 #define GL_SUBPIXEL_BITS 0x0D50
534 #define GL_RED_BITS 0x0D52
535 #define GL_GREEN_BITS 0x0D53
536 #define GL_BLUE_BITS 0x0D54
537 #define GL_ALPHA_BITS 0x0D55
538 #define GL_DEPTH_BITS 0x0D56
539 #define GL_STENCIL_BITS 0x0D57
540 #define GL_POLYGON_OFFSET_UNITS 0x2A00
541 #define GL_POLYGON_OFFSET_FILL 0x8037
542 #define GL_POLYGON_OFFSET_FACTOR 0x8038
543 #define GL_TEXTURE_BINDING_2D 0x8069
544 #define GL_VERTEX_ARRAY_SIZE 0x807A
545 #define GL_VERTEX_ARRAY_TYPE 0x807B
546 #define GL_VERTEX_ARRAY_STRIDE 0x807C
547 #define GL_NORMAL_ARRAY_TYPE 0x807E
548 #define GL_NORMAL_ARRAY_STRIDE 0x807F
549 #define GL_COLOR_ARRAY_SIZE 0x8081
550 #define GL_COLOR_ARRAY_TYPE 0x8082
551 #define GL_COLOR_ARRAY_STRIDE 0x8083
552 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
553 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
554 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
555 #define GL_VERTEX_ARRAY_POINTER 0x808E
556 #define GL_NORMAL_ARRAY_POINTER 0x808F
557 #define GL_COLOR_ARRAY_POINTER 0x8090
558 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
559 #define GL_SAMPLE_BUFFERS 0x80A8
560 #define GL_SAMPLES 0x80A9
561 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
562 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
565 /* ErrorCode */
566 #define GL_NO_ERROR 0
567 #define GL_INVALID_ENUM 0x0500
568 #define GL_INVALID_VALUE 0x0501
569 #define GL_INVALID_OPERATION 0x0502
570 #define GL_STACK_OVERFLOW 0x0503
571 #define GL_STACK_UNDERFLOW 0x0504
572 #define GL_OUT_OF_MEMORY 0x0505
574 // Vladimir
575 #define glVertex2i(x,y) glVertex3f(x,y,0.0)
576 #define glTexCoord2d glTexCoord2f
577 #define glVertex3d glVertex3f
578 //#define glColor4ub(x,y,z,p) glColor4f(x,y,z,p) //nicknekit: wtf???
579 #define glFogi glFogf
580 //
592 void glOrtho (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
595 void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
606 void glFrustum (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
622 void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
625 void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
659 // Vladimir
675 //nicknekit: for xash3d
679 void glCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border );
680 void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
681 void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
682 void glTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels );
687 GLenum format,
694 // for XashXT
696 void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
705 //GLboolean glIsRenderbuffer (GLuint renderbuffer);
711 void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
714 void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
716 void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
727 #ifdef __cplusplus
728 }
729 #endif
732 #endif