1 /*
2 
3 Boost Software License - Version 1.0 - August 17th, 2003
4 
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
11 
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 
27 */
28 module derelict.opengl.gltypes;
29 
30 /*
31 The ExtensionState enum is used internally by the extension loader and externally
32 via the DerelictGL interface. It probably belongs more appropriately in gl.d, but
33 in order to avoid the extloader module having a dependency on the gl module, it lives
34 here instead.
35 */
36 enum GLExtensionState
37 {
38     Loaded,
39     FailedToLoad,
40     DriverUnsupported,
41     DerelictUnsupported,
42 }
43 
44 alias uint      GLenum;
45 alias ubyte     GLboolean;
46 alias uint      GLbitfield;
47 alias void      GLvoid;
48 alias byte      GLbyte;
49 alias short     GLshort;
50 alias int       GLint;
51 alias ubyte     GLubyte;
52 alias ushort    GLushort;
53 alias uint      GLuint;
54 alias int       GLsizei;
55 alias float     GLfloat;
56 alias float     GLclampf;
57 alias double    GLdouble;
58 alias double    GLclampd;
59 alias char      GLchar;
60 alias ptrdiff_t GLintptr;
61 alias ptrdiff_t GLsizeiptr;
62 
63 // Boolean values
64 enum : GLboolean
65 {
66     GL_FALSE    = 0x0,
67     GL_TRUE    = 0x1,
68 }
69 
70 enum : GLenum
71 {
72     // Data types
73     GL_BYTE                                = 0x1400,
74     GL_UNSIGNED_BYTE                       = 0x1401,
75     GL_SHORT                               = 0x1402,
76     GL_UNSIGNED_SHORT                      = 0x1403,
77     GL_INT                                 = 0x1404,
78     GL_UNSIGNED_INT                        = 0x1405,
79     GL_FLOAT                               = 0x1406,
80     GL_DOUBLE                              = 0x140A,
81     GL_2_BYTES                             = 0x1407,
82     GL_3_BYTES                             = 0x1408,
83     GL_4_BYTES                             = 0x1409,
84 
85     // Primitives
86     GL_POINTS                              = 0x0000,
87     GL_LINES                               = 0x0001,
88     GL_LINE_LOOP                           = 0x0002,
89     GL_LINE_STRIP                          = 0x0003,
90     GL_TRIANGLES                           = 0x0004,
91     GL_TRIANGLE_STRIP                      = 0x0005,
92     GL_TRIANGLE_FAN                        = 0x0006,
93     GL_QUADS                               = 0x0007,
94     GL_QUAD_STRIP                          = 0x0008,
95     GL_POLYGON                             = 0x0009,
96 
97     // Vertex Arrays
98     GL_VERTEX_ARRAY                        = 0x8074,
99     GL_NORMAL_ARRAY                        = 0x8075,
100     GL_COLOR_ARRAY                         = 0x8076,
101     GL_INDEX_ARRAY                         = 0x8077,
102     GL_TEXTURE_COORD_ARRAY                 = 0x8078,
103     GL_EDGE_FLAG_ARRAY                     = 0x8079,
104     GL_VERTEX_ARRAY_SIZE                   = 0x807A,
105     GL_VERTEX_ARRAY_TYPE                   = 0x807B,
106     GL_VERTEX_ARRAY_STRIDE                 = 0x807C,
107     GL_NORMAL_ARRAY_TYPE                   = 0x807E,
108     GL_NORMAL_ARRAY_STRIDE                 = 0x807F,
109     GL_COLOR_ARRAY_SIZE                    = 0x8081,
110     GL_COLOR_ARRAY_TYPE                    = 0x8082,
111     GL_COLOR_ARRAY_STRIDE                  = 0x8083,
112     GL_INDEX_ARRAY_TYPE                    = 0x8085,
113     GL_INDEX_ARRAY_STRIDE                  = 0x8086,
114     GL_TEXTURE_COORD_ARRAY_SIZE            = 0x8088,
115     GL_TEXTURE_COORD_ARRAY_TYPE            = 0x8089,
116     GL_TEXTURE_COORD_ARRAY_STRIDE          = 0x808A,
117     GL_EDGE_FLAG_ARRAY_STRIDE              = 0x808C,
118     GL_VERTEX_ARRAY_POINTER                = 0x808E,
119     GL_NORMAL_ARRAY_POINTER                = 0x808F,
120     GL_COLOR_ARRAY_POINTER                 = 0x8090,
121     GL_INDEX_ARRAY_POINTER                 = 0x8091,
122     GL_TEXTURE_COORD_ARRAY_POINTER         = 0x8092,
123     GL_EDGE_FLAG_ARRAY_POINTER             = 0x8093,
124     GL_V2F                                 = 0x2A20,
125     GL_V3F                                 = 0x2A21,
126     GL_C4UB_V2F                            = 0x2A22,
127     GL_C4UB_V3F                            = 0x2A23,
128     GL_C3F_V3F                             = 0x2A24,
129     GL_N3F_V3F                             = 0x2A25,
130     GL_C4F_N3F_V3F                         = 0x2A26,
131     GL_T2F_V3F                             = 0x2A27,
132     GL_T4F_V4F                             = 0x2A28,
133     GL_T2F_C4UB_V3F                        = 0x2A29,
134     GL_T2F_C3F_V3F                         = 0x2A2A,
135     GL_T2F_N3F_V3F                         = 0x2A2B,
136     GL_T2F_C4F_N3F_V3F                     = 0x2A2C,
137     GL_T4F_C4F_N3F_V4F                     = 0x2A2D,
138 
139     // Matrix Mode
140     GL_MATRIX_MODE                         = 0x0BA0,
141     GL_MODELVIEW                           = 0x1700,
142     GL_PROJECTION                          = 0x1701,
143     GL_TEXTURE                             = 0x1702,
144 
145     // Points
146     GL_POINT_SMOOTH                        = 0x0B10,
147     GL_POINT_SIZE                          = 0x0B11,
148     GL_POINT_SIZE_GRANULARITY              = 0x0B13,
149     GL_POINT_SIZE_RANGE                    = 0x0B12,
150 
151     // Lines
152     GL_LINE_SMOOTH                         = 0x0B20,
153     GL_LINE_STIPPLE                        = 0x0B24,
154     GL_LINE_STIPPLE_PATTERN                = 0x0B25,
155     GL_LINE_STIPPLE_REPEAT                 = 0x0B26,
156     GL_LINE_WIDTH                          = 0x0B21,
157     GL_LINE_WIDTH_GRANULARITY              = 0x0B23,
158     GL_LINE_WIDTH_RANGE                    = 0x0B22,
159 
160     // Polygons
161     GL_POINT                               = 0x1B00,
162     GL_LINE                                = 0x1B01,
163     GL_FILL                                = 0x1B02,
164     GL_CW                                  = 0x0900,
165     GL_CCW                                 = 0x0901,
166     GL_FRONT                               = 0x0404,
167     GL_BACK                                = 0x0405,
168     GL_POLYGON_MODE                        = 0x0B40,
169     GL_POLYGON_SMOOTH                      = 0x0B41,
170     GL_POLYGON_STIPPLE                     = 0x0B42,
171     GL_EDGE_FLAG                           = 0x0B43,
172     GL_CULL_FACE                           = 0x0B44,
173     GL_CULL_FACE_MODE                      = 0x0B45,
174     GL_FRONT_FACE                          = 0x0B46,
175     GL_POLYGON_OFFSET_FACTOR               = 0x8038,
176     GL_POLYGON_OFFSET_UNITS                = 0x2A00,
177     GL_POLYGON_OFFSET_POINT                = 0x2A01,
178     GL_POLYGON_OFFSET_LINE                 = 0x2A02,
179     GL_POLYGON_OFFSET_FILL                 = 0x8037,
180 
181     // Display Lists
182     GL_COMPILE                             = 0x1300,
183     GL_COMPILE_AND_EXECUTE                 = 0x1301,
184     GL_LIST_BASE                           = 0x0B32,
185     GL_LIST_INDEX                          = 0x0B33,
186     GL_LIST_MODE                           = 0x0B30,
187 
188     // Depth buffer
189     GL_NEVER                               = 0x0200,
190     GL_LESS                                = 0x0201,
191     GL_EQUAL                               = 0x0202,
192     GL_LEQUAL                              = 0x0203,
193     GL_GREATER                             = 0x0204,
194     GL_NOTEQUAL                            = 0x0205,
195     GL_GEQUAL                              = 0x0206,
196     GL_ALWAYS                              = 0x0207,
197     GL_DEPTH_TEST                          = 0x0B71,
198     GL_DEPTH_BITS                          = 0x0D56,
199     GL_DEPTH_CLEAR_VALUE                   = 0x0B73,
200     GL_DEPTH_FUNC                          = 0x0B74,
201     GL_DEPTH_RANGE                         = 0x0B70,
202     GL_DEPTH_WRITEMASK                     = 0x0B72,
203     GL_DEPTH_COMPONENT                     = 0x1902,
204 
205     // Lighting
206     GL_LIGHTING                            = 0x0B50,
207     GL_LIGHT0                              = 0x4000,
208     GL_LIGHT1                              = 0x4001,
209     GL_LIGHT2                              = 0x4002,
210     GL_LIGHT3                              = 0x4003,
211     GL_LIGHT4                              = 0x4004,
212     GL_LIGHT5                              = 0x4005,
213     GL_LIGHT6                              = 0x4006,
214     GL_LIGHT7                              = 0x4007,
215     GL_SPOT_EXPONENT                       = 0x1205,
216     GL_SPOT_CUTOFF                         = 0x1206,
217     GL_CONSTANT_ATTENUATION                = 0x1207,
218     GL_LINEAR_ATTENUATION                  = 0x1208,
219     GL_QUADRATIC_ATTENUATION               = 0x1209,
220     GL_AMBIENT                             = 0x1200,
221     GL_DIFFUSE                             = 0x1201,
222     GL_SPECULAR                            = 0x1202,
223     GL_SHININESS                           = 0x1601,
224     GL_EMISSION                            = 0x1600,
225     GL_POSITION                            = 0x1203,
226     GL_SPOT_DIRECTION                      = 0x1204,
227     GL_AMBIENT_AND_DIFFUSE                 = 0x1602,
228     GL_COLOR_INDEXES                       = 0x1603,
229     GL_LIGHT_MODEL_TWO_SIDE                = 0x0B52,
230     GL_LIGHT_MODEL_LOCAL_VIEWER            = 0x0B51,
231     GL_LIGHT_MODEL_AMBIENT                 = 0x0B53,
232     GL_FRONT_AND_BACK                      = 0x0408,
233     GL_SHADE_MODEL                         = 0x0B54,
234     GL_FLAT                                = 0x1D00,
235     GL_SMOOTH                              = 0x1D01,
236     GL_COLOR_MATERIAL                      = 0x0B57,
237     GL_COLOR_MATERIAL_FACE                 = 0x0B55,
238     GL_COLOR_MATERIAL_PARAMETER            = 0x0B56,
239     GL_NORMALIZE                           = 0x0BA1,
240 
241     // User clipping planes
242     GL_CLIP_PLANE0                         = 0x3000,
243     GL_CLIP_PLANE1                         = 0x3001,
244     GL_CLIP_PLANE2                         = 0x3002,
245     GL_CLIP_PLANE3                         = 0x3003,
246     GL_CLIP_PLANE4                         = 0x3004,
247     GL_CLIP_PLANE5                         = 0x3005,
248 
249     // Accumulation buffer
250     GL_ACCUM_RED_BITS                      = 0x0D58,
251     GL_ACCUM_GREEN_BITS                    = 0x0D59,
252     GL_ACCUM_BLUE_BITS                     = 0x0D5A,
253     GL_ACCUM_ALPHA_BITS                    = 0x0D5B,
254     GL_ACCUM_CLEAR_VALUE                   = 0x0B80,
255     GL_ACCUM                               = 0x0100,
256     GL_ADD                                 = 0x0104,
257     GL_LOAD                                = 0x0101,
258     GL_MULT                                = 0x0103,
259     GL_RETURN                              = 0x0102,
260 
261     // Alpha testing
262     GL_ALPHA_TEST                          = 0x0BC0,
263     GL_ALPHA_TEST_REF                      = 0x0BC2,
264     GL_ALPHA_TEST_FUNC                     = 0x0BC1,
265 
266     // Blending
267     GL_BLEND                               = 0x0BE2,
268     GL_BLEND_SRC                           = 0x0BE1,
269     GL_BLEND_DST                           = 0x0BE0,
270     GL_ZERO                                = 0x0,
271     GL_ONE                                 = 0x1,
272     GL_SRC_COLOR                           = 0x0300,
273     GL_ONE_MINUS_SRC_COLOR                 = 0x0301,
274     GL_SRC_ALPHA                           = 0x0302,
275     GL_ONE_MINUS_SRC_ALPHA                 = 0x0303,
276     GL_DST_ALPHA                           = 0x0304,
277     GL_ONE_MINUS_DST_ALPHA                 = 0x0305,
278     GL_DST_COLOR                           = 0x0306,
279     GL_ONE_MINUS_DST_COLOR                 = 0x0307,
280     GL_SRC_ALPHA_SATURATE                  = 0x0308,
281 
282     // Render Mode
283     GL_FEEDBACK                            = 0x1C01,
284     GL_RENDER                              = 0x1C00,
285     GL_SELECT                              = 0x1C02,
286 
287     // Feedback
288     GL_2D                                  = 0x0600,
289     GL_3D                                  = 0x0601,
290     GL_3D_COLOR                            = 0x0602,
291     GL_3D_COLOR_TEXTURE                    = 0x0603,
292     GL_4D_COLOR_TEXTURE                    = 0x0604,
293     GL_POINT_TOKEN                         = 0x0701,
294     GL_LINE_TOKEN                          = 0x0702,
295     GL_LINE_RESET_TOKEN                    = 0x0707,
296     GL_POLYGON_TOKEN                       = 0x0703,
297     GL_BITMAP_TOKEN                        = 0x0704,
298     GL_DRAW_PIXEL_TOKEN                    = 0x0705,
299     GL_COPY_PIXEL_TOKEN                    = 0x0706,
300     GL_PASS_THROUGH_TOKEN                  = 0x0700,
301     GL_FEEDBACK_BUFFER_POINTER             = 0x0DF0,
302     GL_FEEDBACK_BUFFER_SIZE                = 0x0DF1,
303     GL_FEEDBACK_BUFFER_TYPE                = 0x0DF2,
304 
305     // Selection
306     GL_SELECTION_BUFFER_POINTER            = 0x0DF3,
307     GL_SELECTION_BUFFER_SIZE               = 0x0DF4,
308 
309     // Fog
310     GL_FOG                                 = 0x0B60,
311     GL_FOG_MODE                            = 0x0B65,
312     GL_FOG_DENSITY                         = 0x0B62,
313     GL_FOG_COLOR                           = 0x0B66,
314     GL_FOG_INDEX                           = 0x0B61,
315     GL_FOG_START                           = 0x0B63,
316     GL_FOG_END                             = 0x0B64,
317     GL_LINEAR                              = 0x2601,
318     GL_EXP                                 = 0x0800,
319     GL_EXP2                                = 0x0801,
320 
321     // Logic Ops
322     GL_LOGIC_OP                            = 0x0BF1,
323     GL_INDEX_LOGIC_OP                      = 0x0BF1,
324     GL_COLOR_LOGIC_OP                      = 0x0BF2,
325     GL_LOGIC_OP_MODE                       = 0x0BF0,
326     GL_CLEAR                               = 0x1500,
327     GL_SET                                 = 0x150F,
328     GL_COPY                                = 0x1503,
329     GL_COPY_INVERTED                       = 0x150C,
330     GL_NOOP                                = 0x1505,
331     GL_INVERT                              = 0x150A,
332     GL_AND                                 = 0x1501,
333     GL_NAND                                = 0x150E,
334     GL_OR                                  = 0x1507,
335     GL_NOR                                 = 0x1508,
336     GL_XOR                                 = 0x1506,
337     GL_EQUIV                               = 0x1509,
338     GL_AND_REVERSE                         = 0x1502,
339     GL_AND_INVERTED                        = 0x1504,
340     GL_OR_REVERSE                          = 0x150B,
341     GL_OR_INVERTED                         = 0x150D,
342 
343     // Stencil
344     GL_STENCIL_TEST                        = 0x0B90,
345     GL_STENCIL_WRITEMASK                   = 0x0B98,
346     GL_STENCIL_BITS                        = 0x0D57,
347     GL_STENCIL_FUNC                        = 0x0B92,
348     GL_STENCIL_VALUE_MASK                  = 0x0B93,
349     GL_STENCIL_REF                         = 0x0B97,
350     GL_STENCIL_FAIL                        = 0x0B94,
351     GL_STENCIL_PASS_DEPTH_PASS             = 0x0B96,
352     GL_STENCIL_PASS_DEPTH_FAIL             = 0x0B95,
353     GL_STENCIL_CLEAR_VALUE                 = 0x0B91,
354     GL_STENCIL_INDEX                       = 0x1901,
355     GL_KEEP                                = 0x1E00,
356     GL_REPLACE                             = 0x1E01,
357     GL_INCR                                = 0x1E02,
358     GL_DECR                                = 0x1E03,
359 
360     // Buffers, Pixel Drawing/Reading
361     GL_NONE                                = 0x0,
362     GL_LEFT                                = 0x0406,
363     GL_RIGHT                               = 0x0407,
364     GL_FRONT_LEFT                          = 0x0400,
365     GL_FRONT_RIGHT                         = 0x0401,
366     GL_BACK_LEFT                           = 0x0402,
367     GL_BACK_RIGHT                          = 0x0403,
368     GL_AUX0                                = 0x0409,
369     GL_AUX1                                = 0x040A,
370     GL_AUX2                                = 0x040B,
371     GL_AUX3                                = 0x040C,
372     GL_COLOR_INDEX                         = 0x1900,
373     GL_RED                                 = 0x1903,
374     GL_GREEN                               = 0x1904,
375     GL_BLUE                                = 0x1905,
376     GL_ALPHA                               = 0x1906,
377     GL_LUMINANCE                           = 0x1909,
378     GL_LUMINANCE_ALPHA                     = 0x190A,
379     GL_ALPHA_BITS                          = 0x0D55,
380     GL_RED_BITS                            = 0x0D52,
381     GL_GREEN_BITS                          = 0x0D53,
382     GL_BLUE_BITS                           = 0x0D54,
383     GL_INDEX_BITS                          = 0x0D51,
384     GL_SUBPIXEL_BITS                       = 0x0D50,
385     GL_AUX_BUFFERS                         = 0x0C00,
386     GL_READ_BUFFER                         = 0x0C02,
387     GL_DRAW_BUFFER                         = 0x0C01,
388     GL_DOUBLEBUFFER                        = 0x0C32,
389     GL_STEREO                              = 0x0C33,
390     GL_BITMAP                              = 0x1A00,
391     GL_COLOR                               = 0x1800,
392     GL_DEPTH                               = 0x1801,
393     GL_STENCIL                             = 0x1802,
394     GL_DITHER                              = 0x0BD0,
395     GL_RGB                                 = 0x1907,
396     GL_RGBA                                = 0x1908,
397 
398     // Implementation limits
399     GL_MAX_LIST_NESTING                    = 0x0B31,
400     GL_MAX_ATTRIB_STACK_DEPTH              = 0x0D35,
401     GL_MAX_MODELVIEW_STACK_DEPTH           = 0x0D36,
402     GL_MAX_NAME_STACK_DEPTH                = 0x0D37,
403     GL_MAX_PROJECTION_STACK_DEPTH          = 0x0D38,
404     GL_MAX_TEXTURE_STACK_DEPTH             = 0x0D39,
405     GL_MAX_EVAL_ORDER                      = 0x0D30,
406     GL_MAX_LIGHTS                          = 0x0D31,
407     GL_MAX_CLIP_PLANES                     = 0x0D32,
408     GL_MAX_TEXTURE_SIZE                    = 0x0D33,
409     GL_MAX_PIXEL_MAP_TABLE                 = 0x0D34,
410     GL_MAX_VIEWPORT_DIMS                   = 0x0D3A,
411     GL_MAX_CLIENT_ATTRIB_STACK_DEPTH       = 0x0D3B,
412 
413     // Gets
414     GL_ATTRIB_STACK_DEPTH                  = 0x0BB0,
415     GL_CLIENT_ATTRIB_STACK_DEPTH           = 0x0BB1,
416     GL_COLOR_CLEAR_VALUE                   = 0x0C22,
417     GL_COLOR_WRITEMASK                     = 0x0C23,
418     GL_CURRENT_INDEX                       = 0x0B01,
419     GL_CURRENT_COLOR                       = 0x0B00,
420     GL_CURRENT_NORMAL                      = 0x0B02,
421     GL_CURRENT_RASTER_COLOR                = 0x0B04,
422     GL_CURRENT_RASTER_DISTANCE             = 0x0B09,
423     GL_CURRENT_RASTER_INDEX                = 0x0B05,
424     GL_CURRENT_RASTER_POSITION             = 0x0B07,
425     GL_CURRENT_RASTER_TEXTURE_COORDS       = 0x0B06,
426     GL_CURRENT_RASTER_POSITION_VALID       = 0x0B08,
427     GL_CURRENT_TEXTURE_COORDS              = 0x0B03,
428     GL_INDEX_CLEAR_VALUE                   = 0x0C20,
429     GL_INDEX_MODE                          = 0x0C30,
430     GL_INDEX_WRITEMASK                     = 0x0C21,
431     GL_MODELVIEW_MATRIX                    = 0x0BA6,
432     GL_MODELVIEW_STACK_DEPTH               = 0x0BA3,
433     GL_NAME_STACK_DEPTH                    = 0x0D70,
434     GL_PROJECTION_MATRIX                   = 0x0BA7,
435     GL_PROJECTION_STACK_DEPTH              = 0x0BA4,
436     GL_RENDER_MODE                         = 0x0C40,
437     GL_RGBA_MODE                           = 0x0C31,
438     GL_TEXTURE_MATRIX                      = 0x0BA8,
439     GL_TEXTURE_STACK_DEPTH                 = 0x0BA5,
440     GL_VIEWPORT                            = 0x0BA2,
441 
442     // Evaluators
443     GL_AUTO_NORMAL                         = 0x0D80,
444     GL_MAP1_COLOR_4                        = 0x0D90,
445     GL_MAP1_GRID_DOMAIN                    = 0x0DD0,
446     GL_MAP1_GRID_SEGMENTS                  = 0x0DD1,
447     GL_MAP1_INDEX                          = 0x0D91,
448     GL_MAP1_NORMAL                         = 0x0D92,
449     GL_MAP1_TEXTURE_COORD_1                = 0x0D93,
450     GL_MAP1_TEXTURE_COORD_2                = 0x0D94,
451     GL_MAP1_TEXTURE_COORD_3                = 0x0D95,
452     GL_MAP1_TEXTURE_COORD_4                = 0x0D96,
453     GL_MAP1_VERTEX_3                       = 0x0D97,
454     GL_MAP1_VERTEX_4                       = 0x0D98,
455     GL_MAP2_COLOR_4                        = 0x0DB0,
456     GL_MAP2_GRID_DOMAIN                    = 0x0DD2,
457     GL_MAP2_GRID_SEGMENTS                  = 0x0DD3,
458     GL_MAP2_INDEX                          = 0x0DB1,
459     GL_MAP2_NORMAL                         = 0x0DB2,
460     GL_MAP2_TEXTURE_COORD_1                = 0x0DB3,
461     GL_MAP2_TEXTURE_COORD_2                = 0x0DB4,
462     GL_MAP2_TEXTURE_COORD_3                = 0x0DB5,
463     GL_MAP2_TEXTURE_COORD_4                = 0x0DB6,
464     GL_MAP2_VERTEX_3                       = 0x0DB7,
465     GL_MAP2_VERTEX_4                       = 0x0DB8,
466     GL_COEFF                               = 0x0A00,
467     GL_DOMAIN                              = 0x0A02,
468     GL_ORDER                               = 0x0A01,
469 
470     // Hints
471     GL_FOG_HINT                            = 0x0C54,
472     GL_LINE_SMOOTH_HINT                    = 0x0C52,
473     GL_PERSPECTIVE_CORRECTION_HINT         = 0x0C50,
474     GL_POINT_SMOOTH_HINT                   = 0x0C51,
475     GL_POLYGON_SMOOTH_HINT                 = 0x0C53,
476     GL_DONT_CARE                           = 0x1100,
477     GL_FASTEST                             = 0x1101,
478     GL_NICEST                              = 0x1102,
479 
480     // Scissor box
481     GL_SCISSOR_TEST                        = 0x0C11,
482     GL_SCISSOR_BOX                         = 0x0C10,
483 
484     // Pixel Mode / Transfer
485     GL_MAP_COLOR                           = 0x0D10,
486     GL_MAP_STENCIL                         = 0x0D11,
487     GL_INDEX_SHIFT                         = 0x0D12,
488     GL_INDEX_OFFSET                        = 0x0D13,
489     GL_RED_SCALE                           = 0x0D14,
490     GL_RED_BIAS                            = 0x0D15,
491     GL_GREEN_SCALE                         = 0x0D18,
492     GL_GREEN_BIAS                          = 0x0D19,
493     GL_BLUE_SCALE                          = 0x0D1A,
494     GL_BLUE_BIAS                           = 0x0D1B,
495     GL_ALPHA_SCALE                         = 0x0D1C,
496     GL_ALPHA_BIAS                          = 0x0D1D,
497     GL_DEPTH_SCALE                         = 0x0D1E,
498     GL_DEPTH_BIAS                          = 0x0D1F,
499     GL_PIXEL_MAP_S_TO_S_SIZE               = 0x0CB1,
500     GL_PIXEL_MAP_I_TO_I_SIZE               = 0x0CB0,
501     GL_PIXEL_MAP_I_TO_R_SIZE               = 0x0CB2,
502     GL_PIXEL_MAP_I_TO_G_SIZE               = 0x0CB3,
503     GL_PIXEL_MAP_I_TO_B_SIZE               = 0x0CB4,
504     GL_PIXEL_MAP_I_TO_A_SIZE               = 0x0CB5,
505     GL_PIXEL_MAP_R_TO_R_SIZE               = 0x0CB6,
506     GL_PIXEL_MAP_G_TO_G_SIZE               = 0x0CB7,
507     GL_PIXEL_MAP_B_TO_B_SIZE               = 0x0CB8,
508     GL_PIXEL_MAP_A_TO_A_SIZE               = 0x0CB9,
509     GL_PIXEL_MAP_S_TO_S                    = 0x0C71,
510     GL_PIXEL_MAP_I_TO_I                    = 0x0C70,
511     GL_PIXEL_MAP_I_TO_R                    = 0x0C72,
512     GL_PIXEL_MAP_I_TO_G                    = 0x0C73,
513     GL_PIXEL_MAP_I_TO_B                    = 0x0C74,
514     GL_PIXEL_MAP_I_TO_A                    = 0x0C75,
515     GL_PIXEL_MAP_R_TO_R                    = 0x0C76,
516     GL_PIXEL_MAP_G_TO_G                    = 0x0C77,
517     GL_PIXEL_MAP_B_TO_B                    = 0x0C78,
518     GL_PIXEL_MAP_A_TO_A                    = 0x0C79,
519     GL_PACK_ALIGNMENT                      = 0x0D05,
520     GL_PACK_LSB_FIRST                      = 0x0D01,
521     GL_PACK_ROW_LENGTH                     = 0x0D02,
522     GL_PACK_SKIP_PIXELS                    = 0x0D04,
523     GL_PACK_SKIP_ROWS                      = 0x0D03,
524     GL_PACK_SWAP_BYTES                     = 0x0D00,
525     GL_UNPACK_ALIGNMENT                    = 0x0CF5,
526     GL_UNPACK_LSB_FIRST                    = 0x0CF1,
527     GL_UNPACK_ROW_LENGTH                   = 0x0CF2,
528     GL_UNPACK_SKIP_PIXELS                  = 0x0CF4,
529     GL_UNPACK_SKIP_ROWS                    = 0x0CF3,
530     GL_UNPACK_SWAP_BYTES                   = 0x0CF0,
531     GL_ZOOM_X                              = 0x0D16,
532     GL_ZOOM_Y                              = 0x0D17,
533 
534     // Texture mapping
535     GL_TEXTURE_ENV                         = 0x2300,
536     GL_TEXTURE_ENV_MODE                    = 0x2200,
537     GL_TEXTURE_1D                          = 0x0DE0,
538     GL_TEXTURE_2D                          = 0x0DE1,
539     GL_TEXTURE_WRAP_S                      = 0x2802,
540     GL_TEXTURE_WRAP_T                      = 0x2803,
541     GL_TEXTURE_MAG_FILTER                  = 0x2800,
542     GL_TEXTURE_MIN_FILTER                  = 0x2801,
543     GL_TEXTURE_ENV_COLOR                   = 0x2201,
544     GL_TEXTURE_GEN_S                       = 0x0C60,
545     GL_TEXTURE_GEN_T                       = 0x0C61,
546     GL_TEXTURE_GEN_MODE                    = 0x2500,
547     GL_TEXTURE_BORDER_COLOR                = 0x1004,
548     GL_TEXTURE_WIDTH                       = 0x1000,
549     GL_TEXTURE_HEIGHT                      = 0x1001,
550     GL_TEXTURE_BORDER                      = 0x1005,
551     GL_TEXTURE_COMPONENTS                  = 0x1003,
552     GL_TEXTURE_RED_SIZE                    = 0x805C,
553     GL_TEXTURE_GREEN_SIZE                  = 0x805D,
554     GL_TEXTURE_BLUE_SIZE                   = 0x805E,
555     GL_TEXTURE_ALPHA_SIZE                  = 0x805F,
556     GL_TEXTURE_LUMINANCE_SIZE              = 0x8060,
557     GL_TEXTURE_INTENSITY_SIZE              = 0x8061,
558     GL_NEAREST_MIPMAP_NEAREST              = 0x2700,
559     GL_NEAREST_MIPMAP_LINEAR               = 0x2702,
560     GL_LINEAR_MIPMAP_NEAREST               = 0x2701,
561     GL_LINEAR_MIPMAP_LINEAR                = 0x2703,
562     GL_OBJECT_LINEAR                       = 0x2401,
563     GL_OBJECT_PLANE                        = 0x2501,
564     GL_EYE_LINEAR                          = 0x2400,
565     GL_EYE_PLANE                           = 0x2502,
566     GL_SPHERE_MAP                          = 0x2402,
567     GL_DECAL                               = 0x2101,
568     GL_MODULATE                            = 0x2100,
569     GL_NEAREST                             = 0x2600,
570     GL_REPEAT                              = 0x2901,
571     GL_CLAMP                               = 0x2900,
572     GL_S                                   = 0x2000,
573     GL_T                                   = 0x2001,
574     GL_R                                   = 0x2002,
575     GL_Q                                   = 0x2003,
576     GL_TEXTURE_GEN_R                       = 0x0C62,
577     GL_TEXTURE_GEN_Q                       = 0x0C63,
578 
579     // Utility
580     GL_VENDOR                              = 0x1F00,
581     GL_RENDERER                            = 0x1F01,
582     GL_VERSION                             = 0x1F02,
583     GL_EXTENSIONS                          = 0x1F03,
584 
585     // Errors
586     GL_NO_ERROR                            = 0x0,
587     GL_INVALID_VALUE                       = 0x0501,
588     GL_INVALID_ENUM                        = 0x0500,
589     GL_INVALID_OPERATION                   = 0x0502,
590     GL_STACK_OVERFLOW                      = 0x0503,
591     GL_STACK_UNDERFLOW                     = 0x0504,
592     GL_OUT_OF_MEMORY                       = 0x0505,
593 }
594 
595 // glPush/PopAttrib bits
596 enum : GLuint
597 {
598     GL_CURRENT_BIT                         = 0x00000001,
599     GL_POINT_BIT                           = 0x00000002,
600     GL_LINE_BIT                            = 0x00000004,
601     GL_POLYGON_BIT                         = 0x00000008,
602     GL_POLYGON_STIPPLE_BIT                 = 0x00000010,
603     GL_PIXEL_MODE_BIT                      = 0x00000020,
604     GL_LIGHTING_BIT                        = 0x00000040,
605     GL_FOG_BIT                             = 0x00000080,
606     GL_DEPTH_BUFFER_BIT                    = 0x00000100,
607     GL_ACCUM_BUFFER_BIT                    = 0x00000200,
608     GL_STENCIL_BUFFER_BIT                  = 0x00000400,
609     GL_VIEWPORT_BIT                        = 0x00000800,
610     GL_TRANSFORM_BIT                       = 0x00001000,
611     GL_ENABLE_BIT                          = 0x00002000,
612     GL_COLOR_BUFFER_BIT                    = 0x00004000,
613     GL_HINT_BIT                            = 0x00008000,
614     GL_EVAL_BIT                            = 0x00010000,
615     GL_LIST_BIT                            = 0x00020000,
616     GL_TEXTURE_BIT                         = 0x00040000,
617     GL_SCISSOR_BIT                         = 0x00080000,
618     GL_ALL_ATTRIB_BITS                     = 0x000FFFFF,
619 }
620 
621 // gl 1.1
622 enum : GLenum
623 {
624 GL_PROXY_TEXTURE_1D                    = 0x8063,
625 GL_PROXY_TEXTURE_2D                    = 0x8064,
626 GL_TEXTURE_PRIORITY                    = 0x8066,
627 GL_TEXTURE_RESIDENT                    = 0x8067,
628 GL_TEXTURE_BINDING_1D                  = 0x8068,
629 GL_TEXTURE_BINDING_2D                  = 0x8069,
630 GL_TEXTURE_INTERNAL_FORMAT             = 0x1003,
631 GL_ALPHA4                              = 0x803B,
632 GL_ALPHA8                              = 0x803C,
633 GL_ALPHA12                             = 0x803D,
634 GL_ALPHA16                             = 0x803E,
635 GL_LUMINANCE4                          = 0x803F,
636 GL_LUMINANCE8                          = 0x8040,
637 GL_LUMINANCE12                         = 0x8041,
638 GL_LUMINANCE16                         = 0x8042,
639 GL_LUMINANCE4_ALPHA4                   = 0x8043,
640 GL_LUMINANCE6_ALPHA2                   = 0x8044,
641 GL_LUMINANCE8_ALPHA8                   = 0x8045,
642 GL_LUMINANCE12_ALPHA4                  = 0x8046,
643 GL_LUMINANCE12_ALPHA12                 = 0x8047,
644 GL_LUMINANCE16_ALPHA16                 = 0x8048,
645 GL_INTENSITY                           = 0x8049,
646 GL_INTENSITY4                          = 0x804A,
647 GL_INTENSITY8                          = 0x804B,
648 GL_INTENSITY12                         = 0x804C,
649 GL_INTENSITY16                         = 0x804D,
650 GL_R3_G3_B2                            = 0x2A10,
651 GL_RGB4                                = 0x804F,
652 GL_RGB5                                = 0x8050,
653 GL_RGB8                                = 0x8051,
654 GL_RGB10                               = 0x8052,
655 GL_RGB12                               = 0x8053,
656 GL_RGB16                               = 0x8054,
657 GL_RGBA2                               = 0x8055,
658 GL_RGBA4                               = 0x8056,
659 GL_RGB5_A1                             = 0x8057,
660 GL_RGBA8                               = 0x8058,
661 GL_RGB10_A2                            = 0x8059,
662 GL_RGBA12                              = 0x805A,
663 GL_RGBA16                              = 0x805B,
664 }
665 
666 enum : GLuint
667 {
668     GL_CLIENT_PIXEL_STORE_BIT              = 0x00000001,
669     GL_CLIENT_VERTEX_ARRAY_BIT             = 0x00000002,
670     GL_ALL_CLIENT_ATTRIB_BITS              = 0xFFFFFFFF,
671     GL_CLIENT_ALL_ATTRIB_BITS              = 0xFFFFFFFF,
672 }
673 
674 // gl 1.2
675 enum : GLenum
676 {
677     GL_RESCALE_NORMAL                  = 0x803A,
678     GL_CLAMP_TO_EDGE                   = 0x812F,
679     GL_MAX_ELEMENTS_VERTICES           = 0x80E8,
680     GL_MAX_ELEMENTS_INDICES            = 0x80E9,
681     GL_BGR                             = 0x80E0,
682     GL_BGRA                            = 0x80E1,
683     GL_UNSIGNED_BYTE_3_3_2             = 0x8032,
684     GL_UNSIGNED_BYTE_2_3_3_REV         = 0x8362,
685     GL_UNSIGNED_SHORT_5_6_5            = 0x8363,
686     GL_UNSIGNED_SHORT_5_6_5_REV        = 0x8364,
687     GL_UNSIGNED_SHORT_4_4_4_4          = 0x8033,
688     GL_UNSIGNED_SHORT_4_4_4_4_REV      = 0x8365,
689     GL_UNSIGNED_SHORT_5_5_5_1          = 0x8034,
690     GL_UNSIGNED_SHORT_1_5_5_5_REV      = 0x8366,
691     GL_UNSIGNED_INT_8_8_8_8            = 0x8035,
692     GL_UNSIGNED_INT_8_8_8_8_REV        = 0x8367,
693     GL_UNSIGNED_INT_10_10_10_2         = 0x8036,
694     GL_UNSIGNED_INT_2_10_10_10_REV     = 0x8368,
695     GL_LIGHT_MODEL_COLOR_CONTROL       = 0x81F8,
696     GL_SINGLE_COLOR                    = 0x81F9,
697     GL_SEPARATE_SPECULAR_COLOR         = 0x81FA,
698     GL_TEXTURE_MIN_LOD                 = 0x813A,
699     GL_TEXTURE_MAX_LOD                 = 0x813B,
700     GL_TEXTURE_BASE_LEVEL              = 0x813C,
701     GL_TEXTURE_MAX_LEVEL               = 0x813D,
702     GL_SMOOTH_POINT_SIZE_RANGE         = 0x0B12,
703     GL_SMOOTH_POINT_SIZE_GRANULARITY   = 0x0B13,
704     GL_SMOOTH_LINE_WIDTH_RANGE         = 0x0B22,
705     GL_SMOOTH_LINE_WIDTH_GRANULARITY   = 0x0B23,
706     GL_ALIASED_POINT_SIZE_RANGE        = 0x846D,
707     GL_ALIASED_LINE_WIDTH_RANGE        = 0x846E,
708     GL_PACK_SKIP_IMAGES                = 0x806B,
709     GL_PACK_IMAGE_HEIGHT               = 0x806C,
710     GL_UNPACK_SKIP_IMAGES              = 0x806D,
711     GL_UNPACK_IMAGE_HEIGHT             = 0x806E,
712     GL_TEXTURE_3D                      = 0x806F,
713     GL_PROXY_TEXTURE_3D                = 0x8070,
714     GL_TEXTURE_DEPTH                   = 0x8071,
715     GL_TEXTURE_WRAP_R                  = 0x8072,
716     GL_MAX_3D_TEXTURE_SIZE             = 0x8073,
717     GL_TEXTURE_BINDING_3D              = 0x806A,
718 }
719 
720 // gl 1.3
721 enum : GLenum
722 {
723     GL_TEXTURE0                    = 0x84C0,
724     GL_TEXTURE1                    = 0x84C1,
725     GL_TEXTURE2                    = 0x84C2,
726     GL_TEXTURE3                    = 0x84C3,
727     GL_TEXTURE4                    = 0x84C4,
728     GL_TEXTURE5                    = 0x84C5,
729     GL_TEXTURE6                    = 0x84C6,
730     GL_TEXTURE7                    = 0x84C7,
731     GL_TEXTURE8                    = 0x84C8,
732     GL_TEXTURE9                    = 0x84C9,
733     GL_TEXTURE10                   = 0x84CA,
734     GL_TEXTURE11                   = 0x84CB,
735     GL_TEXTURE12                   = 0x84CC,
736     GL_TEXTURE13                   = 0x84CD,
737     GL_TEXTURE14                   = 0x84CE,
738     GL_TEXTURE15                   = 0x84CF,
739     GL_TEXTURE16                   = 0x84D0,
740     GL_TEXTURE17                   = 0x84D1,
741     GL_TEXTURE18                   = 0x84D2,
742     GL_TEXTURE19                   = 0x84D3,
743     GL_TEXTURE20                   = 0x84D4,
744     GL_TEXTURE21                   = 0x84D5,
745     GL_TEXTURE22                   = 0x84D6,
746     GL_TEXTURE23                   = 0x84D7,
747     GL_TEXTURE24                   = 0x84D8,
748     GL_TEXTURE25                   = 0x84D9,
749     GL_TEXTURE26                   = 0x84DA,
750     GL_TEXTURE27                   = 0x84DB,
751     GL_TEXTURE28                   = 0x84DC,
752     GL_TEXTURE29                   = 0x84DD,
753     GL_TEXTURE30                   = 0x84DE,
754     GL_TEXTURE31                   = 0x84DF,
755     GL_ACTIVE_TEXTURE              = 0x84E0,
756     GL_CLIENT_ACTIVE_TEXTURE       = 0x84E1,
757     GL_MAX_TEXTURE_UNITS           = 0x84E2,
758     GL_NORMAL_MAP                  = 0x8511,
759     GL_REFLECTION_MAP              = 0x8512,
760     GL_TEXTURE_CUBE_MAP            = 0x8513,
761     GL_TEXTURE_BINDING_CUBE_MAP    = 0x8514,
762     GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515,
763     GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516,
764     GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517,
765     GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518,
766     GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519,
767     GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A,
768     GL_PROXY_TEXTURE_CUBE_MAP      = 0x851B,
769     GL_MAX_CUBE_MAP_TEXTURE_SIZE   = 0x851C,
770     GL_COMPRESSED_ALPHA            = 0x84E9,
771     GL_COMPRESSED_LUMINANCE        = 0x84EA,
772     GL_COMPRESSED_LUMINANCE_ALPHA  = 0x84EB,
773     GL_COMPRESSED_INTENSITY        = 0x84EC,
774     GL_COMPRESSED_RGB              = 0x84ED,
775     GL_COMPRESSED_RGBA             = 0x84EE,
776     GL_TEXTURE_COMPRESSION_HINT    = 0x84EF,
777     GL_TEXTURE_COMPRESSED_IMAGE_SIZE   = 0x86A0,
778     GL_TEXTURE_COMPRESSED      = 0x86A1,
779     GL_NUM_COMPRESSED_TEXTURE_FORMATS  = 0x86A2,
780     GL_COMPRESSED_TEXTURE_FORMATS  = 0x86A3,
781     GL_MULTISAMPLE                 = 0x809D,
782     GL_SAMPLE_ALPHA_TO_COVERAGE    = 0x809E,
783     GL_SAMPLE_ALPHA_TO_ONE         = 0x809F,
784     GL_SAMPLE_COVERAGE             = 0x80A0,
785     GL_SAMPLE_BUFFERS              = 0x80A8,
786     GL_SAMPLES                     = 0x80A9,
787     GL_SAMPLE_COVERAGE_VALUE       = 0x80AA,
788     GL_SAMPLE_COVERAGE_INVERT      = 0x80AB,
789     GL_MULTISAMPLE_BIT             = 0x20000000,
790     GL_TRANSPOSE_MODELVIEW_MATRIX  = 0x84E3,
791     GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4,
792     GL_TRANSPOSE_TEXTURE_MATRIX    = 0x84E5,
793     GL_TRANSPOSE_COLOR_MATRIX      = 0x84E6,
794     GL_COMBINE                     = 0x8570,
795     GL_COMBINE_RGB                 = 0x8571,
796     GL_COMBINE_ALPHA               = 0x8572,
797     GL_SOURCE0_RGB                 = 0x8580,
798     GL_SOURCE1_RGB                 = 0x8581,
799     GL_SOURCE2_RGB                 = 0x8582,
800     GL_SOURCE0_ALPHA               = 0x8588,
801     GL_SOURCE1_ALPHA               = 0x8589,
802     GL_SOURCE2_ALPHA               = 0x858A,
803     GL_OPERAND0_RGB                = 0x8590,
804     GL_OPERAND1_RGB                = 0x8591,
805     GL_OPERAND2_RGB                = 0x8592,
806     GL_OPERAND0_ALPHA              = 0x8598,
807     GL_OPERAND1_ALPHA              = 0x8599,
808     GL_OPERAND2_ALPHA              = 0x859A,
809     GL_RGB_SCALE                   = 0x8573,
810     GL_ADD_SIGNED                  = 0x8574,
811     GL_INTERPOLATE                 = 0x8575,
812     GL_SUBTRACT                    = 0x84E7,
813     GL_CONSTANT                    = 0x8576,
814     GL_PRIMARY_COLOR               = 0x8577,
815     GL_PREVIOUS                    = 0x8578,
816     GL_DOT3_RGB                    = 0x86AE,
817     GL_DOT3_RGBA                   = 0x86AF,
818     GL_CLAMP_TO_BORDER             = 0x812D,
819 }
820 
821 // gl 1.4
822 enum : GLenum
823 {
824     GL_BLEND_DST_RGB                   = 0x80C8,
825     GL_BLEND_SRC_RGB                   = 0x80C9,
826     GL_BLEND_DST_ALPHA                 = 0x80CA,
827     GL_BLEND_SRC_ALPHA                 = 0x80CB,
828     GL_POINT_SIZE_MIN                  = 0x8126,
829     GL_POINT_SIZE_MAX                  = 0x8127,
830     GL_POINT_FADE_THRESHOLD_SIZE       = 0x8128,
831     GL_POINT_DISTANCE_ATTENUATION      = 0x8129,
832     GL_GENERATE_MIPMAP                 = 0x8191,
833     GL_GENERATE_MIPMAP_HINT            = 0x8192,
834     GL_DEPTH_COMPONENT16               = 0x81A5,
835     GL_DEPTH_COMPONENT24               = 0x81A6,
836     GL_DEPTH_COMPONENT32               = 0x81A7,
837     GL_MIRRORED_REPEAT                 = 0x8370,
838     GL_FOG_COORDINATE_SOURCE           = 0x8450,
839     GL_FOG_COORDINATE                  = 0x8451,
840     GL_FRAGMENT_DEPTH                  = 0x8452,
841     GL_CURRENT_FOG_COORDINATE          = 0x8453,
842     GL_FOG_COORDINATE_ARRAY_TYPE       = 0x8454,
843     GL_FOG_COORDINATE_ARRAY_STRIDE     = 0x8455,
844     GL_FOG_COORDINATE_ARRAY_POINTER    = 0x8456,
845     GL_FOG_COORDINATE_ARRAY            = 0x8457,
846     GL_COLOR_SUM                       = 0x8458,
847     GL_CURRENT_SECONDARY_COLOR         = 0x8459,
848     GL_SECONDARY_COLOR_ARRAY_SIZE      = 0x845A,
849     GL_SECONDARY_COLOR_ARRAY_TYPE      = 0x845B,
850     GL_SECONDARY_COLOR_ARRAY_STRIDE    = 0x845C,
851     GL_SECONDARY_COLOR_ARRAY_POINTER   = 0x845D,
852     GL_SECONDARY_COLOR_ARRAY           = 0x845E,
853     GL_MAX_TEXTURE_LOD_BIAS            = 0x84FD,
854     GL_TEXTURE_FILTER_CONTROL          = 0x8500,
855     GL_TEXTURE_LOD_BIAS                = 0x8501,
856     GL_INCR_WRAP                       = 0x8507,
857     GL_DECR_WRAP                       = 0x8508,
858     GL_TEXTURE_DEPTH_SIZE              = 0x884A,
859     GL_DEPTH_TEXTURE_MODE              = 0x884B,
860     GL_TEXTURE_COMPARE_MODE            = 0x884C,
861     GL_TEXTURE_COMPARE_FUNC            = 0x884D,
862     GL_COMPARE_R_TO_TEXTURE            = 0x884E,
863     GL_CONSTANT_COLOR                  = 0x8001,
864     GL_ONE_MINUS_CONSTANT_COLOR        = 0x8002,
865     GL_CONSTANT_ALPHA                  = 0x8003,
866     GL_ONE_MINUS_CONSTANT_ALPHA        = 0x8004,
867     GL_BLEND_COLOR                     = 0x8005,
868     GL_FUNC_ADD                        = 0x8006,
869     GL_MIN                             = 0x8007,
870     GL_MAX                             = 0x8008,
871     GL_BLEND_EQUATION                  = 0x8009,
872     GL_FUNC_SUBTRACT                   = 0x800A,
873     GL_FUNC_REVERSE_SUBTRACT           = 0x800B,
874 }
875 
876 // gl 1.5
877 enum : GLenum
878 {
879     GL_BUFFER_SIZE                     = 0x8764,
880     GL_BUFFER_USAGE                    = 0x8765,
881     GL_QUERY_COUNTER_BITS              = 0x8864,
882     GL_CURRENT_QUERY                   = 0x8865,
883     GL_QUERY_RESULT                    = 0x8866,
884     GL_QUERY_RESULT_AVAILABLE          = 0x8867,
885     GL_ARRAY_BUFFER                    = 0x8892,
886     GL_ELEMENT_ARRAY_BUFFER            = 0x8893,
887     GL_ARRAY_BUFFER_BINDING            = 0x8894,
888     GL_ELEMENT_ARRAY_BUFFER_BINDING    = 0x8895,
889     GL_VERTEX_ARRAY_BUFFER_BINDING     = 0x8896,
890     GL_NORMAL_ARRAY_BUFFER_BINDING     = 0x8897,
891     GL_COLOR_ARRAY_BUFFER_BINDING      = 0x8898,
892     GL_INDEX_ARRAY_BUFFER_BINDING      = 0x8899,
893     GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A,
894     GL_EDGE_FLAG_ARRAY_BUFFER_BINDING  = 0x889B,
895     GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C,
896     GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D,
897     GL_WEIGHT_ARRAY_BUFFER_BINDING     = 0x889E,
898     GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F,
899     GL_READ_ONLY                       = 0x88B8,
900     GL_WRITE_ONLY                      = 0x88B9,
901     GL_READ_WRITE                      = 0x88BA,
902     GL_BUFFER_ACCESS                   = 0x88BB,
903     GL_BUFFER_MAPPED                   = 0x88BC,
904     GL_BUFFER_MAP_POINTER              = 0x88BD,
905     GL_STREAM_DRAW                     = 0x88E0,
906     GL_STREAM_READ                     = 0x88E1,
907     GL_STREAM_COPY                     = 0x88E2,
908     GL_STATIC_DRAW                     = 0x88E4,
909     GL_STATIC_READ                     = 0x88E5,
910     GL_STATIC_COPY                     = 0x88E6,
911     GL_DYNAMIC_DRAW                    = 0x88E8,
912     GL_DYNAMIC_READ                    = 0x88E9,
913     GL_DYNAMIC_COPY                    = 0x88EA,
914     GL_SAMPLES_PASSED                  = 0x8914,
915     GL_FOG_COORD_SRC                   = GL_FOG_COORDINATE_SOURCE,
916     GL_FOG_COORD                       = GL_FOG_COORDINATE,
917     GL_CURRENT_FOG_COORD               = GL_CURRENT_FOG_COORDINATE,
918     GL_FOG_COORD_ARRAY_TYPE            = GL_FOG_COORDINATE_ARRAY_TYPE,
919     GL_FOG_COORD_ARRAY_STRIDE          = GL_FOG_COORDINATE_ARRAY_STRIDE,
920     GL_FOG_COORD_ARRAY_POINTER         = GL_FOG_COORDINATE_ARRAY_POINTER,
921     GL_FOG_COORD_ARRAY                 = GL_FOG_COORDINATE_ARRAY,
922     GL_FOG_COORD_ARRAY_BUFFER_BINDING  = GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING,
923     GL_SRC0_RGB                        = GL_SOURCE0_RGB,
924     GL_SRC1_RGB                        = GL_SOURCE1_RGB,
925     GL_SRC2_RGB                        = GL_SOURCE2_RGB,
926     GL_SRC0_ALPHA                      = GL_SOURCE0_ALPHA,
927     GL_SRC1_ALPHA                      = GL_SOURCE1_ALPHA,
928     GL_SRC2_ALPHA                      = GL_SOURCE2_ALPHA,
929 }
930 
931 // gl 2.0
932 enum : GLenum
933 {
934     GL_BLEND_EQUATION_RGB              = 0x8009,
935     GL_VERTEX_ATTRIB_ARRAY_ENABLED     = 0x8622,
936     GL_VERTEX_ATTRIB_ARRAY_SIZE        = 0x8623,
937     GL_VERTEX_ATTRIB_ARRAY_STRIDE      = 0x8624,
938     GL_VERTEX_ATTRIB_ARRAY_TYPE        = 0x8625,
939     GL_CURRENT_VERTEX_ATTRIB           = 0x8626,
940     GL_VERTEX_PROGRAM_POINT_SIZE       = 0x8642,
941     GL_VERTEX_PROGRAM_TWO_SIDE         = 0x8643,
942     GL_VERTEX_ATTRIB_ARRAY_POINTER     = 0x8645,
943     GL_STENCIL_BACK_FUNC               = 0x8800,
944     GL_STENCIL_BACK_FAIL               = 0x8801,
945     GL_STENCIL_BACK_PASS_DEPTH_FAIL    = 0x8802,
946     GL_STENCIL_BACK_PASS_DEPTH_PASS    = 0x8803,
947     GL_MAX_DRAW_BUFFERS                = 0x8824,
948     GL_DRAW_BUFFER0                    = 0x8825,
949     GL_DRAW_BUFFER1                    = 0x8826,
950     GL_DRAW_BUFFER2                    = 0x8827,
951     GL_DRAW_BUFFER3                    = 0x8828,
952     GL_DRAW_BUFFER4                    = 0x8829,
953     GL_DRAW_BUFFER5                    = 0x882A,
954     GL_DRAW_BUFFER6                    = 0x882B,
955     GL_DRAW_BUFFER7                    = 0x882C,
956     GL_DRAW_BUFFER8                    = 0x882D,
957     GL_DRAW_BUFFER9                    = 0x882E,
958     GL_DRAW_BUFFER10                   = 0x882F,
959     GL_DRAW_BUFFER11                   = 0x8830,
960     GL_DRAW_BUFFER12                   = 0x8831,
961     GL_DRAW_BUFFER13                   = 0x8832,
962     GL_DRAW_BUFFER14                   = 0x8833,
963     GL_DRAW_BUFFER15                   = 0x8834,
964     GL_BLEND_EQUATION_ALPHA            = 0x883D,
965     GL_POINT_SPRITE                    = 0x8861,
966     GL_COORD_REPLACE                   = 0x8862,
967     GL_MAX_VERTEX_ATTRIBS              = 0x8869,
968     GL_VERTEX_ATTRIB_ARRAY_NORMALIZED  = 0x886A,
969     GL_MAX_TEXTURE_COORDS              = 0x8871,
970     GL_MAX_TEXTURE_IMAGE_UNITS         = 0x8872,
971     GL_FRAGMENT_SHADER                 = 0x8B30,
972     GL_VERTEX_SHADER                   = 0x8B31,
973     GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49,
974     GL_MAX_VERTEX_UNIFORM_COMPONENTS   = 0x8B4A,
975     GL_MAX_VARYING_FLOATS              = 0x8B4B,
976     GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS  = 0x8B4C,
977     GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS= 0x8B4D,
978     GL_SHADER_TYPE                     = 0x8B4F,
979     GL_FLOAT_VEC2                      = 0x8B50,
980     GL_FLOAT_VEC3                      = 0x8B51,
981     GL_FLOAT_VEC4                      = 0x8B52,
982     GL_INT_VEC2                        = 0x8B53,
983     GL_INT_VEC3                        = 0x8B54,
984     GL_INT_VEC4                        = 0x8B55,
985     GL_BOOL                            = 0x8B56,
986     GL_BOOL_VEC2                       = 0x8B57,
987     GL_BOOL_VEC3                       = 0x8B58,
988     GL_BOOL_VEC4                       = 0x8B59,
989     GL_FLOAT_MAT2                      = 0x8B5A,
990     GL_FLOAT_MAT3                      = 0x8B5B,
991     GL_FLOAT_MAT4                      = 0x8B5C,
992     GL_SAMPLER_1D                      = 0x8B5D,
993     GL_SAMPLER_2D                      = 0x8B5E,
994     GL_SAMPLER_3D                      = 0x8B5F,
995     GL_SAMPLER_CUBE                    = 0x8B60,
996     GL_SAMPLER_1D_SHADOW               = 0x8B61,
997     GL_SAMPLER_2D_SHADOW               = 0x8B62,
998     GL_DELETE_STATUS                   = 0x8B80,
999     GL_COMPILE_STATUS                  = 0x8B81,
1000     GL_LINK_STATUS                     = 0x8B82,
1001     GL_VALIDATE_STATUS                 = 0x8B83,
1002     GL_INFO_LOG_LENGTH                 = 0x8B84,
1003     GL_ATTACHED_SHADERS                = 0x8B85,
1004     GL_ACTIVE_UNIFORMS                 = 0x8B86,
1005     GL_ACTIVE_UNIFORM_MAX_LENGTH       = 0x8B87,
1006     GL_SHADER_SOURCE_LENGTH            = 0x8B88,
1007     GL_ACTIVE_ATTRIBUTES               = 0x8B89,
1008     GL_ACTIVE_ATTRIBUTE_MAX_LENGTH     = 0x8B8A,
1009     GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B,
1010     GL_SHADING_LANGUAGE_VERSION        = 0x8B8C,
1011     GL_CURRENT_PROGRAM                 = 0x8B8D,
1012     GL_POINT_SPRITE_COORD_ORIGIN       = 0x8CA0,
1013     GL_LOWER_LEFT                      = 0x8CA1,
1014     GL_UPPER_LEFT                      = 0x8CA2,
1015     GL_STENCIL_BACK_REF                = 0x8CA3,
1016     GL_STENCIL_BACK_VALUE_MASK         = 0x8CA4,
1017     GL_STENCIL_BACK_WRITEMASK          = 0x8CA5,
1018 }
1019 
1020 // gl 2.1
1021 enum : GLenum
1022 {
1023     GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F,
1024     GL_PIXEL_PACK_BUFFER              = 0x88EB,
1025     GL_PIXEL_UNPACK_BUFFER            = 0x88EC,
1026     GL_PIXEL_PACK_BUFFER_BINDING      = 0x88ED,
1027     GL_PIXEL_UNPACK_BUFFER_BINDING    = 0x88EF,
1028     GL_FLOAT_MAT2x3                   = 0x8B65,
1029     GL_FLOAT_MAT2x4                   = 0x8B66,
1030     GL_FLOAT_MAT3x2                   = 0x8B67,
1031     GL_FLOAT_MAT3x4                   = 0x8B68,
1032     GL_FLOAT_MAT4x2                   = 0x8B69,
1033     GL_FLOAT_MAT4x3                   = 0x8B6A,
1034     GL_SRGB                           = 0x8C40,
1035     GL_SRGB8                          = 0x8C41,
1036     GL_SRGB_ALPHA                     = 0x8C42,
1037     GL_SRGB8_ALPHA8                   = 0x8C43,
1038     GL_SLUMINANCE_ALPHA               = 0x8C44,
1039     GL_SLUMINANCE8_ALPHA8             = 0x8C45,
1040     GL_SLUMINANCE                     = 0x8C46,
1041     GL_SLUMINANCE8                    = 0x8C47,
1042     GL_COMPRESSED_SRGB                = 0x8C48,
1043     GL_COMPRESSED_SRGB_ALPHA          = 0x8C49,
1044     GL_COMPRESSED_SLUMINANCE          = 0x8C4A,
1045     GL_COMPRESSED_SLUMINANCE_ALPHA    = 0x8C4B,
1046 }
1047 
1048 // gl 3.0
1049 enum : GLenum
1050 {
1051     GL_MAX_CLIP_DISTANCES           = GL_MAX_CLIP_PLANES,
1052     GL_CLIP_DISTANCE5               = GL_CLIP_PLANE5,
1053     GL_CLIP_DISTANCE1               = GL_CLIP_PLANE1,
1054     GL_CLIP_DISTANCE3               = GL_CLIP_PLANE3,
1055     GL_COMPARE_REF_TO_TEXTURE       = 0x884E, // Must be same as GL_COMPARE_R_TO_TEXTURE_ARB from GL_ARB_shadow
1056     GL_CLIP_DISTANCE0               = GL_CLIP_PLANE0,
1057     GL_CLIP_DISTANCE4               = GL_CLIP_PLANE4,
1058     GL_CLIP_DISTANCE2               = GL_CLIP_PLANE2,
1059     GL_MAX_VARYING_COMPONENTS       = GL_MAX_VARYING_FLOATS,
1060     GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x0001,
1061     GL_MAJOR_VERSION                = 0x821B,
1062     GL_MINOR_VERSION                = 0x821C,
1063     GL_NUM_EXTENSIONS               = 0x821D,
1064     GL_CONTEXT_FLAGS                = 0x821E,
1065     GL_DEPTH_BUFFER                 = 0x8223,
1066     GL_STENCIL_BUFFER               = 0x8224,
1067     GL_COMPRESSED_RED               = 0x8225,
1068     GL_COMPRESSED_RG                = 0x8226,
1069     GL_RGBA32F                      = 0x8814,
1070     GL_RGB32F                       = 0x8815,
1071     GL_RGBA16F                      = 0x881A,
1072     GL_RGB16F                       = 0x881B,
1073     GL_VERTEX_ATTRIB_ARRAY_INTEGER  = 0x88FD,
1074     GL_MAX_ARRAY_TEXTURE_LAYERS     = 0x88FF,
1075     GL_MIN_PROGRAM_TEXEL_OFFSET     = 0x8904,
1076     GL_MAX_PROGRAM_TEXEL_OFFSET     = 0x8905,
1077     GL_CLAMP_VERTEX_COLOR           = 0x891A,
1078     GL_CLAMP_FRAGMENT_COLOR         = 0x891B,
1079     GL_CLAMP_READ_COLOR             = 0x891C,
1080     GL_FIXED_ONLY                   = 0x891D,
1081     GL_TEXTURE_RED_TYPE             = 0x8C10,
1082     GL_TEXTURE_GREEN_TYPE           = 0x8C11,
1083     GL_TEXTURE_BLUE_TYPE            = 0x8C12,
1084     GL_TEXTURE_ALPHA_TYPE           = 0x8C13,
1085     GL_TEXTURE_LUMINANCE_TYPE       = 0x8C14,
1086     GL_TEXTURE_INTENSITY_TYPE       = 0x8C15,
1087     GL_TEXTURE_DEPTH_TYPE           = 0x8C16,
1088     GL_UNSIGNED_NORMALIZED          = 0x8C17,
1089     GL_TEXTURE_1D_ARRAY             = 0x8C18,
1090     GL_PROXY_TEXTURE_1D_ARRAY       = 0x8C19,
1091     GL_TEXTURE_2D_ARRAY             = 0x8C1A,
1092     GL_PROXY_TEXTURE_2D_ARRAY       = 0x8C1B,
1093     GL_TEXTURE_BINDING_1D_ARRAY     = 0x8C1C,
1094     GL_TEXTURE_BINDING_2D_ARRAY     = 0x8C1D,
1095     GL_R11F_G11F_B10F               = 0x8C3A,
1096     GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B,
1097     GL_RGB9_E5                      = 0x8C3D,
1098     GL_UNSIGNED_INT_5_9_9_9_REV     = 0x8C3E,
1099     GL_TEXTURE_SHARED_SIZE          = 0x8C3F,
1100     GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76,
1101     GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F,
1102     GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80,
1103     GL_TRANSFORM_FEEDBACK_VARYINGS  = 0x8C83,
1104     GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84,
1105     GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85,
1106     GL_PRIMITIVES_GENERATED         = 0x8C87,
1107     GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88,
1108     GL_RASTERIZER_DISCARD           = 0x8C89,
1109     GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A,
1110     GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B,
1111     GL_INTERLEAVED_ATTRIBS          = 0x8C8C,
1112     GL_SEPARATE_ATTRIBS             = 0x8C8D,
1113     GL_TRANSFORM_FEEDBACK_BUFFER    = 0x8C8E,
1114     GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F,
1115     GL_RGBA32UI                     = 0x8D70,
1116     GL_RGB32UI                      = 0x8D71,
1117     GL_RGBA16UI                     = 0x8D76,
1118     GL_RGB16UI                      = 0x8D77,
1119     GL_RGBA8UI                      = 0x8D7C,
1120     GL_RGB8UI                       = 0x8D7D,
1121     GL_RGBA32I                      = 0x8D82,
1122     GL_RGB32I                       = 0x8D83,
1123     GL_RGBA16I                      = 0x8D88,
1124     GL_RGB16I                       = 0x8D89,
1125     GL_RGBA8I                       = 0x8D8E,
1126     GL_RGB8I                        = 0x8D8F,
1127     GL_RED_INTEGER                  = 0x8D94,
1128     GL_GREEN_INTEGER                = 0x8D95,
1129     GL_BLUE_INTEGER                 = 0x8D96,
1130     GL_ALPHA_INTEGER                = 0x8D97,
1131     GL_RGB_INTEGER                  = 0x8D98,
1132     GL_RGBA_INTEGER                 = 0x8D99,
1133     GL_BGR_INTEGER                  = 0x8D9A,
1134     GL_BGRA_INTEGER                 = 0x8D9B,
1135     GL_SAMPLER_1D_ARRAY             = 0x8DC0,
1136     GL_SAMPLER_2D_ARRAY             = 0x8DC1,
1137     GL_SAMPLER_1D_ARRAY_SHADOW      = 0x8DC3,
1138     GL_SAMPLER_2D_ARRAY_SHADOW      = 0x8DC4,
1139     GL_SAMPLER_CUBE_SHADOW          = 0x8DC5,
1140     GL_UNSIGNED_INT_VEC2            = 0x8DC6,
1141     GL_UNSIGNED_INT_VEC3            = 0x8DC7,
1142     GL_UNSIGNED_INT_VEC4            = 0x8DC8,
1143     GL_INT_SAMPLER_1D               = 0x8DC9,
1144     GL_INT_SAMPLER_2D               = 0x8DCA,
1145     GL_INT_SAMPLER_3D               = 0x8DCB,
1146     GL_INT_SAMPLER_CUBE             = 0x8DCC,
1147     GL_INT_SAMPLER_1D_ARRAY         = 0x8DCE,
1148     GL_INT_SAMPLER_2D_ARRAY         = 0x8DCF,
1149     GL_UNSIGNED_INT_SAMPLER_1D      = 0x8DD1,
1150     GL_UNSIGNED_INT_SAMPLER_2D      = 0x8DD2,
1151     GL_UNSIGNED_INT_SAMPLER_3D      = 0x8DD3,
1152     GL_UNSIGNED_INT_SAMPLER_CUBE    = 0x8DD4,
1153     GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6,
1154     GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7,
1155     GL_QUERY_WAIT                   = 0x8E13,
1156     GL_QUERY_NO_WAIT                = 0x8E14,
1157     GL_QUERY_BY_REGION_WAIT         = 0x8E15,
1158     GL_QUERY_BY_REGION_NO_WAIT      = 0x8E16,
1159 }
1160 
1161 // gl 3.1
1162 enum : GLenum
1163 {
1164     GL_TEXTURE_RECTANGLE            = 0x84F5,
1165     GL_TEXTURE_BINDING_RECTANGLE    = 0x84F6,
1166     GL_PROXY_TEXTURE_RECTANGLE      = 0x84F7,
1167     GL_MAX_RECTANGLE_TEXTURE_SIZE   = 0x84F8,
1168     GL_SAMPLER_2D_RECT              = 0x8B63,
1169     GL_SAMPLER_2D_RECT_SHADOW       = 0x8B64,
1170     GL_TEXTURE_BUFFER               = 0x8C2A,
1171     GL_MAX_TEXTURE_BUFFER_SIZE      = 0x8C2B,
1172     GL_TEXTURE_BINDING_BUFFER       = 0x8C2C,
1173     GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D,
1174     GL_TEXTURE_BUFFER_FORMAT        = 0x8C2E,
1175     GL_SAMPLER_BUFFER               = 0x8DC2,
1176     GL_INT_SAMPLER_2D_RECT          = 0x8DCD,
1177     GL_INT_SAMPLER_BUFFER           = 0x8DD0,
1178     GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5,
1179     GL_UNSIGNED_INT_SAMPLER_BUFFER  = 0x8DD8,
1180     GL_RED_SNORM                    = 0x8F90,
1181     GL_RG_SNORM                     = 0x8F91,
1182     GL_RGB_SNORM                    = 0x8F92,
1183     GL_RGBA_SNORM                   = 0x8F93,
1184     GL_R8_SNORM                     = 0x8F94,
1185     GL_RG8_SNORM                    = 0x8F95,
1186     GL_RGB8_SNORM                   = 0x8F96,
1187     GL_RGBA8_SNORM                  = 0x8F97,
1188     GL_R16_SNORM                    = 0x8F98,
1189     GL_RG16_SNORM                   = 0x8F99,
1190     GL_RGB16_SNORM                  = 0x8F9A,
1191     GL_RGBA16_SNORM                 = 0x8F9B,
1192     GL_SIGNED_NORMALIZED            = 0x8F9C,
1193     GL_PRIMITIVE_RESTART            = 0x8F9D,
1194     GL_PRIMITIVE_RESTART_INDEX      = 0x8F9E,
1195     GL_BUFFER_ACCESS_FLAGS          = 0x911F,
1196     GL_BUFFER_MAP_LENGTH            = 0x9120,
1197     GL_BUFFER_MAP_OFFSET            = 0x9121,
1198 }
1199 
1200 // gl 3.2
1201 alias long GLint64;
1202 
1203 enum : int
1204 {
1205     GL_CONTEXT_CORE_PROFILE_BIT     = 0x00000001,
1206     GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002,
1207 }
1208 
1209 enum : GLenum
1210 {
1211     GL_LINES_ADJACENCY              = 0x000A,
1212     GL_LINE_STRIP_ADJACENCY         = 0x000B,
1213     GL_TRIANGLES_ADJACENCY          = 0x000C,
1214     GL_TRIANGLE_STRIP_ADJACENCY     = 0x000D,
1215     GL_PROGRAM_POINT_SIZE           = 0x8642,
1216     GL_GEOMETRY_VERTICES_OUT        = 0x8916,
1217     GL_GEOMETRY_INPUT_TYPE          = 0x8917,
1218     GL_GEOMETRY_OUTPUT_TYPE         = 0x8918,
1219     GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29,
1220     GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7,
1221     GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8,
1222     GL_GEOMETRY_SHADER              = 0x8DD9,
1223     GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF,
1224     GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0,
1225     GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1,
1226     GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122,
1227     GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123,
1228     GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124,
1229     GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125,
1230     GL_CONTEXT_PROFILE_MASK         = 0x9126,
1231 }
1232 
1233 // gl 3.3
1234 enum : GLenum
1235 {
1236     GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE,
1237     GL_ANY_SAMPLES_PASSED       = 0x8C2F,
1238     GL_TEXTURE_SWIZZLE_R        = 0x8E42,
1239     GL_TEXTURE_SWIZZLE_G        = 0x8E43,
1240     GL_TEXTURE_SWIZZLE_B        = 0x8E44,
1241     GL_TEXTURE_SWIZZLE_A        = 0x8E45,
1242     GL_TEXTURE_SWIZZLE_RGBA     = 0x8E46,
1243     GL_RGB10_A2UI               = 0x906F,
1244 }
1245 
1246 // gl 4.0
1247 enum : GLenum
1248 {
1249     GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F,
1250     GL_SAMPLE_SHADING           = 0x8C36,
1251     GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37,
1252     GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A,
1253     GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B,
1254     GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C,
1255     GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D,
1256     GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E,
1257     GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F,
1258     GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS = 0x8F9F,
1259     GL_TEXTURE_CUBE_MAP_ARRAY   = 0x9009,
1260     GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A,
1261     GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B,
1262     GL_SAMPLER_CUBE_MAP_ARRAY   = 0x900C,
1263     GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D,
1264     GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E,
1265     GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F,
1266 }