Commits

Joseph Marshall committed 4dba030

OpenGL bindings for rust.

Comments (0)

Files changed (5)

+syntax:glob
+*.swp
+*.so
+all:
+	rustc gl.rc
+
+clean:
+	rm -rf libgl*.so
+
+import re
+
+HEADER_FILE = "/usr/include/GL/gl.h"
+
+types = {
+    "double": "f64",
+    "float": "f32",
+    "unsigned int": "u32",
+    "int": "i32",
+    "short": "i16",
+    "unsigned short": "u16",
+    "unsigned char": "u8",
+    "signed char": "i8",
+    "void": "()",
+}
+class errors:
+    unknown = []
+    unknown_api = []
+
+def output(l):
+    print(l)
+
+
+def typedef(l):
+    m = re.match(r'typedef\s+([\w\s]+)\s+(\w+);(.*)', l)
+    if m:
+        g = m.groups()
+        output("type "+g[1].strip()+" = "+types[g[0].strip()]+"; "+g[2].strip())
+        types[g[1].strip()] = types[g[0].strip()]
+    else:
+        errors.unknown.append(l)
+
+
+def define(l):
+    m = re.match(r'\#define\s+(\w+)\s+(\w+).*', l)
+    if m:
+        g = m.groups()
+        if g[1] in ('extern', 'GLAPIENTRY', 'APIENTRY'):
+            return
+        output("const "+g[0]+":uint = "+g[1]+"u;")
+    else:
+        errors.unknown.append(l)
+
+
+funcs = []
+def GLAPI(l):
+    m = re.match(r'GLAPI\s+(\w+)\s+GLAPIENTRY\s+(\w+)\s*\(([\w\s\,\*\[\]]+)\).*', l)
+    if m:
+        funcs.append(m.groups())
+    else:
+        errors.unknown_api.append(l)
+
+
+fn = open(HEADER_FILE, "r")
+
+r = ""
+for l in fn.readlines():
+    if l.startswith("typedef"):
+        typedef(l)
+    elif l.startswith("#define"):
+        define(l)
+    elif l.strip() and not l.startswith("#") and not l.startswith("/*") and not l.strip().startswith("*"):
+        r += l
+
+for l in r.split(";"):
+    l = l.strip()
+    if l.startswith("GLAPI"):
+        GLAPI(l)
+
+def parse_params(ps):
+    if ps == 'void':
+        return ''
+    r = []
+    for p in ps.split(','):
+        p = p.strip()
+        ptr = '*' if '*' in p else ''
+        if ptr:
+            p = p.replace('*', '')
+
+        m = re.match(r'([\w\s]+)\s+(\w+)', p)
+        if not m:
+            print p
+        type = m.group(1)
+        name = m.group(2)
+        if name in ('type', 'fail'):
+            name = name+"_"
+
+        type = type.replace('const', '').strip()
+        r.append(name+': '+ptr+types[type])
+    return ', '.join(r)
+
+output_funcs = []
+for g in funcs:
+    ret = g[0].strip()
+    name = g[1].strip()
+    if "MESA" in name or 'ATI' in name:
+        continue
+    params = g[2].strip()
+    output_funcs.append((name, parse_params(params), types[ret]))
+
+output("native mod GL {");
+output("    fn SDL_GL_SwapBuffers();");
+for f in output_funcs:
+    name,params,ret = f
+    output("    fn "+name+"("+params+") -> "+ret+";")
+output("}");
+
+
+nice = {
+    'u64': 'uint',
+    'u32': 'uint',
+    'u16': 'uint',
+    'u8': 'uint',
+    'i64': 'int',
+    'i32': 'int',
+    'i16': 'int',
+    'i8': 'int',
+
+    'f64': 'float',
+    'f32': 'float',
+    'f16': 'float',
+    'f8': 'float',
+
+    '()':'()'
+}
+def nice_types(params):
+    if not params:
+        return ''
+    r = []
+    for p in params.split(', '):
+        n,t = p.split(": ")
+        if t[0] == '*':
+            t = '*'+nice[t[1:]]
+        else:
+            t = nice[t]
+        r.append(n+': '+t)
+    return ', '.join(r)
+
+def cast(params):
+    if not params:
+        return ''
+    r = []
+    for p in params.split(', '):
+        n,t = p.split(": ")
+        n = n+' as '+t
+        r.append(n)
+    return ', '.join(r)
+
+for f in output_funcs:
+    name,params,ret = f
+    output('fn '+name+'('+nice_types(params)+') -> '+ret+' unsafe {')
+    output('    ret GL::'+name+'('+cast(params)+');')
+    output('}')
+#[link(name="gl", vers="7.6")];
+
+#[comment = "OpenGL bindings"];
+#[license = "LGPLv2"];
+#[crate_type = "lib"];
+
+mod gl;
+const WIN32_LEAN_AND_MEAN:uint = 1u;
+const GL_VERSION_1_1:uint = 1u;
+const GL_VERSION_1_2:uint = 1u;
+const GL_VERSION_1_3:uint = 1u;
+const GL_ARB_imaging:uint = 1u;
+type GLenum = u32; 
+type GLboolean = u8; 
+type GLbitfield = u32; 
+type GLvoid = (); 
+type GLbyte = i8; /* 1-byte signed */
+type GLshort = i16; /* 2-byte signed */
+type GLint = i32; /* 4-byte signed */
+type GLubyte = u8; /* 1-byte unsigned */
+type GLushort = u16; /* 2-byte unsigned */
+type GLuint = u32; /* 4-byte unsigned */
+type GLsizei = i32; /* 4-byte signed */
+type GLfloat = f32; /* single precision float */
+type GLclampf = f32; /* single precision float in [0,1] */
+type GLdouble = f64; /* double precision float */
+type GLclampd = f64; /* double precision float in [0,1] */
+const GL_FALSE:uint = 0x0u;
+const GL_TRUE:uint = 0x1u;
+const GL_BYTE:uint = 0x1400u;
+const GL_UNSIGNED_BYTE:uint = 0x1401u;
+const GL_SHORT:uint = 0x1402u;
+const GL_UNSIGNED_SHORT:uint = 0x1403u;
+const GL_INT:uint = 0x1404u;
+const GL_UNSIGNED_INT:uint = 0x1405u;
+const GL_FLOAT:uint = 0x1406u;
+const GL_2_BYTES:uint = 0x1407u;
+const GL_3_BYTES:uint = 0x1408u;
+const GL_4_BYTES:uint = 0x1409u;
+const GL_DOUBLE:uint = 0x140Au;
+const GL_POINTS:uint = 0x0000u;
+const GL_LINES:uint = 0x0001u;
+const GL_LINE_LOOP:uint = 0x0002u;
+const GL_LINE_STRIP:uint = 0x0003u;
+const GL_TRIANGLES:uint = 0x0004u;
+const GL_TRIANGLE_STRIP:uint = 0x0005u;
+const GL_TRIANGLE_FAN:uint = 0x0006u;
+const GL_QUADS:uint = 0x0007u;
+const GL_QUAD_STRIP:uint = 0x0008u;
+const GL_POLYGON:uint = 0x0009u;
+const GL_VERTEX_ARRAY:uint = 0x8074u;
+const GL_NORMAL_ARRAY:uint = 0x8075u;
+const GL_COLOR_ARRAY:uint = 0x8076u;
+const GL_INDEX_ARRAY:uint = 0x8077u;
+const GL_TEXTURE_COORD_ARRAY:uint = 0x8078u;
+const GL_EDGE_FLAG_ARRAY:uint = 0x8079u;
+const GL_VERTEX_ARRAY_SIZE:uint = 0x807Au;
+const GL_VERTEX_ARRAY_TYPE:uint = 0x807Bu;
+const GL_VERTEX_ARRAY_STRIDE:uint = 0x807Cu;
+const GL_NORMAL_ARRAY_TYPE:uint = 0x807Eu;
+const GL_NORMAL_ARRAY_STRIDE:uint = 0x807Fu;
+const GL_COLOR_ARRAY_SIZE:uint = 0x8081u;
+const GL_COLOR_ARRAY_TYPE:uint = 0x8082u;
+const GL_COLOR_ARRAY_STRIDE:uint = 0x8083u;
+const GL_INDEX_ARRAY_TYPE:uint = 0x8085u;
+const GL_INDEX_ARRAY_STRIDE:uint = 0x8086u;
+const GL_TEXTURE_COORD_ARRAY_SIZE:uint = 0x8088u;
+const GL_TEXTURE_COORD_ARRAY_TYPE:uint = 0x8089u;
+const GL_TEXTURE_COORD_ARRAY_STRIDE:uint = 0x808Au;
+const GL_EDGE_FLAG_ARRAY_STRIDE:uint = 0x808Cu;
+const GL_VERTEX_ARRAY_POINTER:uint = 0x808Eu;
+const GL_NORMAL_ARRAY_POINTER:uint = 0x808Fu;
+const GL_COLOR_ARRAY_POINTER:uint = 0x8090u;
+const GL_INDEX_ARRAY_POINTER:uint = 0x8091u;
+const GL_TEXTURE_COORD_ARRAY_POINTER:uint = 0x8092u;
+const GL_EDGE_FLAG_ARRAY_POINTER:uint = 0x8093u;
+const GL_V2F:uint = 0x2A20u;
+const GL_V3F:uint = 0x2A21u;
+const GL_C4UB_V2F:uint = 0x2A22u;
+const GL_C4UB_V3F:uint = 0x2A23u;
+const GL_C3F_V3F:uint = 0x2A24u;
+const GL_N3F_V3F:uint = 0x2A25u;
+const GL_C4F_N3F_V3F:uint = 0x2A26u;
+const GL_T2F_V3F:uint = 0x2A27u;
+const GL_T4F_V4F:uint = 0x2A28u;
+const GL_T2F_C4UB_V3F:uint = 0x2A29u;
+const GL_T2F_C3F_V3F:uint = 0x2A2Au;
+const GL_T2F_N3F_V3F:uint = 0x2A2Bu;
+const GL_T2F_C4F_N3F_V3F:uint = 0x2A2Cu;
+const GL_T4F_C4F_N3F_V4F:uint = 0x2A2Du;
+const GL_MATRIX_MODE:uint = 0x0BA0u;
+const GL_MODELVIEW:uint = 0x1700u;
+const GL_PROJECTION:uint = 0x1701u;
+const GL_TEXTURE:uint = 0x1702u;
+const GL_POINT_SMOOTH:uint = 0x0B10u;
+const GL_POINT_SIZE:uint = 0x0B11u;
+const GL_POINT_SIZE_GRANULARITY:uint = 0x0B13u;
+const GL_POINT_SIZE_RANGE:uint = 0x0B12u;
+const GL_LINE_SMOOTH:uint = 0x0B20u;
+const GL_LINE_STIPPLE:uint = 0x0B24u;
+const GL_LINE_STIPPLE_PATTERN:uint = 0x0B25u;
+const GL_LINE_STIPPLE_REPEAT:uint = 0x0B26u;
+const GL_LINE_WIDTH:uint = 0x0B21u;
+const GL_LINE_WIDTH_GRANULARITY:uint = 0x0B23u;
+const GL_LINE_WIDTH_RANGE:uint = 0x0B22u;
+const GL_POINT:uint = 0x1B00u;
+const GL_LINE:uint = 0x1B01u;
+const GL_FILL:uint = 0x1B02u;
+const GL_CW:uint = 0x0900u;
+const GL_CCW:uint = 0x0901u;
+const GL_FRONT:uint = 0x0404u;
+const GL_BACK:uint = 0x0405u;
+const GL_POLYGON_MODE:uint = 0x0B40u;
+const GL_POLYGON_SMOOTH:uint = 0x0B41u;
+const GL_POLYGON_STIPPLE:uint = 0x0B42u;
+const GL_EDGE_FLAG:uint = 0x0B43u;
+const GL_CULL_FACE:uint = 0x0B44u;
+const GL_CULL_FACE_MODE:uint = 0x0B45u;
+const GL_FRONT_FACE:uint = 0x0B46u;
+const GL_POLYGON_OFFSET_FACTOR:uint = 0x8038u;
+const GL_POLYGON_OFFSET_UNITS:uint = 0x2A00u;
+const GL_POLYGON_OFFSET_POINT:uint = 0x2A01u;
+const GL_POLYGON_OFFSET_LINE:uint = 0x2A02u;
+const GL_POLYGON_OFFSET_FILL:uint = 0x8037u;
+const GL_COMPILE:uint = 0x1300u;
+const GL_COMPILE_AND_EXECUTE:uint = 0x1301u;
+const GL_LIST_BASE:uint = 0x0B32u;
+const GL_LIST_INDEX:uint = 0x0B33u;
+const GL_LIST_MODE:uint = 0x0B30u;
+const GL_NEVER:uint = 0x0200u;
+const GL_LESS:uint = 0x0201u;
+const GL_EQUAL:uint = 0x0202u;
+const GL_LEQUAL:uint = 0x0203u;
+const GL_GREATER:uint = 0x0204u;
+const GL_NOTEQUAL:uint = 0x0205u;
+const GL_GEQUAL:uint = 0x0206u;
+const GL_ALWAYS:uint = 0x0207u;
+const GL_DEPTH_TEST:uint = 0x0B71u;
+const GL_DEPTH_BITS:uint = 0x0D56u;
+const GL_DEPTH_CLEAR_VALUE:uint = 0x0B73u;
+const GL_DEPTH_FUNC:uint = 0x0B74u;
+const GL_DEPTH_RANGE:uint = 0x0B70u;
+const GL_DEPTH_WRITEMASK:uint = 0x0B72u;
+const GL_DEPTH_COMPONENT:uint = 0x1902u;
+const GL_LIGHTING:uint = 0x0B50u;
+const GL_LIGHT0:uint = 0x4000u;
+const GL_LIGHT1:uint = 0x4001u;
+const GL_LIGHT2:uint = 0x4002u;
+const GL_LIGHT3:uint = 0x4003u;
+const GL_LIGHT4:uint = 0x4004u;
+const GL_LIGHT5:uint = 0x4005u;
+const GL_LIGHT6:uint = 0x4006u;
+const GL_LIGHT7:uint = 0x4007u;
+const GL_SPOT_EXPONENT:uint = 0x1205u;
+const GL_SPOT_CUTOFF:uint = 0x1206u;
+const GL_CONSTANT_ATTENUATION:uint = 0x1207u;
+const GL_LINEAR_ATTENUATION:uint = 0x1208u;
+const GL_QUADRATIC_ATTENUATION:uint = 0x1209u;
+const GL_AMBIENT:uint = 0x1200u;
+const GL_DIFFUSE:uint = 0x1201u;
+const GL_SPECULAR:uint = 0x1202u;
+const GL_SHININESS:uint = 0x1601u;
+const GL_EMISSION:uint = 0x1600u;
+const GL_POSITION:uint = 0x1203u;
+const GL_SPOT_DIRECTION:uint = 0x1204u;
+const GL_AMBIENT_AND_DIFFUSE:uint = 0x1602u;
+const GL_COLOR_INDEXES:uint = 0x1603u;
+const GL_LIGHT_MODEL_TWO_SIDE:uint = 0x0B52u;
+const GL_LIGHT_MODEL_LOCAL_VIEWER:uint = 0x0B51u;
+const GL_LIGHT_MODEL_AMBIENT:uint = 0x0B53u;
+const GL_FRONT_AND_BACK:uint = 0x0408u;
+const GL_SHADE_MODEL:uint = 0x0B54u;
+const GL_FLAT:uint = 0x1D00u;
+const GL_SMOOTH:uint = 0x1D01u;
+const GL_COLOR_MATERIAL:uint = 0x0B57u;
+const GL_COLOR_MATERIAL_FACE:uint = 0x0B55u;
+const GL_COLOR_MATERIAL_PARAMETER:uint = 0x0B56u;
+const GL_NORMALIZE:uint = 0x0BA1u;
+const GL_CLIP_PLANE0:uint = 0x3000u;
+const GL_CLIP_PLANE1:uint = 0x3001u;
+const GL_CLIP_PLANE2:uint = 0x3002u;
+const GL_CLIP_PLANE3:uint = 0x3003u;
+const GL_CLIP_PLANE4:uint = 0x3004u;
+const GL_CLIP_PLANE5:uint = 0x3005u;
+const GL_ACCUM_RED_BITS:uint = 0x0D58u;
+const GL_ACCUM_GREEN_BITS:uint = 0x0D59u;
+const GL_ACCUM_BLUE_BITS:uint = 0x0D5Au;
+const GL_ACCUM_ALPHA_BITS:uint = 0x0D5Bu;
+const GL_ACCUM_CLEAR_VALUE:uint = 0x0B80u;
+const GL_ACCUM:uint = 0x0100u;
+const GL_ADD:uint = 0x0104u;
+const GL_LOAD:uint = 0x0101u;
+const GL_MULT:uint = 0x0103u;
+const GL_RETURN:uint = 0x0102u;
+const GL_ALPHA_TEST:uint = 0x0BC0u;
+const GL_ALPHA_TEST_REF:uint = 0x0BC2u;
+const GL_ALPHA_TEST_FUNC:uint = 0x0BC1u;
+const GL_BLEND:uint = 0x0BE2u;
+const GL_BLEND_SRC:uint = 0x0BE1u;
+const GL_BLEND_DST:uint = 0x0BE0u;
+const GL_ZERO:uint = 0x0u;
+const GL_ONE:uint = 0x1u;
+const GL_SRC_COLOR:uint = 0x0300u;
+const GL_ONE_MINUS_SRC_COLOR:uint = 0x0301u;
+const GL_SRC_ALPHA:uint = 0x0302u;
+const GL_ONE_MINUS_SRC_ALPHA:uint = 0x0303u;
+const GL_DST_ALPHA:uint = 0x0304u;
+const GL_ONE_MINUS_DST_ALPHA:uint = 0x0305u;
+const GL_DST_COLOR:uint = 0x0306u;
+const GL_ONE_MINUS_DST_COLOR:uint = 0x0307u;
+const GL_SRC_ALPHA_SATURATE:uint = 0x0308u;
+const GL_FEEDBACK:uint = 0x1C01u;
+const GL_RENDER:uint = 0x1C00u;
+const GL_SELECT:uint = 0x1C02u;
+const GL_2D:uint = 0x0600u;
+const GL_3D:uint = 0x0601u;
+const GL_3D_COLOR:uint = 0x0602u;
+const GL_3D_COLOR_TEXTURE:uint = 0x0603u;
+const GL_4D_COLOR_TEXTURE:uint = 0x0604u;
+const GL_POINT_TOKEN:uint = 0x0701u;
+const GL_LINE_TOKEN:uint = 0x0702u;
+const GL_LINE_RESET_TOKEN:uint = 0x0707u;
+const GL_POLYGON_TOKEN:uint = 0x0703u;
+const GL_BITMAP_TOKEN:uint = 0x0704u;
+const GL_DRAW_PIXEL_TOKEN:uint = 0x0705u;
+const GL_COPY_PIXEL_TOKEN:uint = 0x0706u;
+const GL_PASS_THROUGH_TOKEN:uint = 0x0700u;
+const GL_FEEDBACK_BUFFER_POINTER:uint = 0x0DF0u;
+const GL_FEEDBACK_BUFFER_SIZE:uint = 0x0DF1u;
+const GL_FEEDBACK_BUFFER_TYPE:uint = 0x0DF2u;
+const GL_SELECTION_BUFFER_POINTER:uint = 0x0DF3u;
+const GL_SELECTION_BUFFER_SIZE:uint = 0x0DF4u;
+const GL_FOG:uint = 0x0B60u;
+const GL_FOG_MODE:uint = 0x0B65u;
+const GL_FOG_DENSITY:uint = 0x0B62u;
+const GL_FOG_COLOR:uint = 0x0B66u;
+const GL_FOG_INDEX:uint = 0x0B61u;
+const GL_FOG_START:uint = 0x0B63u;
+const GL_FOG_END:uint = 0x0B64u;
+const GL_LINEAR:uint = 0x2601u;
+const GL_EXP:uint = 0x0800u;
+const GL_EXP2:uint = 0x0801u;
+const GL_LOGIC_OP:uint = 0x0BF1u;
+const GL_INDEX_LOGIC_OP:uint = 0x0BF1u;
+const GL_COLOR_LOGIC_OP:uint = 0x0BF2u;
+const GL_LOGIC_OP_MODE:uint = 0x0BF0u;
+const GL_CLEAR:uint = 0x1500u;
+const GL_SET:uint = 0x150Fu;
+const GL_COPY:uint = 0x1503u;
+const GL_COPY_INVERTED:uint = 0x150Cu;
+const GL_NOOP:uint = 0x1505u;
+const GL_INVERT:uint = 0x150Au;
+const GL_AND:uint = 0x1501u;
+const GL_NAND:uint = 0x150Eu;
+const GL_OR:uint = 0x1507u;
+const GL_NOR:uint = 0x1508u;
+const GL_XOR:uint = 0x1506u;
+const GL_EQUIV:uint = 0x1509u;
+const GL_AND_REVERSE:uint = 0x1502u;
+const GL_AND_INVERTED:uint = 0x1504u;
+const GL_OR_REVERSE:uint = 0x150Bu;
+const GL_OR_INVERTED:uint = 0x150Du;
+const GL_STENCIL_BITS:uint = 0x0D57u;
+const GL_STENCIL_TEST:uint = 0x0B90u;
+const GL_STENCIL_CLEAR_VALUE:uint = 0x0B91u;
+const GL_STENCIL_FUNC:uint = 0x0B92u;
+const GL_STENCIL_VALUE_MASK:uint = 0x0B93u;
+const GL_STENCIL_FAIL:uint = 0x0B94u;
+const GL_STENCIL_PASS_DEPTH_FAIL:uint = 0x0B95u;
+const GL_STENCIL_PASS_DEPTH_PASS:uint = 0x0B96u;
+const GL_STENCIL_REF:uint = 0x0B97u;
+const GL_STENCIL_WRITEMASK:uint = 0x0B98u;
+const GL_STENCIL_INDEX:uint = 0x1901u;
+const GL_KEEP:uint = 0x1E00u;
+const GL_REPLACE:uint = 0x1E01u;
+const GL_INCR:uint = 0x1E02u;
+const GL_DECR:uint = 0x1E03u;
+const GL_NONE:uint = 0x0u;
+const GL_LEFT:uint = 0x0406u;
+const GL_RIGHT:uint = 0x0407u;
+const GL_FRONT_LEFT:uint = 0x0400u;
+const GL_FRONT_RIGHT:uint = 0x0401u;
+const GL_BACK_LEFT:uint = 0x0402u;
+const GL_BACK_RIGHT:uint = 0x0403u;
+const GL_AUX0:uint = 0x0409u;
+const GL_AUX1:uint = 0x040Au;
+const GL_AUX2:uint = 0x040Bu;
+const GL_AUX3:uint = 0x040Cu;
+const GL_COLOR_INDEX:uint = 0x1900u;
+const GL_RED:uint = 0x1903u;
+const GL_GREEN:uint = 0x1904u;
+const GL_BLUE:uint = 0x1905u;
+const GL_ALPHA:uint = 0x1906u;
+const GL_LUMINANCE:uint = 0x1909u;
+const GL_LUMINANCE_ALPHA:uint = 0x190Au;
+const GL_ALPHA_BITS:uint = 0x0D55u;
+const GL_RED_BITS:uint = 0x0D52u;
+const GL_GREEN_BITS:uint = 0x0D53u;
+const GL_BLUE_BITS:uint = 0x0D54u;
+const GL_INDEX_BITS:uint = 0x0D51u;
+const GL_SUBPIXEL_BITS:uint = 0x0D50u;
+const GL_AUX_BUFFERS:uint = 0x0C00u;
+const GL_READ_BUFFER:uint = 0x0C02u;
+const GL_DRAW_BUFFER:uint = 0x0C01u;
+const GL_DOUBLEBUFFER:uint = 0x0C32u;
+const GL_STEREO:uint = 0x0C33u;
+const GL_BITMAP:uint = 0x1A00u;
+const GL_COLOR:uint = 0x1800u;
+const GL_DEPTH:uint = 0x1801u;
+const GL_STENCIL:uint = 0x1802u;
+const GL_DITHER:uint = 0x0BD0u;
+const GL_RGB:uint = 0x1907u;
+const GL_RGBA:uint = 0x1908u;
+const GL_MAX_LIST_NESTING:uint = 0x0B31u;
+const GL_MAX_EVAL_ORDER:uint = 0x0D30u;
+const GL_MAX_LIGHTS:uint = 0x0D31u;
+const GL_MAX_CLIP_PLANES:uint = 0x0D32u;
+const GL_MAX_TEXTURE_SIZE:uint = 0x0D33u;
+const GL_MAX_PIXEL_MAP_TABLE:uint = 0x0D34u;
+const GL_MAX_ATTRIB_STACK_DEPTH:uint = 0x0D35u;
+const GL_MAX_MODELVIEW_STACK_DEPTH:uint = 0x0D36u;
+const GL_MAX_NAME_STACK_DEPTH:uint = 0x0D37u;
+const GL_MAX_PROJECTION_STACK_DEPTH:uint = 0x0D38u;
+const GL_MAX_TEXTURE_STACK_DEPTH:uint = 0x0D39u;
+const GL_MAX_VIEWPORT_DIMS:uint = 0x0D3Au;
+const GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:uint = 0x0D3Bu;
+const GL_ATTRIB_STACK_DEPTH:uint = 0x0BB0u;
+const GL_CLIENT_ATTRIB_STACK_DEPTH:uint = 0x0BB1u;
+const GL_COLOR_CLEAR_VALUE:uint = 0x0C22u;
+const GL_COLOR_WRITEMASK:uint = 0x0C23u;
+const GL_CURRENT_INDEX:uint = 0x0B01u;
+const GL_CURRENT_COLOR:uint = 0x0B00u;
+const GL_CURRENT_NORMAL:uint = 0x0B02u;
+const GL_CURRENT_RASTER_COLOR:uint = 0x0B04u;
+const GL_CURRENT_RASTER_DISTANCE:uint = 0x0B09u;
+const GL_CURRENT_RASTER_INDEX:uint = 0x0B05u;
+const GL_CURRENT_RASTER_POSITION:uint = 0x0B07u;
+const GL_CURRENT_RASTER_TEXTURE_COORDS:uint = 0x0B06u;
+const GL_CURRENT_RASTER_POSITION_VALID:uint = 0x0B08u;
+const GL_CURRENT_TEXTURE_COORDS:uint = 0x0B03u;
+const GL_INDEX_CLEAR_VALUE:uint = 0x0C20u;
+const GL_INDEX_MODE:uint = 0x0C30u;
+const GL_INDEX_WRITEMASK:uint = 0x0C21u;
+const GL_MODELVIEW_MATRIX:uint = 0x0BA6u;
+const GL_MODELVIEW_STACK_DEPTH:uint = 0x0BA3u;
+const GL_NAME_STACK_DEPTH:uint = 0x0D70u;
+const GL_PROJECTION_MATRIX:uint = 0x0BA7u;
+const GL_PROJECTION_STACK_DEPTH:uint = 0x0BA4u;
+const GL_RENDER_MODE:uint = 0x0C40u;
+const GL_RGBA_MODE:uint = 0x0C31u;
+const GL_TEXTURE_MATRIX:uint = 0x0BA8u;
+const GL_TEXTURE_STACK_DEPTH:uint = 0x0BA5u;
+const GL_VIEWPORT:uint = 0x0BA2u;
+const GL_AUTO_NORMAL:uint = 0x0D80u;
+const GL_MAP1_COLOR_4:uint = 0x0D90u;
+const GL_MAP1_INDEX:uint = 0x0D91u;
+const GL_MAP1_NORMAL:uint = 0x0D92u;
+const GL_MAP1_TEXTURE_COORD_1:uint = 0x0D93u;
+const GL_MAP1_TEXTURE_COORD_2:uint = 0x0D94u;
+const GL_MAP1_TEXTURE_COORD_3:uint = 0x0D95u;
+const GL_MAP1_TEXTURE_COORD_4:uint = 0x0D96u;
+const GL_MAP1_VERTEX_3:uint = 0x0D97u;
+const GL_MAP1_VERTEX_4:uint = 0x0D98u;
+const GL_MAP2_COLOR_4:uint = 0x0DB0u;
+const GL_MAP2_INDEX:uint = 0x0DB1u;
+const GL_MAP2_NORMAL:uint = 0x0DB2u;
+const GL_MAP2_TEXTURE_COORD_1:uint = 0x0DB3u;
+const GL_MAP2_TEXTURE_COORD_2:uint = 0x0DB4u;
+const GL_MAP2_TEXTURE_COORD_3:uint = 0x0DB5u;
+const GL_MAP2_TEXTURE_COORD_4:uint = 0x0DB6u;
+const GL_MAP2_VERTEX_3:uint = 0x0DB7u;
+const GL_MAP2_VERTEX_4:uint = 0x0DB8u;
+const GL_MAP1_GRID_DOMAIN:uint = 0x0DD0u;
+const GL_MAP1_GRID_SEGMENTS:uint = 0x0DD1u;
+const GL_MAP2_GRID_DOMAIN:uint = 0x0DD2u;
+const GL_MAP2_GRID_SEGMENTS:uint = 0x0DD3u;
+const GL_COEFF:uint = 0x0A00u;
+const GL_ORDER:uint = 0x0A01u;
+const GL_DOMAIN:uint = 0x0A02u;
+const GL_PERSPECTIVE_CORRECTION_HINT:uint = 0x0C50u;
+const GL_POINT_SMOOTH_HINT:uint = 0x0C51u;
+const GL_LINE_SMOOTH_HINT:uint = 0x0C52u;
+const GL_POLYGON_SMOOTH_HINT:uint = 0x0C53u;
+const GL_FOG_HINT:uint = 0x0C54u;
+const GL_DONT_CARE:uint = 0x1100u;
+const GL_FASTEST:uint = 0x1101u;
+const GL_NICEST:uint = 0x1102u;
+const GL_SCISSOR_BOX:uint = 0x0C10u;
+const GL_SCISSOR_TEST:uint = 0x0C11u;
+const GL_MAP_COLOR:uint = 0x0D10u;
+const GL_MAP_STENCIL:uint = 0x0D11u;
+const GL_INDEX_SHIFT:uint = 0x0D12u;
+const GL_INDEX_OFFSET:uint = 0x0D13u;
+const GL_RED_SCALE:uint = 0x0D14u;
+const GL_RED_BIAS:uint = 0x0D15u;
+const GL_GREEN_SCALE:uint = 0x0D18u;
+const GL_GREEN_BIAS:uint = 0x0D19u;
+const GL_BLUE_SCALE:uint = 0x0D1Au;
+const GL_BLUE_BIAS:uint = 0x0D1Bu;
+const GL_ALPHA_SCALE:uint = 0x0D1Cu;
+const GL_ALPHA_BIAS:uint = 0x0D1Du;
+const GL_DEPTH_SCALE:uint = 0x0D1Eu;
+const GL_DEPTH_BIAS:uint = 0x0D1Fu;
+const GL_PIXEL_MAP_S_TO_S_SIZE:uint = 0x0CB1u;
+const GL_PIXEL_MAP_I_TO_I_SIZE:uint = 0x0CB0u;
+const GL_PIXEL_MAP_I_TO_R_SIZE:uint = 0x0CB2u;
+const GL_PIXEL_MAP_I_TO_G_SIZE:uint = 0x0CB3u;
+const GL_PIXEL_MAP_I_TO_B_SIZE:uint = 0x0CB4u;
+const GL_PIXEL_MAP_I_TO_A_SIZE:uint = 0x0CB5u;
+const GL_PIXEL_MAP_R_TO_R_SIZE:uint = 0x0CB6u;
+const GL_PIXEL_MAP_G_TO_G_SIZE:uint = 0x0CB7u;
+const GL_PIXEL_MAP_B_TO_B_SIZE:uint = 0x0CB8u;
+const GL_PIXEL_MAP_A_TO_A_SIZE:uint = 0x0CB9u;
+const GL_PIXEL_MAP_S_TO_S:uint = 0x0C71u;
+const GL_PIXEL_MAP_I_TO_I:uint = 0x0C70u;
+const GL_PIXEL_MAP_I_TO_R:uint = 0x0C72u;
+const GL_PIXEL_MAP_I_TO_G:uint = 0x0C73u;
+const GL_PIXEL_MAP_I_TO_B:uint = 0x0C74u;
+const GL_PIXEL_MAP_I_TO_A:uint = 0x0C75u;
+const GL_PIXEL_MAP_R_TO_R:uint = 0x0C76u;
+const GL_PIXEL_MAP_G_TO_G:uint = 0x0C77u;
+const GL_PIXEL_MAP_B_TO_B:uint = 0x0C78u;
+const GL_PIXEL_MAP_A_TO_A:uint = 0x0C79u;
+const GL_PACK_ALIGNMENT:uint = 0x0D05u;
+const GL_PACK_LSB_FIRST:uint = 0x0D01u;
+const GL_PACK_ROW_LENGTH:uint = 0x0D02u;
+const GL_PACK_SKIP_PIXELS:uint = 0x0D04u;
+const GL_PACK_SKIP_ROWS:uint = 0x0D03u;
+const GL_PACK_SWAP_BYTES:uint = 0x0D00u;
+const GL_UNPACK_ALIGNMENT:uint = 0x0CF5u;
+const GL_UNPACK_LSB_FIRST:uint = 0x0CF1u;
+const GL_UNPACK_ROW_LENGTH:uint = 0x0CF2u;
+const GL_UNPACK_SKIP_PIXELS:uint = 0x0CF4u;
+const GL_UNPACK_SKIP_ROWS:uint = 0x0CF3u;
+const GL_UNPACK_SWAP_BYTES:uint = 0x0CF0u;
+const GL_ZOOM_X:uint = 0x0D16u;
+const GL_ZOOM_Y:uint = 0x0D17u;
+const GL_TEXTURE_ENV:uint = 0x2300u;
+const GL_TEXTURE_ENV_MODE:uint = 0x2200u;
+const GL_TEXTURE_1D:uint = 0x0DE0u;
+const GL_TEXTURE_2D:uint = 0x0DE1u;
+const GL_TEXTURE_WRAP_S:uint = 0x2802u;
+const GL_TEXTURE_WRAP_T:uint = 0x2803u;
+const GL_TEXTURE_MAG_FILTER:uint = 0x2800u;
+const GL_TEXTURE_MIN_FILTER:uint = 0x2801u;
+const GL_TEXTURE_ENV_COLOR:uint = 0x2201u;
+const GL_TEXTURE_GEN_S:uint = 0x0C60u;
+const GL_TEXTURE_GEN_T:uint = 0x0C61u;
+const GL_TEXTURE_GEN_R:uint = 0x0C62u;
+const GL_TEXTURE_GEN_Q:uint = 0x0C63u;
+const GL_TEXTURE_GEN_MODE:uint = 0x2500u;
+const GL_TEXTURE_BORDER_COLOR:uint = 0x1004u;
+const GL_TEXTURE_WIDTH:uint = 0x1000u;
+const GL_TEXTURE_HEIGHT:uint = 0x1001u;
+const GL_TEXTURE_BORDER:uint = 0x1005u;
+const GL_TEXTURE_COMPONENTS:uint = 0x1003u;
+const GL_TEXTURE_RED_SIZE:uint = 0x805Cu;
+const GL_TEXTURE_GREEN_SIZE:uint = 0x805Du;
+const GL_TEXTURE_BLUE_SIZE:uint = 0x805Eu;
+const GL_TEXTURE_ALPHA_SIZE:uint = 0x805Fu;
+const GL_TEXTURE_LUMINANCE_SIZE:uint = 0x8060u;
+const GL_TEXTURE_INTENSITY_SIZE:uint = 0x8061u;
+const GL_NEAREST_MIPMAP_NEAREST:uint = 0x2700u;
+const GL_NEAREST_MIPMAP_LINEAR:uint = 0x2702u;
+const GL_LINEAR_MIPMAP_NEAREST:uint = 0x2701u;
+const GL_LINEAR_MIPMAP_LINEAR:uint = 0x2703u;
+const GL_OBJECT_LINEAR:uint = 0x2401u;
+const GL_OBJECT_PLANE:uint = 0x2501u;
+const GL_EYE_LINEAR:uint = 0x2400u;
+const GL_EYE_PLANE:uint = 0x2502u;
+const GL_SPHERE_MAP:uint = 0x2402u;
+const GL_DECAL:uint = 0x2101u;
+const GL_MODULATE:uint = 0x2100u;
+const GL_NEAREST:uint = 0x2600u;
+const GL_REPEAT:uint = 0x2901u;
+const GL_CLAMP:uint = 0x2900u;
+const GL_S:uint = 0x2000u;
+const GL_T:uint = 0x2001u;
+const GL_R:uint = 0x2002u;
+const GL_Q:uint = 0x2003u;
+const GL_VENDOR:uint = 0x1F00u;
+const GL_RENDERER:uint = 0x1F01u;
+const GL_VERSION:uint = 0x1F02u;
+const GL_EXTENSIONS:uint = 0x1F03u;
+const GL_NO_ERROR:uint = 0x0u;
+const GL_INVALID_ENUM:uint = 0x0500u;
+const GL_INVALID_VALUE:uint = 0x0501u;
+const GL_INVALID_OPERATION:uint = 0x0502u;
+const GL_STACK_OVERFLOW:uint = 0x0503u;
+const GL_STACK_UNDERFLOW:uint = 0x0504u;
+const GL_OUT_OF_MEMORY:uint = 0x0505u;
+const GL_CURRENT_BIT:uint = 0x00000001u;
+const GL_POINT_BIT:uint = 0x00000002u;
+const GL_LINE_BIT:uint = 0x00000004u;
+const GL_POLYGON_BIT:uint = 0x00000008u;
+const GL_POLYGON_STIPPLE_BIT:uint = 0x00000010u;
+const GL_PIXEL_MODE_BIT:uint = 0x00000020u;
+const GL_LIGHTING_BIT:uint = 0x00000040u;
+const GL_FOG_BIT:uint = 0x00000080u;
+const GL_DEPTH_BUFFER_BIT:uint = 0x00000100u;
+const GL_ACCUM_BUFFER_BIT:uint = 0x00000200u;
+const GL_STENCIL_BUFFER_BIT:uint = 0x00000400u;
+const GL_VIEWPORT_BIT:uint = 0x00000800u;
+const GL_TRANSFORM_BIT:uint = 0x00001000u;
+const GL_ENABLE_BIT:uint = 0x00002000u;
+const GL_COLOR_BUFFER_BIT:uint = 0x00004000u;
+const GL_HINT_BIT:uint = 0x00008000u;
+const GL_EVAL_BIT:uint = 0x00010000u;
+const GL_LIST_BIT:uint = 0x00020000u;
+const GL_TEXTURE_BIT:uint = 0x00040000u;
+const GL_SCISSOR_BIT:uint = 0x00080000u;
+const GL_ALL_ATTRIB_BITS:uint = 0x000FFFFFu;
+const GL_PROXY_TEXTURE_1D:uint = 0x8063u;
+const GL_PROXY_TEXTURE_2D:uint = 0x8064u;
+const GL_TEXTURE_PRIORITY:uint = 0x8066u;
+const GL_TEXTURE_RESIDENT:uint = 0x8067u;
+const GL_TEXTURE_BINDING_1D:uint = 0x8068u;
+const GL_TEXTURE_BINDING_2D:uint = 0x8069u;
+const GL_TEXTURE_INTERNAL_FORMAT:uint = 0x1003u;
+const GL_ALPHA4:uint = 0x803Bu;
+const GL_ALPHA8:uint = 0x803Cu;
+const GL_ALPHA12:uint = 0x803Du;
+const GL_ALPHA16:uint = 0x803Eu;
+const GL_LUMINANCE4:uint = 0x803Fu;
+const GL_LUMINANCE8:uint = 0x8040u;
+const GL_LUMINANCE12:uint = 0x8041u;
+const GL_LUMINANCE16:uint = 0x8042u;
+const GL_LUMINANCE4_ALPHA4:uint = 0x8043u;
+const GL_LUMINANCE6_ALPHA2:uint = 0x8044u;
+const GL_LUMINANCE8_ALPHA8:uint = 0x8045u;
+const GL_LUMINANCE12_ALPHA4:uint = 0x8046u;
+const GL_LUMINANCE12_ALPHA12:uint = 0x8047u;
+const GL_LUMINANCE16_ALPHA16:uint = 0x8048u;
+const GL_INTENSITY:uint = 0x8049u;
+const GL_INTENSITY4:uint = 0x804Au;
+const GL_INTENSITY8:uint = 0x804Bu;
+const GL_INTENSITY12:uint = 0x804Cu;
+const GL_INTENSITY16:uint = 0x804Du;
+const GL_R3_G3_B2:uint = 0x2A10u;
+const GL_RGB4:uint = 0x804Fu;
+const GL_RGB5:uint = 0x8050u;
+const GL_RGB8:uint = 0x8051u;
+const GL_RGB10:uint = 0x8052u;
+const GL_RGB12:uint = 0x8053u;
+const GL_RGB16:uint = 0x8054u;
+const GL_RGBA2:uint = 0x8055u;
+const GL_RGBA4:uint = 0x8056u;
+const GL_RGB5_A1:uint = 0x8057u;
+const GL_RGBA8:uint = 0x8058u;
+const GL_RGB10_A2:uint = 0x8059u;
+const GL_RGBA12:uint = 0x805Au;
+const GL_RGBA16:uint = 0x805Bu;
+const GL_CLIENT_PIXEL_STORE_BIT:uint = 0x00000001u;
+const GL_CLIENT_VERTEX_ARRAY_BIT:uint = 0x00000002u;
+const GL_ALL_CLIENT_ATTRIB_BITS:uint = 0xFFFFFFFFu;
+const GL_CLIENT_ALL_ATTRIB_BITS:uint = 0xFFFFFFFFu;
+const GL_RESCALE_NORMAL:uint = 0x803Au;
+const GL_CLAMP_TO_EDGE:uint = 0x812Fu;
+const GL_MAX_ELEMENTS_VERTICES:uint = 0x80E8u;
+const GL_MAX_ELEMENTS_INDICES:uint = 0x80E9u;
+const GL_BGR:uint = 0x80E0u;
+const GL_BGRA:uint = 0x80E1u;
+const GL_UNSIGNED_BYTE_3_3_2:uint = 0x8032u;
+const GL_UNSIGNED_BYTE_2_3_3_REV:uint = 0x8362u;
+const GL_UNSIGNED_SHORT_5_6_5:uint = 0x8363u;
+const GL_UNSIGNED_SHORT_5_6_5_REV:uint = 0x8364u;
+const GL_UNSIGNED_SHORT_4_4_4_4:uint = 0x8033u;
+const GL_UNSIGNED_SHORT_4_4_4_4_REV:uint = 0x8365u;
+const GL_UNSIGNED_SHORT_5_5_5_1:uint = 0x8034u;
+const GL_UNSIGNED_SHORT_1_5_5_5_REV:uint = 0x8366u;
+const GL_UNSIGNED_INT_8_8_8_8:uint = 0x8035u;
+const GL_UNSIGNED_INT_8_8_8_8_REV:uint = 0x8367u;
+const GL_UNSIGNED_INT_10_10_10_2:uint = 0x8036u;
+const GL_UNSIGNED_INT_2_10_10_10_REV:uint = 0x8368u;
+const GL_LIGHT_MODEL_COLOR_CONTROL:uint = 0x81F8u;
+const GL_SINGLE_COLOR:uint = 0x81F9u;
+const GL_SEPARATE_SPECULAR_COLOR:uint = 0x81FAu;
+const GL_TEXTURE_MIN_LOD:uint = 0x813Au;
+const GL_TEXTURE_MAX_LOD:uint = 0x813Bu;
+const GL_TEXTURE_BASE_LEVEL:uint = 0x813Cu;
+const GL_TEXTURE_MAX_LEVEL:uint = 0x813Du;
+const GL_SMOOTH_POINT_SIZE_RANGE:uint = 0x0B12u;
+const GL_SMOOTH_POINT_SIZE_GRANULARITY:uint = 0x0B13u;
+const GL_SMOOTH_LINE_WIDTH_RANGE:uint = 0x0B22u;
+const GL_SMOOTH_LINE_WIDTH_GRANULARITY:uint = 0x0B23u;
+const GL_ALIASED_POINT_SIZE_RANGE:uint = 0x846Du;
+const GL_ALIASED_LINE_WIDTH_RANGE:uint = 0x846Eu;
+const GL_PACK_SKIP_IMAGES:uint = 0x806Bu;
+const GL_PACK_IMAGE_HEIGHT:uint = 0x806Cu;
+const GL_UNPACK_SKIP_IMAGES:uint = 0x806Du;
+const GL_UNPACK_IMAGE_HEIGHT:uint = 0x806Eu;
+const GL_TEXTURE_3D:uint = 0x806Fu;
+const GL_PROXY_TEXTURE_3D:uint = 0x8070u;
+const GL_TEXTURE_DEPTH:uint = 0x8071u;
+const GL_TEXTURE_WRAP_R:uint = 0x8072u;
+const GL_MAX_3D_TEXTURE_SIZE:uint = 0x8073u;
+const GL_TEXTURE_BINDING_3D:uint = 0x806Au;
+const GL_CONSTANT_COLOR:uint = 0x8001u;
+const GL_ONE_MINUS_CONSTANT_COLOR:uint = 0x8002u;
+const GL_CONSTANT_ALPHA:uint = 0x8003u;
+const GL_ONE_MINUS_CONSTANT_ALPHA:uint = 0x8004u;
+const GL_COLOR_TABLE:uint = 0x80D0u;
+const GL_POST_CONVOLUTION_COLOR_TABLE:uint = 0x80D1u;
+const GL_POST_COLOR_MATRIX_COLOR_TABLE:uint = 0x80D2u;
+const GL_PROXY_COLOR_TABLE:uint = 0x80D3u;
+const GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:uint = 0x80D4u;
+const GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:uint = 0x80D5u;
+const GL_COLOR_TABLE_SCALE:uint = 0x80D6u;
+const GL_COLOR_TABLE_BIAS:uint = 0x80D7u;
+const GL_COLOR_TABLE_FORMAT:uint = 0x80D8u;
+const GL_COLOR_TABLE_WIDTH:uint = 0x80D9u;
+const GL_COLOR_TABLE_RED_SIZE:uint = 0x80DAu;
+const GL_COLOR_TABLE_GREEN_SIZE:uint = 0x80DBu;
+const GL_COLOR_TABLE_BLUE_SIZE:uint = 0x80DCu;
+const GL_COLOR_TABLE_ALPHA_SIZE:uint = 0x80DDu;
+const GL_COLOR_TABLE_LUMINANCE_SIZE:uint = 0x80DEu;
+const GL_COLOR_TABLE_INTENSITY_SIZE:uint = 0x80DFu;
+const GL_CONVOLUTION_1D:uint = 0x8010u;
+const GL_CONVOLUTION_2D:uint = 0x8011u;
+const GL_SEPARABLE_2D:uint = 0x8012u;
+const GL_CONVOLUTION_BORDER_MODE:uint = 0x8013u;
+const GL_CONVOLUTION_FILTER_SCALE:uint = 0x8014u;
+const GL_CONVOLUTION_FILTER_BIAS:uint = 0x8015u;
+const GL_REDUCE:uint = 0x8016u;
+const GL_CONVOLUTION_FORMAT:uint = 0x8017u;
+const GL_CONVOLUTION_WIDTH:uint = 0x8018u;
+const GL_CONVOLUTION_HEIGHT:uint = 0x8019u;
+const GL_MAX_CONVOLUTION_WIDTH:uint = 0x801Au;
+const GL_MAX_CONVOLUTION_HEIGHT:uint = 0x801Bu;
+const GL_POST_CONVOLUTION_RED_SCALE:uint = 0x801Cu;
+const GL_POST_CONVOLUTION_GREEN_SCALE:uint = 0x801Du;
+const GL_POST_CONVOLUTION_BLUE_SCALE:uint = 0x801Eu;
+const GL_POST_CONVOLUTION_ALPHA_SCALE:uint = 0x801Fu;
+const GL_POST_CONVOLUTION_RED_BIAS:uint = 0x8020u;
+const GL_POST_CONVOLUTION_GREEN_BIAS:uint = 0x8021u;
+const GL_POST_CONVOLUTION_BLUE_BIAS:uint = 0x8022u;
+const GL_POST_CONVOLUTION_ALPHA_BIAS:uint = 0x8023u;
+const GL_CONSTANT_BORDER:uint = 0x8151u;
+const GL_REPLICATE_BORDER:uint = 0x8153u;
+const GL_CONVOLUTION_BORDER_COLOR:uint = 0x8154u;
+const GL_COLOR_MATRIX:uint = 0x80B1u;
+const GL_COLOR_MATRIX_STACK_DEPTH:uint = 0x80B2u;
+const GL_MAX_COLOR_MATRIX_STACK_DEPTH:uint = 0x80B3u;
+const GL_POST_COLOR_MATRIX_RED_SCALE:uint = 0x80B4u;
+const GL_POST_COLOR_MATRIX_GREEN_SCALE:uint = 0x80B5u;
+const GL_POST_COLOR_MATRIX_BLUE_SCALE:uint = 0x80B6u;
+const GL_POST_COLOR_MATRIX_ALPHA_SCALE:uint = 0x80B7u;
+const GL_POST_COLOR_MATRIX_RED_BIAS:uint = 0x80B8u;
+const GL_POST_COLOR_MATRIX_GREEN_BIAS:uint = 0x80B9u;
+const GL_POST_COLOR_MATRIX_BLUE_BIAS:uint = 0x80BAu;
+const GL_POST_COLOR_MATRIX_ALPHA_BIAS:uint = 0x80BBu;
+const GL_HISTOGRAM:uint = 0x8024u;
+const GL_PROXY_HISTOGRAM:uint = 0x8025u;
+const GL_HISTOGRAM_WIDTH:uint = 0x8026u;
+const GL_HISTOGRAM_FORMAT:uint = 0x8027u;
+const GL_HISTOGRAM_RED_SIZE:uint = 0x8028u;
+const GL_HISTOGRAM_GREEN_SIZE:uint = 0x8029u;
+const GL_HISTOGRAM_BLUE_SIZE:uint = 0x802Au;
+const GL_HISTOGRAM_ALPHA_SIZE:uint = 0x802Bu;
+const GL_HISTOGRAM_LUMINANCE_SIZE:uint = 0x802Cu;
+const GL_HISTOGRAM_SINK:uint = 0x802Du;
+const GL_MINMAX:uint = 0x802Eu;
+const GL_MINMAX_FORMAT:uint = 0x802Fu;
+const GL_MINMAX_SINK:uint = 0x8030u;
+const GL_TABLE_TOO_LARGE:uint = 0x8031u;
+const GL_BLEND_EQUATION:uint = 0x8009u;
+const GL_MIN:uint = 0x8007u;
+const GL_MAX:uint = 0x8008u;
+const GL_FUNC_ADD:uint = 0x8006u;
+const GL_FUNC_SUBTRACT:uint = 0x800Au;
+const GL_FUNC_REVERSE_SUBTRACT:uint = 0x800Bu;
+const GL_BLEND_COLOR:uint = 0x8005u;
+const GL_TEXTURE0:uint = 0x84C0u;
+const GL_TEXTURE1:uint = 0x84C1u;
+const GL_TEXTURE2:uint = 0x84C2u;
+const GL_TEXTURE3:uint = 0x84C3u;
+const GL_TEXTURE4:uint = 0x84C4u;
+const GL_TEXTURE5:uint = 0x84C5u;
+const GL_TEXTURE6:uint = 0x84C6u;
+const GL_TEXTURE7:uint = 0x84C7u;
+const GL_TEXTURE8:uint = 0x84C8u;
+const GL_TEXTURE9:uint = 0x84C9u;
+const GL_TEXTURE10:uint = 0x84CAu;
+const GL_TEXTURE11:uint = 0x84CBu;
+const GL_TEXTURE12:uint = 0x84CCu;
+const GL_TEXTURE13:uint = 0x84CDu;
+const GL_TEXTURE14:uint = 0x84CEu;
+const GL_TEXTURE15:uint = 0x84CFu;
+const GL_TEXTURE16:uint = 0x84D0u;
+const GL_TEXTURE17:uint = 0x84D1u;
+const GL_TEXTURE18:uint = 0x84D2u;
+const GL_TEXTURE19:uint = 0x84D3u;
+const GL_TEXTURE20:uint = 0x84D4u;
+const GL_TEXTURE21:uint = 0x84D5u;
+const GL_TEXTURE22:uint = 0x84D6u;
+const GL_TEXTURE23:uint = 0x84D7u;
+const GL_TEXTURE24:uint = 0x84D8u;
+const GL_TEXTURE25:uint = 0x84D9u;
+const GL_TEXTURE26:uint = 0x84DAu;
+const GL_TEXTURE27:uint = 0x84DBu;
+const GL_TEXTURE28:uint = 0x84DCu;
+const GL_TEXTURE29:uint = 0x84DDu;
+const GL_TEXTURE30:uint = 0x84DEu;
+const GL_TEXTURE31:uint = 0x84DFu;
+const GL_ACTIVE_TEXTURE:uint = 0x84E0u;
+const GL_CLIENT_ACTIVE_TEXTURE:uint = 0x84E1u;
+const GL_MAX_TEXTURE_UNITS:uint = 0x84E2u;
+const GL_NORMAL_MAP:uint = 0x8511u;
+const GL_REFLECTION_MAP:uint = 0x8512u;
+const GL_TEXTURE_CUBE_MAP:uint = 0x8513u;
+const GL_TEXTURE_BINDING_CUBE_MAP:uint = 0x8514u;
+const GL_TEXTURE_CUBE_MAP_POSITIVE_X:uint = 0x8515u;
+const GL_TEXTURE_CUBE_MAP_NEGATIVE_X:uint = 0x8516u;
+const GL_TEXTURE_CUBE_MAP_POSITIVE_Y:uint = 0x8517u;
+const GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:uint = 0x8518u;
+const GL_TEXTURE_CUBE_MAP_POSITIVE_Z:uint = 0x8519u;
+const GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:uint = 0x851Au;
+const GL_PROXY_TEXTURE_CUBE_MAP:uint = 0x851Bu;
+const GL_MAX_CUBE_MAP_TEXTURE_SIZE:uint = 0x851Cu;
+const GL_COMPRESSED_ALPHA:uint = 0x84E9u;
+const GL_COMPRESSED_LUMINANCE:uint = 0x84EAu;
+const GL_COMPRESSED_LUMINANCE_ALPHA:uint = 0x84EBu;
+const GL_COMPRESSED_INTENSITY:uint = 0x84ECu;
+const GL_COMPRESSED_RGB:uint = 0x84EDu;
+const GL_COMPRESSED_RGBA:uint = 0x84EEu;
+const GL_TEXTURE_COMPRESSION_HINT:uint = 0x84EFu;
+const GL_TEXTURE_COMPRESSED_IMAGE_SIZE:uint = 0x86A0u;
+const GL_TEXTURE_COMPRESSED:uint = 0x86A1u;
+const GL_NUM_COMPRESSED_TEXTURE_FORMATS:uint = 0x86A2u;
+const GL_COMPRESSED_TEXTURE_FORMATS:uint = 0x86A3u;
+const GL_MULTISAMPLE:uint = 0x809Du;
+const GL_SAMPLE_ALPHA_TO_COVERAGE:uint = 0x809Eu;
+const GL_SAMPLE_ALPHA_TO_ONE:uint = 0x809Fu;
+const GL_SAMPLE_COVERAGE:uint = 0x80A0u;
+const GL_SAMPLE_BUFFERS:uint = 0x80A8u;
+const GL_SAMPLES:uint = 0x80A9u;
+const GL_SAMPLE_COVERAGE_VALUE:uint = 0x80AAu;
+const GL_SAMPLE_COVERAGE_INVERT:uint = 0x80ABu;
+const GL_MULTISAMPLE_BIT:uint = 0x20000000u;
+const GL_TRANSPOSE_MODELVIEW_MATRIX:uint = 0x84E3u;
+const GL_TRANSPOSE_PROJECTION_MATRIX:uint = 0x84E4u;
+const GL_TRANSPOSE_TEXTURE_MATRIX:uint = 0x84E5u;
+const GL_TRANSPOSE_COLOR_MATRIX:uint = 0x84E6u;
+const GL_COMBINE:uint = 0x8570u;
+const GL_COMBINE_RGB:uint = 0x8571u;
+const GL_COMBINE_ALPHA:uint = 0x8572u;
+const GL_SOURCE0_RGB:uint = 0x8580u;
+const GL_SOURCE1_RGB:uint = 0x8581u;
+const GL_SOURCE2_RGB:uint = 0x8582u;
+const GL_SOURCE0_ALPHA:uint = 0x8588u;
+const GL_SOURCE1_ALPHA:uint = 0x8589u;
+const GL_SOURCE2_ALPHA:uint = 0x858Au;
+const GL_OPERAND0_RGB:uint = 0x8590u;
+const GL_OPERAND1_RGB:uint = 0x8591u;
+const GL_OPERAND2_RGB:uint = 0x8592u;
+const GL_OPERAND0_ALPHA:uint = 0x8598u;
+const GL_OPERAND1_ALPHA:uint = 0x8599u;
+const GL_OPERAND2_ALPHA:uint = 0x859Au;
+const GL_RGB_SCALE:uint = 0x8573u;
+const GL_ADD_SIGNED:uint = 0x8574u;
+const GL_INTERPOLATE:uint = 0x8575u;
+const GL_SUBTRACT:uint = 0x84E7u;
+const GL_CONSTANT:uint = 0x8576u;
+const GL_PRIMARY_COLOR:uint = 0x8577u;
+const GL_PREVIOUS:uint = 0x8578u;
+const GL_DOT3_RGB:uint = 0x86AEu;
+const GL_DOT3_RGBA:uint = 0x86AFu;
+const GL_CLAMP_TO_BORDER:uint = 0x812Du;
+const GL_ARB_multitexture:uint = 1u;
+const GL_TEXTURE0_ARB:uint = 0x84C0u;
+const GL_TEXTURE1_ARB:uint = 0x84C1u;
+const GL_TEXTURE2_ARB:uint = 0x84C2u;
+const GL_TEXTURE3_ARB:uint = 0x84C3u;
+const GL_TEXTURE4_ARB:uint = 0x84C4u;
+const GL_TEXTURE5_ARB:uint = 0x84C5u;
+const GL_TEXTURE6_ARB:uint = 0x84C6u;
+const GL_TEXTURE7_ARB:uint = 0x84C7u;
+const GL_TEXTURE8_ARB:uint = 0x84C8u;
+const GL_TEXTURE9_ARB:uint = 0x84C9u;
+const GL_TEXTURE10_ARB:uint = 0x84CAu;
+const GL_TEXTURE11_ARB:uint = 0x84CBu;
+const GL_TEXTURE12_ARB:uint = 0x84CCu;
+const GL_TEXTURE13_ARB:uint = 0x84CDu;
+const GL_TEXTURE14_ARB:uint = 0x84CEu;
+const GL_TEXTURE15_ARB:uint = 0x84CFu;
+const GL_TEXTURE16_ARB:uint = 0x84D0u;
+const GL_TEXTURE17_ARB:uint = 0x84D1u;
+const GL_TEXTURE18_ARB:uint = 0x84D2u;
+const GL_TEXTURE19_ARB:uint = 0x84D3u;
+const GL_TEXTURE20_ARB:uint = 0x84D4u;
+const GL_TEXTURE21_ARB:uint = 0x84D5u;
+const GL_TEXTURE22_ARB:uint = 0x84D6u;
+const GL_TEXTURE23_ARB:uint = 0x84D7u;
+const GL_TEXTURE24_ARB:uint = 0x84D8u;
+const GL_TEXTURE25_ARB:uint = 0x84D9u;
+const GL_TEXTURE26_ARB:uint = 0x84DAu;
+const GL_TEXTURE27_ARB:uint = 0x84DBu;
+const GL_TEXTURE28_ARB:uint = 0x84DCu;
+const GL_TEXTURE29_ARB:uint = 0x84DDu;
+const GL_TEXTURE30_ARB:uint = 0x84DEu;
+const GL_TEXTURE31_ARB:uint = 0x84DFu;
+const GL_ACTIVE_TEXTURE_ARB:uint = 0x84E0u;
+const GL_CLIENT_ACTIVE_TEXTURE_ARB:uint = 0x84E1u;
+const GL_MAX_TEXTURE_UNITS_ARB:uint = 0x84E2u;
+const GL_MESA_shader_debug:uint = 1u;
+const GL_DEBUG_OBJECT_MESA:uint = 0x8759u;
+const GL_DEBUG_PRINT_MESA:uint = 0x875Au;
+const GL_DEBUG_ASSERT_MESA:uint = 0x875Bu;
+const GL_MESA_packed_depth_stencil:uint = 1u;
+const GL_DEPTH_STENCIL_MESA:uint = 0x8750u;
+const GL_UNSIGNED_INT_24_8_MESA:uint = 0x8751u;
+const GL_UNSIGNED_INT_8_24_REV_MESA:uint = 0x8752u;
+const GL_UNSIGNED_SHORT_15_1_MESA:uint = 0x8753u;
+const GL_UNSIGNED_SHORT_1_15_REV_MESA:uint = 0x8754u;
+const GL_MESA_program_debug:uint = 1u;
+const GL_FRAGMENT_PROGRAM_POSITION_MESA:uint = 0x8bb0u;
+const GL_FRAGMENT_PROGRAM_CALLBACK_MESA:uint = 0x8bb1u;
+const GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA:uint = 0x8bb2u;
+const GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA:uint = 0x8bb3u;
+const GL_VERTEX_PROGRAM_POSITION_MESA:uint = 0x8bb4u;
+const GL_VERTEX_PROGRAM_CALLBACK_MESA:uint = 0x8bb5u;
+const GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA:uint = 0x8bb6u;
+const GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA:uint = 0x8bb7u;
+const GL_MESA_texture_array:uint = 1u;
+const GL_TEXTURE_1D_ARRAY_EXT:uint = 0x8C18u;
+const GL_PROXY_TEXTURE_1D_ARRAY_EXT:uint = 0x8C19u;
+const GL_TEXTURE_2D_ARRAY_EXT:uint = 0x8C1Au;
+const GL_PROXY_TEXTURE_2D_ARRAY_EXT:uint = 0x8C1Bu;
+const GL_TEXTURE_BINDING_1D_ARRAY_EXT:uint = 0x8C1Cu;
+const GL_TEXTURE_BINDING_2D_ARRAY_EXT:uint = 0x8C1Du;
+const GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:uint = 0x88FFu;
+const GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT:uint = 0x8CD4u;
+const GL_ATI_blend_equation_separate:uint = 1u;
+const GL_ALPHA_BLEND_EQUATION_ATI:uint = 0x883Du;
+const GL_OES_EGL_image:uint = 1u;
+native mod GL {
+    fn SDL_GL_SwapBuffers();
+    fn glClearColor(red: f32, green: f32, blue: f32, alpha: f32) -> ();
+    fn glClear(mask: u32) -> ();
+    fn glIndexMask(mask: u32) -> ();
+    fn glColorMask(red: u8, green: u8, blue: u8, alpha: u8) -> ();
+    fn glAlphaFunc(func: u32, ref: f32) -> ();
+    fn glBlendFunc(sfactor: u32, dfactor: u32) -> ();
+    fn glLogicOp(opcode: u32) -> ();
+    fn glCullFace(mode: u32) -> ();
+    fn glFrontFace(mode: u32) -> ();
+    fn glPointSize(size: f32) -> ();
+    fn glLineWidth(width: f32) -> ();
+    fn glLineStipple(factor: i32, pattern: u16) -> ();
+    fn glPolygonMode(face: u32, mode: u32) -> ();
+    fn glPolygonOffset(factor: f32, units: f32) -> ();
+    fn glPolygonStipple(mask: *u8) -> ();
+    fn glGetPolygonStipple(mask: *u8) -> ();
+    fn glEdgeFlag(flag: u8) -> ();
+    fn glEdgeFlagv(flag: *u8) -> ();
+    fn glScissor(x: i32, y: i32, width: i32, height: i32) -> ();
+    fn glClipPlane(plane: u32, equation: *f64) -> ();
+    fn glGetClipPlane(plane: u32, equation: *f64) -> ();
+    fn glDrawBuffer(mode: u32) -> ();
+    fn glReadBuffer(mode: u32) -> ();
+    fn glEnable(cap: u32) -> ();
+    fn glDisable(cap: u32) -> ();
+    fn glIsEnabled(cap: u32) -> u8;
+    fn glEnableClientState(cap: u32) -> ();
+    fn glGetDoublev(pname: u32, params: *f64) -> ();
+    fn glGetFloatv(pname: u32, params: *f32) -> ();
+    fn glGetIntegerv(pname: u32, params: *i32) -> ();
+    fn glPushAttrib(mask: u32) -> ();
+    fn glPopAttrib() -> ();
+    fn glPushClientAttrib(mask: u32) -> ();
+    fn glGetError() -> u32;
+    fn glFinish() -> ();
+    fn glFlush() -> ();
+    fn glHint(target: u32, mode: u32) -> ();
+    fn glClearDepth(depth: f64) -> ();
+    fn glDepthFunc(func: u32) -> ();
+    fn glDepthMask(flag: u8) -> ();
+    fn glDepthRange(near_val: f64, far_val: f64) -> ();
+    fn glClearAccum(red: f32, green: f32, blue: f32, alpha: f32) -> ();
+    fn glAccum(op: u32, value: f32) -> ();
+    fn glMatrixMode(mode: u32) -> ();
+    fn glOrtho(left: f64, right: f64, bottom: f64, top: f64, near_val: f64, far_val: f64) -> ();
+    fn glFrustum(left: f64, right: f64, bottom: f64, top: f64, near_val: f64, far_val: f64) -> ();
+    fn glViewport(x: i32, y: i32, width: i32, height: i32) -> ();
+    fn glPushMatrix() -> ();
+    fn glPopMatrix() -> ();
+    fn glLoadIdentity() -> ();
+    fn glLoadMatrixd(m: *f64) -> ();
+    fn glLoadMatrixf(m: *f32) -> ();
+    fn glMultMatrixd(m: *f64) -> ();
+    fn glMultMatrixf(m: *f32) -> ();
+    fn glRotated(angle: f64, x: f64, y: f64, z: f64) -> ();
+    fn glRotatef(angle: f32, x: f32, y: f32, z: f32) -> ();
+    fn glScaled(x: f64, y: f64, z: f64) -> ();
+    fn glScalef(x: f32, y: f32, z: f32) -> ();
+    fn glTranslated(x: f64, y: f64, z: f64) -> ();
+    fn glTranslatef(x: f32, y: f32, z: f32) -> ();
+    fn glIsList(list: u32) -> u8;
+    fn glDeleteLists(list: u32, range: i32) -> ();
+    fn glGenLists(range: i32) -> u32;
+    fn glNewList(list: u32, mode: u32) -> ();
+    fn glEndList() -> ();
+    fn glCallList(list: u32) -> ();
+    fn glCallLists(n: i32, type_: u32, lists: *()) -> ();
+    fn glListBase(base: u32) -> ();
+    fn glBegin(mode: u32) -> ();
+    fn glEnd() -> ();
+    fn glVertex2d(x: f64, y: f64) -> ();
+    fn glVertex2f(x: f32, y: f32) -> ();
+    fn glVertex2i(x: i32, y: i32) -> ();
+    fn glVertex2s(x: i16, y: i16) -> ();
+    fn glVertex3d(x: f64, y: f64, z: f64) -> ();
+    fn glVertex3f(x: f32, y: f32, z: f32) -> ();
+    fn glVertex3i(x: i32, y: i32, z: i32) -> ();
+    fn glVertex3s(x: i16, y: i16, z: i16) -> ();
+    fn glVertex4d(x: f64, y: f64, z: f64, w: f64) -> ();
+    fn glVertex4f(x: f32, y: f32, z: f32, w: f32) -> ();
+    fn glVertex4i(x: i32, y: i32, z: i32, w: i32) -> ();
+    fn glVertex4s(x: i16, y: i16, z: i16, w: i16) -> ();
+    fn glVertex2dv(v: *f64) -> ();
+    fn glVertex2fv(v: *f32) -> ();
+    fn glVertex2iv(v: *i32) -> ();
+    fn glVertex2sv(v: *i16) -> ();
+    fn glVertex3dv(v: *f64) -> ();
+    fn glVertex3fv(v: *f32) -> ();
+    fn glVertex3iv(v: *i32) -> ();
+    fn glVertex3sv(v: *i16) -> ();
+    fn glVertex4dv(v: *f64) -> ();
+    fn glVertex4fv(v: *f32) -> ();
+    fn glVertex4iv(v: *i32) -> ();
+    fn glVertex4sv(v: *i16) -> ();
+    fn glNormal3b(nx: i8, ny: i8, nz: i8) -> ();
+    fn glNormal3d(nx: f64, ny: f64, nz: f64) -> ();
+    fn glNormal3f(nx: f32, ny: f32, nz: f32) -> ();
+    fn glNormal3i(nx: i32, ny: i32, nz: i32) -> ();
+    fn glNormal3s(nx: i16, ny: i16, nz: i16) -> ();
+    fn glNormal3bv(v: *i8) -> ();
+    fn glNormal3dv(v: *f64) -> ();
+    fn glNormal3fv(v: *f32) -> ();
+    fn glNormal3iv(v: *i32) -> ();
+    fn glNormal3sv(v: *i16) -> ();
+    fn glIndexd(c: f64) -> ();
+    fn glIndexf(c: f32) -> ();
+    fn glIndexi(c: i32) -> ();
+    fn glIndexs(c: i16) -> ();
+    fn glIndexub(c: u8) -> ();
+    fn glIndexfv(c: *f32) -> ();
+    fn glIndexiv(c: *i32) -> ();
+    fn glIndexsv(c: *i16) -> ();
+    fn glIndexubv(c: *u8) -> ();
+    fn glColor3d(red: f64, green: f64, blue: f64) -> ();
+    fn glColor3f(red: f32, green: f32, blue: f32) -> ();
+    fn glColor3i(red: i32, green: i32, blue: i32) -> ();
+    fn glColor3s(red: i16, green: i16, blue: i16) -> ();
+    fn glColor3ub(red: u8, green: u8, blue: u8) -> ();
+    fn glColor3ui(red: u32, green: u32, blue: u32) -> ();
+    fn glColor3us(red: u16, green: u16, blue: u16) -> ();
+    fn glColor4b(red: i8, green: i8, blue: i8, alpha: i8) -> ();
+    fn glColor4d(red: f64, green: f64, blue: f64, alpha: f64) -> ();
+    fn glColor4f(red: f32, green: f32, blue: f32, alpha: f32) -> ();
+    fn glColor4i(red: i32, green: i32, blue: i32, alpha: i32) -> ();
+    fn glColor4s(red: i16, green: i16, blue: i16, alpha: i16) -> ();
+    fn glColor4ub(red: u8, green: u8, blue: u8, alpha: u8) -> ();
+    fn glColor4ui(red: u32, green: u32, blue: u32, alpha: u32) -> ();
+    fn glColor4us(red: u16, green: u16, blue: u16, alpha: u16) -> ();
+    fn glColor3bv(v: *i8) -> ();
+    fn glColor3dv(v: *f64) -> ();
+    fn glColor3fv(v: *f32) -> ();
+    fn glColor3iv(v: *i32) -> ();
+    fn glColor3sv(v: *i16) -> ();
+    fn glColor3ubv(v: *u8) -> ();
+    fn glColor3uiv(v: *u32) -> ();
+    fn glColor3usv(v: *u16) -> ();
+    fn glColor4bv(v: *i8) -> ();
+    fn glColor4dv(v: *f64) -> ();
+    fn glColor4fv(v: *f32) -> ();
+    fn glColor4iv(v: *i32) -> ();
+    fn glColor4sv(v: *i16) -> ();
+    fn glColor4ubv(v: *u8) -> ();
+    fn glColor4uiv(v: *u32) -> ();
+    fn glColor4usv(v: *u16) -> ();
+    fn glTexCoord1d(s: f64) -> ();
+    fn glTexCoord1f(s: f32) -> ();
+    fn glTexCoord1i(s: i32) -> ();
+    fn glTexCoord1s(s: i16) -> ();
+    fn glTexCoord2d(s: f64, t: f64) -> ();
+    fn glTexCoord2f(s: f32, t: f32) -> ();
+    fn glTexCoord2i(s: i32, t: i32) -> ();
+    fn glTexCoord2s(s: i16, t: i16) -> ();
+    fn glTexCoord3d(s: f64, t: f64, r: f64) -> ();
+    fn glTexCoord3f(s: f32, t: f32, r: f32) -> ();
+    fn glTexCoord3i(s: i32, t: i32, r: i32) -> ();
+    fn glTexCoord3s(s: i16, t: i16, r: i16) -> ();
+    fn glTexCoord4d(s: f64, t: f64, r: f64, q: f64) -> ();
+    fn glTexCoord4f(s: f32, t: f32, r: f32, q: f32) -> ();
+    fn glTexCoord4i(s: i32, t: i32, r: i32, q: i32) -> ();
+    fn glTexCoord4s(s: i16, t: i16, r: i16, q: i16) -> ();
+    fn glTexCoord1dv(v: *f64) -> ();
+    fn glTexCoord1fv(v: *f32) -> ();
+    fn glTexCoord1iv(v: *i32) -> ();
+    fn glTexCoord1sv(v: *i16) -> ();
+    fn glTexCoord2dv(v: *f64) -> ();
+    fn glTexCoord2fv(v: *f32) -> ();
+    fn glTexCoord2iv(v: *i32) -> ();
+    fn glTexCoord2sv(v: *i16) -> ();
+    fn glTexCoord3dv(v: *f64) -> ();
+    fn glTexCoord3fv(v: *f32) -> ();
+    fn glTexCoord3iv(v: *i32) -> ();
+    fn glTexCoord3sv(v: *i16) -> ();
+    fn glTexCoord4dv(v: *f64) -> ();
+    fn glTexCoord4fv(v: *f32) -> ();
+    fn glTexCoord4iv(v: *i32) -> ();
+    fn glTexCoord4sv(v: *i16) -> ();
+    fn glRasterPos2d(x: f64, y: f64) -> ();
+    fn glRasterPos2f(x: f32, y: f32) -> ();
+    fn glRasterPos2i(x: i32, y: i32) -> ();
+    fn glRasterPos2s(x: i16, y: i16) -> ();
+    fn glRasterPos3d(x: f64, y: f64, z: f64) -> ();
+    fn glRasterPos3f(x: f32, y: f32, z: f32) -> ();
+    fn glRasterPos3i(x: i32, y: i32, z: i32) -> ();
+    fn glRasterPos3s(x: i16, y: i16, z: i16) -> ();
+    fn glRasterPos4d(x: f64, y: f64, z: f64, w: f64) -> ();
+    fn glRasterPos4f(x: f32, y: f32, z: f32, w: f32) -> ();
+    fn glRasterPos4i(x: i32, y: i32, z: i32, w: i32) -> ();
+    fn glRasterPos4s(x: i16, y: i16, z: i16, w: i16) -> ();
+    fn glRasterPos2dv(v: *f64) -> ();
+    fn glRasterPos2fv(v: *f32) -> ();
+    fn glRasterPos2iv(v: *i32) -> ();
+    fn glRasterPos2sv(v: *i16) -> ();
+    fn glRasterPos3dv(v: *f64) -> ();
+    fn glRasterPos3fv(v: *f32) -> ();
+    fn glRasterPos3iv(v: *i32) -> ();
+    fn glRasterPos3sv(v: *i16) -> ();
+    fn glRasterPos4dv(v: *f64) -> ();
+    fn glRasterPos4fv(v: *f32) -> ();
+    fn glRasterPos4iv(v: *i32) -> ();
+    fn glRasterPos4sv(v: *i16) -> ();
+    fn glRectd(x1: f64, y1: f64, x2: f64, y2: f64) -> ();
+    fn glRectf(x1: f32, y1: f32, x2: f32, y2: f32) -> ();
+    fn glRecti(x1: i32, y1: i32, x2: i32, y2: i32) -> ();
+    fn glRects(x1: i16, y1: i16, x2: i16, y2: i16) -> ();
+    fn glRectdv(v1: *f64, v2: *f64) -> ();
+    fn glRectfv(v1: *f32, v2: *f32) -> ();
+    fn glRectiv(v1: *i32, v2: *i32) -> ();
+    fn glRectsv(v1: *i16, v2: *i16) -> ();
+    fn glVertexPointer(size: i32, type_: u32, stride: i32, ptr: *()) -> ();
+    fn glNormalPointer(type_: u32, stride: i32, ptr: *()) -> ();
+    fn glColorPointer(size: i32, type_: u32, stride: i32, ptr: *()) -> ();
+    fn glIndexPointer(type_: u32, stride: i32, ptr: *()) -> ();
+    fn glTexCoordPointer(size: i32, type_: u32, stride: i32, ptr: *()) -> ();
+    fn glEdgeFlagPointer(stride: i32, ptr: *()) -> ();
+    fn glGetPointerv(pname: u32, params: *()) -> ();
+    fn glArrayElement(i: i32) -> ();
+    fn glDrawArrays(mode: u32, first: i32, count: i32) -> ();
+    fn glDrawElements(mode: u32, count: i32, type_: u32, indices: *()) -> ();
+    fn glInterleavedArrays(format: u32, stride: i32, pointer: *()) -> ();
+    fn glShadeModel(mode: u32) -> ();
+    fn glLightf(light: u32, pname: u32, param: f32) -> ();
+    fn glLighti(light: u32, pname: u32, param: i32) -> ();
+    fn glLightfv(light: u32, pname: u32, params: *f32) -> ();
+    fn glLightiv(light: u32, pname: u32, params: *i32) -> ();
+    fn glGetLightfv(light: u32, pname: u32, params: *f32) -> ();
+    fn glGetLightiv(light: u32, pname: u32, params: *i32) -> ();
+    fn glLightModelf(pname: u32, param: f32) -> ();
+    fn glLightModeli(pname: u32, param: i32) -> ();
+    fn glLightModelfv(pname: u32, params: *f32) -> ();
+    fn glLightModeliv(pname: u32, params: *i32) -> ();
+    fn glMaterialf(face: u32, pname: u32, param: f32) -> ();
+    fn glMateriali(face: u32, pname: u32, param: i32) -> ();
+    fn glMaterialfv(face: u32, pname: u32, params: *f32) -> ();
+    fn glMaterialiv(face: u32, pname: u32, params: *i32) -> ();
+    fn glGetMaterialfv(face: u32, pname: u32, params: *f32) -> ();
+    fn glGetMaterialiv(face: u32, pname: u32, params: *i32) -> ();
+    fn glColorMaterial(face: u32, mode: u32) -> ();
+    fn glPixelZoom(xfactor: f32, yfactor: f32) -> ();
+    fn glPixelStoref(pname: u32, param: f32) -> ();
+    fn glPixelStorei(pname: u32, param: i32) -> ();
+    fn glPixelTransferf(pname: u32, param: f32) -> ();
+    fn glPixelTransferi(pname: u32, param: i32) -> ();
+    fn glPixelMapfv(map: u32, mapsize: i32, values: *f32) -> ();
+    fn glPixelMapuiv(map: u32, mapsize: i32, values: *u32) -> ();
+    fn glPixelMapusv(map: u32, mapsize: i32, values: *u16) -> ();
+    fn glGetPixelMapfv(map: u32, values: *f32) -> ();
+    fn glGetPixelMapuiv(map: u32, values: *u32) -> ();
+    fn glGetPixelMapusv(map: u32, values: *u16) -> ();
+    fn glBitmap(width: i32, height: i32, xorig: f32, yorig: f32, xmove: f32, ymove: f32, bitmap: *u8) -> ();
+    fn glReadPixels(x: i32, y: i32, width: i32, height: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glDrawPixels(width: i32, height: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glCopyPixels(x: i32, y: i32, width: i32, height: i32, type_: u32) -> ();
+    fn glStencilFunc(func: u32, ref: i32, mask: u32) -> ();
+    fn glStencilMask(mask: u32) -> ();
+    fn glStencilOp(fail_: u32, zfail: u32, zpass: u32) -> ();
+    fn glClearStencil(s: i32) -> ();
+    fn glTexGend(coord: u32, pname: u32, param: f64) -> ();
+    fn glTexGenf(coord: u32, pname: u32, param: f32) -> ();
+    fn glTexGeni(coord: u32, pname: u32, param: i32) -> ();
+    fn glTexGendv(coord: u32, pname: u32, params: *f64) -> ();
+    fn glTexGenfv(coord: u32, pname: u32, params: *f32) -> ();
+    fn glTexGeniv(coord: u32, pname: u32, params: *i32) -> ();
+    fn glGetTexGendv(coord: u32, pname: u32, params: *f64) -> ();
+    fn glGetTexGenfv(coord: u32, pname: u32, params: *f32) -> ();
+    fn glGetTexGeniv(coord: u32, pname: u32, params: *i32) -> ();
+    fn glTexEnvf(target: u32, pname: u32, param: f32) -> ();
+    fn glTexEnvi(target: u32, pname: u32, param: i32) -> ();
+    fn glTexEnvfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glTexEnviv(target: u32, pname: u32, params: *i32) -> ();
+    fn glGetTexEnvfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glGetTexEnviv(target: u32, pname: u32, params: *i32) -> ();
+    fn glTexParameterf(target: u32, pname: u32, param: f32) -> ();
+    fn glTexParameteri(target: u32, pname: u32, param: i32) -> ();
+    fn glTexParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glTexParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glGetTexParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glGetTexParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glGetTexLevelParameterfv(target: u32, level: i32, pname: u32, params: *f32) -> ();
+    fn glGetTexLevelParameteriv(target: u32, level: i32, pname: u32, params: *i32) -> ();
+    fn glTexImage1D(target: u32, level: i32, internalFormat: i32, width: i32, border: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glTexImage2D(target: u32, level: i32, internalFormat: i32, width: i32, height: i32, border: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glGetTexImage(target: u32, level: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glGenTextures(n: i32, textures: *u32) -> ();
+    fn glDeleteTextures(n: i32, textures: *u32) -> ();
+    fn glBindTexture(target: u32, texture: u32) -> ();
+    fn glPrioritizeTextures(n: i32, textures: *u32, priorities: *f32) -> ();
+    fn glAreTexturesResident(n: i32, textures: *u32, residences: *u8) -> u8;
+    fn glIsTexture(texture: u32) -> u8;
+    fn glTexSubImage1D(target: u32, level: i32, xoffset: i32, width: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glTexSubImage2D(target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glCopyTexImage1D(target: u32, level: i32, internalformat: u32, x: i32, y: i32, width: i32, border: i32) -> ();
+    fn glCopyTexImage2D(target: u32, level: i32, internalformat: u32, x: i32, y: i32, width: i32, height: i32, border: i32) -> ();
+    fn glCopyTexSubImage1D(target: u32, level: i32, xoffset: i32, x: i32, y: i32, width: i32) -> ();
+    fn glCopyTexSubImage2D(target: u32, level: i32, xoffset: i32, yoffset: i32, x: i32, y: i32, width: i32, height: i32) -> ();
+    fn glMap1d(target: u32, u1: f64, u2: f64, stride: i32, order: i32, points: *f64) -> ();
+    fn glMap1f(target: u32, u1: f32, u2: f32, stride: i32, order: i32, points: *f32) -> ();
+    fn glMap2d(target: u32, u1: f64, u2: f64, ustride: i32, uorder: i32, v1: f64, v2: f64, vstride: i32, vorder: i32, points: *f64) -> ();
+    fn glMap2f(target: u32, u1: f32, u2: f32, ustride: i32, uorder: i32, v1: f32, v2: f32, vstride: i32, vorder: i32, points: *f32) -> ();
+    fn glGetMapdv(target: u32, query: u32, v: *f64) -> ();
+    fn glGetMapfv(target: u32, query: u32, v: *f32) -> ();
+    fn glGetMapiv(target: u32, query: u32, v: *i32) -> ();
+    fn glEvalCoord1d(u: f64) -> ();
+    fn glEvalCoord1f(u: f32) -> ();
+    fn glEvalCoord1dv(u: *f64) -> ();
+    fn glEvalCoord1fv(u: *f32) -> ();
+    fn glEvalCoord2d(u: f64, v: f64) -> ();
+    fn glEvalCoord2f(u: f32, v: f32) -> ();
+    fn glEvalCoord2dv(u: *f64) -> ();
+    fn glEvalCoord2fv(u: *f32) -> ();
+    fn glMapGrid1d(un: i32, u1: f64, u2: f64) -> ();
+    fn glMapGrid1f(un: i32, u1: f32, u2: f32) -> ();
+    fn glMapGrid2d(un: i32, u1: f64, u2: f64, vn: i32, v1: f64, v2: f64) -> ();
+    fn glMapGrid2f(un: i32, u1: f32, u2: f32, vn: i32, v1: f32, v2: f32) -> ();
+    fn glEvalPoint1(i: i32) -> ();
+    fn glEvalPoint2(i: i32, j: i32) -> ();
+    fn glEvalMesh1(mode: u32, i1: i32, i2: i32) -> ();
+    fn glEvalMesh2(mode: u32, i1: i32, i2: i32, j1: i32, j2: i32) -> ();
+    fn glFogf(pname: u32, param: f32) -> ();
+    fn glFogi(pname: u32, param: i32) -> ();
+    fn glFogfv(pname: u32, params: *f32) -> ();
+    fn glFogiv(pname: u32, params: *i32) -> ();
+    fn glFeedbackBuffer(size: i32, type_: u32, buffer: *f32) -> ();
+    fn glPassThrough(token: f32) -> ();
+    fn glSelectBuffer(size: i32, buffer: *u32) -> ();
+    fn glInitNames() -> ();
+    fn glLoadName(name: u32) -> ();
+    fn glPushName(name: u32) -> ();
+    fn glPopName() -> ();
+    fn glDrawRangeElements(mode: u32, start: u32, end: u32, count: i32, type_: u32, indices: *()) -> ();
+    fn glTexImage3D(target: u32, level: i32, internalFormat: i32, width: i32, height: i32, depth: i32, border: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glTexSubImage3D(target: u32, level: i32, xoffset: i32, yoffset: i32, zoffset: i32, width: i32, height: i32, depth: i32, format: u32, type_: u32, pixels: *()) -> ();
+    fn glCopyTexSubImage3D(target: u32, level: i32, xoffset: i32, yoffset: i32, zoffset: i32, x: i32, y: i32, width: i32, height: i32) -> ();
+    fn glColorTable(target: u32, internalformat: u32, width: i32, format: u32, type_: u32, table: *()) -> ();
+    fn glColorSubTable(target: u32, start: i32, count: i32, format: u32, type_: u32, data: *()) -> ();
+    fn glColorTableParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glColorTableParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glCopyColorSubTable(target: u32, start: i32, x: i32, y: i32, width: i32) -> ();
+    fn glCopyColorTable(target: u32, internalformat: u32, x: i32, y: i32, width: i32) -> ();
+    fn glGetColorTable(target: u32, format: u32, type_: u32, table: *()) -> ();
+    fn glGetColorTableParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glGetColorTableParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glBlendEquation(mode: u32) -> ();
+    fn glBlendColor(red: f32, green: f32, blue: f32, alpha: f32) -> ();
+    fn glHistogram(target: u32, width: i32, internalformat: u32, sink: u8) -> ();
+    fn glResetHistogram(target: u32) -> ();
+    fn glGetHistogram(target: u32, reset: u8, format: u32, type_: u32, values: *()) -> ();
+    fn glGetHistogramParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glGetHistogramParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glMinmax(target: u32, internalformat: u32, sink: u8) -> ();
+    fn glResetMinmax(target: u32) -> ();
+    fn glGetMinmax(target: u32, reset: u8, format: u32, types: u32, values: *()) -> ();
+    fn glGetMinmaxParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glGetMinmaxParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glConvolutionFilter1D(target: u32, internalformat: u32, width: i32, format: u32, type_: u32, image: *()) -> ();
+    fn glConvolutionFilter2D(target: u32, internalformat: u32, width: i32, height: i32, format: u32, type_: u32, image: *()) -> ();
+    fn glConvolutionParameterf(target: u32, pname: u32, params: f32) -> ();
+    fn glConvolutionParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glConvolutionParameteri(target: u32, pname: u32, params: i32) -> ();
+    fn glConvolutionParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glCopyConvolutionFilter1D(target: u32, internalformat: u32, x: i32, y: i32, width: i32) -> ();
+    fn glCopyConvolutionFilter2D(target: u32, internalformat: u32, x: i32, y: i32, width: i32, height: i32) -> ();
+    fn glGetConvolutionFilter(target: u32, format: u32, type_: u32, image: *()) -> ();
+    fn glGetConvolutionParameterfv(target: u32, pname: u32, params: *f32) -> ();
+    fn glGetConvolutionParameteriv(target: u32, pname: u32, params: *i32) -> ();
+    fn glSeparableFilter2D(target: u32, internalformat: u32, width: i32, height: i32, format: u32, type_: u32, row: *(), column: *()) -> ();
+    fn glGetSeparableFilter(target: u32, format: u32, type_: u32, row: *(), column: *(), span: *()) -> ();
+    fn glActiveTexture(texture: u32) -> ();
+    fn glClientActiveTexture(texture: u32) -> ();
+    fn glCompressedTexImage1D(target: u32, level: i32, internalformat: u32, width: i32, border: i32, imageSize: i32, data: *()) -> ();
+    fn glCompressedTexImage2D(target: u32, level: i32, internalformat: u32, width: i32, height: i32, border: i32, imageSize: i32, data: *()) -> ();
+    fn glCompressedTexImage3D(target: u32, level: i32, internalformat: u32, width: i32, height: i32, depth: i32, border: i32, imageSize: i32, data: *()) -> ();
+    fn glCompressedTexSubImage1D(target: u32, level: i32, xoffset: i32, width: i32, format: u32, imageSize: i32, data: *()) -> ();
+    fn glCompressedTexSubImage2D(target: u32, level: i32, xoffset: i32, yoffset: i32, width: i32, height: i32, format: u32, imageSize: i32, data: *()) -> ();
+    fn glCompressedTexSubImage3D(target: u32, level: i32, xoffset: i32, yoffset: i32, zoffset: i32, width: i32, height: i32, depth: i32, format: u32, imageSize: i32, data: *()) -> ();
+    fn glGetCompressedTexImage(target: u32, lod: i32, img: *()) -> ();
+    fn glMultiTexCoord1d(target: u32, s: f64) -> ();
+    fn glMultiTexCoord1dv(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord1f(target: u32, s: f32) -> ();
+    fn glMultiTexCoord1fv(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord1i(target: u32, s: i32) -> ();
+    fn glMultiTexCoord1iv(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord1s(target: u32, s: i16) -> ();
+    fn glMultiTexCoord1sv(target: u32, v: *i16) -> ();
+    fn glMultiTexCoord2d(target: u32, s: f64, t: f64) -> ();
+    fn glMultiTexCoord2dv(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord2f(target: u32, s: f32, t: f32) -> ();
+    fn glMultiTexCoord2fv(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord2i(target: u32, s: i32, t: i32) -> ();
+    fn glMultiTexCoord2iv(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord2s(target: u32, s: i16, t: i16) -> ();
+    fn glMultiTexCoord2sv(target: u32, v: *i16) -> ();
+    fn glMultiTexCoord3d(target: u32, s: f64, t: f64, r: f64) -> ();
+    fn glMultiTexCoord3dv(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord3f(target: u32, s: f32, t: f32, r: f32) -> ();
+    fn glMultiTexCoord3fv(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord3i(target: u32, s: i32, t: i32, r: i32) -> ();
+    fn glMultiTexCoord3iv(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord3s(target: u32, s: i16, t: i16, r: i16) -> ();
+    fn glMultiTexCoord3sv(target: u32, v: *i16) -> ();
+    fn glMultiTexCoord4d(target: u32, s: f64, t: f64, r: f64, q: f64) -> ();
+    fn glMultiTexCoord4dv(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord4f(target: u32, s: f32, t: f32, r: f32, q: f32) -> ();
+    fn glMultiTexCoord4fv(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord4i(target: u32, s: i32, t: i32, r: i32, q: i32) -> ();
+    fn glMultiTexCoord4iv(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord4s(target: u32, s: i16, t: i16, r: i16, q: i16) -> ();
+    fn glMultiTexCoord4sv(target: u32, v: *i16) -> ();
+    fn glLoadTransposeMatrixd(m: f64) -> ();
+    fn glLoadTransposeMatrixf(m: f32) -> ();
+    fn glMultTransposeMatrixd(m: f64) -> ();
+    fn glMultTransposeMatrixf(m: f32) -> ();
+    fn glSampleCoverage(value: f32, invert: u8) -> ();
+    fn glActiveTextureARB(texture: u32) -> ();
+    fn glClientActiveTextureARB(texture: u32) -> ();
+    fn glMultiTexCoord1dARB(target: u32, s: f64) -> ();
+    fn glMultiTexCoord1dvARB(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord1fARB(target: u32, s: f32) -> ();
+    fn glMultiTexCoord1fvARB(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord1iARB(target: u32, s: i32) -> ();
+    fn glMultiTexCoord1ivARB(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord1sARB(target: u32, s: i16) -> ();
+    fn glMultiTexCoord1svARB(target: u32, v: *i16) -> ();
+    fn glMultiTexCoord2dARB(target: u32, s: f64, t: f64) -> ();
+    fn glMultiTexCoord2dvARB(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord2fARB(target: u32, s: f32, t: f32) -> ();
+    fn glMultiTexCoord2fvARB(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord2iARB(target: u32, s: i32, t: i32) -> ();
+    fn glMultiTexCoord2ivARB(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord2sARB(target: u32, s: i16, t: i16) -> ();
+    fn glMultiTexCoord2svARB(target: u32, v: *i16) -> ();
+    fn glMultiTexCoord3dARB(target: u32, s: f64, t: f64, r: f64) -> ();
+    fn glMultiTexCoord3dvARB(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord3fARB(target: u32, s: f32, t: f32, r: f32) -> ();
+    fn glMultiTexCoord3fvARB(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord3iARB(target: u32, s: i32, t: i32, r: i32) -> ();
+    fn glMultiTexCoord3ivARB(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord3sARB(target: u32, s: i16, t: i16, r: i16) -> ();
+    fn glMultiTexCoord3svARB(target: u32, v: *i16) -> ();
+    fn glMultiTexCoord4dARB(target: u32, s: f64, t: f64, r: f64, q: f64) -> ();
+    fn glMultiTexCoord4dvARB(target: u32, v: *f64) -> ();
+    fn glMultiTexCoord4fARB(target: u32, s: f32, t: f32, r: f32, q: f32) -> ();
+    fn glMultiTexCoord4fvARB(target: u32, v: *f32) -> ();
+    fn glMultiTexCoord4iARB(target: u32, s: i32, t: i32, r: i32, q: i32) -> ();
+    fn glMultiTexCoord4ivARB(target: u32, v: *i32) -> ();
+    fn glMultiTexCoord4sARB(target: u32, s: i16, t: i16, r: i16, q: i16) -> ();
+    fn glMultiTexCoord4svARB(target: u32, v: *i16) -> ();
+}
+fn glClearColor(red: float, green: float, blue: float, alpha: float) -> () unsafe {
+    ret GL::glClearColor(red as f32, green as f32, blue as f32, alpha as f32);
+}
+fn glClear(mask: uint) -> () unsafe {
+    ret GL::glClear(mask as u32);
+}
+fn glIndexMask(mask: uint) -> () unsafe {
+    ret GL::glIndexMask(mask as u32);
+}
+fn glColorMask(red: uint, green: uint, blue: uint, alpha: uint) -> () unsafe {
+    ret GL::glColorMask(red as u8, green as u8, blue as u8, alpha as u8);
+}
+fn glAlphaFunc(func: uint, ref: float) -> () unsafe {
+    ret GL::glAlphaFunc(func as u32, ref as f32);
+}
+fn glBlendFunc(sfactor: uint, dfactor: uint) -> () unsafe {
+    ret GL::glBlendFunc(sfactor as u32, dfactor as u32);
+}
+fn glLogicOp(opcode: uint) -> () unsafe {
+    ret GL::glLogicOp(opcode as u32);
+}
+fn glCullFace(mode: uint) -> () unsafe {
+    ret GL::glCullFace(mode as u32);
+}
+fn glFrontFace(mode: uint) -> () unsafe {
+    ret GL::glFrontFace(mode as u32);
+}
+fn glPointSize(size: float) -> () unsafe {
+    ret GL::glPointSize(size as f32);
+}
+fn glLineWidth(width: float) -> () unsafe {
+    ret GL::glLineWidth(width as f32);
+}
+fn glLineStipple(factor: int, pattern: uint) -> () unsafe {
+    ret GL::glLineStipple(factor as i32, pattern as u16);
+}
+fn glPolygonMode(face: uint, mode: uint) -> () unsafe {
+    ret GL::glPolygonMode(face as u32, mode as u32);
+}
+fn glPolygonOffset(factor: float, units: float) -> () unsafe {
+    ret GL::glPolygonOffset(factor as f32, units as f32);
+}
+fn glPolygonStipple(mask: *uint) -> () unsafe {
+    ret GL::glPolygonStipple(mask as *u8);
+}
+fn glGetPolygonStipple(mask: *uint) -> () unsafe {
+    ret GL::glGetPolygonStipple(mask as *u8);
+}
+fn glEdgeFlag(flag: uint) -> () unsafe {
+    ret GL::glEdgeFlag(flag as u8);
+}
+fn glEdgeFlagv(flag: *uint) -> () unsafe {
+    ret GL::glEdgeFlagv(flag as *u8);
+}
+fn glScissor(x: int, y: int, width: int, height: int) -> () unsafe {
+    ret GL::glScissor(x as i32, y as i32, width as i32, height as i32);
+}
+fn glClipPlane(plane: uint, equation: *float) -> () unsafe {
+    ret GL::glClipPlane(plane as u32, equation as *f64);
+}
+fn glGetClipPlane(plane: uint, equation: *float) -> () unsafe {
+    ret GL::glGetClipPlane(plane as u32, equation as *f64);
+}
+fn glDrawBuffer(mode: uint) -> () unsafe {
+    ret GL::glDrawBuffer(mode as u32);
+}
+fn glReadBuffer(mode: uint) -> () unsafe {
+    ret GL::glReadBuffer(mode as u32);
+}
+fn glEnable(cap: uint) -> () unsafe {
+    ret GL::glEnable(cap as u32);
+}
+fn glDisable(cap: uint) -> () unsafe {
+    ret GL::glDisable(cap as u32);
+}
+fn glIsEnabled(cap: uint) -> u8 unsafe {
+    ret GL::glIsEnabled(cap as u32);
+}
+fn glEnableClientState(cap: uint) -> () unsafe {
+    ret GL::glEnableClientState(cap as u32);
+}
+fn glGetDoublev(pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetDoublev(pname as u32, params as *f64);
+}
+fn glGetFloatv(pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetFloatv(pname as u32, params as *f32);
+}
+fn glGetIntegerv(pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetIntegerv(pname as u32, params as *i32);
+}
+fn glPushAttrib(mask: uint) -> () unsafe {
+    ret GL::glPushAttrib(mask as u32);
+}
+fn glPopAttrib() -> () unsafe {
+    ret GL::glPopAttrib();
+}
+fn glPushClientAttrib(mask: uint) -> () unsafe {
+    ret GL::glPushClientAttrib(mask as u32);
+}
+fn glGetError() -> u32 unsafe {
+    ret GL::glGetError();
+}
+fn glFinish() -> () unsafe {
+    ret GL::glFinish();
+}
+fn glFlush() -> () unsafe {
+    ret GL::glFlush();
+}
+fn glHint(target: uint, mode: uint) -> () unsafe {
+    ret GL::glHint(target as u32, mode as u32);
+}
+fn glClearDepth(depth: float) -> () unsafe {
+    ret GL::glClearDepth(depth as f64);
+}
+fn glDepthFunc(func: uint) -> () unsafe {
+    ret GL::glDepthFunc(func as u32);
+}
+fn glDepthMask(flag: uint) -> () unsafe {
+    ret GL::glDepthMask(flag as u8);
+}
+fn glDepthRange(near_val: float, far_val: float) -> () unsafe {
+    ret GL::glDepthRange(near_val as f64, far_val as f64);
+}
+fn glClearAccum(red: float, green: float, blue: float, alpha: float) -> () unsafe {
+    ret GL::glClearAccum(red as f32, green as f32, blue as f32, alpha as f32);
+}
+fn glAccum(op: uint, value: float) -> () unsafe {
+    ret GL::glAccum(op as u32, value as f32);
+}
+fn glMatrixMode(mode: uint) -> () unsafe {
+    ret GL::glMatrixMode(mode as u32);
+}
+fn glOrtho(left: float, right: float, bottom: float, top: float, near_val: float, far_val: float) -> () unsafe {
+    ret GL::glOrtho(left as f64, right as f64, bottom as f64, top as f64, near_val as f64, far_val as f64);
+}
+fn glFrustum(left: float, right: float, bottom: float, top: float, near_val: float, far_val: float) -> () unsafe {
+    ret GL::glFrustum(left as f64, right as f64, bottom as f64, top as f64, near_val as f64, far_val as f64);
+}
+fn glViewport(x: int, y: int, width: int, height: int) -> () unsafe {
+    ret GL::glViewport(x as i32, y as i32, width as i32, height as i32);
+}
+fn glPushMatrix() -> () unsafe {
+    ret GL::glPushMatrix();
+}
+fn glPopMatrix() -> () unsafe {
+    ret GL::glPopMatrix();
+}
+fn glLoadIdentity() -> () unsafe {
+    ret GL::glLoadIdentity();
+}
+fn glLoadMatrixd(m: *float) -> () unsafe {
+    ret GL::glLoadMatrixd(m as *f64);
+}
+fn glLoadMatrixf(m: *float) -> () unsafe {
+    ret GL::glLoadMatrixf(m as *f32);
+}
+fn glMultMatrixd(m: *float) -> () unsafe {
+    ret GL::glMultMatrixd(m as *f64);
+}
+fn glMultMatrixf(m: *float) -> () unsafe {
+    ret GL::glMultMatrixf(m as *f32);
+}
+fn glRotated(angle: float, x: float, y: float, z: float) -> () unsafe {
+    ret GL::glRotated(angle as f64, x as f64, y as f64, z as f64);
+}
+fn glRotatef(angle: float, x: float, y: float, z: float) -> () unsafe {
+    ret GL::glRotatef(angle as f32, x as f32, y as f32, z as f32);
+}
+fn glScaled(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glScaled(x as f64, y as f64, z as f64);
+}
+fn glScalef(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glScalef(x as f32, y as f32, z as f32);
+}
+fn glTranslated(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glTranslated(x as f64, y as f64, z as f64);
+}
+fn glTranslatef(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glTranslatef(x as f32, y as f32, z as f32);
+}
+fn glIsList(list: uint) -> u8 unsafe {
+    ret GL::glIsList(list as u32);
+}
+fn glDeleteLists(list: uint, range: int) -> () unsafe {
+    ret GL::glDeleteLists(list as u32, range as i32);
+}
+fn glGenLists(range: int) -> u32 unsafe {
+    ret GL::glGenLists(range as i32);
+}
+fn glNewList(list: uint, mode: uint) -> () unsafe {
+    ret GL::glNewList(list as u32, mode as u32);
+}
+fn glEndList() -> () unsafe {
+    ret GL::glEndList();
+}
+fn glCallList(list: uint) -> () unsafe {
+    ret GL::glCallList(list as u32);
+}
+fn glCallLists(n: int, type_: uint, lists: *()) -> () unsafe {
+    ret GL::glCallLists(n as i32, type_ as u32, lists as *());
+}
+fn glListBase(base: uint) -> () unsafe {
+    ret GL::glListBase(base as u32);
+}
+fn glBegin(mode: uint) -> () unsafe {
+    ret GL::glBegin(mode as u32);
+}
+fn glEnd() -> () unsafe {
+    ret GL::glEnd();
+}
+fn glVertex2d(x: float, y: float) -> () unsafe {
+    ret GL::glVertex2d(x as f64, y as f64);
+}
+fn glVertex2f(x: float, y: float) -> () unsafe {
+    ret GL::glVertex2f(x as f32, y as f32);
+}
+fn glVertex2i(x: int, y: int) -> () unsafe {
+    ret GL::glVertex2i(x as i32, y as i32);
+}
+fn glVertex2s(x: int, y: int) -> () unsafe {
+    ret GL::glVertex2s(x as i16, y as i16);
+}
+fn glVertex3d(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glVertex3d(x as f64, y as f64, z as f64);
+}
+fn glVertex3f(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glVertex3f(x as f32, y as f32, z as f32);
+}
+fn glVertex3i(x: int, y: int, z: int) -> () unsafe {
+    ret GL::glVertex3i(x as i32, y as i32, z as i32);
+}
+fn glVertex3s(x: int, y: int, z: int) -> () unsafe {
+    ret GL::glVertex3s(x as i16, y as i16, z as i16);
+}
+fn glVertex4d(x: float, y: float, z: float, w: float) -> () unsafe {
+    ret GL::glVertex4d(x as f64, y as f64, z as f64, w as f64);
+}
+fn glVertex4f(x: float, y: float, z: float, w: float) -> () unsafe {
+    ret GL::glVertex4f(x as f32, y as f32, z as f32, w as f32);
+}
+fn glVertex4i(x: int, y: int, z: int, w: int) -> () unsafe {
+    ret GL::glVertex4i(x as i32, y as i32, z as i32, w as i32);
+}
+fn glVertex4s(x: int, y: int, z: int, w: int) -> () unsafe {
+    ret GL::glVertex4s(x as i16, y as i16, z as i16, w as i16);
+}
+fn glVertex2dv(v: *float) -> () unsafe {
+    ret GL::glVertex2dv(v as *f64);
+}
+fn glVertex2fv(v: *float) -> () unsafe {
+    ret GL::glVertex2fv(v as *f32);
+}
+fn glVertex2iv(v: *int) -> () unsafe {
+    ret GL::glVertex2iv(v as *i32);
+}
+fn glVertex2sv(v: *int) -> () unsafe {
+    ret GL::glVertex2sv(v as *i16);
+}
+fn glVertex3dv(v: *float) -> () unsafe {
+    ret GL::glVertex3dv(v as *f64);
+}
+fn glVertex3fv(v: *float) -> () unsafe {
+    ret GL::glVertex3fv(v as *f32);
+}
+fn glVertex3iv(v: *int) -> () unsafe {
+    ret GL::glVertex3iv(v as *i32);
+}
+fn glVertex3sv(v: *int) -> () unsafe {
+    ret GL::glVertex3sv(v as *i16);
+}
+fn glVertex4dv(v: *float) -> () unsafe {
+    ret GL::glVertex4dv(v as *f64);
+}
+fn glVertex4fv(v: *float) -> () unsafe {
+    ret GL::glVertex4fv(v as *f32);
+}
+fn glVertex4iv(v: *int) -> () unsafe {
+    ret GL::glVertex4iv(v as *i32);
+}
+fn glVertex4sv(v: *int) -> () unsafe {
+    ret GL::glVertex4sv(v as *i16);
+}
+fn glNormal3b(nx: int, ny: int, nz: int) -> () unsafe {
+    ret GL::glNormal3b(nx as i8, ny as i8, nz as i8);
+}
+fn glNormal3d(nx: float, ny: float, nz: float) -> () unsafe {
+    ret GL::glNormal3d(nx as f64, ny as f64, nz as f64);
+}
+fn glNormal3f(nx: float, ny: float, nz: float) -> () unsafe {
+    ret GL::glNormal3f(nx as f32, ny as f32, nz as f32);
+}
+fn glNormal3i(nx: int, ny: int, nz: int) -> () unsafe {
+    ret GL::glNormal3i(nx as i32, ny as i32, nz as i32);
+}
+fn glNormal3s(nx: int, ny: int, nz: int) -> () unsafe {
+    ret GL::glNormal3s(nx as i16, ny as i16, nz as i16);
+}
+fn glNormal3bv(v: *int) -> () unsafe {
+    ret GL::glNormal3bv(v as *i8);
+}
+fn glNormal3dv(v: *float) -> () unsafe {
+    ret GL::glNormal3dv(v as *f64);
+}
+fn glNormal3fv(v: *float) -> () unsafe {
+    ret GL::glNormal3fv(v as *f32);
+}
+fn glNormal3iv(v: *int) -> () unsafe {
+    ret GL::glNormal3iv(v as *i32);
+}
+fn glNormal3sv(v: *int) -> () unsafe {
+    ret GL::glNormal3sv(v as *i16);
+}
+fn glIndexd(c: float) -> () unsafe {
+    ret GL::glIndexd(c as f64);
+}
+fn glIndexf(c: float) -> () unsafe {
+    ret GL::glIndexf(c as f32);
+}
+fn glIndexi(c: int) -> () unsafe {
+    ret GL::glIndexi(c as i32);
+}
+fn glIndexs(c: int) -> () unsafe {
+    ret GL::glIndexs(c as i16);
+}
+fn glIndexub(c: uint) -> () unsafe {
+    ret GL::glIndexub(c as u8);
+}
+fn glIndexfv(c: *float) -> () unsafe {
+    ret GL::glIndexfv(c as *f32);
+}
+fn glIndexiv(c: *int) -> () unsafe {
+    ret GL::glIndexiv(c as *i32);
+}
+fn glIndexsv(c: *int) -> () unsafe {
+    ret GL::glIndexsv(c as *i16);
+}
+fn glIndexubv(c: *uint) -> () unsafe {
+    ret GL::glIndexubv(c as *u8);
+}
+fn glColor3d(red: float, green: float, blue: float) -> () unsafe {
+    ret GL::glColor3d(red as f64, green as f64, blue as f64);
+}
+fn glColor3f(red: float, green: float, blue: float) -> () unsafe {
+    ret GL::glColor3f(red as f32, green as f32, blue as f32);
+}
+fn glColor3i(red: int, green: int, blue: int) -> () unsafe {
+    ret GL::glColor3i(red as i32, green as i32, blue as i32);
+}
+fn glColor3s(red: int, green: int, blue: int) -> () unsafe {
+    ret GL::glColor3s(red as i16, green as i16, blue as i16);
+}
+fn glColor3ub(red: uint, green: uint, blue: uint) -> () unsafe {
+    ret GL::glColor3ub(red as u8, green as u8, blue as u8);
+}
+fn glColor3ui(red: uint, green: uint, blue: uint) -> () unsafe {
+    ret GL::glColor3ui(red as u32, green as u32, blue as u32);
+}
+fn glColor3us(red: uint, green: uint, blue: uint) -> () unsafe {
+    ret GL::glColor3us(red as u16, green as u16, blue as u16);
+}
+fn glColor4b(red: int, green: int, blue: int, alpha: int) -> () unsafe {
+    ret GL::glColor4b(red as i8, green as i8, blue as i8, alpha as i8);
+}
+fn glColor4d(red: float, green: float, blue: float, alpha: float) -> () unsafe {
+    ret GL::glColor4d(red as f64, green as f64, blue as f64, alpha as f64);
+}
+fn glColor4f(red: float, green: float, blue: float, alpha: float) -> () unsafe {
+    ret GL::glColor4f(red as f32, green as f32, blue as f32, alpha as f32);
+}
+fn glColor4i(red: int, green: int, blue: int, alpha: int) -> () unsafe {
+    ret GL::glColor4i(red as i32, green as i32, blue as i32, alpha as i32);
+}
+fn glColor4s(red: int, green: int, blue: int, alpha: int) -> () unsafe {
+    ret GL::glColor4s(red as i16, green as i16, blue as i16, alpha as i16);
+}
+fn glColor4ub(red: uint, green: uint, blue: uint, alpha: uint) -> () unsafe {
+    ret GL::glColor4ub(red as u8, green as u8, blue as u8, alpha as u8);
+}
+fn glColor4ui(red: uint, green: uint, blue: uint, alpha: uint) -> () unsafe {
+    ret GL::glColor4ui(red as u32, green as u32, blue as u32, alpha as u32);
+}
+fn glColor4us(red: uint, green: uint, blue: uint, alpha: uint) -> () unsafe {
+    ret GL::glColor4us(red as u16, green as u16, blue as u16, alpha as u16);
+}
+fn glColor3bv(v: *int) -> () unsafe {
+    ret GL::glColor3bv(v as *i8);
+}
+fn glColor3dv(v: *float) -> () unsafe {
+    ret GL::glColor3dv(v as *f64);
+}
+fn glColor3fv(v: *float) -> () unsafe {
+    ret GL::glColor3fv(v as *f32);
+}
+fn glColor3iv(v: *int) -> () unsafe {
+    ret GL::glColor3iv(v as *i32);
+}
+fn glColor3sv(v: *int) -> () unsafe {
+    ret GL::glColor3sv(v as *i16);
+}
+fn glColor3ubv(v: *uint) -> () unsafe {
+    ret GL::glColor3ubv(v as *u8);
+}
+fn glColor3uiv(v: *uint) -> () unsafe {
+    ret GL::glColor3uiv(v as *u32);
+}
+fn glColor3usv(v: *uint) -> () unsafe {
+    ret GL::glColor3usv(v as *u16);
+}
+fn glColor4bv(v: *int) -> () unsafe {
+    ret GL::glColor4bv(v as *i8);
+}
+fn glColor4dv(v: *float) -> () unsafe {
+    ret GL::glColor4dv(v as *f64);
+}
+fn glColor4fv(v: *float) -> () unsafe {
+    ret GL::glColor4fv(v as *f32);
+}
+fn glColor4iv(v: *int) -> () unsafe {
+    ret GL::glColor4iv(v as *i32);
+}
+fn glColor4sv(v: *int) -> () unsafe {
+    ret GL::glColor4sv(v as *i16);
+}
+fn glColor4ubv(v: *uint) -> () unsafe {
+    ret GL::glColor4ubv(v as *u8);
+}
+fn glColor4uiv(v: *uint) -> () unsafe {
+    ret GL::glColor4uiv(v as *u32);
+}
+fn glColor4usv(v: *uint) -> () unsafe {
+    ret GL::glColor4usv(v as *u16);
+}
+fn glTexCoord1d(s: float) -> () unsafe {
+    ret GL::glTexCoord1d(s as f64);
+}
+fn glTexCoord1f(s: float) -> () unsafe {
+    ret GL::glTexCoord1f(s as f32);
+}
+fn glTexCoord1i(s: int) -> () unsafe {
+    ret GL::glTexCoord1i(s as i32);
+}
+fn glTexCoord1s(s: int) -> () unsafe {
+    ret GL::glTexCoord1s(s as i16);
+}
+fn glTexCoord2d(s: float, t: float) -> () unsafe {
+    ret GL::glTexCoord2d(s as f64, t as f64);
+}
+fn glTexCoord2f(s: float, t: float) -> () unsafe {
+    ret GL::glTexCoord2f(s as f32, t as f32);
+}
+fn glTexCoord2i(s: int, t: int) -> () unsafe {
+    ret GL::glTexCoord2i(s as i32, t as i32);
+}
+fn glTexCoord2s(s: int, t: int) -> () unsafe {
+    ret GL::glTexCoord2s(s as i16, t as i16);
+}
+fn glTexCoord3d(s: float, t: float, r: float) -> () unsafe {
+    ret GL::glTexCoord3d(s as f64, t as f64, r as f64);
+}
+fn glTexCoord3f(s: float, t: float, r: float) -> () unsafe {
+    ret GL::glTexCoord3f(s as f32, t as f32, r as f32);
+}
+fn glTexCoord3i(s: int, t: int, r: int) -> () unsafe {
+    ret GL::glTexCoord3i(s as i32, t as i32, r as i32);
+}
+fn glTexCoord3s(s: int, t: int, r: int) -> () unsafe {
+    ret GL::glTexCoord3s(s as i16, t as i16, r as i16);
+}
+fn glTexCoord4d(s: float, t: float, r: float, q: float) -> () unsafe {
+    ret GL::glTexCoord4d(s as f64, t as f64, r as f64, q as f64);
+}
+fn glTexCoord4f(s: float, t: float, r: float, q: float) -> () unsafe {
+    ret GL::glTexCoord4f(s as f32, t as f32, r as f32, q as f32);
+}
+fn glTexCoord4i(s: int, t: int, r: int, q: int) -> () unsafe {
+    ret GL::glTexCoord4i(s as i32, t as i32, r as i32, q as i32);
+}
+fn glTexCoord4s(s: int, t: int, r: int, q: int) -> () unsafe {
+    ret GL::glTexCoord4s(s as i16, t as i16, r as i16, q as i16);
+}
+fn glTexCoord1dv(v: *float) -> () unsafe {
+    ret GL::glTexCoord1dv(v as *f64);
+}
+fn glTexCoord1fv(v: *float) -> () unsafe {
+    ret GL::glTexCoord1fv(v as *f32);
+}
+fn glTexCoord1iv(v: *int) -> () unsafe {
+    ret GL::glTexCoord1iv(v as *i32);
+}
+fn glTexCoord1sv(v: *int) -> () unsafe {
+    ret GL::glTexCoord1sv(v as *i16);
+}
+fn glTexCoord2dv(v: *float) -> () unsafe {
+    ret GL::glTexCoord2dv(v as *f64);
+}
+fn glTexCoord2fv(v: *float) -> () unsafe {
+    ret GL::glTexCoord2fv(v as *f32);
+}
+fn glTexCoord2iv(v: *int) -> () unsafe {
+    ret GL::glTexCoord2iv(v as *i32);
+}
+fn glTexCoord2sv(v: *int) -> () unsafe {
+    ret GL::glTexCoord2sv(v as *i16);
+}
+fn glTexCoord3dv(v: *float) -> () unsafe {
+    ret GL::glTexCoord3dv(v as *f64);
+}
+fn glTexCoord3fv(v: *float) -> () unsafe {
+    ret GL::glTexCoord3fv(v as *f32);
+}
+fn glTexCoord3iv(v: *int) -> () unsafe {
+    ret GL::glTexCoord3iv(v as *i32);
+}
+fn glTexCoord3sv(v: *int) -> () unsafe {
+    ret GL::glTexCoord3sv(v as *i16);
+}
+fn glTexCoord4dv(v: *float) -> () unsafe {
+    ret GL::glTexCoord4dv(v as *f64);
+}
+fn glTexCoord4fv(v: *float) -> () unsafe {
+    ret GL::glTexCoord4fv(v as *f32);
+}
+fn glTexCoord4iv(v: *int) -> () unsafe {
+    ret GL::glTexCoord4iv(v as *i32);
+}
+fn glTexCoord4sv(v: *int) -> () unsafe {
+    ret GL::glTexCoord4sv(v as *i16);
+}
+fn glRasterPos2d(x: float, y: float) -> () unsafe {
+    ret GL::glRasterPos2d(x as f64, y as f64);
+}
+fn glRasterPos2f(x: float, y: float) -> () unsafe {
+    ret GL::glRasterPos2f(x as f32, y as f32);
+}
+fn glRasterPos2i(x: int, y: int) -> () unsafe {
+    ret GL::glRasterPos2i(x as i32, y as i32);
+}
+fn glRasterPos2s(x: int, y: int) -> () unsafe {
+    ret GL::glRasterPos2s(x as i16, y as i16);
+}
+fn glRasterPos3d(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glRasterPos3d(x as f64, y as f64, z as f64);
+}
+fn glRasterPos3f(x: float, y: float, z: float) -> () unsafe {
+    ret GL::glRasterPos3f(x as f32, y as f32, z as f32);
+}
+fn glRasterPos3i(x: int, y: int, z: int) -> () unsafe {
+    ret GL::glRasterPos3i(x as i32, y as i32, z as i32);
+}
+fn glRasterPos3s(x: int, y: int, z: int) -> () unsafe {
+    ret GL::glRasterPos3s(x as i16, y as i16, z as i16);
+}
+fn glRasterPos4d(x: float, y: float, z: float, w: float) -> () unsafe {
+    ret GL::glRasterPos4d(x as f64, y as f64, z as f64, w as f64);
+}
+fn glRasterPos4f(x: float, y: float, z: float, w: float) -> () unsafe {
+    ret GL::glRasterPos4f(x as f32, y as f32, z as f32, w as f32);
+}
+fn glRasterPos4i(x: int, y: int, z: int, w: int) -> () unsafe {
+    ret GL::glRasterPos4i(x as i32, y as i32, z as i32, w as i32);
+}
+fn glRasterPos4s(x: int, y: int, z: int, w: int) -> () unsafe {
+    ret GL::glRasterPos4s(x as i16, y as i16, z as i16, w as i16);
+}
+fn glRasterPos2dv(v: *float) -> () unsafe {
+    ret GL::glRasterPos2dv(v as *f64);
+}
+fn glRasterPos2fv(v: *float) -> () unsafe {
+    ret GL::glRasterPos2fv(v as *f32);
+}
+fn glRasterPos2iv(v: *int) -> () unsafe {
+    ret GL::glRasterPos2iv(v as *i32);
+}
+fn glRasterPos2sv(v: *int) -> () unsafe {
+    ret GL::glRasterPos2sv(v as *i16);
+}
+fn glRasterPos3dv(v: *float) -> () unsafe {
+    ret GL::glRasterPos3dv(v as *f64);
+}
+fn glRasterPos3fv(v: *float) -> () unsafe {
+    ret GL::glRasterPos3fv(v as *f32);
+}
+fn glRasterPos3iv(v: *int) -> () unsafe {
+    ret GL::glRasterPos3iv(v as *i32);
+}
+fn glRasterPos3sv(v: *int) -> () unsafe {
+    ret GL::glRasterPos3sv(v as *i16);
+}
+fn glRasterPos4dv(v: *float) -> () unsafe {
+    ret GL::glRasterPos4dv(v as *f64);
+}
+fn glRasterPos4fv(v: *float) -> () unsafe {
+    ret GL::glRasterPos4fv(v as *f32);
+}
+fn glRasterPos4iv(v: *int) -> () unsafe {
+    ret GL::glRasterPos4iv(v as *i32);
+}
+fn glRasterPos4sv(v: *int) -> () unsafe {
+    ret GL::glRasterPos4sv(v as *i16);
+}
+fn glRectd(x1: float, y1: float, x2: float, y2: float) -> () unsafe {
+    ret GL::glRectd(x1 as f64, y1 as f64, x2 as f64, y2 as f64);
+}
+fn glRectf(x1: float, y1: float, x2: float, y2: float) -> () unsafe {
+    ret GL::glRectf(x1 as f32, y1 as f32, x2 as f32, y2 as f32);
+}
+fn glRecti(x1: int, y1: int, x2: int, y2: int) -> () unsafe {
+    ret GL::glRecti(x1 as i32, y1 as i32, x2 as i32, y2 as i32);
+}
+fn glRects(x1: int, y1: int, x2: int, y2: int) -> () unsafe {
+    ret GL::glRects(x1 as i16, y1 as i16, x2 as i16, y2 as i16);
+}
+fn glRectdv(v1: *float, v2: *float) -> () unsafe {
+    ret GL::glRectdv(v1 as *f64, v2 as *f64);
+}
+fn glRectfv(v1: *float, v2: *float) -> () unsafe {
+    ret GL::glRectfv(v1 as *f32, v2 as *f32);
+}
+fn glRectiv(v1: *int, v2: *int) -> () unsafe {
+    ret GL::glRectiv(v1 as *i32, v2 as *i32);
+}
+fn glRectsv(v1: *int, v2: *int) -> () unsafe {
+    ret GL::glRectsv(v1 as *i16, v2 as *i16);
+}
+fn glVertexPointer(size: int, type_: uint, stride: int, ptr: *()) -> () unsafe {
+    ret GL::glVertexPointer(size as i32, type_ as u32, stride as i32, ptr as *());
+}
+fn glNormalPointer(type_: uint, stride: int, ptr: *()) -> () unsafe {
+    ret GL::glNormalPointer(type_ as u32, stride as i32, ptr as *());
+}
+fn glColorPointer(size: int, type_: uint, stride: int, ptr: *()) -> () unsafe {
+    ret GL::glColorPointer(size as i32, type_ as u32, stride as i32, ptr as *());
+}
+fn glIndexPointer(type_: uint, stride: int, ptr: *()) -> () unsafe {
+    ret GL::glIndexPointer(type_ as u32, stride as i32, ptr as *());
+}
+fn glTexCoordPointer(size: int, type_: uint, stride: int, ptr: *()) -> () unsafe {
+    ret GL::glTexCoordPointer(size as i32, type_ as u32, stride as i32, ptr as *());
+}
+fn glEdgeFlagPointer(stride: int, ptr: *()) -> () unsafe {
+    ret GL::glEdgeFlagPointer(stride as i32, ptr as *());
+}
+fn glGetPointerv(pname: uint, params: *()) -> () unsafe {
+    ret GL::glGetPointerv(pname as u32, params as *());
+}
+fn glArrayElement(i: int) -> () unsafe {
+    ret GL::glArrayElement(i as i32);
+}
+fn glDrawArrays(mode: uint, first: int, count: int) -> () unsafe {
+    ret GL::glDrawArrays(mode as u32, first as i32, count as i32);
+}
+fn glDrawElements(mode: uint, count: int, type_: uint, indices: *()) -> () unsafe {
+    ret GL::glDrawElements(mode as u32, count as i32, type_ as u32, indices as *());
+}
+fn glInterleavedArrays(format: uint, stride: int, pointer: *()) -> () unsafe {
+    ret GL::glInterleavedArrays(format as u32, stride as i32, pointer as *());
+}
+fn glShadeModel(mode: uint) -> () unsafe {
+    ret GL::glShadeModel(mode as u32);
+}
+fn glLightf(light: uint, pname: uint, param: float) -> () unsafe {
+    ret GL::glLightf(light as u32, pname as u32, param as f32);
+}
+fn glLighti(light: uint, pname: uint, param: int) -> () unsafe {
+    ret GL::glLighti(light as u32, pname as u32, param as i32);
+}
+fn glLightfv(light: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glLightfv(light as u32, pname as u32, params as *f32);
+}
+fn glLightiv(light: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glLightiv(light as u32, pname as u32, params as *i32);
+}
+fn glGetLightfv(light: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetLightfv(light as u32, pname as u32, params as *f32);
+}
+fn glGetLightiv(light: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetLightiv(light as u32, pname as u32, params as *i32);
+}
+fn glLightModelf(pname: uint, param: float) -> () unsafe {
+    ret GL::glLightModelf(pname as u32, param as f32);
+}
+fn glLightModeli(pname: uint, param: int) -> () unsafe {
+    ret GL::glLightModeli(pname as u32, param as i32);
+}
+fn glLightModelfv(pname: uint, params: *float) -> () unsafe {
+    ret GL::glLightModelfv(pname as u32, params as *f32);
+}
+fn glLightModeliv(pname: uint, params: *int) -> () unsafe {
+    ret GL::glLightModeliv(pname as u32, params as *i32);
+}
+fn glMaterialf(face: uint, pname: uint, param: float) -> () unsafe {
+    ret GL::glMaterialf(face as u32, pname as u32, param as f32);
+}
+fn glMateriali(face: uint, pname: uint, param: int) -> () unsafe {
+    ret GL::glMateriali(face as u32, pname as u32, param as i32);
+}
+fn glMaterialfv(face: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glMaterialfv(face as u32, pname as u32, params as *f32);
+}
+fn glMaterialiv(face: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glMaterialiv(face as u32, pname as u32, params as *i32);
+}
+fn glGetMaterialfv(face: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetMaterialfv(face as u32, pname as u32, params as *f32);
+}
+fn glGetMaterialiv(face: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetMaterialiv(face as u32, pname as u32, params as *i32);
+}
+fn glColorMaterial(face: uint, mode: uint) -> () unsafe {
+    ret GL::glColorMaterial(face as u32, mode as u32);
+}
+fn glPixelZoom(xfactor: float, yfactor: float) -> () unsafe {
+    ret GL::glPixelZoom(xfactor as f32, yfactor as f32);
+}
+fn glPixelStoref(pname: uint, param: float) -> () unsafe {
+    ret GL::glPixelStoref(pname as u32, param as f32);
+}
+fn glPixelStorei(pname: uint, param: int) -> () unsafe {
+    ret GL::glPixelStorei(pname as u32, param as i32);
+}
+fn glPixelTransferf(pname: uint, param: float) -> () unsafe {
+    ret GL::glPixelTransferf(pname as u32, param as f32);
+}
+fn glPixelTransferi(pname: uint, param: int) -> () unsafe {
+    ret GL::glPixelTransferi(pname as u32, param as i32);
+}
+fn glPixelMapfv(map: uint, mapsize: int, values: *float) -> () unsafe {
+    ret GL::glPixelMapfv(map as u32, mapsize as i32, values as *f32);
+}
+fn glPixelMapuiv(map: uint, mapsize: int, values: *uint) -> () unsafe {
+    ret GL::glPixelMapuiv(map as u32, mapsize as i32, values as *u32);
+}
+fn glPixelMapusv(map: uint, mapsize: int, values: *uint) -> () unsafe {
+    ret GL::glPixelMapusv(map as u32, mapsize as i32, values as *u16);
+}
+fn glGetPixelMapfv(map: uint, values: *float) -> () unsafe {
+    ret GL::glGetPixelMapfv(map as u32, values as *f32);
+}
+fn glGetPixelMapuiv(map: uint, values: *uint) -> () unsafe {
+    ret GL::glGetPixelMapuiv(map as u32, values as *u32);
+}
+fn glGetPixelMapusv(map: uint, values: *uint) -> () unsafe {
+    ret GL::glGetPixelMapusv(map as u32, values as *u16);
+}
+fn glBitmap(width: int, height: int, xorig: float, yorig: float, xmove: float, ymove: float, bitmap: *uint) -> () unsafe {
+    ret GL::glBitmap(width as i32, height as i32, xorig as f32, yorig as f32, xmove as f32, ymove as f32, bitmap as *u8);
+}
+fn glReadPixels(x: int, y: int, width: int, height: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glReadPixels(x as i32, y as i32, width as i32, height as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glDrawPixels(width: int, height: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glDrawPixels(width as i32, height as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glCopyPixels(x: int, y: int, width: int, height: int, type_: uint) -> () unsafe {
+    ret GL::glCopyPixels(x as i32, y as i32, width as i32, height as i32, type_ as u32);
+}
+fn glStencilFunc(func: uint, ref: int, mask: uint) -> () unsafe {
+    ret GL::glStencilFunc(func as u32, ref as i32, mask as u32);
+}
+fn glStencilMask(mask: uint) -> () unsafe {
+    ret GL::glStencilMask(mask as u32);
+}
+fn glStencilOp(fail_: uint, zfail: uint, zpass: uint) -> () unsafe {
+    ret GL::glStencilOp(fail_ as u32, zfail as u32, zpass as u32);
+}
+fn glClearStencil(s: int) -> () unsafe {
+    ret GL::glClearStencil(s as i32);
+}
+fn glTexGend(coord: uint, pname: uint, param: float) -> () unsafe {
+    ret GL::glTexGend(coord as u32, pname as u32, param as f64);
+}
+fn glTexGenf(coord: uint, pname: uint, param: float) -> () unsafe {
+    ret GL::glTexGenf(coord as u32, pname as u32, param as f32);
+}
+fn glTexGeni(coord: uint, pname: uint, param: int) -> () unsafe {
+    ret GL::glTexGeni(coord as u32, pname as u32, param as i32);
+}
+fn glTexGendv(coord: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glTexGendv(coord as u32, pname as u32, params as *f64);
+}
+fn glTexGenfv(coord: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glTexGenfv(coord as u32, pname as u32, params as *f32);
+}
+fn glTexGeniv(coord: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glTexGeniv(coord as u32, pname as u32, params as *i32);
+}
+fn glGetTexGendv(coord: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetTexGendv(coord as u32, pname as u32, params as *f64);
+}
+fn glGetTexGenfv(coord: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetTexGenfv(coord as u32, pname as u32, params as *f32);
+}
+fn glGetTexGeniv(coord: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetTexGeniv(coord as u32, pname as u32, params as *i32);
+}
+fn glTexEnvf(target: uint, pname: uint, param: float) -> () unsafe {
+    ret GL::glTexEnvf(target as u32, pname as u32, param as f32);
+}
+fn glTexEnvi(target: uint, pname: uint, param: int) -> () unsafe {
+    ret GL::glTexEnvi(target as u32, pname as u32, param as i32);
+}
+fn glTexEnvfv(target: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glTexEnvfv(target as u32, pname as u32, params as *f32);
+}
+fn glTexEnviv(target: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glTexEnviv(target as u32, pname as u32, params as *i32);
+}
+fn glGetTexEnvfv(target: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetTexEnvfv(target as u32, pname as u32, params as *f32);
+}
+fn glGetTexEnviv(target: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetTexEnviv(target as u32, pname as u32, params as *i32);
+}
+fn glTexParameterf(target: uint, pname: uint, param: float) -> () unsafe {
+    ret GL::glTexParameterf(target as u32, pname as u32, param as f32);
+}
+fn glTexParameteri(target: uint, pname: uint, param: int) -> () unsafe {
+    ret GL::glTexParameteri(target as u32, pname as u32, param as i32);
+}
+fn glTexParameterfv(target: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glTexParameterfv(target as u32, pname as u32, params as *f32);
+}
+fn glTexParameteriv(target: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glTexParameteriv(target as u32, pname as u32, params as *i32);
+}
+fn glGetTexParameterfv(target: uint, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetTexParameterfv(target as u32, pname as u32, params as *f32);
+}
+fn glGetTexParameteriv(target: uint, pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetTexParameteriv(target as u32, pname as u32, params as *i32);
+}
+fn glGetTexLevelParameterfv(target: uint, level: int, pname: uint, params: *float) -> () unsafe {
+    ret GL::glGetTexLevelParameterfv(target as u32, level as i32, pname as u32, params as *f32);
+}
+fn glGetTexLevelParameteriv(target: uint, level: int, pname: uint, params: *int) -> () unsafe {
+    ret GL::glGetTexLevelParameteriv(target as u32, level as i32, pname as u32, params as *i32);
+}
+fn glTexImage1D(target: uint, level: int, internalFormat: int, width: int, border: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glTexImage1D(target as u32, level as i32, internalFormat as i32, width as i32, border as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glTexImage2D(target: uint, level: int, internalFormat: int, width: int, height: int, border: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glTexImage2D(target as u32, level as i32, internalFormat as i32, width as i32, height as i32, border as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glGetTexImage(target: uint, level: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glGetTexImage(target as u32, level as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glGenTextures(n: int, textures: *uint) -> () unsafe {
+    ret GL::glGenTextures(n as i32, textures as *u32);
+}
+fn glDeleteTextures(n: int, textures: *uint) -> () unsafe {
+    ret GL::glDeleteTextures(n as i32, textures as *u32);
+}
+fn glBindTexture(target: uint, texture: uint) -> () unsafe {
+    ret GL::glBindTexture(target as u32, texture as u32);
+}
+fn glPrioritizeTextures(n: int, textures: *uint, priorities: *float) -> () unsafe {
+    ret GL::glPrioritizeTextures(n as i32, textures as *u32, priorities as *f32);
+}
+fn glAreTexturesResident(n: int, textures: *uint, residences: *uint) -> u8 unsafe {
+    ret GL::glAreTexturesResident(n as i32, textures as *u32, residences as *u8);
+}
+fn glIsTexture(texture: uint) -> u8 unsafe {
+    ret GL::glIsTexture(texture as u32);
+}
+fn glTexSubImage1D(target: uint, level: int, xoffset: int, width: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glTexSubImage1D(target as u32, level as i32, xoffset as i32, width as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glTexSubImage2D(target: uint, level: int, xoffset: int, yoffset: int, width: int, height: int, format: uint, type_: uint, pixels: *()) -> () unsafe {
+    ret GL::glTexSubImage2D(target as u32, level as i32, xoffset as i32, yoffset as i32, width as i32, height as i32, format as u32, type_ as u32, pixels as *());
+}
+fn glCopyTexImage1D(target: uint, level: int, internalformat: uint, x: int, y: int, width: int, border: int) -> () unsafe {
+    ret GL::glCopyTexImage1D(target as u32, level as i32, internalformat as u32, x as i32, y as i32, width as i32, border as i32);
+}
+fn glCopyTexImage2D(target: uint, level: int, internalformat: uint, x: int, y: int, width: int, height: int, border: int) -> () unsafe {
+    ret GL::glCopyTexImage2D(target as u32, level as i32, internalformat as u32, x as i32, y as i32, width as i32, height as i32, border as i32);
+}
+fn glCopyTexSubImage1D(target: uint, level: int, xoffset: int, x: int, y: int, width: int) -> () unsafe {
+    ret GL::glCopyTexSubImage1D(target as u32, level as i32, xoffset as i32, x as i32, y as i32, width as i32);
+}
+fn glCopyTexSubImage2D(target: uint, level: int, xoffset: int, yoffset: int, x: int, y: int, width: int, height: int) -> () unsafe {
+    ret GL::glCopyTexSubImage2D(target as u32, level as i32, xoffset as i32, yoffset as i32, x as i32, y as i32, width as i32, height as i32);
+}
+fn glMap1d(target: uint, u1: float, u2: float, stride: int, order: int, points: *float) -> () unsafe {
+    ret GL::glMap1d(target as u32, u1 as f64, u2 as f64, stride as i32, order as i32, points as *f64);
+}
+fn glMap1f(target: uint, u1: float, u2: float, stride: int, order: int, points: *float) -> () unsafe {
+    ret GL::glMap1f(target as u32, u1 as f32, u2 as f32, stride as i32, order as i32, points as *f32);
+}
+fn glMap2d(target: uint, u1: float, u2: float, ustride: int, uorder: int, v1: float, v2: float, vstride: int, vorder: int, points: *float) -> () unsafe {
+    ret GL::glMap2d(target as u32, u1 as f64, u2 as f64, ustride as i32, uorder as i32, v1 as f64, v2 as f64, vstride as i32, vorder as i32, points as *f64);
+}
+fn glMap2f(target: uint, u1: float, u2: float, ustride: int, uorder: int, v1: float, v2: float, vstride: int, vorder: int, points: *float) -> () unsafe {
+    ret GL::glMap2f(target as u32, u1 as f32, u2 as f32, ustride as i32, uorder as i32, v1 as f32, v2 as f32, vstride as i32, vorder as i32, points as *f32);
+}
+fn glGetMapdv(target: uint, query: uint, v: *float) -> () unsafe {
+    ret GL::glGetMapdv(target as u32, query as u32, v as *f64);
+}
+fn glGetMapfv(target: uint, query: uint, v: *float) -> () unsafe {
+    ret GL::glGetMapfv(target as u32, query as u32, v as *f32);
+}
+fn glGetMapiv(target: uint, query: uint, v: *int) -> () unsafe {
+    ret GL::glGetMapiv(target as u32, query as u32, v as *i32);
+}
+fn glEvalCoord1d(u: float) -> () unsafe {
+    ret GL::glEvalCoord1d(u as f64);
+}
+fn glEvalCoord1f(u: float) -> () unsafe {
+    ret GL::glEvalCoord1f(u as f32);
+}
+fn glEvalCoord1dv(u: *float) -> () unsafe {
+    ret GL::glEvalCoord1dv(u as *f64);
+}
+fn glEvalCoord1fv(u: *float) -> () unsafe {
+    ret GL::glEvalCoord1fv(u as *f32);
+}
+fn glEvalCoord2d(u: float, v: float) -> () unsafe {
+    ret GL::glEvalCoord2d(u as f64, v as f64);
+}
+fn glEvalCoord2f(u: float, v: float) -> () unsafe {
+    ret GL::glEvalCoord2f(u as f32, v as f32);
+}
+fn glEvalCoord2dv(u: *float) -> () unsafe {
+    ret GL::glEvalCoord2dv(u as *f64);
+}
+fn glEvalCoord2fv(u: *float) -> () unsafe {