1 module dcv.plot.bindings.gl;
2 
3 alias uint GLenum;
4 alias ubyte GLboolean;
5 alias uint GLbitfield;
6 alias void GLvoid;
7 alias byte GLbyte; /* 1-byte signed */
8 alias short GLshort; /* 2-byte signed */
9 alias int GLint; /* 4-byte signed */
10 alias ubyte GLubyte; /* 1-byte u*/
11 alias ushort GLushort; /* 2-byte u*/
12 alias uint GLuint; /* 4-byte u*/
13 alias int GLsizei; /* 4-byte signed */
14 alias float GLfloat; /* single precision float */
15 alias float GLclampf; /* single precision float in [0,1] */
16 alias double GLdouble; /* double precision float */
17 alias double GLclampd; /* double precision float in [0,1] */
18 
19 immutable GL_FALSE = 0;
20 immutable GL_TRUE = 1;
21 immutable GL_BYTE = 0x1400;
22 immutable GL_UNSIGNED_BYTE = 0x1401;
23 immutable GL_SHORT = 0x1402;
24 immutable GL_UNSIGNED_SHORT = 0x1403;
25 immutable GL_INT = 0x1404;
26 immutable GL_UNSIGNED_INT = 0x1405;
27 immutable GL_FLOAT = 0x1406;
28 immutable GL_2_BYTES = 0x1407;
29 immutable GL_3_BYTES = 0x1408;
30 immutable GL_4_BYTES = 0x1409;
31 immutable GL_DOUBLE = 0x140A;
32 
33 /* Primitives */
34 immutable GL_POINTS = 0x0000;
35 immutable GL_LINES = 0x0001;
36 immutable GL_LINE_LOOP = 0x0002;
37 immutable GL_LINE_STRIP = 0x0003;
38 immutable GL_TRIANGLES = 0x0004;
39 immutable GL_TRIANGLE_STRIP = 0x0005;
40 immutable GL_TRIANGLE_FAN = 0x0006;
41 immutable GL_QUADS = 0x0007;
42 immutable GL_QUAD_STRIP = 0x0008;
43 immutable GL_POLYGON = 0x0009;
44 
45 /* Vertex Arrays */
46 immutable GL_VERTEX_ARRAY = 0x8074;
47 immutable GL_NORMAL_ARRAY = 0x8075;
48 immutable GL_COLOR_ARRAY = 0x8076;
49 immutable GL_INDEX_ARRAY = 0x8077;
50 immutable GL_TEXTURE_COORD_ARRAY = 0x8078;
51 immutable GL_EDGE_FLAG_ARRAY = 0x8079;
52 immutable GL_VERTEX_ARRAY_SIZE = 0x807A;
53 immutable GL_VERTEX_ARRAY_TYPE = 0x807B;
54 immutable GL_VERTEX_ARRAY_STRIDE = 0x807C;
55 immutable GL_NORMAL_ARRAY_TYPE = 0x807E;
56 immutable GL_NORMAL_ARRAY_STRIDE = 0x807F;
57 immutable GL_COLOR_ARRAY_SIZE = 0x8081;
58 immutable GL_COLOR_ARRAY_TYPE = 0x8082;
59 immutable GL_COLOR_ARRAY_STRIDE = 0x8083;
60 immutable GL_INDEX_ARRAY_TYPE = 0x8085;
61 immutable GL_INDEX_ARRAY_STRIDE = 0x8086;
62 immutable GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088;
63 immutable GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089;
64 immutable GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A;
65 immutable GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C;
66 immutable GL_VERTEX_ARRAY_POINTER = 0x808E;
67 immutable GL_NORMAL_ARRAY_POINTER = 0x808F;
68 immutable GL_COLOR_ARRAY_POINTER = 0x8090;
69 immutable GL_INDEX_ARRAY_POINTER = 0x8091;
70 immutable GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092;
71 immutable GL_EDGE_FLAG_ARRAY_POINTER = 0x8093;
72 immutable GL_V2F = 0x2A20;
73 immutable GL_V3F = 0x2A21;
74 immutable GL_C4UB_V2F = 0x2A22;
75 immutable GL_C4UB_V3F = 0x2A23;
76 immutable GL_C3F_V3F = 0x2A24;
77 immutable GL_N3F_V3F = 0x2A25;
78 immutable GL_C4F_N3F_V3F = 0x2A26;
79 immutable GL_T2F_V3F = 0x2A27;
80 immutable GL_T4F_V4F = 0x2A28;
81 immutable GL_T2F_C4UB_V3F = 0x2A29;
82 immutable GL_T2F_C3F_V3F = 0x2A2A;
83 immutable GL_T2F_N3F_V3F = 0x2A2B;
84 immutable GL_T2F_C4F_N3F_V3F = 0x2A2C;
85 immutable GL_T4F_C4F_N3F_V4F = 0x2A2D;
86 
87 /* Matrix Mode */
88 
89 immutable GL_MATRIX_MODE = 0x0BA0;
90 immutable GL_MODELVIEW = 0x1700;
91 immutable GL_PROJECTION = 0x1701;
92 immutable GL_TEXTURE = 0x1702;
93 
94 /* Points */
95 
96 immutable GL_POINT_SMOOTH = 0x0B10;
97 immutable GL_POINT_SIZE = 0x0B11;
98 immutable GL_POINT_SIZE_GRANULARITY = 0x0B13;
99 immutable GL_POINT_SIZE_RANGE = 0x0B12;
100 
101 /* Lines */
102 
103 immutable GL_LINE_SMOOTH = 0x0B20;
104 immutable GL_LINE_STIPPLE = 0x0B24;
105 immutable GL_LINE_STIPPLE_PATTERN = 0x0B25;
106 immutable GL_LINE_STIPPLE_REPEAT = 0x0B26;
107 immutable GL_LINE_WIDTH = 0x0B21;
108 immutable GL_LINE_WIDTH_GRANULARITY = 0x0B23;
109 immutable GL_LINE_WIDTH_RANGE = 0x0B22;
110 
111 /* Polygons */
112 immutable GL_POINT = 0x1B00;
113 immutable GL_LINE = 0x1B01;
114 immutable GL_FILL = 0x1B02;
115 immutable GL_CW = 0x0900;
116 immutable GL_CCW = 0x0901;
117 immutable GL_FRONT = 0x0404;
118 immutable GL_BACK = 0x0405;
119 immutable GL_POLYGON_MODE = 0x0B40;
120 immutable GL_POLYGON_SMOOTH = 0x0B41;
121 immutable GL_POLYGON_STIPPLE = 0x0B42;
122 immutable GL_EDGE_FLAG = 0x0B43;
123 immutable GL_CULL_FACE = 0x0B44;
124 immutable GL_CULL_FACE_MODE = 0x0B45;
125 immutable GL_FRONT_FACE = 0x0B46;
126 immutable GL_POLYGON_OFFSET_FACTOR = 0x8038;
127 immutable GL_POLYGON_OFFSET_UNITS = 0x2A00;
128 immutable GL_POLYGON_OFFSET_POINT = 0x2A01;
129 immutable GL_POLYGON_OFFSET_LINE = 0x2A02;
130 immutable GL_POLYGON_OFFSET_FILL = 0x8037;
131 
132 /* Display Lists */
133 immutable GL_COMPILE = 0x1300;
134 immutable GL_COMPILE_AND_EXECUTE = 0x1301;
135 immutable GL_LIST_BASE = 0x0B32;
136 immutable GL_LIST_INDEX = 0x0B33;
137 immutable GL_LIST_MODE = 0x0B30;
138 
139 /* Depth buffer */
140 immutable GL_NEVER = 0x0200;
141 immutable GL_LESS = 0x0201;
142 immutable GL_EQUAL = 0x0202;
143 immutable GL_LEQUAL = 0x0203;
144 immutable GL_GREATER = 0x0204;
145 immutable GL_NOTEQUAL = 0x0205;
146 immutable GL_GEQUAL = 0x0206;
147 immutable GL_ALWAYS = 0x0207;
148 immutable GL_DEPTH_TEST = 0x0B71;
149 immutable GL_DEPTH_BITS = 0x0D56;
150 immutable GL_DEPTH_CLEAR_VALUE = 0x0B73;
151 immutable GL_DEPTH_FUNC = 0x0B74;
152 immutable GL_DEPTH_RANGE = 0x0B70;
153 immutable GL_DEPTH_WRITEMASK = 0x0B72;
154 immutable GL_DEPTH_COMPONENT = 0x1902;
155 
156 /* Lighting */
157 immutable GL_LIGHTING = 0x0B50;
158 immutable GL_LIGHT0 = 0x4000;
159 immutable GL_LIGHT1 = 0x4001;
160 immutable GL_LIGHT2 = 0x4002;
161 immutable GL_LIGHT3 = 0x4003;
162 immutable GL_LIGHT4 = 0x4004;
163 immutable GL_LIGHT5 = 0x4005;
164 immutable GL_LIGHT6 = 0x4006;
165 immutable GL_LIGHT7 = 0x4007;
166 immutable GL_SPOT_EXPONENT = 0x1205;
167 immutable GL_SPOT_CUTOFF = 0x1206;
168 immutable GL_CONSTANT_ATTENUATION = 0x1207;
169 immutable GL_LINEAR_ATTENUATION = 0x1208;
170 immutable GL_QUADRATIC_ATTENUATION = 0x1209;
171 immutable GL_AMBIENT = 0x1200;
172 immutable GL_DIFFUSE = 0x1201;
173 immutable GL_SPECULAR = 0x1202;
174 immutable GL_SHININESS = 0x1601;
175 immutable GL_EMISSION = 0x1600;
176 immutable GL_POSITION = 0x1203;
177 immutable GL_SPOT_DIRECTION = 0x1204;
178 immutable GL_AMBIENT_AND_DIFFUSE = 0x1602;
179 immutable GL_COLOR_INDEXES = 0x1603;
180 immutable GL_LIGHT_MODEL_TWO_SIDE = 0x0B52;
181 immutable GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51;
182 immutable GL_LIGHT_MODEL_AMBIENT = 0x0B53;
183 immutable GL_FRONT_AND_BACK = 0x0408;
184 immutable GL_SHADE_MODEL = 0x0B54;
185 immutable GL_FLAT = 0x1D00;
186 immutable GL_SMOOTH = 0x1D01;
187 immutable GL_COLOR_MATERIAL = 0x0B57;
188 immutable GL_COLOR_MATERIAL_FACE = 0x0B55;
189 immutable GL_COLOR_MATERIAL_PARAMETER = 0x0B56;
190 immutable GL_NORMALIZE = 0x0BA1;
191 
192 /* User clipping planes */
193 immutable GL_CLIP_PLANE0 = 0x3000;
194 immutable GL_CLIP_PLANE1 = 0x3001;
195 immutable GL_CLIP_PLANE2 = 0x3002;
196 immutable GL_CLIP_PLANE3 = 0x3003;
197 immutable GL_CLIP_PLANE4 = 0x3004;
198 immutable GL_CLIP_PLANE5 = 0x3005;
199 
200 /* Accumulation buffer */
201 immutable GL_ACCUM_RED_BITS = 0x0D58;
202 immutable GL_ACCUM_GREEN_BITS = 0x0D59;
203 immutable GL_ACCUM_BLUE_BITS = 0x0D5A;
204 immutable GL_ACCUM_ALPHA_BITS = 0x0D5B;
205 immutable GL_ACCUM_CLEAR_VALUE = 0x0B80;
206 immutable GL_ACCUM = 0x0100;
207 immutable GL_ADD = 0x0104;
208 immutable GL_LOAD = 0x0101;
209 immutable GL_MULT = 0x0103;
210 immutable GL_RETURN = 0x0102;
211 
212 /* Alpha testing */
213 immutable GL_ALPHA_TEST = 0x0BC0;
214 immutable GL_ALPHA_TEST_REF = 0x0BC2;
215 immutable GL_ALPHA_TEST_FUNC = 0x0BC1;
216 
217 /* Blending */
218 immutable GL_BLEND = 0x0BE2;
219 immutable GL_BLEND_SRC = 0x0BE1;
220 immutable GL_BLEND_DST = 0x0BE0;
221 immutable GL_ZERO = 0;
222 immutable GL_ONE = 1;
223 immutable GL_SRC_COLOR = 0x0300;
224 immutable GL_ONE_MINUS_SRC_COLOR = 0x0301;
225 immutable GL_SRC_ALPHA = 0x0302;
226 immutable GL_ONE_MINUS_SRC_ALPHA = 0x0303;
227 immutable GL_DST_ALPHA = 0x0304;
228 immutable GL_ONE_MINUS_DST_ALPHA = 0x0305;
229 immutable GL_DST_COLOR = 0x0306;
230 immutable GL_ONE_MINUS_DST_COLOR = 0x0307;
231 immutable GL_SRC_ALPHA_SATURATE = 0x0308;
232 
233 /* Render Mode */
234 immutable GL_FEEDBACK = 0x1C01;
235 immutable GL_RENDER = 0x1C00;
236 immutable GL_SELECT = 0x1C02;
237 
238 /* Feedback */
239 immutable GL_2D = 0x0600;
240 immutable GL_3D = 0x0601;
241 immutable GL_3D_COLOR = 0x0602;
242 immutable GL_3D_COLOR_TEXTURE = 0x0603;
243 immutable GL_4D_COLOR_TEXTURE = 0x0604;
244 immutable GL_POINT_TOKEN = 0x0701;
245 immutable GL_LINE_TOKEN = 0x0702;
246 immutable GL_LINE_RESET_TOKEN = 0x0707;
247 immutable GL_POLYGON_TOKEN = 0x0703;
248 immutable GL_BITMAP_TOKEN = 0x0704;
249 immutable GL_DRAW_PIXEL_TOKEN = 0x0705;
250 immutable GL_COPY_PIXEL_TOKEN = 0x0706;
251 immutable GL_PASS_THROUGH_TOKEN = 0x0700;
252 immutable GL_FEEDBACK_BUFFER_POINTER = 0x0DF0;
253 immutable GL_FEEDBACK_BUFFER_SIZE = 0x0DF1;
254 immutable GL_FEEDBACK_BUFFER_TYPE = 0x0DF2;
255 
256 /* Selection */
257 immutable GL_SELECTION_BUFFER_POINTER = 0x0DF3;
258 immutable GL_SELECTION_BUFFER_SIZE = 0x0DF4;
259 
260 /* Fog */
261 immutable GL_FOG = 0x0B60;
262 immutable GL_FOG_MODE = 0x0B65;
263 immutable GL_FOG_DENSITY = 0x0B62;
264 immutable GL_FOG_COLOR = 0x0B66;
265 immutable GL_FOG_INDEX = 0x0B61;
266 immutable GL_FOG_START = 0x0B63;
267 immutable GL_FOG_END = 0x0B64;
268 immutable GL_LINEAR = 0x2601;
269 immutable GL_EXP = 0x0800;
270 immutable GL_EXP2 = 0x0801;
271 
272 /* Logic Ops */
273 immutable GL_LOGIC_OP = 0x0BF1;
274 immutable GL_INDEX_LOGIC_OP = 0x0BF1;
275 immutable GL_COLOR_LOGIC_OP = 0x0BF2;
276 immutable GL_LOGIC_OP_MODE = 0x0BF0;
277 immutable GL_CLEAR = 0x1500;
278 immutable GL_SET = 0x150F;
279 immutable GL_COPY = 0x1503;
280 immutable GL_COPY_INVERTED = 0x150C;
281 immutable GL_NOOP = 0x1505;
282 immutable GL_INVERT = 0x150A;
283 immutable GL_AND = 0x1501;
284 immutable GL_NAND = 0x150E;
285 immutable GL_OR = 0x1507;
286 immutable GL_NOR = 0x1508;
287 immutable GL_XOR = 0x1506;
288 immutable GL_EQUIV = 0x1509;
289 immutable GL_AND_REVERSE = 0x1502;
290 immutable GL_AND_INVERTED = 0x1504;
291 immutable GL_OR_REVERSE = 0x150B;
292 immutable GL_OR_INVERTED = 0x150D;
293 
294 /* Stencil */
295 immutable GL_STENCIL_BITS = 0x0D57;
296 immutable GL_STENCIL_TEST = 0x0B90;
297 immutable GL_STENCIL_CLEAR_VALUE = 0x0B91;
298 immutable GL_STENCIL_FUNC = 0x0B92;
299 immutable GL_STENCIL_VALUE_MASK = 0x0B93;
300 immutable GL_STENCIL_FAIL = 0x0B94;
301 immutable GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
302 immutable GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
303 immutable GL_STENCIL_REF = 0x0B97;
304 immutable GL_STENCIL_WRITEMASK = 0x0B98;
305 immutable GL_STENCIL_INDEX = 0x1901;
306 immutable GL_KEEP = 0x1E00;
307 immutable GL_REPLACE = 0x1E01;
308 immutable GL_INCR = 0x1E02;
309 immutable GL_DECR = 0x1E03;
310 
311 /* Buffers, Pixel Drawing/Reading */
312 immutable GL_NONE = 0;
313 immutable GL_LEFT = 0x0406;
314 immutable GL_RIGHT = 0x0407;
315 immutable GL_FRONT_LEFT = 0x0400;
316 immutable GL_FRONT_RIGHT = 0x0401;
317 immutable GL_BACK_LEFT = 0x0402;
318 immutable GL_BACK_RIGHT = 0x0403;
319 immutable GL_AUX0 = 0x0409;
320 immutable GL_AUX1 = 0x040A;
321 immutable GL_AUX2 = 0x040B;
322 immutable GL_AUX3 = 0x040C;
323 immutable GL_COLOR_INDEX = 0x1900;
324 immutable GL_RED = 0x1903;
325 immutable GL_GREEN = 0x1904;
326 immutable GL_BLUE = 0x1905;
327 immutable GL_ALPHA = 0x1906;
328 immutable GL_LUMINANCE = 0x1909;
329 immutable GL_LUMINANCE_ALPHA = 0x190A;
330 immutable GL_ALPHA_BITS = 0x0D55;
331 immutable GL_RED_BITS = 0x0D52;
332 immutable GL_GREEN_BITS = 0x0D53;
333 immutable GL_BLUE_BITS = 0x0D54;
334 immutable GL_INDEX_BITS = 0x0D51;
335 immutable GL_SUBPIXEL_BITS = 0x0D50;
336 immutable GL_AUX_BUFFERS = 0x0C00;
337 immutable GL_READ_BUFFER = 0x0C02;
338 immutable GL_DRAW_BUFFER = 0x0C01;
339 immutable GL_DOUBLEBUFFER = 0x0C32;
340 immutable GL_STEREO = 0x0C33;
341 immutable GL_BITMAP = 0x1A00;
342 immutable GL_COLOR = 0x1800;
343 immutable GL_DEPTH = 0x1801;
344 immutable GL_STENCIL = 0x1802;
345 immutable GL_DITHER = 0x0BD0;
346 immutable GL_RGB = 0x1907;
347 immutable GL_RGBA = 0x1908;
348 
349 /* Implementation limits */
350 immutable GL_MAX_LIST_NESTING = 0x0B31;
351 immutable GL_MAX_EVAL_ORDER = 0x0D30;
352 immutable GL_MAX_LIGHTS = 0x0D31;
353 immutable GL_MAX_CLIP_PLANES = 0x0D32;
354 immutable GL_MAX_TEXTURE_SIZE = 0x0D33;
355 immutable GL_MAX_PIXEL_MAP_TABLE = 0x0D34;
356 immutable GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35;
357 immutable GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36;
358 immutable GL_MAX_NAME_STACK_DEPTH = 0x0D37;
359 immutable GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38;
360 immutable GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39;
361 immutable GL_MAX_VIEWPORT_DIMS = 0x0D3A;
362 immutable GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B;
363 
364 /* Gets */
365 immutable GL_ATTRIB_STACK_DEPTH = 0x0BB0;
366 immutable GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1;
367 immutable GL_COLOR_CLEAR_VALUE = 0x0C22;
368 immutable GL_COLOR_WRITEMASK = 0x0C23;
369 immutable GL_CURRENT_INDEX = 0x0B01;
370 immutable GL_CURRENT_COLOR = 0x0B00;
371 immutable GL_CURRENT_NORMAL = 0x0B02;
372 immutable GL_CURRENT_RASTER_COLOR = 0x0B04;
373 immutable GL_CURRENT_RASTER_DISTANCE = 0x0B09;
374 immutable GL_CURRENT_RASTER_INDEX = 0x0B05;
375 immutable GL_CURRENT_RASTER_POSITION = 0x0B07;
376 immutable GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06;
377 immutable GL_CURRENT_RASTER_POSITION_VALID = 0x0B08;
378 immutable GL_CURRENT_TEXTURE_COORDS = 0x0B03;
379 immutable GL_INDEX_CLEAR_VALUE = 0x0C20;
380 immutable GL_INDEX_MODE = 0x0C30;
381 immutable GL_INDEX_WRITEMASK = 0x0C21;
382 immutable GL_MODELVIEW_MATRIX = 0x0BA6;
383 immutable GL_MODELVIEW_STACK_DEPTH = 0x0BA3;
384 immutable GL_NAME_STACK_DEPTH = 0x0D70;
385 immutable GL_PROJECTION_MATRIX = 0x0BA7;
386 immutable GL_PROJECTION_STACK_DEPTH = 0x0BA4;
387 immutable GL_RENDER_MODE = 0x0C40;
388 immutable GL_RGBA_MODE = 0x0C31;
389 immutable GL_TEXTURE_MATRIX = 0x0BA8;
390 immutable GL_TEXTURE_STACK_DEPTH = 0x0BA5;
391 immutable GL_VIEWPORT = 0x0BA2;
392 
393 /* Evaluators */
394 immutable GL_AUTO_NORMAL = 0x0D80;
395 immutable GL_MAP1_COLOR_4 = 0x0D90;
396 immutable GL_MAP1_INDEX = 0x0D91;
397 immutable GL_MAP1_NORMAL = 0x0D92;
398 immutable GL_MAP1_TEXTURE_COORD_1 = 0x0D93;
399 immutable GL_MAP1_TEXTURE_COORD_2 = 0x0D94;
400 immutable GL_MAP1_TEXTURE_COORD_3 = 0x0D95;
401 immutable GL_MAP1_TEXTURE_COORD_4 = 0x0D96;
402 immutable GL_MAP1_VERTEX_3 = 0x0D97;
403 immutable GL_MAP1_VERTEX_4 = 0x0D98;
404 immutable GL_MAP2_COLOR_4 = 0x0DB0;
405 immutable GL_MAP2_INDEX = 0x0DB1;
406 immutable GL_MAP2_NORMAL = 0x0DB2;
407 immutable GL_MAP2_TEXTURE_COORD_1 = 0x0DB3;
408 immutable GL_MAP2_TEXTURE_COORD_2 = 0x0DB4;
409 immutable GL_MAP2_TEXTURE_COORD_3 = 0x0DB5;
410 immutable GL_MAP2_TEXTURE_COORD_4 = 0x0DB6;
411 immutable GL_MAP2_VERTEX_3 = 0x0DB7;
412 immutable GL_MAP2_VERTEX_4 = 0x0DB8;
413 immutable GL_MAP1_GRID_DOMAIN = 0x0DD0;
414 immutable GL_MAP1_GRID_SEGMENTS = 0x0DD1;
415 immutable GL_MAP2_GRID_DOMAIN = 0x0DD2;
416 immutable GL_MAP2_GRID_SEGMENTS = 0x0DD3;
417 immutable GL_COEFF = 0x0A00;
418 immutable GL_ORDER = 0x0A01;
419 immutable GL_DOMAIN = 0x0A02;
420 
421 /* Hints */
422 immutable GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50;
423 immutable GL_POINT_SMOOTH_HINT = 0x0C51;
424 immutable GL_LINE_SMOOTH_HINT = 0x0C52;
425 immutable GL_POLYGON_SMOOTH_HINT = 0x0C53;
426 immutable GL_FOG_HINT = 0x0C54;
427 immutable GL_DONT_CARE = 0x1100;
428 immutable GL_FASTEST = 0x1101;
429 immutable GL_NICEST = 0x1102;
430 
431 /* Scissor box */
432 immutable GL_SCISSOR_BOX = 0x0C10;
433 immutable GL_SCISSOR_TEST = 0x0C11;
434 
435 /* Pixel Mode / Transfer */
436 immutable GL_MAP_COLOR = 0x0D10;
437 immutable GL_MAP_STENCIL = 0x0D11;
438 immutable GL_INDEX_SHIFT = 0x0D12;
439 immutable GL_INDEX_OFFSET = 0x0D13;
440 immutable GL_RED_SCALE = 0x0D14;
441 immutable GL_RED_BIAS = 0x0D15;
442 immutable GL_GREEN_SCALE = 0x0D18;
443 immutable GL_GREEN_BIAS = 0x0D19;
444 immutable GL_BLUE_SCALE = 0x0D1A;
445 immutable GL_BLUE_BIAS = 0x0D1B;
446 immutable GL_ALPHA_SCALE = 0x0D1C;
447 immutable GL_ALPHA_BIAS = 0x0D1D;
448 immutable GL_DEPTH_SCALE = 0x0D1E;
449 immutable GL_DEPTH_BIAS = 0x0D1F;
450 immutable GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1;
451 immutable GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0;
452 immutable GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2;
453 immutable GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3;
454 immutable GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4;
455 immutable GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5;
456 immutable GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6;
457 immutable GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7;
458 immutable GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8;
459 immutable GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9;
460 immutable GL_PIXEL_MAP_S_TO_S = 0x0C71;
461 immutable GL_PIXEL_MAP_I_TO_I = 0x0C70;
462 immutable GL_PIXEL_MAP_I_TO_R = 0x0C72;
463 immutable GL_PIXEL_MAP_I_TO_G = 0x0C73;
464 immutable GL_PIXEL_MAP_I_TO_B = 0x0C74;
465 immutable GL_PIXEL_MAP_I_TO_A = 0x0C75;
466 immutable GL_PIXEL_MAP_R_TO_R = 0x0C76;
467 immutable GL_PIXEL_MAP_G_TO_G = 0x0C77;
468 immutable GL_PIXEL_MAP_B_TO_B = 0x0C78;
469 immutable GL_PIXEL_MAP_A_TO_A = 0x0C79;
470 immutable GL_PACK_ALIGNMENT = 0x0D05;
471 immutable GL_PACK_LSB_FIRST = 0x0D01;
472 immutable GL_PACK_ROW_LENGTH = 0x0D02;
473 immutable GL_PACK_SKIP_PIXELS = 0x0D04;
474 immutable GL_PACK_SKIP_ROWS = 0x0D03;
475 immutable GL_PACK_SWAP_BYTES = 0x0D00;
476 immutable GL_UNPACK_ALIGNMENT = 0x0CF5;
477 immutable GL_UNPACK_LSB_FIRST = 0x0CF1;
478 immutable GL_UNPACK_ROW_LENGTH = 0x0CF2;
479 immutable GL_UNPACK_SKIP_PIXELS = 0x0CF4;
480 immutable GL_UNPACK_SKIP_ROWS = 0x0CF3;
481 immutable GL_UNPACK_SWAP_BYTES = 0x0CF0;
482 immutable GL_ZOOM_X = 0x0D16;
483 immutable GL_ZOOM_Y = 0x0D17;
484 
485 /* Texture mapping */
486 immutable GL_TEXTURE_ENV = 0x2300;
487 immutable GL_TEXTURE_ENV_MODE = 0x2200;
488 immutable GL_TEXTURE_1D = 0x0DE0;
489 immutable GL_TEXTURE_2D = 0x0DE1;
490 immutable GL_TEXTURE_WRAP_S = 0x2802;
491 immutable GL_TEXTURE_WRAP_T = 0x2803;
492 immutable GL_TEXTURE_MAG_FILTER = 0x2800;
493 immutable GL_TEXTURE_MIN_FILTER = 0x2801;
494 immutable GL_TEXTURE_ENV_COLOR = 0x2201;
495 immutable GL_TEXTURE_GEN_S = 0x0C60;
496 immutable GL_TEXTURE_GEN_T = 0x0C61;
497 immutable GL_TEXTURE_GEN_R = 0x0C62;
498 immutable GL_TEXTURE_GEN_Q = 0x0C63;
499 immutable GL_TEXTURE_GEN_MODE = 0x2500;
500 immutable GL_TEXTURE_BORDER_COLOR = 0x1004;
501 immutable GL_TEXTURE_WIDTH = 0x1000;
502 immutable GL_TEXTURE_HEIGHT = 0x1001;
503 immutable GL_TEXTURE_BORDER = 0x1005;
504 immutable GL_TEXTURE_COMPONENTS = 0x1003;
505 immutable GL_TEXTURE_RED_SIZE = 0x805C;
506 immutable GL_TEXTURE_GREEN_SIZE = 0x805D;
507 immutable GL_TEXTURE_BLUE_SIZE = 0x805E;
508 immutable GL_TEXTURE_ALPHA_SIZE = 0x805F;
509 immutable GL_TEXTURE_LUMINANCE_SIZE = 0x8060;
510 immutable GL_TEXTURE_INTENSITY_SIZE = 0x8061;
511 immutable GL_NEAREST_MIPMAP_NEAREST = 0x2700;
512 immutable GL_NEAREST_MIPMAP_LINEAR = 0x2702;
513 immutable GL_LINEAR_MIPMAP_NEAREST = 0x2701;
514 immutable GL_LINEAR_MIPMAP_LINEAR = 0x2703;
515 immutable GL_OBJECT_LINEAR = 0x2401;
516 immutable GL_OBJECT_PLANE = 0x2501;
517 immutable GL_EYE_LINEAR = 0x2400;
518 immutable GL_EYE_PLANE = 0x2502;
519 immutable GL_SPHERE_MAP = 0x2402;
520 immutable GL_DECAL = 0x2101;
521 immutable GL_MODULATE = 0x2100;
522 immutable GL_NEAREST = 0x2600;
523 immutable GL_REPEAT = 0x2901;
524 immutable GL_CLAMP = 0x2900;
525 immutable GL_S = 0x2000;
526 immutable GL_T = 0x2001;
527 immutable GL_R = 0x2002;
528 immutable GL_Q = 0x2003;
529 
530 /* Utility */
531 immutable GL_VENDOR = 0x1F00;
532 immutable GL_RENDERER = 0x1F01;
533 immutable GL_VERSION = 0x1F02;
534 immutable GL_EXTENSIONS = 0x1F03;
535 
536 /* Errors */
537 immutable GL_NO_ERROR = 0;
538 immutable GL_INVALID_ENUM = 0x0500;
539 immutable GL_INVALID_VALUE = 0x0501;
540 immutable GL_INVALID_OPERATION = 0x0502;
541 immutable GL_STACK_OVERFLOW = 0x0503;
542 immutable GL_STACK_UNDERFLOW = 0x0504;
543 immutable GL_OUT_OF_MEMORY = 0x0505;
544 
545 /* glPush/PopAttrib bits */
546 immutable GL_CURRENT_BIT = 0x00000001;
547 immutable GL_POINT_BIT = 0x00000002;
548 immutable GL_LINE_BIT = 0x00000004;
549 immutable GL_POLYGON_BIT = 0x00000008;
550 immutable GL_POLYGON_STIPPLE_BIT = 0x00000010;
551 immutable GL_PIXEL_MODE_BIT = 0x00000020;
552 immutable GL_LIGHTING_BIT = 0x00000040;
553 immutable GL_FOG_BIT = 0x00000080;
554 immutable GL_DEPTH_BUFFER_BIT = 0x00000100;
555 immutable GL_ACCUM_BUFFER_BIT = 0x00000200;
556 immutable GL_STENCIL_BUFFER_BIT = 0x00000400;
557 immutable GL_VIEWPORT_BIT = 0x00000800;
558 immutable GL_TRANSFORM_BIT = 0x00001000;
559 immutable GL_ENABLE_BIT = 0x00002000;
560 immutable GL_COLOR_BUFFER_BIT = 0x00004000;
561 immutable GL_HINT_BIT = 0x00008000;
562 immutable GL_EVAL_BIT = 0x00010000;
563 immutable GL_LIST_BIT = 0x00020000;
564 immutable GL_TEXTURE_BIT = 0x00040000;
565 immutable GL_SCISSOR_BIT = 0x00080000;
566 immutable GL_ALL_ATTRIB_BITS = 0xFFFFFFFF;
567 
568 /* OpenGL 1.1 */
569 immutable GL_PROXY_TEXTURE_1D = 0x8063;
570 immutable GL_PROXY_TEXTURE_2D = 0x8064;
571 immutable GL_TEXTURE_PRIORITY = 0x8066;
572 immutable GL_TEXTURE_RESIDENT = 0x8067;
573 immutable GL_TEXTURE_BINDING_1D = 0x8068;
574 immutable GL_TEXTURE_BINDING_2D = 0x8069;
575 immutable GL_TEXTURE_INTERNAL_FORMAT = 0x1003;
576 immutable GL_ALPHA4 = 0x803B;
577 immutable GL_ALPHA8 = 0x803C;
578 immutable GL_ALPHA12 = 0x803D;
579 immutable GL_ALPHA16 = 0x803E;
580 immutable GL_LUMINANCE4 = 0x803F;
581 immutable GL_LUMINANCE8 = 0x8040;
582 immutable GL_LUMINANCE12 = 0x8041;
583 immutable GL_LUMINANCE16 = 0x8042;
584 immutable GL_LUMINANCE4_ALPHA4 = 0x8043;
585 immutable GL_LUMINANCE6_ALPHA2 = 0x8044;
586 immutable GL_LUMINANCE8_ALPHA8 = 0x8045;
587 immutable GL_LUMINANCE12_ALPHA4 = 0x8046;
588 immutable GL_LUMINANCE12_ALPHA12 = 0x8047;
589 immutable GL_LUMINANCE16_ALPHA16 = 0x8048;
590 immutable GL_INTENSITY = 0x8049;
591 immutable GL_INTENSITY4 = 0x804A;
592 immutable GL_INTENSITY8 = 0x804B;
593 immutable GL_INTENSITY12 = 0x804C;
594 immutable GL_INTENSITY16 = 0x804D;
595 immutable GL_R3_G3_B2 = 0x2A10;
596 immutable GL_RGB4 = 0x804F;
597 immutable GL_RGB5 = 0x8050;
598 immutable GL_RGB8 = 0x8051;
599 immutable GL_RGB10 = 0x8052;
600 immutable GL_RGB12 = 0x8053;
601 immutable GL_RGB16 = 0x8054;
602 immutable GL_RGBA2 = 0x8055;
603 immutable GL_RGBA4 = 0x8056;
604 immutable GL_RGB5_A1 = 0x8057;
605 immutable GL_RGBA8 = 0x8058;
606 immutable GL_RGB10_A2 = 0x8059;
607 immutable GL_RGBA12 = 0x805A;
608 immutable GL_RGBA16 = 0x805B;
609 immutable GL_CLIENT_PIXEL_STORE_BIT = 0x00000001;
610 immutable GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002;
611 immutable GL_ALL_CLIENT_ATTRIB_BITS = 0xFFFFFFFF;
612 immutable GL_CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF;
613 
614 extern (C)
615 {
616 
617     /*************************************************************************
618      * GL functions definitions.
619      *************************************************************************/
620 
621     GLenum glGetError();
622     void glClearIndex(GLfloat c);
623     void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
624     void glClear(GLbitfield mask);
625     void glBegin(GLenum mode);
626     void glEnd();
627     void glVertex2f(GLfloat x, GLfloat y);
628     void glVertex3f(GLfloat x, GLfloat y, GLfloat z);
629     void glColor3f(GLfloat red, GLfloat green, GLfloat blue);
630     void glTexCoord2f(GLfloat s, GLfloat t);
631     void glEnable(GLenum cap);
632     void glDisable(GLenum cap);
633     void glTexEnvf(GLenum target, GLenum pname, GLfloat param);
634     void glGenTextures(GLsizei n, GLuint* textures);
635     void glDeleteTextures(GLsizei n, const GLuint* textures);
636     void glBindTexture(GLenum target, GLuint texture);
637     void glFlush();
638     void glShadeModel(GLenum mode);
639     void glPixelStorei(GLenum pname, GLint param);
640     void glTexParameteri(GLenum target, GLenum pname, GLint param);
641     void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height,
642             GLint border, GLenum format, GLenum type, const GLvoid* pixels);
643     void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
644             GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
645     void glGenerateMipmap(GLenum);
646     void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val);
647     void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
648     void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val);
649     void glPushMatrix();
650     void glPopMatrix();
651     void glLoadIdentity();
652     void glMatrixMode(GLenum mode);
653 
654     void glTranslatef(GLfloat x, GLfloat y, GLfloat z);
655     void glScalef(GLfloat x, GLfloat y, GLfloat z);
656     void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
657     void glPixelZoom(GLfloat xfactor, GLfloat yfactor);
658     void glRasterPos2f(GLfloat x, GLfloat y);
659     void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z);
660 }