Browse Source

add `core` folder with dependencies.

SakiKawasaki 5 years ago
parent
commit
c9cf72d6ad

+ 1 - 1
src/nodesnim/controlnodes/color_rect.nim

@@ -1,5 +1,5 @@
 # author: Ethosa
-import sdl2
+import ../core/sdl2
 import control
 import ../default/enums
 import ../default/vector2

+ 1 - 1
src/nodesnim/controlnodes/control.nim

@@ -1,5 +1,5 @@
 # author: Ethosa
-import sdl2
+import ../core/sdl2
 import ../default/vector2
 import ../defaultnodes/canvas
 import ../defaultnodes/node

+ 3 - 3
src/nodesnim/controlnodes/label.nim

@@ -1,8 +1,8 @@
 # author: Ethosa
 import strutils
-import sdl2
-import sdl2/ttf
-import sdl2/gfx
+import ../core/sdl2
+import ../core/sdl2/ttf
+import ../core/sdl2/gfx
 import control
 import ../default/enums
 import ../default/anchor

+ 2 - 2
src/nodesnim/controlnodes/texture_rect.nim

@@ -1,6 +1,6 @@
 # author: Ethosa
-import sdl2
-import sdl2/gfx
+import ../core/sdl2
+import ../core/sdl2/gfx
 import control
 import ../default/enums
 import ../default/anchor

+ 19 - 0
src/nodesnim/core/opengl.nim

@@ -0,0 +1,19 @@
+#
+#
+#            Nim's Runtime Library
+#        (c) Copyright 2012-2017 Andreas Rumpf
+#
+#    See the file "copying.txt", included in this
+#    distribution, for details about the copyright.
+#
+
+## This module is a wrapper around `opengl`:idx:. If you define the symbol
+## ``useGlew`` this wrapper does not use Nim's ``dynlib`` mechanism,
+## but `glew`:idx: instead. However, this shouldn't be necessary anymore; even
+## extension loading for the different operating systems is handled here.
+##
+## You need to call ``loadExtensions`` after a rendering context has been
+## created to load any extension proc that your code uses.
+
+include opengl/private/prelude, opengl/private/types,
+    opengl/private/errors, opengl/private/procs, opengl/private/constants

+ 326 - 0
src/nodesnim/core/opengl/glu.nim

@@ -0,0 +1,326 @@
+#
+#
+#  Adaption of the delphi3d.net OpenGL units to FreePascal
+#  Sebastian Guenther (sg@freepascal.org) in 2002
+#  These units are free to use
+#******************************************************************************
+# Converted to Delphi by Tom Nuydens (tom@delphi3d.net)
+# For the latest updates, visit Delphi3D: http://www.delphi3d.net
+#******************************************************************************
+
+import opengl
+
+{.deadCodeElim: on.}
+
+when defined(windows):
+  {.push, callconv: stdcall.}
+else:
+  {.push, callconv: cdecl.}
+
+when defined(windows):
+  const
+    dllname = "glu32.dll"
+elif defined(macosx):
+  const
+    dllname = "/System/Library/Frameworks/OpenGL.framework/Libraries/libGLU.dylib"
+else:
+  const
+    dllname = "libGLU.so.1"
+
+type
+  ViewPortArray* = array[0..3, GLint]
+  T16dArray* = array[0..15, GLdouble]
+  CallBack* = proc () {.cdecl.}
+  T3dArray* = array[0..2, GLdouble]
+  T4pArray* = array[0..3, pointer]
+  T4fArray* = array[0..3, GLfloat]
+
+{.deprecated: [
+  TViewPortArray: ViewPortArray,
+  TCallBack: CallBack,
+].}
+
+type
+  GLUnurbs*{.final.} = ptr object
+  GLUquadric*{.final.} = ptr object
+  GLUtesselator*{.final.} = ptr object
+  GLUnurbsObj* = GLUnurbs
+  GLUquadricObj* = GLUquadric
+  GLUtesselatorObj* = GLUtesselator
+  GLUtriangulatorObj* = GLUtesselator
+
+proc gluErrorString*(errCode: GLenum): cstring{.dynlib: dllname,
+    importc: "gluErrorString".}
+when defined(Windows):
+  proc gluErrorUnicodeStringEXT*(errCode: GLenum): ptr int16{.dynlib: dllname,
+      importc: "gluErrorUnicodeStringEXT".}
+proc gluGetString*(name: GLenum): cstring{.dynlib: dllname,
+    importc: "gluGetString".}
+proc gluOrtho2D*(left, right, bottom, top: GLdouble){.dynlib: dllname,
+    importc: "gluOrtho2D".}
+proc gluPerspective*(fovy, aspect, zNear, zFar: GLdouble){.dynlib: dllname,
+    importc: "gluPerspective".}
+proc gluPickMatrix*(x, y, width, height: GLdouble, viewport: var ViewPortArray){.
+    dynlib: dllname, importc: "gluPickMatrix".}
+proc gluLookAt*(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz: GLdouble){.
+    dynlib: dllname, importc: "gluLookAt".}
+proc gluProject*(objx, objy, objz: GLdouble,
+                 modelMatrix, projMatrix: var T16dArray,
+                 viewport: var ViewPortArray, winx, winy, winz: ptr GLdouble): int{.
+    dynlib: dllname, importc: "gluProject".}
+proc gluUnProject*(winx, winy, winz: GLdouble,
+                   modelMatrix, projMatrix: var T16dArray,
+                   viewport: var ViewPortArray, objx, objy, objz: ptr GLdouble): int{.
+    dynlib: dllname, importc: "gluUnProject".}
+proc gluScaleImage*(format: GLenum, widthin, heightin: GLint, typein: GLenum,
+                    datain: pointer, widthout, heightout: GLint,
+                    typeout: GLenum, dataout: pointer): int{.dynlib: dllname,
+    importc: "gluScaleImage".}
+proc gluBuild1DMipmaps*(target: GLenum, components, width: GLint,
+                        format, atype: GLenum, data: pointer): int{.
+    dynlib: dllname, importc: "gluBuild1DMipmaps".}
+proc gluBuild2DMipmaps*(target: GLenum, components, width, height: GLint,
+                        format, atype: GLenum, data: pointer): int{.
+    dynlib: dllname, importc: "gluBuild2DMipmaps".}
+proc gluNewQuadric*(): GLUquadric{.dynlib: dllname, importc: "gluNewQuadric".}
+proc gluDeleteQuadric*(state: GLUquadric){.dynlib: dllname,
+    importc: "gluDeleteQuadric".}
+proc gluQuadricNormals*(quadObject: GLUquadric, normals: GLenum){.
+    dynlib: dllname, importc: "gluQuadricNormals".}
+proc gluQuadricTexture*(quadObject: GLUquadric, textureCoords: GLboolean){.
+    dynlib: dllname, importc: "gluQuadricTexture".}
+proc gluQuadricOrientation*(quadObject: GLUquadric, orientation: GLenum){.
+    dynlib: dllname, importc: "gluQuadricOrientation".}
+proc gluQuadricDrawStyle*(quadObject: GLUquadric, drawStyle: GLenum){.
+    dynlib: dllname, importc: "gluQuadricDrawStyle".}
+proc gluCylinder*(qobj: GLUquadric, baseRadius, topRadius, height: GLdouble,
+                  slices, stacks: GLint){.dynlib: dllname,
+    importc: "gluCylinder".}
+proc gluDisk*(qobj: GLUquadric, innerRadius, outerRadius: GLdouble,
+              slices, loops: GLint){.dynlib: dllname, importc: "gluDisk".}
+proc gluPartialDisk*(qobj: GLUquadric, innerRadius, outerRadius: GLdouble,
+                     slices, loops: GLint, startAngle, sweepAngle: GLdouble){.
+    dynlib: dllname, importc: "gluPartialDisk".}
+proc gluSphere*(qobj: GLuquadric, radius: GLdouble, slices, stacks: GLint){.
+    dynlib: dllname, importc: "gluSphere".}
+proc gluQuadricCallback*(qobj: GLUquadric, which: GLenum, fn: CallBack){.
+    dynlib: dllname, importc: "gluQuadricCallback".}
+proc gluNewTess*(): GLUtesselator{.dynlib: dllname, importc: "gluNewTess".}
+proc gluDeleteTess*(tess: GLUtesselator){.dynlib: dllname,
+    importc: "gluDeleteTess".}
+proc gluTessBeginPolygon*(tess: GLUtesselator, polygon_data: pointer){.
+    dynlib: dllname, importc: "gluTessBeginPolygon".}
+proc gluTessBeginContour*(tess: GLUtesselator){.dynlib: dllname,
+    importc: "gluTessBeginContour".}
+proc gluTessVertex*(tess: GLUtesselator, coords: var T3dArray, data: pointer){.
+    dynlib: dllname, importc: "gluTessVertex".}
+proc gluTessEndContour*(tess: GLUtesselator){.dynlib: dllname,
+    importc: "gluTessEndContour".}
+proc gluTessEndPolygon*(tess: GLUtesselator){.dynlib: dllname,
+    importc: "gluTessEndPolygon".}
+proc gluTessProperty*(tess: GLUtesselator, which: GLenum, value: GLdouble){.
+    dynlib: dllname, importc: "gluTessProperty".}
+proc gluTessNormal*(tess: GLUtesselator, x, y, z: GLdouble){.dynlib: dllname,
+    importc: "gluTessNormal".}
+proc gluTessCallback*(tess: GLUtesselator, which: GLenum, fn: CallBack){.
+    dynlib: dllname, importc: "gluTessCallback".}
+proc gluGetTessProperty*(tess: GLUtesselator, which: GLenum, value: ptr GLdouble){.
+    dynlib: dllname, importc: "gluGetTessProperty".}
+proc gluNewNurbsRenderer*(): GLUnurbs{.dynlib: dllname,
+                                        importc: "gluNewNurbsRenderer".}
+proc gluDeleteNurbsRenderer*(nobj: GLUnurbs){.dynlib: dllname,
+    importc: "gluDeleteNurbsRenderer".}
+proc gluBeginSurface*(nobj: GLUnurbs){.dynlib: dllname,
+                                        importc: "gluBeginSurface".}
+proc gluBeginCurve*(nobj: GLUnurbs){.dynlib: dllname, importc: "gluBeginCurve".}
+proc gluEndCurve*(nobj: GLUnurbs){.dynlib: dllname, importc: "gluEndCurve".}
+proc gluEndSurface*(nobj: GLUnurbs){.dynlib: dllname, importc: "gluEndSurface".}
+proc gluBeginTrim*(nobj: GLUnurbs){.dynlib: dllname, importc: "gluBeginTrim".}
+proc gluEndTrim*(nobj: GLUnurbs){.dynlib: dllname, importc: "gluEndTrim".}
+proc gluPwlCurve*(nobj: GLUnurbs, count: GLint, aarray: ptr GLfloat,
+                  stride: GLint, atype: GLenum){.dynlib: dllname,
+    importc: "gluPwlCurve".}
+proc gluNurbsCurve*(nobj: GLUnurbs, nknots: GLint, knot: ptr GLfloat,
+                    stride: GLint, ctlarray: ptr GLfloat, order: GLint,
+                    atype: GLenum){.dynlib: dllname, importc: "gluNurbsCurve".}
+proc gluNurbsSurface*(nobj: GLUnurbs, sknot_count: GLint, sknot: ptr GLfloat,
+                      tknot_count: GLint, tknot: ptr GLfloat,
+                      s_stride, t_stride: GLint, ctlarray: ptr GLfloat,
+                      sorder, torder: GLint, atype: GLenum){.dynlib: dllname,
+    importc: "gluNurbsSurface".}
+proc gluLoadSamplingMatrices*(nobj: GLUnurbs,
+                              modelMatrix, projMatrix: var T16dArray,
+                              viewport: var ViewPortArray){.dynlib: dllname,
+    importc: "gluLoadSamplingMatrices".}
+proc gluNurbsProperty*(nobj: GLUnurbs, aproperty: GLenum, value: GLfloat){.
+    dynlib: dllname, importc: "gluNurbsProperty".}
+proc gluGetNurbsProperty*(nobj: GLUnurbs, aproperty: GLenum, value: ptr GLfloat){.
+    dynlib: dllname, importc: "gluGetNurbsProperty".}
+proc gluNurbsCallback*(nobj: GLUnurbs, which: GLenum, fn: CallBack){.
+    dynlib: dllname, importc: "gluNurbsCallback".}
+  #*** Callback function prototypes ***
+type                          # gluQuadricCallback
+  GLUquadricErrorProc* = proc (p: GLenum) # gluTessCallback
+  GLUtessBeginProc* = proc (p: GLenum)
+  GLUtessEdgeFlagProc* = proc (p: GLboolean)
+  GLUtessVertexProc* = proc (p: pointer)
+  GLUtessEndProc* = proc ()
+  GLUtessErrorProc* = proc (p: GLenum)
+  GLUtessCombineProc* = proc (p1: var T3dArray, p2: T4pArray, p3: T4fArray,
+                              p4: ptr pointer)
+  GLUtessBeginDataProc* = proc (p1: GLenum, p2: pointer)
+  GLUtessEdgeFlagDataProc* = proc (p1: GLboolean, p2: pointer)
+  GLUtessVertexDataProc* = proc (p1, p2: pointer)
+  GLUtessEndDataProc* = proc (p: pointer)
+  GLUtessErrorDataProc* = proc (p1: GLenum, p2: pointer)
+  GLUtessCombineDataProc* = proc (p1: var T3dArray, p2: var T4pArray,
+                                  p3: var T4fArray, p4: ptr pointer, p5: pointer) #
+  GLUnurbsErrorProc* = proc (p: GLenum) #***           Generic constants               ****/
+
+const                         # Version
+  GLU_VERSION_1_1* = 1
+  GLU_VERSION_1_2* = 1        # Errors: (return value 0 = no error)
+  GLU_INVALID_ENUM* = 100900
+  GLU_INVALID_VALUE* = 100901
+  GLU_OUT_OF_MEMORY* = 100902
+  GLU_INCOMPATIBLE_GL_VERSION* = 100903 # StringName
+  GLU_VERSION* = 100800
+  GLU_EXTENSIONS* = 100801    # Boolean
+  GLU_TRUE* = GL_TRUE
+  GLU_FALSE* = GL_FALSE #***           Quadric constants               ****/
+                        # QuadricNormal
+  GLU_SMOOTH* = 100000
+  GLU_FLAT* = 100001
+  GLU_NONE* = 100002          # QuadricDrawStyle
+  GLU_POINT* = 100010
+  GLU_LINE* = 100011
+  GLU_FILL* = 100012
+  GLU_SILHOUETTE* = 100013    # QuadricOrientation
+  GLU_OUTSIDE* = 100020
+  GLU_INSIDE* = 100021        # Callback types:
+                              #      GLU_ERROR       = 100103;
+                              #***           Tesselation constants           ****/
+  GLU_TESS_MAX_COORD* = 1.00000e+150 # TessProperty
+  GLU_TESS_WINDING_RULE* = 100140
+  GLU_TESS_BOUNDARY_ONLY* = 100141
+  GLU_TESS_TOLERANCE* = 100142 # TessWinding
+  GLU_TESS_WINDING_ODD* = 100130
+  GLU_TESS_WINDING_NONZERO* = 100131
+  GLU_TESS_WINDING_POSITIVE* = 100132
+  GLU_TESS_WINDING_NEGATIVE* = 100133
+  GLU_TESS_WINDING_ABS_GEQ_TWO* = 100134 # TessCallback
+  GLU_TESS_BEGIN* = 100100    # void (CALLBACK*)(GLenum    type)
+  constGLU_TESS_VERTEX* = 100101 # void (CALLBACK*)(void      *data)
+  GLU_TESS_END* = 100102      # void (CALLBACK*)(void)
+  GLU_TESS_ERROR* = 100103    # void (CALLBACK*)(GLenum    errno)
+  GLU_TESS_EDGE_FLAG* = 100104 # void (CALLBACK*)(GLboolean boundaryEdge)
+  GLU_TESS_COMBINE* = 100105 # void (CALLBACK*)(GLdouble  coords[3],
+                             #                                                            void      *data[4],
+                             #                                                            GLfloat   weight[4],
+                             #                                                            void      **dataOut)
+  GLU_TESS_BEGIN_DATA* = 100106 # void (CALLBACK*)(GLenum    type,
+                                #                                                            void      *polygon_data)
+  GLU_TESS_VERTEX_DATA* = 100107 # void (CALLBACK*)(void      *data,
+                                 #                                                            void      *polygon_data)
+  GLU_TESS_END_DATA* = 100108 # void (CALLBACK*)(void      *polygon_data)
+  GLU_TESS_ERROR_DATA* = 100109 # void (CALLBACK*)(GLenum    errno,
+                                #                                                            void      *polygon_data)
+  GLU_TESS_EDGE_FLAG_DATA* = 100110 # void (CALLBACK*)(GLboolean boundaryEdge,
+                                    #                                                            void      *polygon_data)
+  GLU_TESS_COMBINE_DATA* = 100111 # void (CALLBACK*)(GLdouble  coords[3],
+                                  #                                                            void      *data[4],
+                                  #                                                            GLfloat   weight[4],
+                                  #                                                            void      **dataOut,
+                                  #                                                            void      *polygon_data)
+                                  # TessError
+  GLU_TESS_ERROR1* = 100151
+  GLU_TESS_ERROR2* = 100152
+  GLU_TESS_ERROR3* = 100153
+  GLU_TESS_ERROR4* = 100154
+  GLU_TESS_ERROR5* = 100155
+  GLU_TESS_ERROR6* = 100156
+  GLU_TESS_ERROR7* = 100157
+  GLU_TESS_ERROR8* = 100158
+  GLU_TESS_MISSING_BEGIN_POLYGON* = GLU_TESS_ERROR1
+  GLU_TESS_MISSING_BEGIN_CONTOUR* = GLU_TESS_ERROR2
+  GLU_TESS_MISSING_END_POLYGON* = GLU_TESS_ERROR3
+  GLU_TESS_MISSING_END_CONTOUR* = GLU_TESS_ERROR4
+  GLU_TESS_COORD_TOO_LARGE* = GLU_TESS_ERROR5
+  GLU_TESS_NEED_COMBINE_CALLBACK* = GLU_TESS_ERROR6 #***           NURBS constants                 ****/
+                                                    # NurbsProperty
+  GLU_AUTO_LOAD_MATRIX* = 100200
+  GLU_CULLING* = 100201
+  GLU_SAMPLING_TOLERANCE* = 100203
+  GLU_DISPLAY_MODE* = 100204
+  GLU_PARAMETRIC_TOLERANCE* = 100202
+  GLU_SAMPLING_METHOD* = 100205
+  GLU_U_STEP* = 100206
+  GLU_V_STEP* = 100207        # NurbsSampling
+  GLU_PATH_LENGTH* = 100215
+  GLU_PARAMETRIC_ERROR* = 100216
+  GLU_DOMAIN_DISTANCE* = 100217 # NurbsTrim
+  GLU_MAP1_TRIM_2* = 100210
+  GLU_MAP1_TRIM_3* = 100211   # NurbsDisplay
+                              #      GLU_FILL                = 100012;
+  GLU_OUTLINE_POLYGON* = 100240
+  GLU_OUTLINE_PATCH* = 100241 # NurbsCallback
+                              #      GLU_ERROR               = 100103;
+                              # NurbsErrors
+  GLU_NURBS_ERROR1* = 100251
+  GLU_NURBS_ERROR2* = 100252
+  GLU_NURBS_ERROR3* = 100253
+  GLU_NURBS_ERROR4* = 100254
+  GLU_NURBS_ERROR5* = 100255
+  GLU_NURBS_ERROR6* = 100256
+  GLU_NURBS_ERROR7* = 100257
+  GLU_NURBS_ERROR8* = 100258
+  GLU_NURBS_ERROR9* = 100259
+  GLU_NURBS_ERROR10* = 100260
+  GLU_NURBS_ERROR11* = 100261
+  GLU_NURBS_ERROR12* = 100262
+  GLU_NURBS_ERROR13* = 100263
+  GLU_NURBS_ERROR14* = 100264
+  GLU_NURBS_ERROR15* = 100265
+  GLU_NURBS_ERROR16* = 100266
+  GLU_NURBS_ERROR17* = 100267
+  GLU_NURBS_ERROR18* = 100268
+  GLU_NURBS_ERROR19* = 100269
+  GLU_NURBS_ERROR20* = 100270
+  GLU_NURBS_ERROR21* = 100271
+  GLU_NURBS_ERROR22* = 100272
+  GLU_NURBS_ERROR23* = 100273
+  GLU_NURBS_ERROR24* = 100274
+  GLU_NURBS_ERROR25* = 100275
+  GLU_NURBS_ERROR26* = 100276
+  GLU_NURBS_ERROR27* = 100277
+  GLU_NURBS_ERROR28* = 100278
+  GLU_NURBS_ERROR29* = 100279
+  GLU_NURBS_ERROR30* = 100280
+  GLU_NURBS_ERROR31* = 100281
+  GLU_NURBS_ERROR32* = 100282
+  GLU_NURBS_ERROR33* = 100283
+  GLU_NURBS_ERROR34* = 100284
+  GLU_NURBS_ERROR35* = 100285
+  GLU_NURBS_ERROR36* = 100286
+  GLU_NURBS_ERROR37* = 100287 #***           Backwards compatibility for old tesselator           ****/
+
+proc gluBeginPolygon*(tess: GLUtesselator){.dynlib: dllname,
+    importc: "gluBeginPolygon".}
+proc gluNextContour*(tess: GLUtesselator, atype: GLenum){.dynlib: dllname,
+    importc: "gluNextContour".}
+proc gluEndPolygon*(tess: GLUtesselator){.dynlib: dllname,
+    importc: "gluEndPolygon".}
+const                         # Contours types -- obsolete!
+  GLU_CW* = 100120
+  GLU_CCW* = 100121
+  GLU_INTERIOR* = 100122
+  GLU_EXTERIOR* = 100123
+  GLU_UNKNOWN* = 100124       # Names without "TESS_" prefix
+  GLU_BEGIN* = GLU_TESS_BEGIN
+  GLU_VERTEX* = constGLU_TESS_VERTEX
+  GLU_END* = GLU_TESS_END
+  GLU_ERROR* = GLU_TESS_ERROR
+  GLU_EDGE_FLAG* = GLU_TESS_EDGE_FLAG
+
+{.pop.}
+# implementation

+ 379 - 0
src/nodesnim/core/opengl/glut.nim

@@ -0,0 +1,379 @@
+#
+#
+#  Adaption of the delphi3d.net OpenGL units to FreePascal
+#  Sebastian Guenther (sg@freepascal.org) in 2002
+#  These units are free to use
+#
+
+# Copyright (c) Mark J. Kilgard, 1994, 1995, 1996.
+# This program is freely distributable without licensing fees  and is
+#   provided without guarantee or warrantee expressed or  implied. This
+#   program is -not- in the public domain.
+#******************************************************************************
+# Converted to Delphi by Tom Nuydens (tom@delphi3d.net)
+#   Contributions by Igor Karpov (glygrik@hotbox.ru)
+#   For the latest updates, visit Delphi3D: http://www.delphi3d.net
+#******************************************************************************
+
+import opengl
+
+{.deadCodeElim: on.}
+
+when defined(windows):
+  const
+    dllname = "(freeglut.dll|glut32.dll)"
+elif defined(macosx):
+  const
+    dllname = "/System/Library/Frameworks/GLUT.framework/GLUT"
+else:
+  const
+    dllname = "libglut.so.3"
+type
+  TGlutVoidCallback* = proc (){.cdecl.}
+  TGlut1IntCallback* = proc (value: cint){.cdecl.}
+  TGlut2IntCallback* = proc (v1, v2: cint){.cdecl.}
+  TGlut3IntCallback* = proc (v1, v2, v3: cint){.cdecl.}
+  TGlut4IntCallback* = proc (v1, v2, v3, v4: cint){.cdecl.}
+  TGlut1Char2IntCallback* = proc (c: int8, v1, v2: cint){.cdecl.}
+  TGlut1UInt3IntCallback* = proc (u, v1, v2, v3: cint){.cdecl.}
+
+{.deprecated: [Pointer: pointer].}
+
+const
+  GLUT_API_VERSION* = 3
+  GLUT_XLIB_IMPLEMENTATION* = 12 # Display mode bit masks.
+  GLUT_RGB* = 0
+  GLUT_RGBA* = GLUT_RGB
+  GLUT_INDEX* = 1
+  GLUT_SINGLE* = 0
+  GLUT_DOUBLE* = 2
+  GLUT_ACCUM* = 4
+  GLUT_ALPHA* = 8
+  GLUT_DEPTH* = 16
+  GLUT_STENCIL* = 32
+  GLUT_MULTISAMPLE* = 128
+  GLUT_STEREO* = 256
+  GLUT_LUMINANCE* = 512       # Mouse buttons.
+  GLUT_LEFT_BUTTON* = 0
+  GLUT_MIDDLE_BUTTON* = 1
+  GLUT_RIGHT_BUTTON* = 2      # Mouse button state.
+  GLUT_DOWN* = 0
+  GLUT_UP* = 1                # function keys
+  GLUT_KEY_F1* = 1
+  GLUT_KEY_F2* = 2
+  GLUT_KEY_F3* = 3
+  GLUT_KEY_F4* = 4
+  GLUT_KEY_F5* = 5
+  GLUT_KEY_F6* = 6
+  GLUT_KEY_F7* = 7
+  GLUT_KEY_F8* = 8
+  GLUT_KEY_F9* = 9
+  GLUT_KEY_F10* = 10
+  GLUT_KEY_F11* = 11
+  GLUT_KEY_F12* = 12          # directional keys
+  GLUT_KEY_LEFT* = 100
+  GLUT_KEY_UP* = 101
+  GLUT_KEY_RIGHT* = 102
+  GLUT_KEY_DOWN* = 103
+  GLUT_KEY_PAGE_UP* = 104
+  GLUT_KEY_PAGE_DOWN* = 105
+  GLUT_KEY_HOME* = 106
+  GLUT_KEY_END* = 107
+  GLUT_KEY_INSERT* = 108      # Entry/exit  state.
+  GLUT_LEFT* = 0
+  GLUT_ENTERED* = 1           # Menu usage state.
+  GLUT_MENU_NOT_IN_USE* = 0
+  GLUT_MENU_IN_USE* = 1       # Visibility  state.
+  GLUT_NOT_VISIBLE* = 0
+  GLUT_VISIBLE* = 1           # Window status  state.
+  GLUT_HIDDEN* = 0
+  GLUT_FULLY_RETAINED* = 1
+  GLUT_PARTIALLY_RETAINED* = 2
+  GLUT_FULLY_COVERED* = 3     # Color index component selection values.
+  GLUT_RED* = 0
+  GLUT_GREEN* = 1
+  GLUT_BLUE* = 2              # Layers for use.
+  GLUT_NORMAL* = 0
+  GLUT_OVERLAY* = 1
+
+{.push dynlib: dllname, importc.}
+
+when defined(Windows):
+  const                       # Stroke font constants (use these in GLUT program).
+    GLUT_STROKE_ROMAN* = cast[pointer](0)
+    GLUT_STROKE_MONO_ROMAN* = cast[pointer](1) # Bitmap font constants (use these in GLUT program).
+    GLUT_BITMAP_9_BY_15* = cast[pointer](2)
+    GLUT_BITMAP_8_BY_13* = cast[pointer](3)
+    GLUT_BITMAP_TIMES_ROMAN_10* = cast[pointer](4)
+    GLUT_BITMAP_TIMES_ROMAN_24* = cast[pointer](5)
+    GLUT_BITMAP_HELVETICA_10* = cast[pointer](6)
+    GLUT_BITMAP_HELVETICA_12* = cast[pointer](7)
+    GLUT_BITMAP_HELVETICA_18* = cast[pointer](8)
+else:
+  var                         # Stroke font constants (use these in GLUT program).
+    glutStrokeRoman {.importc: "glutStrokeRoman".}: pointer
+    glutStrokeMonoRoman {.importc: "glutStrokeMonoRoman".}: pointer # Bitmap font constants (use these in GLUT program).
+    glutBitmap9By15 {.importc: "glutBitmap9By15".}: pointer
+    glutBitmap8By13 {.importc: "glutBitmap8By13".}: pointer
+    glutBitmapTimesRoman10 {.importc: "glutBitmapTimesRoman10".}: pointer
+    glutBitmapTimesRoman24 {.importc: "glutBitmapTimesRoman24".}: pointer
+    glutBitmapHelvetica10 {.importc: "glutBitmapHelvetica10".}: pointer
+    glutBitmapHelvetica12 {.importc: "glutBitmapHelvetica12".}: pointer
+    glutBitmapHelvetica18 {.importc: "glutBitmapHelvetica18".}: pointer
+
+  let
+    GLUT_STROKE_ROMAN*      = cast[pointer](addr glutStrokeRoman)
+    GLUT_STROKE_MONO_ROMAN* = cast[pointer](addr glutStrokeMonoRoman)
+    GLUT_BITMAP_9_BY_15* = cast[pointer](addr glutBitmap9By15)
+    GLUT_BITMAP_8_BY_13* = cast[pointer](addr glutBitmap8By13)
+    GLUT_BITMAP_TIMES_ROMAN_10* = cast[pointer](addr glutBitmapTimesRoman10)
+    GLUT_BITMAP_TIMES_ROMAN_24* = cast[pointer](addr glutBitmapTimesRoman24)
+    GLUT_BITMAP_HELVETICA_10* = cast[pointer](addr glutBitmapHelvetica10)
+    GLUT_BITMAP_HELVETICA_12* = cast[pointer](addr glutBitmapHelvetica12)
+    GLUT_BITMAP_HELVETICA_18* = cast[pointer](addr glutBitmapHelvetica18)
+
+const                         # glutGet parameters.
+  GLUT_WINDOW_X* = 100
+  GLUT_WINDOW_Y* = 101
+  GLUT_WINDOW_WIDTH* = 102
+  GLUT_WINDOW_HEIGHT* = 103
+  GLUT_WINDOW_BUFFER_SIZE* = 104
+  GLUT_WINDOW_STENCIL_SIZE* = 105
+  GLUT_WINDOW_DEPTH_SIZE* = 106
+  GLUT_WINDOW_RED_SIZE* = 107
+  GLUT_WINDOW_GREEN_SIZE* = 108
+  GLUT_WINDOW_BLUE_SIZE* = 109
+  GLUT_WINDOW_ALPHA_SIZE* = 110
+  GLUT_WINDOW_ACCUM_RED_SIZE* = 111
+  GLUT_WINDOW_ACCUM_GREEN_SIZE* = 112
+  GLUT_WINDOW_ACCUM_BLUE_SIZE* = 113
+  GLUT_WINDOW_ACCUM_ALPHA_SIZE* = 114
+  GLUT_WINDOW_DOUBLEBUFFER* = 115
+  GLUT_WINDOW_RGBA* = 116
+  GLUT_WINDOW_PARENT* = 117
+  GLUT_WINDOW_NUM_CHILDREN* = 118
+  GLUT_WINDOW_COLORMAP_SIZE* = 119
+  GLUT_WINDOW_NUM_SAMPLES* = 120
+  GLUT_WINDOW_STEREO* = 121
+  GLUT_WINDOW_CURSOR* = 122
+  GLUT_SCREEN_WIDTH* = 200
+  GLUT_SCREEN_HEIGHT* = 201
+  GLUT_SCREEN_WIDTH_MM* = 202
+  GLUT_SCREEN_HEIGHT_MM* = 203
+  GLUT_MENU_NUM_ITEMS* = 300
+  GLUT_DISPLAY_MODE_POSSIBLE* = 400
+  GLUT_INIT_WINDOW_X* = 500
+  GLUT_INIT_WINDOW_Y* = 501
+  GLUT_INIT_WINDOW_WIDTH* = 502
+  GLUT_INIT_WINDOW_HEIGHT* = 503
+  constGLUT_INIT_DISPLAY_MODE* = 504
+  GLUT_ELAPSED_TIME* = 700
+  GLUT_WINDOW_FORMAT_ID* = 123 # glutDeviceGet parameters.
+  GLUT_HAS_KEYBOARD* = 600
+  GLUT_HAS_MOUSE* = 601
+  GLUT_HAS_SPACEBALL* = 602
+  GLUT_HAS_DIAL_AND_BUTTON_BOX* = 603
+  GLUT_HAS_TABLET* = 604
+  GLUT_NUM_MOUSE_BUTTONS* = 605
+  GLUT_NUM_SPACEBALL_BUTTONS* = 606
+  GLUT_NUM_BUTTON_BOX_BUTTONS* = 607
+  GLUT_NUM_DIALS* = 608
+  GLUT_NUM_TABLET_BUTTONS* = 609
+  GLUT_DEVICE_IGNORE_KEY_REPEAT* = 610
+  GLUT_DEVICE_KEY_REPEAT* = 611
+  GLUT_HAS_JOYSTICK* = 612
+  GLUT_OWNS_JOYSTICK* = 613
+  GLUT_JOYSTICK_BUTTONS* = 614
+  GLUT_JOYSTICK_AXES* = 615
+  GLUT_JOYSTICK_POLL_RATE* = 616 # glutLayerGet parameters.
+  GLUT_OVERLAY_POSSIBLE* = 800
+  GLUT_LAYER_IN_USE* = 801
+  GLUT_HAS_OVERLAY* = 802
+  GLUT_TRANSPARENT_INDEX* = 803
+  GLUT_NORMAL_DAMAGED* = 804
+  GLUT_OVERLAY_DAMAGED* = 805 # glutVideoResizeGet parameters.
+  GLUT_VIDEO_RESIZE_POSSIBLE* = 900
+  GLUT_VIDEO_RESIZE_IN_USE* = 901
+  GLUT_VIDEO_RESIZE_X_DELTA* = 902
+  GLUT_VIDEO_RESIZE_Y_DELTA* = 903
+  GLUT_VIDEO_RESIZE_WIDTH_DELTA* = 904
+  GLUT_VIDEO_RESIZE_HEIGHT_DELTA* = 905
+  GLUT_VIDEO_RESIZE_X* = 906
+  GLUT_VIDEO_RESIZE_Y* = 907
+  GLUT_VIDEO_RESIZE_WIDTH* = 908
+  GLUT_VIDEO_RESIZE_HEIGHT* = 909 # glutGetModifiers return mask.
+  GLUT_ACTIVE_SHIFT* = 1
+  GLUT_ACTIVE_CTRL* = 2
+  GLUT_ACTIVE_ALT* = 4        # glutSetCursor parameters.
+                              # Basic arrows.
+  GLUT_CURSOR_RIGHT_ARROW* = 0
+  GLUT_CURSOR_LEFT_ARROW* = 1 # Symbolic cursor shapes.
+  GLUT_CURSOR_INFO* = 2
+  GLUT_CURSOR_DESTROY* = 3
+  GLUT_CURSOR_HELP* = 4
+  GLUT_CURSOR_CYCLE* = 5
+  GLUT_CURSOR_SPRAY* = 6
+  GLUT_CURSOR_WAIT* = 7
+  GLUT_CURSOR_TEXT* = 8
+  GLUT_CURSOR_CROSSHAIR* = 9  # Directional cursors.
+  GLUT_CURSOR_UP_DOWN* = 10
+  GLUT_CURSOR_LEFT_RIGHT* = 11 # Sizing cursors.
+  GLUT_CURSOR_TOP_SIDE* = 12
+  GLUT_CURSOR_BOTTOM_SIDE* = 13
+  GLUT_CURSOR_LEFT_SIDE* = 14
+  GLUT_CURSOR_RIGHT_SIDE* = 15
+  GLUT_CURSOR_TOP_LEFT_CORNER* = 16
+  GLUT_CURSOR_TOP_RIGHT_CORNER* = 17
+  GLUT_CURSOR_BOTTOM_RIGHT_CORNER* = 18
+  GLUT_CURSOR_BOTTOM_LEFT_CORNER* = 19 # Inherit from parent window.
+  GLUT_CURSOR_INHERIT* = 100  # Blank cursor.
+  GLUT_CURSOR_NONE* = 101     # Fullscreen crosshair (if available).
+  GLUT_CURSOR_FULL_CROSSHAIR* = 102 # GLUT device control sub-API.
+                                    # glutSetKeyRepeat modes.
+  GLUT_KEY_REPEAT_OFF* = 0
+  GLUT_KEY_REPEAT_ON* = 1
+  GLUT_KEY_REPEAT_DEFAULT* = 2 # Joystick button masks.
+  GLUT_JOYSTICK_BUTTON_A* = 1
+  GLUT_JOYSTICK_BUTTON_B* = 2
+  GLUT_JOYSTICK_BUTTON_C* = 4
+  GLUT_JOYSTICK_BUTTON_D* = 8 # GLUT game mode sub-API.
+                              # glutGameModeGet.
+  GLUT_GAME_MODE_ACTIVE* = 0
+  GLUT_GAME_MODE_POSSIBLE* = 1
+  GLUT_GAME_MODE_WIDTH* = 2
+  GLUT_GAME_MODE_HEIGHT* = 3
+  GLUT_GAME_MODE_PIXEL_DEPTH* = 4
+  GLUT_GAME_MODE_REFRESH_RATE* = 5
+  GLUT_GAME_MODE_DISPLAY_CHANGED* = 6 # GLUT initialization sub-API.
+
+proc glutInit*(argcp: ptr cint, argv: pointer)
+proc glutInitDisplayMode*(mode: int16)
+proc glutInitDisplayString*(str: cstring)
+proc glutInitWindowPosition*(x, y: int)
+proc glutInitWindowSize*(width, height: int)
+proc glutMainLoop*()
+  # GLUT window sub-API.
+proc glutCreateWindow*(title: cstring): int
+proc glutCreateSubWindow*(win, x, y, width, height: int): int
+proc glutDestroyWindow*(win: int)
+proc glutPostRedisplay*()
+proc glutPostWindowRedisplay*(win: int)
+proc glutSwapBuffers*()
+proc glutSetWindow*(win: int)
+proc glutSetWindowTitle*(title: cstring)
+proc glutSetIconTitle*(title: cstring)
+proc glutPositionWindow*(x, y: int)
+proc glutReshapeWindow*(width, height: int)
+proc glutPopWindow*()
+proc glutPushWindow*()
+proc glutIconifyWindow*()
+proc glutShowWindow*()
+proc glutHideWindow*()
+proc glutFullScreen*()
+proc glutSetCursor*(cursor: int)
+proc glutWarpPointer*(x, y: int)
+  # GLUT overlay sub-API.
+proc glutEstablishOverlay*()
+proc glutRemoveOverlay*()
+proc glutUseLayer*(layer: GLenum)
+proc glutPostOverlayRedisplay*()
+proc glutPostWindowOverlayRedisplay*(win: int)
+proc glutShowOverlay*()
+proc glutHideOverlay*()
+  # GLUT menu sub-API.
+proc glutCreateMenu*(callback: TGlut1IntCallback): int
+proc glutDestroyMenu*(menu: int)
+proc glutSetMenu*(menu: int)
+proc glutAddMenuEntry*(caption: cstring, value: int)
+proc glutAddSubMenu*(caption: cstring, submenu: int)
+proc glutChangeToMenuEntry*(item: int, caption: cstring, value: int)
+proc glutChangeToSubMenu*(item: int, caption: cstring, submenu: int)
+proc glutRemoveMenuItem*(item: int)
+proc glutAttachMenu*(button: int)
+proc glutDetachMenu*(button: int)
+  # GLUT window callback sub-API.
+proc glutDisplayFunc*(f: TGlutVoidCallback)
+proc glutReshapeFunc*(f: TGlut2IntCallback)
+proc glutKeyboardFunc*(f: TGlut1Char2IntCallback)
+proc glutMouseFunc*(f: TGlut4IntCallback)
+proc glutMotionFunc*(f: TGlut2IntCallback)
+proc glutPassiveMotionFunc*(f: TGlut2IntCallback)
+proc glutEntryFunc*(f: TGlut1IntCallback)
+proc glutVisibilityFunc*(f: TGlut1IntCallback)
+proc glutIdleFunc*(f: TGlutVoidCallback)
+proc glutTimerFunc*(millis: int16, f: TGlut1IntCallback, value: int)
+proc glutMenuStateFunc*(f: TGlut1IntCallback)
+proc glutSpecialFunc*(f: TGlut3IntCallback)
+proc glutSpaceballMotionFunc*(f: TGlut3IntCallback)
+proc glutSpaceballRotateFunc*(f: TGlut3IntCallback)
+proc glutSpaceballButtonFunc*(f: TGlut2IntCallback)
+proc glutButtonBoxFunc*(f: TGlut2IntCallback)
+proc glutDialsFunc*(f: TGlut2IntCallback)
+proc glutTabletMotionFunc*(f: TGlut2IntCallback)
+proc glutTabletButtonFunc*(f: TGlut4IntCallback)
+proc glutMenuStatusFunc*(f: TGlut3IntCallback)
+proc glutOverlayDisplayFunc*(f: TGlutVoidCallback)
+proc glutWindowStatusFunc*(f: TGlut1IntCallback)
+proc glutKeyboardUpFunc*(f: TGlut1Char2IntCallback)
+proc glutSpecialUpFunc*(f: TGlut3IntCallback)
+proc glutJoystickFunc*(f: TGlut1UInt3IntCallback, pollInterval: int)
+  # GLUT color index sub-API.
+proc glutSetColor*(cell: int, red, green, blue: GLfloat)
+proc glutGetColor*(ndx, component: int): GLfloat
+proc glutCopyColormap*(win: int)
+  # GLUT state retrieval sub-API.
+  # GLUT extension support sub-API
+proc glutExtensionSupported*(name: cstring): int
+  # GLUT font sub-API
+proc glutBitmapCharacter*(font: pointer, character: int)
+proc glutBitmapWidth*(font: pointer, character: int): int
+proc glutStrokeCharacter*(font: pointer, character: int)
+proc glutStrokeWidth*(font: pointer, character: int): int
+proc glutBitmapLength*(font: pointer, str: cstring): int
+proc glutStrokeLength*(font: pointer, str: cstring): int
+  # GLUT pre-built models sub-API
+proc glutWireSphere*(radius: GLdouble, slices, stacks: GLint)
+proc glutSolidSphere*(radius: GLdouble, slices, stacks: GLint)
+proc glutWireCone*(base, height: GLdouble, slices, stacks: GLint)
+proc glutSolidCone*(base, height: GLdouble, slices, stacks: GLint)
+proc glutWireCube*(size: GLdouble)
+proc glutSolidCube*(size: GLdouble)
+proc glutWireTorus*(innerRadius, outerRadius: GLdouble, sides, rings: GLint)
+proc glutSolidTorus*(innerRadius, outerRadius: GLdouble, sides, rings: GLint)
+proc glutWireDodecahedron*()
+proc glutSolidDodecahedron*()
+proc glutWireTeapot*(size: GLdouble)
+proc glutSolidTeapot*(size: GLdouble)
+proc glutWireOctahedron*()
+proc glutSolidOctahedron*()
+proc glutWireTetrahedron*()
+proc glutSolidTetrahedron*()
+proc glutWireIcosahedron*()
+proc glutSolidIcosahedron*()
+  # GLUT video resize sub-API.
+proc glutVideoResizeGet*(param: GLenum): int
+proc glutSetupVideoResizing*()
+proc glutStopVideoResizing*()
+proc glutVideoResize*(x, y, width, height: int)
+proc glutVideoPan*(x, y, width, height: int)
+  # GLUT debugging sub-API.
+proc glutReportErrors*()
+  # GLUT device control sub-API.
+proc glutIgnoreKeyRepeat*(ignore: int)
+proc glutSetKeyRepeat*(repeatMode: int)
+proc glutForceJoystickFunc*()
+  # GLUT game mode sub-API.
+  #example glutGameModeString('1280x1024:32@75');
+proc glutGameModeString*(AString: cstring)
+proc glutLeaveGameMode*()
+proc glutGameModeGet*(mode: GLenum): int
+# implementation
+{.pop.} # dynlib: dllname, importc
+
+# Convenience procs
+proc glutInit*() =
+  ## version that passes `argc` and `argc` implicitely.
+  var
+    cmdLine {.importc: "cmdLine".}: array[0..255, cstring]
+    cmdCount {.importc: "cmdCount".}: cint
+  glutInit(addr(cmdCount), addr(cmdLine))

+ 159 - 0
src/nodesnim/core/opengl/glx.nim

@@ -0,0 +1,159 @@
+#
+#
+#  Translation of the Mesa GLX headers for FreePascal
+#  Copyright (C) 1999 Sebastian Guenther
+#
+#
+#  Mesa 3-D graphics library
+#  Version:  3.0
+#  Copyright (C) 1995-1998  Brian Paul
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Library General Public
+#  License as published by the Free Software Foundation; either
+#  version 2 of the License, or (at your option) any later version.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Library General Public License for more details.
+#
+#  You should have received a copy of the GNU Library General Public
+#  License along with this library; if not, write to the Free
+#  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+import x11/x, x11/xlib, x11/xutil, opengl
+
+{.deadCodeElim: on.}
+
+when defined(windows):
+  const
+    dllname = "GL.dll"
+elif defined(macosx):
+  const
+    dllname = "/usr/X11R6/lib/libGL.dylib"
+elif defined(linux):
+  const
+    dllname = "libGL.so.1"
+else:
+  const
+    dllname = "libGL.so"
+const
+  GLX_USE_GL* = 1'i32
+  GLX_BUFFER_SIZE* = 2'i32
+  GLX_LEVEL* = 3'i32
+  GLX_RGBA* = 4'i32
+  GLX_DOUBLEBUFFER* = 5'i32
+  GLX_STEREO* = 6'i32
+  GLX_AUX_BUFFERS* = 7'i32
+  GLX_RED_SIZE* = 8'i32
+  GLX_GREEN_SIZE* = 9'i32
+  GLX_BLUE_SIZE* = 10'i32
+  GLX_ALPHA_SIZE* = 11'i32
+  GLX_DEPTH_SIZE* = 12'i32
+  GLX_STENCIL_SIZE* = 13'i32
+  GLX_ACCUM_RED_SIZE* = 14'i32
+  GLX_ACCUM_GREEN_SIZE* = 15'i32
+  GLX_ACCUM_BLUE_SIZE* = 16'i32
+  GLX_ACCUM_ALPHA_SIZE* = 17'i32  # GLX_EXT_visual_info extension
+  GLX_X_VISUAL_TYPE_EXT* = 0x00000022
+  GLX_TRANSPARENT_TYPE_EXT* = 0x00000023
+  GLX_TRANSPARENT_INDEX_VALUE_EXT* = 0x00000024
+  GLX_TRANSPARENT_RED_VALUE_EXT* = 0x00000025
+  GLX_TRANSPARENT_GREEN_VALUE_EXT* = 0x00000026
+  GLX_TRANSPARENT_BLUE_VALUE_EXT* = 0x00000027
+  GLX_TRANSPARENT_ALPHA_VALUE_EXT* = 0x00000028 # Error codes returned by glXGetConfig:
+  GLX_BAD_SCREEN* = 1
+  GLX_BAD_ATTRIBUTE* = 2
+  GLX_NO_EXTENSION* = 3
+  GLX_BAD_VISUAL* = 4
+  GLX_BAD_CONTEXT* = 5
+  GLX_BAD_VALUE* = 6
+  GLX_BAD_ENUM* = 7           # GLX 1.1 and later:
+  GLX_VENDOR* = 1
+  GLX_VERSION* = 2
+  GLX_EXTENSIONS* = 3         # GLX_visual_info extension
+  GLX_TRUE_COLOR_EXT* = 0x00008002
+  GLX_DIRECT_COLOR_EXT* = 0x00008003
+  GLX_PSEUDO_COLOR_EXT* = 0x00008004
+  GLX_STATIC_COLOR_EXT* = 0x00008005
+  GLX_GRAY_SCALE_EXT* = 0x00008006
+  GLX_STATIC_GRAY_EXT* = 0x00008007
+  GLX_NONE_EXT* = 0x00008000
+  GLX_TRANSPARENT_RGB_EXT* = 0x00008008
+  GLX_TRANSPARENT_INDEX_EXT* = 0x00008009
+
+type                          # From XLib:
+  XPixmap* = TXID
+  XFont* = TXID
+  XColormap* = TXID
+  GLXContext* = pointer
+  GLXPixmap* = TXID
+  GLXDrawable* = TXID
+  GLXContextID* = TXID
+  TXPixmap* = XPixmap
+  TXFont* = XFont
+  TXColormap* = XColormap
+  TGLXContext* = GLXContext
+  TGLXPixmap* = GLXPixmap
+  TGLXDrawable* = GLXDrawable
+  TGLXContextID* = GLXContextID
+
+  GLXBool = cint
+
+proc glXChooseVisual*(dpy: PDisplay, screen: cint, attribList: ptr int32): PXVisualInfo{.
+    cdecl, dynlib: dllname, importc: "glXChooseVisual".}
+proc glXCreateContext*(dpy: PDisplay, vis: PXVisualInfo, shareList: GLXContext,
+                       direct: GLXBool): GLXContext{.cdecl, dynlib: dllname,
+    importc: "glXCreateContext".}
+proc glXDestroyContext*(dpy: PDisplay, ctx: GLXContext){.cdecl, dynlib: dllname,
+    importc: "glXDestroyContext".}
+proc glXMakeCurrent*(dpy: PDisplay, drawable: GLXDrawable, ctx: GLXContext): GLXBool{.
+    cdecl, dynlib: dllname, importc: "glXMakeCurrent".}
+proc glXCopyContext*(dpy: PDisplay, src, dst: GLXContext, mask: int32){.cdecl,
+    dynlib: dllname, importc: "glXCopyContext".}
+proc glXSwapBuffers*(dpy: PDisplay, drawable: GLXDrawable){.cdecl,
+    dynlib: dllname, importc: "glXSwapBuffers".}
+proc glXCreateGLXPixmap*(dpy: PDisplay, visual: PXVisualInfo, pixmap: XPixmap): GLXPixmap{.
+    cdecl, dynlib: dllname, importc: "glXCreateGLXPixmap".}
+proc glXDestroyGLXPixmap*(dpy: PDisplay, pixmap: GLXPixmap){.cdecl,
+    dynlib: dllname, importc: "glXDestroyGLXPixmap".}
+proc glXQueryExtension*(dpy: PDisplay, errorb, event: var cint): GLXBool{.cdecl,
+    dynlib: dllname, importc: "glXQueryExtension".}
+proc glXQueryVersion*(dpy: PDisplay, maj, min: var cint): GLXBool{.cdecl,
+    dynlib: dllname, importc: "glXQueryVersion".}
+proc glXIsDirect*(dpy: PDisplay, ctx: GLXContext): GLXBool{.cdecl, dynlib: dllname,
+    importc: "glXIsDirect".}
+proc glXGetConfig*(dpy: PDisplay, visual: PXVisualInfo, attrib: cint,
+                   value: var cint): cint{.cdecl, dynlib: dllname,
+    importc: "glXGetConfig".}
+proc glXGetCurrentContext*(): GLXContext{.cdecl, dynlib: dllname,
+    importc: "glXGetCurrentContext".}
+proc glXGetCurrentDrawable*(): GLXDrawable{.cdecl, dynlib: dllname,
+    importc: "glXGetCurrentDrawable".}
+proc glXWaitGL*(){.cdecl, dynlib: dllname, importc: "glXWaitGL".}
+proc glXWaitX*(){.cdecl, dynlib: dllname, importc: "glXWaitX".}
+proc glXUseXFont*(font: XFont, first, count, list: cint){.cdecl, dynlib: dllname,
+    importc: "glXUseXFont".}
+  # GLX 1.1 and later
+proc glXQueryExtensionsString*(dpy: PDisplay, screen: cint): cstring{.cdecl,
+    dynlib: dllname, importc: "glXQueryExtensionsString".}
+proc glXQueryServerString*(dpy: PDisplay, screen, name: cint): cstring{.cdecl,
+    dynlib: dllname, importc: "glXQueryServerString".}
+proc glXGetClientString*(dpy: PDisplay, name: cint): cstring{.cdecl,
+    dynlib: dllname, importc: "glXGetClientString".}
+  # Mesa GLX Extensions
+proc glXCreateGLXPixmapMESA*(dpy: PDisplay, visual: PXVisualInfo,
+                             pixmap: XPixmap, cmap: XColormap): GLXPixmap{.
+    cdecl, dynlib: dllname, importc: "glXCreateGLXPixmapMESA".}
+proc glXReleaseBufferMESA*(dpy: PDisplay, d: GLXDrawable): GLXBool{.cdecl,
+    dynlib: dllname, importc: "glXReleaseBufferMESA".}
+proc glXCopySubBufferMESA*(dpy: PDisplay, drawbale: GLXDrawable,
+                           x, y, width, height: cint){.cdecl, dynlib: dllname,
+    importc: "glXCopySubBufferMESA".}
+proc glXGetVideoSyncSGI*(counter: var int32): cint{.cdecl, dynlib: dllname,
+    importc: "glXGetVideoSyncSGI".}
+proc glXWaitVideoSyncSGI*(divisor, remainder: cint, count: var int32): cint{.
+    cdecl, dynlib: dllname, importc: "glXWaitVideoSyncSGI".}
+# implementation

+ 5013 - 0
src/nodesnim/core/opengl/private/constants.nim

@@ -0,0 +1,5013 @@
+const
+  cGL_UNSIGNED_BYTE* = 0x1401.GLenum
+  cGL_UNSIGNED_SHORT* = 0x1403.GLenum
+  GL_2X_BIT_ATI* = 0x00000001.GLbitfield
+  GL_MODELVIEW6_ARB* = 0x8726.GLenum
+  GL_CULL_FACE_MODE* = 0x0B45.GLenum
+  GL_TEXTURE_MAG_FILTER* = 0x2800.GLenum
+  GL_TRANSFORM_FEEDBACK_VARYINGS_EXT* = 0x8C83.GLenum
+  GL_PATH_JOIN_STYLE_NV* = 0x9079.GLenum
+  GL_FEEDBACK_BUFFER_SIZE* = 0x0DF1.GLenum
+  GL_FRAGMENT_LIGHT0_SGIX* = 0x840C.GLenum
+  GL_DRAW_BUFFER7_ARB* = 0x882C.GLenum
+  GL_POINT_SPRITE_OES* = 0x8861.GLenum
+  GL_INT_SAMPLER_RENDERBUFFER_NV* = 0x8E57.GLenum
+  GL_POST_CONVOLUTION_COLOR_TABLE_SGI* = 0x80D1.GLenum
+  GL_ZOOM_X* = 0x0D16.GLenum
+  GL_DRAW_FRAMEBUFFER_NV* = 0x8CA9.GLenum
+  GL_RGB_FLOAT16_ATI* = 0x881B.GLenum
+  GL_NUM_COMPRESSED_TEXTURE_FORMATS* = 0x86A2.GLenum
+  GL_LINE_STRIP* = 0x0003.GLenum
+  GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI* = 0x80D5.GLenum
+  GL_CURRENT_TIME_NV* = 0x8E28.GLenum
+  GL_FRAMEBUFFER_UNSUPPORTED* = 0x8CDD.GLenum
+  GL_PIXEL_TEX_GEN_Q_CEILING_SGIX* = 0x8184.GLenum
+  GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT* = 0x8C76.GLenum
+  GL_MAP_PERSISTENT_BIT* = 0x0040.GLbitfield
+  GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT* = 0x9056.GLenum
+  GL_CON_16_ATI* = 0x8951.GLenum
+  GL_DEPTH_BUFFER_BIT1_QCOM* = 0x00000200.GLbitfield
+  GL_TEXTURE30_ARB* = 0x84DE.GLenum
+  GL_SAMPLER_BUFFER* = 0x8DC2.GLenum
+  GL_MAX_COLOR_TEXTURE_SAMPLES* = 0x910E.GLenum
+  GL_DEPTH_STENCIL* = 0x84F9.GLenum
+  GL_C4F_N3F_V3F* = 0x2A26.GLenum
+  GL_ZOOM_Y* = 0x0D17.GLenum
+  GL_RGB10* = 0x8052.GLenum
+  GL_PRESERVE_ATI* = 0x8762.GLenum
+  GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB* = 0x8B4D.GLenum
+  GL_COLOR_ATTACHMENT12_NV* = 0x8CEC.GLenum
+  GL_GREEN_MAX_CLAMP_INGR* = 0x8565.GLenum
+  GL_CURRENT_VERTEX_ATTRIB* = 0x8626.GLenum
+  GL_TEXTURE_SHARED_SIZE* = 0x8C3F.GLenum
+  GL_NORMAL_ARRAY_TYPE* = 0x807E.GLenum
+  GL_DYNAMIC_READ* = 0x88E9.GLenum
+  GL_ALPHA4_EXT* = 0x803B.GLenum
+  GL_REPLACEMENT_CODE_ARRAY_SUN* = 0x85C0.GLenum
+  GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV* = 0x8852.GLenum
+  GL_MAX_VERTEX_ATTRIBS_ARB* = 0x8869.GLenum
+  GL_VIDEO_COLOR_CONVERSION_MIN_NV* = 0x902B.GLenum
+  GL_SOURCE3_RGB_NV* = 0x8583.GLenum
+  GL_ALPHA* = 0x1906.GLenum
+  GL_OUTPUT_TEXTURE_COORD16_EXT* = 0x87AD.GLenum
+  GL_BLEND_EQUATION_EXT* = 0x8009.GLenum
+  GL_BIAS_BIT_ATI* = 0x00000008.GLbitfield
+  GL_BLEND_EQUATION_RGB* = 0x8009.GLenum
+  GL_SHADER_BINARY_DMP* = 0x9250.GLenum
+  GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE* = 0x90C8.GLenum
+  GL_Z4Y12Z4CB12Z4CR12_444_NV* = 0x9037.GLenum
+  GL_READ_PIXELS_TYPE* = 0x828E.GLenum
+  GL_CONVOLUTION_HINT_SGIX* = 0x8316.GLenum
+  GL_TRANSPOSE_AFFINE_3D_NV* = 0x9098.GLenum
+  GL_PIXEL_MAP_B_TO_B* = 0x0C78.GLenum
+  GL_VERTEX_BLEND_ARB* = 0x86A7.GLenum
+  GL_LIGHT2* = 0x4002.GLenum
+  cGL_BYTE* = 0x1400.GLenum
+  GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS* = 0x92D3.GLenum
+  GL_DOMAIN* = 0x0A02.GLenum
+  GL_PROGRAM_NATIVE_TEMPORARIES_ARB* = 0x88A6.GLenum
+  GL_RELATIVE_CUBIC_CURVE_TO_NV* = 0x0D.GLenum
+  GL_TEXTURE_DEPTH_TYPE_ARB* = 0x8C16.GLenum
+  GL_STENCIL_BACK_PASS_DEPTH_PASS* = 0x8803.GLenum
+  GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV* = 0x8868.GLenum
+  GL_ATTRIB_STACK_DEPTH* = 0x0BB0.GLenum
+  GL_DEPTH_COMPONENT16_ARB* = 0x81A5.GLenum
+  GL_TESSELLATION_MODE_AMD* = 0x9004.GLenum
+  GL_UNSIGNED_INT8_VEC3_NV* = 0x8FEE.GLenum
+  GL_DOUBLE_VEC4* = 0x8FFE.GLenum
+  GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS* = 0x8E85.GLenum
+  GL_TEXTURE_GREEN_TYPE_ARB* = 0x8C11.GLenum
+  GL_PIXEL_PACK_BUFFER* = 0x88EB.GLenum
+  GL_VERTEX_WEIGHT_ARRAY_EXT* = 0x850C.GLenum
+  GL_HALF_FLOAT* = 0x140B.GLenum
+  GL_REG_0_ATI* = 0x8921.GLenum
+  GL_DEPTH_BUFFER_BIT4_QCOM* = 0x00001000.GLbitfield
+  GL_UNSIGNED_INT_5_9_9_9_REV_EXT* = 0x8C3E.GLenum
+  GL_DEPTH_COMPONENT16_SGIX* = 0x81A5.GLenum
+  GL_COMPRESSED_RGBA_ASTC_8x5_KHR* = 0x93B5.GLenum
+  GL_EDGE_FLAG_ARRAY_LENGTH_NV* = 0x8F30.GLenum
+  GL_CON_17_ATI* = 0x8952.GLenum
+  GL_PARAMETER_BUFFER_ARB* = 0x80EE.GLenum
+  GL_COLOR_ATTACHMENT6_EXT* = 0x8CE6.GLenum
+  GL_INDEX_ARRAY_EXT* = 0x8077.GLenum
+  GL_ALPHA_SCALE* = 0x0D1C.GLenum
+  GL_LINE_QUALITY_HINT_SGIX* = 0x835B.GLenum
+  GL_SLUMINANCE8* = 0x8C47.GLenum
+  GL_DEBUG_OUTPUT_KHR* = 0x92E0.GLenum
+  GL_TEXTURE_LIGHTING_MODE_HP* = 0x8167.GLenum
+  GL_SPOT_DIRECTION* = 0x1204.GLenum
+  GL_V3F* = 0x2A21.GLenum
+  GL_ALPHA16_EXT* = 0x803E.GLenum
+  GL_DRAW_BUFFER15_NV* = 0x8834.GLenum
+  GL_MIN_PROGRAM_TEXEL_OFFSET_EXT* = 0x8904.GLenum
+  GL_ACTIVE_VARYING_MAX_LENGTH_NV* = 0x8C82.GLenum
+  GL_COLOR_ATTACHMENT10* = 0x8CEA.GLenum
+  GL_COLOR_ARRAY_LIST_STRIDE_IBM* = 103082.GLenum
+  GL_TEXTURE_TARGET_QCOM* = 0x8BDA.GLenum
+  GL_DRAW_BUFFER12_ARB* = 0x8831.GLenum
+  GL_SAMPLE_MASK* = 0x8E51.GLenum
+  GL_TEXTURE_FORMAT_QCOM* = 0x8BD6.GLenum
+  GL_TEXTURE_COMPONENTS* = 0x1003.GLenum
+  GL_PROGRAM_PIPELINE_BINDING* = 0x825A.GLenum
+  GL_HIGH_INT* = 0x8DF5.GLenum
+  GL_MAP_INVALIDATE_BUFFER_BIT* = 0x0008.GLbitfield
+  GL_LAYOUT_LINEAR_CPU_CACHED_INTEL* = 2.GLenum
+  GL_TEXTURE_DS_SIZE_NV* = 0x871D.GLenum
+  GL_HALF_FLOAT_NV* = 0x140B.GLenum
+  GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE* = 0x80D5.GLenum
+  GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER* = 0x8A45.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR* = 0x93DB.GLenum
+  GL_REG_18_ATI* = 0x8933.GLenum
+  GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS* = 0x8266.GLenum
+  GL_UNPACK_FLIP_Y_WEBGL* = 0x9240.GLenum
+  GL_POLYGON_STIPPLE_BIT* = 0x00000010.GLbitfield
+  GL_MULTISAMPLE_BUFFER_BIT6_QCOM* = 0x40000000.GLbitfield
+  GL_ONE_MINUS_SRC_ALPHA* = 0x0303.GLenum
+  GL_RASTERIZER_DISCARD_EXT* = 0x8C89.GLenum
+  GL_BGRA_INTEGER* = 0x8D9B.GLenum
+  GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS* = 0x92CE.GLenum
+  GL_MODELVIEW1_EXT* = 0x850A.GLenum
+  GL_VERTEX_ELEMENT_SWIZZLE_AMD* = 0x91A4.GLenum
+  GL_MAP1_GRID_SEGMENTS* = 0x0DD1.GLenum
+  GL_PATH_ERROR_POSITION_NV* = 0x90AB.GLenum
+  GL_FOG_COORDINATE_ARRAY_EXT* = 0x8457.GLenum
+  GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI* = 0x8973.GLenum
+  GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB* = 0x880D.GLenum
+  GL_PATH_GEN_COLOR_FORMAT_NV* = 0x90B2.GLenum
+  GL_BUFFER_VARIABLE* = 0x92E5.GLenum
+  GL_PROXY_TEXTURE_CUBE_MAP_ARB* = 0x851B.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB* = 0x8E8D.GLenum
+  GL_TEXT_FRAGMENT_SHADER_ATI* = 0x8200.GLenum
+  GL_ALPHA_MAX_SGIX* = 0x8321.GLenum
+  GL_UNPACK_ALIGNMENT* = 0x0CF5.GLenum
+  GL_POST_COLOR_MATRIX_RED_SCALE* = 0x80B4.GLenum
+  GL_CIRCULAR_CW_ARC_TO_NV* = 0xFA.GLenum
+  GL_MAX_SAMPLES_APPLE* = 0x8D57.GLenum
+  GL_4PASS_3_SGIS* = 0x80A7.GLenum
+  GL_SAMPLER_3D_OES* = 0x8B5F.GLenum
+  GL_UNSIGNED_INT16_VEC2_NV* = 0x8FF1.GLenum
+  GL_UNSIGNED_INT_SAMPLER_1D_ARRAY* = 0x8DD6.GLenum
+  GL_REG_8_ATI* = 0x8929.GLenum
+  GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT* = 0x8366.GLenum
+  GL_QUERY_RESULT_AVAILABLE_EXT* = 0x8867.GLenum
+  GL_INTENSITY8_EXT* = 0x804B.GLenum
+  GL_OUTPUT_TEXTURE_COORD9_EXT* = 0x87A6.GLenum
+  GL_TEXTURE_BINDING_RECTANGLE_NV* = 0x84F6.GLenum
+  GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV* = 0x8853.GLenum
+  GL_IMAGE_FORMAT_COMPATIBILITY_TYPE* = 0x90C7.GLenum
+  GL_WRITE_ONLY* = 0x88B9.GLenum
+  GL_SAMPLER_1D_SHADOW* = 0x8B61.GLenum
+  GL_DISPATCH_INDIRECT_BUFFER_BINDING* = 0x90EF.GLenum
+  GL_VERTEX_PROGRAM_BINDING_NV* = 0x864A.GLenum
+  GL_RGB8_EXT* = 0x8051.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR* = 0x93D7.GLenum
+  GL_CON_5_ATI* = 0x8946.GLenum
+  GL_DUAL_INTENSITY8_SGIS* = 0x8119.GLenum
+  GL_MAX_SAMPLES_EXT* = 0x8D57.GLenum
+  GL_VERTEX_ARRAY_POINTER_EXT* = 0x808E.GLenum
+  GL_COMBINE_EXT* = 0x8570.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT1_QCOM* = 0x02000000.GLbitfield
+  GL_MAGNITUDE_SCALE_NV* = 0x8712.GLenum
+  GL_SYNC_CONDITION_APPLE* = 0x9113.GLenum
+  GL_RGBA_S3TC* = 0x83A2.GLenum
+  GL_LINE_STIPPLE_REPEAT* = 0x0B26.GLenum
+  GL_TEXTURE_COMPRESSION_HINT* = 0x84EF.GLenum
+  GL_TEXTURE_COMPARE_MODE* = 0x884C.GLenum
+  GL_RGBA_FLOAT_MODE_ATI* = 0x8820.GLenum
+  GL_OPERAND0_RGB* = 0x8590.GLenum
+  GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV* = 0x870D.GLenum
+  GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI* = 0x80B5.GLenum
+  GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV* = 0x9033.GLenum
+  GL_UNPACK_ROW_LENGTH* = 0x0CF2.GLenum
+  GL_DOUBLE_MAT2_EXT* = 0x8F46.GLenum
+  GL_TEXTURE_GEQUAL_R_SGIX* = 0x819D.GLenum
+  GL_UNSIGNED_INT_8_24_REV_MESA* = 0x8752.GLenum
+  GL_DSDT8_NV* = 0x8709.GLenum
+  GL_RESAMPLE_DECIMATE_SGIX* = 0x8430.GLenum
+  GL_DEBUG_SOURCE_OTHER_KHR* = 0x824B.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB* = 0x8DA8.GLenum
+  GL_MAX_VERTEX_UNITS_OES* = 0x86A4.GLenum
+  GL_ISOLINES* = 0x8E7A.GLenum
+  GL_INCR_WRAP* = 0x8507.GLenum
+  GL_BUFFER_MAP_POINTER* = 0x88BD.GLenum
+  GL_INT_SAMPLER_CUBE_MAP_ARRAY* = 0x900E.GLenum
+  GL_UNSIGNED_INT_VEC2* = 0x8DC6.GLenum
+  GL_RENDERBUFFER_HEIGHT_OES* = 0x8D43.GLenum
+  GL_COMPRESSED_RGBA_ASTC_10x10_KHR* = 0x93BB.GLenum
+  GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX* = 0x818A.GLenum
+  GL_LINEAR_SHARPEN_COLOR_SGIS* = 0x80AF.GLenum
+  GL_COLOR_ATTACHMENT5_EXT* = 0x8CE5.GLenum
+  GL_VERTEX_ATTRIB_ARRAY9_NV* = 0x8659.GLenum
+  GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING* = 0x889D.GLenum
+  GL_BLEND_DST_RGB* = 0x80C8.GLenum
+  GL_VERTEX_ARRAY_EXT* = 0x8074.GLenum
+  GL_VERTEX_ARRAY_RANGE_POINTER_NV* = 0x8521.GLenum
+  GL_DEBUG_SEVERITY_MEDIUM_ARB* = 0x9147.GLenum
+  GL_OPERAND0_ALPHA* = 0x8598.GLenum
+  GL_TEXTURE_BINDING_CUBE_MAP* = 0x8514.GLenum
+  GL_ADD_ATI* = 0x8963.GLenum
+  GL_AUX1* = 0x040A.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT* = 0x8210.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS* = 0x8CD9.GLenum
+  GL_MINUS_NV* = 0x929F.GLenum
+  GL_RGB4* = 0x804F.GLenum
+  GL_COMPRESSED_RGBA_ASTC_12x12_KHR* = 0x93BD.GLenum
+  GL_MAX_GEOMETRY_OUTPUT_VERTICES* = 0x8DE0.GLenum
+  GL_SURFACE_STATE_NV* = 0x86EB.GLenum
+  GL_COLOR_MATERIAL_FACE* = 0x0B55.GLenum
+  GL_TEXTURE18_ARB* = 0x84D2.GLenum
+  GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2_OES* = 0x9277.GLenum
+  GL_LOWER_LEFT* = 0x8CA1.GLenum
+  GL_DRAW_BUFFER8_ATI* = 0x882D.GLenum
+  GL_TEXTURE_CONSTANT_DATA_SUNX* = 0x81D6.GLenum
+  GL_SAMPLER_1D* = 0x8B5D.GLenum
+  GL_POLYGON_OFFSET_EXT* = 0x8037.GLenum
+  GL_EQUIV* = 0x1509.GLenum
+  GL_QUERY_BUFFER_BINDING* = 0x9193.GLenum
+  GL_COMBINE_ARB* = 0x8570.GLenum
+  GL_MATRIX0_NV* = 0x8630.GLenum
+  GL_CLAMP_TO_BORDER_SGIS* = 0x812D.GLint
+  GL_INTENSITY8UI_EXT* = 0x8D7F.GLenum
+  GL_TRACK_MATRIX_TRANSFORM_NV* = 0x8649.GLenum
+  GL_SURFACE_MAPPED_NV* = 0x8700.GLenum
+  GL_INT_VEC3_ARB* = 0x8B54.GLenum
+  GL_IMAGE_TRANSFORM_2D_HP* = 0x8161.GLenum
+  GL_PROGRAM_BINARY_RETRIEVABLE_HINT* = 0x8257.GLenum
+  GL_DRAW_BUFFER8_EXT* = 0x882D.GLenum
+  GL_DEPTH_STENCIL_EXT* = 0x84F9.GLenum
+  GL_CONTEXT_PROFILE_MASK* = 0x9126.GLenum
+  GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB* = 0x88A3.GLenum
+  GL_MATRIX5_ARB* = 0x88C5.GLenum
+  GL_FRAMEBUFFER_UNDEFINED_OES* = 0x8219.GLenum
+  GL_UNPACK_CMYK_HINT_EXT* = 0x800F.GLenum
+  GL_UNSIGNED_NORMALIZED_EXT* = 0x8C17.GLenum
+  GL_ONE* = 1.GLenum
+  GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB* = 0x889B.GLenum
+  GL_TRANSPOSE_PROJECTION_MATRIX* = 0x84E4.GLenum
+  GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV* = 0x8C28.GLenum
+  GL_CLIP_DISTANCE3* = 0x3003.GLenum
+  GL_4PASS_1_SGIS* = 0x80A5.GLenum
+  GL_MAX_FRAGMENT_LIGHTS_SGIX* = 0x8404.GLenum
+  GL_TEXTURE_3D_OES* = 0x806F.GLenum
+  GL_TEXTURE0* = 0x84C0.GLenum
+  GL_INT_IMAGE_CUBE_EXT* = 0x905B.GLenum
+  GL_INNOCENT_CONTEXT_RESET_ARB* = 0x8254.GLenum
+  GL_INDEX_ARRAY_TYPE_EXT* = 0x8085.GLenum
+  GL_SAMPLER_OBJECT_AMD* = 0x9155.GLenum
+  GL_INDEX_ARRAY_BUFFER_BINDING_ARB* = 0x8899.GLenum
+  GL_RENDERBUFFER_DEPTH_SIZE_OES* = 0x8D54.GLenum
+  GL_MAX_SAMPLE_MASK_WORDS* = 0x8E59.GLenum
+  GL_COMBINER2_NV* = 0x8552.GLenum
+  GL_COLOR_ARRAY_BUFFER_BINDING_ARB* = 0x8898.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB* = 0x886A.GLenum
+  GL_STREAM_DRAW* = 0x88E0.GLenum
+  GL_RGB8I* = 0x8D8F.GLenum
+  GL_BLEND_COLOR_EXT* = 0x8005.GLenum
+  GL_MAX_VARYING_VECTORS* = 0x8DFC.GLenum
+  GL_COPY_WRITE_BUFFER_BINDING* = 0x8F37.GLenum
+  GL_FIXED_ONLY_ARB* = 0x891D.GLenum
+  GL_INT_VEC4* = 0x8B55.GLenum
+  GL_PROGRAM_PIPELINE_BINDING_EXT* = 0x825A.GLenum
+  GL_UNSIGNED_NORMALIZED_ARB* = 0x8C17.GLenum
+  GL_NUM_INSTRUCTIONS_PER_PASS_ATI* = 0x8971.GLenum
+  GL_PIXEL_MODE_BIT* = 0x00000020.GLbitfield
+  GL_COMPRESSED_RED_RGTC1* = 0x8DBB.GLenum
+  GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT* = 0x00000020.GLbitfield
+  GL_VARIANT_DATATYPE_EXT* = 0x87E5.GLenum
+  GL_DARKEN_NV* = 0x9297.GLenum
+  GL_POINT_SIZE_MAX_SGIS* = 0x8127.GLenum
+  GL_OBJECT_ATTACHED_OBJECTS_ARB* = 0x8B85.GLenum
+  GL_SLUMINANCE_ALPHA_EXT* = 0x8C44.GLenum
+  GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY* = 0x906A.GLenum
+  GL_EDGE_FLAG_ARRAY* = 0x8079.GLenum
+  GL_LINEAR_CLIPMAP_NEAREST_SGIX* = 0x844F.GLenum
+  GL_LUMINANCE_ALPHA32F_EXT* = 0x8819.GLenum
+  GL_NORMAL_BIT_PGI* = 0x08000000.GLbitfield
+  GL_SECONDARY_COLOR_ARRAY* = 0x845E.GLenum
+  GL_CLIP_PLANE1_IMG* = 0x3001.GLenum
+  GL_REG_19_ATI* = 0x8934.GLenum
+  GL_PIXEL_PACK_BUFFER_BINDING* = 0x88ED.GLenum
+  GL_PIXEL_GROUP_COLOR_SGIS* = 0x8356.GLenum
+  GL_SELECTION_BUFFER_SIZE* = 0x0DF4.GLenum
+  GL_SRC_OUT_NV* = 0x928C.GLenum
+  GL_TEXTURE7* = 0x84C7.GLenum
+  GL_COMPARE_R_TO_TEXTURE* = 0x884E.GLenum
+  GL_DUDV_ATI* = 0x8779.GLenum
+  GL_TEXTURE_BASE_LEVEL* = 0x813C.GLenum
+  GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI* = 0x87F5.GLenum
+  GL_LAYOUT_LINEAR_INTEL* = 1.GLenum
+  GL_DEPTH_BUFFER_BIT2_QCOM* = 0x00000400.GLbitfield
+  GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS* = 0x8E8A.GLenum
+  GL_LIGHT3* = 0x4003.GLenum
+  GL_ALPHA_MAX_CLAMP_INGR* = 0x8567.GLenum
+  GL_RG_INTEGER* = 0x8228.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL* = 0x8CD2.GLenum
+  GL_TEXTURE_STACK_DEPTH* = 0x0BA5.GLenum
+  GL_ALREADY_SIGNALED* = 0x911A.GLenum
+  GL_TEXTURE_CUBE_MAP_OES* = 0x8513.GLenum
+  GL_N3F_V3F* = 0x2A25.GLenum
+  GL_SUBTRACT_ARB* = 0x84E7.GLenum
+  GL_ELEMENT_ARRAY_LENGTH_NV* = 0x8F33.GLenum
+  GL_NORMAL_ARRAY_EXT* = 0x8075.GLenum
+  GL_POLYGON_OFFSET_FACTOR_EXT* = 0x8038.GLenum
+  GL_EIGHTH_BIT_ATI* = 0x00000020.GLbitfield
+  GL_UNSIGNED_INT_SAMPLER_2D_RECT* = 0x8DD5.GLenum
+  GL_OBJECT_ACTIVE_ATTRIBUTES_ARB* = 0x8B89.GLenum
+  GL_MAX_VERTEX_VARYING_COMPONENTS_ARB* = 0x8DDE.GLenum
+  GL_TEXTURE_COORD_ARRAY_STRIDE_EXT* = 0x808A.GLenum
+  GL_4_BYTES* = 0x1409.GLenum
+  GL_SAMPLE_SHADING* = 0x8C36.GLenum
+  GL_FOG_MODE* = 0x0B65.GLenum
+  GL_CON_7_ATI* = 0x8948.GLenum
+  GL_DRAW_FRAMEBUFFER* = 0x8CA9.GLenum
+  GL_TEXTURE_MEMORY_LAYOUT_INTEL* = 0x83FF.GLenum
+  GL_RGB32I_EXT* = 0x8D83.GLenum
+  GL_VERTEX_ARRAY_STRIDE* = 0x807C.GLenum
+  GL_COLOR_ATTACHMENT3_NV* = 0x8CE3.GLenum
+  GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL* = 0x83F6.GLenum
+  GL_CONTRAST_NV* = 0x92A1.GLenum
+  GL_RGBA32F* = 0x8814.GLenum
+  GL_YCBAYCR8A_4224_NV* = 0x9032.GLenum
+  GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET* = 0x82D9.GLenum
+  GL_TEXTURE22* = 0x84D6.GLenum
+  GL_TEXTURE_3D* = 0x806F.GLenum
+  GL_STENCIL_PASS_DEPTH_FAIL* = 0x0B95.GLenum
+  GL_PROXY_HISTOGRAM_EXT* = 0x8025.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS* = 0x92C5.GLenum
+  GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE* = 0x92D8.GLenum
+  GL_FOG_COORD_ARRAY_TYPE* = 0x8454.GLenum
+  GL_MAP2_VERTEX_4* = 0x0DB8.GLenum
+  GL_PACK_COMPRESSED_SIZE_SGIX* = 0x831C.GLenum
+  GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX* = 0x817C.GLenum
+  GL_ITALIC_BIT_NV* = 0x02.GLbitfield
+  GL_COMPRESSED_LUMINANCE_ALPHA* = 0x84EB.GLenum
+  GL_COLOR_TABLE_SCALE_SGI* = 0x80D6.GLenum
+  GL_DOUBLE_MAT2x4_EXT* = 0x8F4A.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE* = 0x8215.GLenum
+  GL_MATRIX11_ARB* = 0x88CB.GLenum
+  GL_REG_5_ATI* = 0x8926.GLenum
+  GL_RGBA2_EXT* = 0x8055.GLenum
+  GL_DISCARD_NV* = 0x8530.GLenum
+  GL_TEXTURE7_ARB* = 0x84C7.GLenum
+  GL_LUMINANCE32UI_EXT* = 0x8D74.GLenum
+  GL_ACTIVE_UNIFORM_BLOCKS* = 0x8A36.GLenum
+  GL_UNSIGNED_INT16_VEC4_NV* = 0x8FF3.GLenum
+  GL_VERTEX_ATTRIB_ARRAY5_NV* = 0x8655.GLenum
+  GL_DOUBLE_MAT3x4* = 0x8F4C.GLenum
+  GL_BOOL* = 0x8B56.GLenum
+  GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB* = 0x86A2.GLenum
+  GL_COMPRESSED_RGB_ARB* = 0x84ED.GLenum
+  GL_DEBUG_TYPE_MARKER_KHR* = 0x8268.GLenum
+  GL_TEXTURE_DEPTH_QCOM* = 0x8BD4.GLenum
+  GL_VARIABLE_F_NV* = 0x8528.GLenum
+  GL_MAX_PIXEL_MAP_TABLE* = 0x0D34.GLenum
+  GL_DST_COLOR* = 0x0306.GLenum
+  GL_OR_INVERTED* = 0x150D.GLenum
+  GL_TRANSFORM_FEEDBACK_VARYINGS_NV* = 0x8C83.GLenum
+  GL_RGB_INTEGER* = 0x8D98.GLenum
+  GL_COLOR_MATERIAL* = 0x0B57.GLenum
+  GL_DEBUG_SEVERITY_LOW_AMD* = 0x9148.GLenum
+  GL_MIRROR_CLAMP_TO_BORDER_EXT* = 0x8912.GLint
+  GL_TEXTURE1_ARB* = 0x84C1.GLenum
+  GL_MIN_MAP_BUFFER_ALIGNMENT* = 0x90BC.GLenum
+  GL_MATRIX16_ARB* = 0x88D0.GLenum
+  GL_TEXTURE_ALPHA_TYPE_ARB* = 0x8C13.GLenum
+  GL_PROGRAM_POINT_SIZE* = 0x8642.GLenum
+  GL_COMBINER_AB_OUTPUT_NV* = 0x854A.GLenum
+  GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2_OES* = 0x9276.GLenum
+  GL_RGB4_S3TC* = 0x83A1.GLenum
+  GL_TEXTURE_EXTERNAL_OES* = 0x8D65.GLenum
+  GL_MAX_MAP_TESSELLATION_NV* = 0x86D6.GLenum
+  GL_AUX_DEPTH_STENCIL_APPLE* = 0x8A14.GLenum
+  GL_MAX_DEBUG_LOGGED_MESSAGES_AMD* = 0x9144.GLenum
+  GL_CONSTANT_BORDER* = 0x8151.GLenum
+  GL_RESAMPLE_ZERO_FILL_OML* = 0x8987.GLenum
+  GL_POST_CONVOLUTION_ALPHA_SCALE_EXT* = 0x801F.GLenum
+  GL_OBJECT_VALIDATE_STATUS_ARB* = 0x8B83.GLenum
+  GL_DST_ALPHA* = 0x0304.GLenum
+  GL_COMBINER5_NV* = 0x8555.GLenum
+  GL_VERSION_ES_CL_1_1* = 1.GLenum
+  GL_MOVE_TO_CONTINUES_NV* = 0x90B6.GLenum
+  GL_IMAGE_MAG_FILTER_HP* = 0x815C.GLenum
+  GL_TEXTURE_FREE_MEMORY_ATI* = 0x87FC.GLenum
+  GL_DEBUG_TYPE_PORTABILITY_KHR* = 0x824F.GLenum
+  GL_BUFFER_UPDATE_BARRIER_BIT* = 0x00000200.GLbitfield
+  GL_FUNC_ADD* = 0x8006.GLenum
+  GL_PN_TRIANGLES_POINT_MODE_ATI* = 0x87F2.GLenum
+  GL_DEBUG_CALLBACK_USER_PARAM_ARB* = 0x8245.GLenum
+  GL_CURRENT_SECONDARY_COLOR* = 0x8459.GLenum
+  GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV* = 0x885A.GLenum
+  GL_FRAGMENT_LIGHT7_SGIX* = 0x8413.GLenum
+  GL_MAP2_TEXTURE_COORD_4* = 0x0DB6.GLenum
+  GL_PACK_ALIGNMENT* = 0x0D05.GLenum
+  GL_VERTEX23_BIT_PGI* = 0x00000004.GLbitfield
+  GL_MAX_CLIPMAP_DEPTH_SGIX* = 0x8177.GLenum
+  GL_TEXTURE_3D_BINDING_EXT* = 0x806A.GLenum
+  GL_COLOR_ATTACHMENT1* = 0x8CE1.GLenum
+  GL_NEAREST* = 0x2600.GLint
+  GL_MAX_DEBUG_LOGGED_MESSAGES* = 0x9144.GLenum
+  GL_COMBINER6_NV* = 0x8556.GLenum
+  GL_COLOR_SUM_EXT* = 0x8458.GLenum
+  GL_CONVOLUTION_WIDTH* = 0x8018.GLenum
+  GL_SAMPLE_ALPHA_TO_COVERAGE_ARB* = 0x809E.GLenum
+  GL_DRAW_FRAMEBUFFER_EXT* = 0x8CA9.GLenum
+  GL_PROXY_HISTOGRAM* = 0x8025.GLenum
+  GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS* = 0x8355.GLenum
+  GL_COMPRESSED_RGBA_ASTC_10x5_KHR* = 0x93B8.GLenum
+  GL_SMOOTH_CUBIC_CURVE_TO_NV* = 0x10.GLenum
+  GL_BGR_EXT* = 0x80E0.GLenum
+  GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB* = 0x88B6.GLenum
+  GL_VIBRANCE_BIAS_NV* = 0x8719.GLenum
+  GL_UNPACK_COLORSPACE_CONVERSION_WEBGL* = 0x9243.GLenum
+  GL_SLUMINANCE8_NV* = 0x8C47.GLenum
+  GL_TEXTURE_MAX_LEVEL_SGIS* = 0x813D.GLenum
+  GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX* = 0x92DA.GLenum
+  GL_RGB9_E5_EXT* = 0x8C3D.GLenum
+  GL_CULL_VERTEX_IBM* = 103050.GLenum
+  GL_PROXY_COLOR_TABLE* = 0x80D3.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE* = 0x8216.GLenum
+  GL_MAX_FRAGMENT_UNIFORM_COMPONENTS* = 0x8B49.GLenum
+  GL_CCW* = 0x0901.GLenum
+  GL_COLOR_WRITEMASK* = 0x0C23.GLenum
+  GL_TEXTURE19_ARB* = 0x84D3.GLenum
+  GL_VERTEX_STREAM3_ATI* = 0x876F.GLenum
+  GL_ONE_EXT* = 0x87DE.GLenum
+  GL_MAX_SAMPLES* = 0x8D57.GLenum
+  GL_STENCIL_PASS_DEPTH_PASS* = 0x0B96.GLenum
+  GL_PERFMON_RESULT_AVAILABLE_AMD* = 0x8BC4.GLenum
+  GL_RETURN* = 0x0102.GLenum
+  GL_DETAIL_TEXTURE_LEVEL_SGIS* = 0x809A.GLenum
+  GL_UNSIGNED_INT_IMAGE_CUBE_EXT* = 0x9066.GLenum
+  GL_FOG_OFFSET_VALUE_SGIX* = 0x8199.GLenum
+  GL_TEXTURE_MAX_LOD_SGIS* = 0x813B.GLenum
+  GL_TRANSPOSE_COLOR_MATRIX_ARB* = 0x84E6.GLenum
+  GL_DEBUG_SOURCE_APPLICATION_ARB* = 0x824A.GLenum
+  GL_SIGNED_ALPHA_NV* = 0x8705.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_EXT* = 0x9063.GLenum
+  GL_SHADER_IMAGE_ACCESS_BARRIER_BIT* = 0x00000020.GLbitfield
+  GL_ATOMIC_COUNTER_BARRIER_BIT* = 0x00001000.GLbitfield
+  GL_COLOR3_BIT_PGI* = 0x00010000.GLbitfield
+  GL_MATERIAL_SIDE_HINT_PGI* = 0x1A22C.GLenum
+  GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE* = 0x85B0.GLenum
+  GL_LINEAR_SHARPEN_SGIS* = 0x80AD.GLenum
+  GL_LUMINANCE_SNORM* = 0x9011.GLenum
+  GL_TEXTURE_LUMINANCE_SIZE* = 0x8060.GLenum
+  GL_REPLACE_MIDDLE_SUN* = 0x0002.GLenum
+  GL_TEXTURE_DEFORMATION_SGIX* = 0x8195.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT7_QCOM* = 0x80000000.GLbitfield
+  GL_FONT_HAS_KERNING_BIT_NV* = 0x10000000.GLbitfield
+  GL_COPY* = 0x1503.GLenum
+  GL_READ_BUFFER_NV* = 0x0C02.GLenum
+  GL_TRANSPOSE_CURRENT_MATRIX_ARB* = 0x88B7.GLenum
+  GL_VERTEX_ARRAY_OBJECT_AMD* = 0x9154.GLenum
+  GL_TIMEOUT_EXPIRED* = 0x911B.GLenum
+  GL_DYNAMIC_COPY* = 0x88EA.GLenum
+  GL_DRAW_BUFFER2_ARB* = 0x8827.GLenum
+  GL_OUTPUT_TEXTURE_COORD10_EXT* = 0x87A7.GLenum
+  GL_SIGNED_RGBA8_NV* = 0x86FC.GLenum
+  GL_MATRIX6_ARB* = 0x88C6.GLenum
+  GL_OP_SUB_EXT* = 0x8796.GLenum
+  GL_NO_RESET_NOTIFICATION_EXT* = 0x8261.GLenum
+  GL_TEXTURE_BASE_LEVEL_SGIS* = 0x813C.GLenum
+  GL_ALPHA_INTEGER* = 0x8D97.GLenum
+  GL_TEXTURE13* = 0x84CD.GLenum
+  GL_EYE_LINEAR* = 0x2400.GLenum
+  GL_INTENSITY4_EXT* = 0x804A.GLenum
+  GL_SOURCE1_RGB_EXT* = 0x8581.GLenum
+  GL_AUX_BUFFERS* = 0x0C00.GLenum
+  GL_SOURCE0_ALPHA* = 0x8588.GLenum
+  GL_RGB32I* = 0x8D83.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS* = 0x8C8A.GLenum
+  GL_VIEW_CLASS_S3TC_DXT1_RGBA* = 0x82CD.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV* = 0x8C85.GLenum
+  GL_SAMPLER_KHR* = 0x82E6.GLenum
+  GL_WRITEONLY_RENDERING_QCOM* = 0x8823.GLenum
+  GL_PACK_SKIP_ROWS* = 0x0D03.GLenum
+  GL_MAP1_VERTEX_ATTRIB0_4_NV* = 0x8660.GLenum
+  GL_PATH_STENCIL_VALUE_MASK_NV* = 0x90B9.GLenum
+  GL_REPLACE_EXT* = 0x8062.GLenum
+  GL_MODELVIEW3_ARB* = 0x8723.GLenum
+  GL_ONE_MINUS_CONSTANT_ALPHA* = 0x8004.GLenum
+  GL_DSDT8_MAG8_INTENSITY8_NV* = 0x870B.GLenum
+  GL_CURRENT_QUERY_ARB* = 0x8865.GLenum
+  GL_LUMINANCE8_ALPHA8_OES* = 0x8045.GLenum
+  GL_ARRAY_ELEMENT_LOCK_COUNT_EXT* = 0x81A9.GLenum
+  GL_MODELVIEW19_ARB* = 0x8733.GLenum
+  GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT* = 0x87C5.GLenum
+  GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB* = 0x8810.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT* = 0x906C.GLenum
+  GL_NORMAL_ARRAY_BUFFER_BINDING* = 0x8897.GLenum
+  GL_AMBIENT* = 0x1200.GLenum
+  GL_TEXTURE_MATERIAL_PARAMETER_EXT* = 0x8352.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR* = 0x93DA.GLenum
+  GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS* = 0x8E7F.GLenum
+  GL_COMPRESSED_LUMINANCE_ALPHA_ARB* = 0x84EB.GLenum
+  GL_MODELVIEW14_ARB* = 0x872E.GLenum
+  GL_INTERLACE_READ_OML* = 0x8981.GLenum
+  GL_RENDERBUFFER_FREE_MEMORY_ATI* = 0x87FD.GLenum
+  GL_EMBOSS_MAP_NV* = 0x855F.GLenum
+  GL_POINT_SIZE_RANGE* = 0x0B12.GLenum
+  GL_FOG_COORDINATE* = 0x8451.GLenum
+  GL_MAJOR_VERSION* = 0x821B.GLenum
+  GL_FRAME_NV* = 0x8E26.GLenum
+  GL_CURRENT_TEXTURE_COORDS* = 0x0B03.GLenum
+  GL_PACK_RESAMPLE_OML* = 0x8984.GLenum
+  GL_DEPTH24_STENCIL8_OES* = 0x88F0.GLenum
+  GL_PROGRAM_BINARY_FORMATS_OES* = 0x87FF.GLenum
+  GL_TRANSLATE_3D_NV* = 0x9091.GLenum
+  GL_TEXTURE_GEN_Q* = 0x0C63.GLenum
+  GL_COLOR_ATTACHMENT0_EXT* = 0x8CE0.GLenum
+  GL_ALPHA12* = 0x803D.GLenum
+  GL_INCR_WRAP_EXT* = 0x8507.GLenum
+  GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN* = 0x8C88.GLenum
+  GL_DUAL_ALPHA12_SGIS* = 0x8112.GLenum
+  GL_EYE_LINE_SGIS* = 0x81F6.GLenum
+  GL_TEXTURE_MAX_LEVEL_APPLE* = 0x813D.GLenum
+  GL_TRIANGLE_FAN* = 0x0006.GLenum
+  GL_DEBUG_GROUP_STACK_DEPTH* = 0x826D.GLenum
+  GL_IMAGE_CLASS_1_X_16* = 0x82BE.GLenum
+  GL_COMPILE* = 0x1300.GLenum
+  GL_LINE_SMOOTH* = 0x0B20.GLenum
+  GL_FEEDBACK_BUFFER_POINTER* = 0x0DF0.GLenum
+  GL_CURRENT_SECONDARY_COLOR_EXT* = 0x8459.GLenum
+  GL_DRAW_BUFFER2_ATI* = 0x8827.GLenum
+  GL_PN_TRIANGLES_NORMAL_MODE_ATI* = 0x87F3.GLenum
+  GL_MODELVIEW0_ARB* = 0x1700.GLenum
+  GL_SRGB8_ALPHA8* = 0x8C43.GLenum
+  GL_TEXTURE_BLUE_TYPE* = 0x8C12.GLenum
+  GL_POST_CONVOLUTION_ALPHA_BIAS* = 0x8023.GLenum
+  GL_PATH_STROKE_BOUNDING_BOX_NV* = 0x90A2.GLenum
+  GL_RGBA16UI* = 0x8D76.GLenum
+  GL_OFFSET_HILO_TEXTURE_2D_NV* = 0x8854.GLenum
+  GL_PREVIOUS_ARB* = 0x8578.GLenum
+  GL_BINORMAL_ARRAY_EXT* = 0x843A.GLenum
+  GL_UNSIGNED_INT_IMAGE_CUBE* = 0x9066.GLenum
+  GL_REG_30_ATI* = 0x893F.GLenum
+  GL_VIEWPORT_SUBPIXEL_BITS* = 0x825C.GLenum
+  GL_VERSION* = 0x1F02.GLenum
+  GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV* = 0x90FC.GLenum
+  GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD* = 0x914E.GLenum
+  GL_CONVOLUTION_FILTER_SCALE_EXT* = 0x8014.GLenum
+  GL_HALF_BIT_ATI* = 0x00000008.GLbitfield
+  GL_SPRITE_AXIS_SGIX* = 0x814A.GLenum
+  GL_INDEX_ARRAY_STRIDE* = 0x8086.GLenum
+  GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB* = 0x88B2.GLenum
+  GL_EVAL_VERTEX_ATTRIB0_NV* = 0x86C6.GLenum
+  GL_COUNTER_RANGE_AMD* = 0x8BC1.GLenum
+  GL_VERTEX_WEIGHTING_EXT* = 0x8509.GLenum
+  GL_POST_CONVOLUTION_GREEN_SCALE* = 0x801D.GLenum
+  GL_UNSIGNED_INT8_NV* = 0x8FEC.GLenum
+  GL_CURRENT_MATRIX_STACK_DEPTH_NV* = 0x8640.GLenum
+  GL_STENCIL_INDEX1_OES* = 0x8D46.GLenum
+  GL_SLUMINANCE_NV* = 0x8C46.GLenum
+  GL_UNSIGNED_INT_8_8_8_8_REV_EXT* = 0x8367.GLenum
+  GL_HISTOGRAM_FORMAT* = 0x8027.GLenum
+  GL_LUMINANCE12_ALPHA4_EXT* = 0x8046.GLenum
+  GL_FLOAT_MAT3* = 0x8B5B.GLenum
+  GL_MAX_PROGRAM_TEXEL_OFFSET_NV* = 0x8905.GLenum
+  GL_PALETTE8_RGBA4_OES* = 0x8B98.GLenum
+  GL_UNPACK_SKIP_IMAGES_EXT* = 0x806D.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Y* = 0x8518.GLenum
+  GL_UNPACK_SUBSAMPLE_RATE_SGIX* = 0x85A1.GLenum
+  GL_NORMAL_ARRAY_LENGTH_NV* = 0x8F2C.GLenum
+  GL_VERTEX_ATTRIB_ARRAY4_NV* = 0x8654.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES* = 0x8CD9.GLenum
+  GL_UNSIGNED_BYTE* = 0x1401.GLenum
+  GL_RGB2_EXT* = 0x804E.GLenum
+  GL_TEXTURE_BUFFER_SIZE* = 0x919E.GLenum
+  GL_MAP_STENCIL* = 0x0D11.GLenum
+  GL_TIMEOUT_EXPIRED_APPLE* = 0x911B.GLenum
+  GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS* = 0x8C29.GLenum
+  GL_CON_14_ATI* = 0x894F.GLenum
+  GL_RGBA12* = 0x805A.GLenum
+  GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS* = 0x919A.GLenum
+  GL_CON_20_ATI* = 0x8955.GLenum
+  GL_LOCAL_CONSTANT_DATATYPE_EXT* = 0x87ED.GLenum
+  GL_DUP_FIRST_CUBIC_CURVE_TO_NV* = 0xF2.GLenum
+  GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV* = 0x8F27.GLenum
+  GL_TEXTURE_COORD_ARRAY* = 0x8078.GLenum
+  GL_LUMINANCE8I_EXT* = 0x8D92.GLenum
+  GL_REPLACE_OLDEST_SUN* = 0x0003.GLenum
+  GL_TEXTURE_SHADER_NV* = 0x86DE.GLenum
+  GL_UNSIGNED_INT_8_8_8_8_EXT* = 0x8035.GLenum
+  GL_SAMPLE_COVERAGE_INVERT* = 0x80AB.GLenum
+  GL_FOG_COORD_ARRAY_ADDRESS_NV* = 0x8F28.GLenum
+  GL_GPU_DISJOINT_EXT* = 0x8FBB.GLenum
+  GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI* = 0x8803.GLenum
+  GL_TEXTURE_GREEN_SIZE_EXT* = 0x805D.GLenum
+  GL_INTERLEAVED_ATTRIBS* = 0x8C8C.GLenum
+  GL_FOG_FUNC_SGIS* = 0x812A.GLenum
+  GL_TEXTURE_DEPTH_SIZE_ARB* = 0x884A.GLenum
+  GL_MAP_COHERENT_BIT* = 0x0080.GLbitfield
+  GL_COMPRESSED_SLUMINANCE_ALPHA* = 0x8C4B.GLenum
+  GL_RGB32UI* = 0x8D71.GLenum
+  GL_SEPARABLE_2D* = 0x8012.GLenum
+  GL_MATRIX10_ARB* = 0x88CA.GLenum
+  GL_FLOAT_RGBA32_NV* = 0x888B.GLenum
+  GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB* = 0x9199.GLenum
+  GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV* = 0x8E54.GLenum
+  GL_REG_9_ATI* = 0x892A.GLenum
+  GL_MAP2_VERTEX_ATTRIB14_4_NV* = 0x867E.GLenum
+  GL_OP_EXP_BASE_2_EXT* = 0x8791.GLenum
+  GL_INT_IMAGE_BUFFER_EXT* = 0x905C.GLenum
+  GL_TEXTURE_WRAP_R_EXT* = 0x8072.GLenum
+  GL_DOUBLE_VEC3* = 0x8FFD.GLenum
+  GL_DRAW_BUFFER5_EXT* = 0x882A.GLenum
+  GL_OUTPUT_TEXTURE_COORD7_EXT* = 0x87A4.GLenum
+  GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB* = 0x8242.GLenum
+  GL_MAX_TESS_GEN_LEVEL* = 0x8E7E.GLenum
+  GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB* = 0x8895.GLenum
+  GL_RGBA16I_EXT* = 0x8D88.GLenum
+  GL_REG_10_ATI* = 0x892B.GLenum
+  GL_MAT_EMISSION_BIT_PGI* = 0x00800000.GLbitfield
+  GL_TEXTURE_COORD_ARRAY_SIZE_EXT* = 0x8088.GLenum
+  GL_RED_BIAS* = 0x0D15.GLenum
+  GL_RGB16F_ARB* = 0x881B.GLenum
+  GL_ANY_SAMPLES_PASSED_CONSERVATIVE* = 0x8D6A.GLenum
+  GL_BLUE_MAX_CLAMP_INGR* = 0x8566.GLenum
+  cGL_FLOAT* = 0x1406.GLenum
+  GL_STENCIL_INDEX8_EXT* = 0x8D48.GLenum
+  GL_POINT_SIZE_ARRAY_OES* = 0x8B9C.GLenum
+  GL_INT16_NV* = 0x8FE4.GLenum
+  GL_PALETTE4_RGB8_OES* = 0x8B90.GLenum
+  GL_RENDERBUFFER_GREEN_SIZE_OES* = 0x8D51.GLenum
+  GL_SEPARATE_ATTRIBS_NV* = 0x8C8D.GLenum
+  GL_BOOL_VEC3_ARB* = 0x8B58.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES* = 0x92C6.GLenum
+  GL_STACK_UNDERFLOW_KHR* = 0x0504.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB* = 0x8519.GLenum
+  GL_COMPRESSED_INTENSITY_ARB* = 0x84EC.GLenum
+  GL_MAX_ASYNC_TEX_IMAGE_SGIX* = 0x835F.GLenum
+  GL_TEXTURE_4D_SGIS* = 0x8134.GLenum
+  GL_TEXCOORD3_BIT_PGI* = 0x40000000.GLbitfield
+  GL_PIXEL_MAP_I_TO_R_SIZE* = 0x0CB2.GLenum
+  GL_NORMAL_MAP_ARB* = 0x8511.GLenum
+  GL_MAX_CONVOLUTION_HEIGHT* = 0x801B.GLenum
+  GL_COMPRESSED_INTENSITY* = 0x84EC.GLenum
+  GL_FONT_Y_MAX_BOUNDS_BIT_NV* = 0x00080000.GLbitfield
+  GL_FLOAT_MAT2* = 0x8B5A.GLenum
+  GL_TEXTURE_SRGB_DECODE_EXT* = 0x8A48.GLenum
+  GL_FRAMEBUFFER_BLEND* = 0x828B.GLenum
+  GL_TEXTURE_COORD_ARRAY_LIST_IBM* = 103074.GLenum
+  GL_REG_12_ATI* = 0x892D.GLenum
+  GL_UNSIGNED_INT_ATOMIC_COUNTER* = 0x92DB.GLenum
+  GL_DETAIL_TEXTURE_2D_BINDING_SGIS* = 0x8096.GLenum
+  GL_OCCLUSION_TEST_HP* = 0x8165.GLenum
+  GL_TEXTURE11_ARB* = 0x84CB.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC* = 0x9279.GLenum
+  GL_BUFFER_MAPPED* = 0x88BC.GLenum
+  GL_VARIANT_ARRAY_STRIDE_EXT* = 0x87E6.GLenum
+  GL_CONVOLUTION_BORDER_COLOR_HP* = 0x8154.GLenum
+  GL_UNPACK_RESAMPLE_OML* = 0x8985.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_SIZE* = 0x8C85.GLenum
+  GL_PROXY_TEXTURE_2D_ARRAY_EXT* = 0x8C1B.GLenum
+  GL_RGBA4_EXT* = 0x8056.GLenum
+  GL_ALPHA32I_EXT* = 0x8D84.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE* = 0x92C4.GLenum
+  GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX* = 0x840A.GLenum
+  GL_BINORMAL_ARRAY_TYPE_EXT* = 0x8440.GLenum
+  GL_VIEW_CLASS_S3TC_DXT5_RGBA* = 0x82CF.GLenum
+  GL_TEXTURE_CLIPMAP_OFFSET_SGIX* = 0x8173.GLenum
+  GL_RESTART_SUN* = 0x0001.GLenum
+  GL_PERTURB_EXT* = 0x85AE.GLenum
+  GL_UNSIGNED_BYTE_3_3_2_EXT* = 0x8032.GLenum
+  GL_LUMINANCE16I_EXT* = 0x8D8C.GLenum
+  GL_TEXTURE3_ARB* = 0x84C3.GLenum
+  GL_POINT_SIZE_MIN_EXT* = 0x8126.GLenum
+  GL_OUTPUT_TEXTURE_COORD1_EXT* = 0x879E.GLenum
+  GL_COMPARE_REF_TO_TEXTURE* = 0x884E.GLenum
+  GL_KEEP* = 0x1E00.GLenum
+  GL_FLOAT_MAT2x4* = 0x8B66.GLenum
+  GL_FLOAT_VEC4_ARB* = 0x8B52.GLenum
+  GL_BIAS_BY_NEGATIVE_ONE_HALF_NV* = 0x8541.GLenum
+  GL_BGR* = 0x80E0.GLenum
+  GL_SHADER_BINARY_FORMATS* = 0x8DF8.GLenum
+  GL_CND0_ATI* = 0x896B.GLenum
+  GL_MIRRORED_REPEAT_IBM* = 0x8370.GLint
+  GL_REFLECTION_MAP_OES* = 0x8512.GLenum
+  GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT* = 0x8DE2.GLenum
+  GL_R* = 0x2002.GLenum
+  GL_MAX_SHADER_STORAGE_BLOCK_SIZE* = 0x90DE.GLenum
+  GL_ATTRIB_ARRAY_STRIDE_NV* = 0x8624.GLenum
+  GL_VARIABLE_E_NV* = 0x8527.GLenum
+  GL_HISTOGRAM_EXT* = 0x8024.GLenum
+  GL_TEXTURE_BINDING_BUFFER_ARB* = 0x8C2C.GLenum
+  GL_MAX_SPARSE_TEXTURE_SIZE_ARB* = 0x9198.GLenum
+  GL_TEXTURE5* = 0x84C5.GLenum
+  GL_NUM_ACTIVE_VARIABLES* = 0x9304.GLenum
+  GL_DEPTH_STENCIL_ATTACHMENT* = 0x821A.GLenum
+  GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB* = 0x889E.GLenum
+  GL_AMBIENT_AND_DIFFUSE* = 0x1602.GLenum
+  GL_LAYER_NV* = 0x8DAA.GLenum
+  GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV* = 0x08.GLbitfield
+  GL_TEXTURE8* = 0x84C8.GLenum
+  GL_MODELVIEW5_ARB* = 0x8725.GLenum
+  GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS* = 0x92D1.GLenum
+  GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS* = 0x92CD.GLenum
+  GL_BLUE_MIN_CLAMP_INGR* = 0x8562.GLenum
+  GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS* = 0x90D9.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES* = 0x8519.GLenum
+  GL_MAX_SAMPLES_IMG* = 0x9135.GLenum
+  GL_QUERY_BY_REGION_WAIT* = 0x8E15.GLenum
+  GL_T* = 0x2001.GLenum
+  GL_VIEW_CLASS_RGTC2_RG* = 0x82D1.GLenum
+  GL_TEXTURE_ENV_MODE* = 0x2200.GLenum
+  GL_COMPRESSED_SRGB8_ETC2* = 0x9275.GLenum
+  GL_MAP_FLUSH_EXPLICIT_BIT* = 0x0010.GLbitfield
+  GL_COLOR_MATERIAL_PARAMETER* = 0x0B56.GLenum
+  GL_HALF_FLOAT_ARB* = 0x140B.GLenum
+  GL_NOTEQUAL* = 0x0205.GLenum
+  GL_MAP_INVALIDATE_BUFFER_BIT_EXT* = 0x0008.GLbitfield
+  GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT* = 0x8C29.GLenum
+  GL_DUAL_TEXTURE_SELECT_SGIS* = 0x8124.GLenum
+  GL_TEXTURE31* = 0x84DF.GLenum
+  GL_EVAL_TRIANGULAR_2D_NV* = 0x86C1.GLenum
+  GL_VIDEO_COLOR_CONVERSION_OFFSET_NV* = 0x902C.GLenum
+  GL_COMPRESSED_R11_EAC_OES* = 0x9270.GLenum
+  GL_RGB8_OES* = 0x8051.GLenum
+  GL_CLIP_PLANE2* = 0x3002.GLenum
+  GL_HINT_BIT* = 0x00008000.GLbitfield
+  GL_TEXTURE6_ARB* = 0x84C6.GLenum
+  GL_FLOAT_VEC2* = 0x8B50.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT* = 0x8C85.GLenum
+  GL_MAX_EVAL_ORDER* = 0x0D30.GLenum
+  GL_DUAL_LUMINANCE8_SGIS* = 0x8115.GLenum
+  GL_ALPHA16I_EXT* = 0x8D8A.GLenum
+  GL_IDENTITY_NV* = 0x862A.GLenum
+  GL_VIEW_CLASS_BPTC_UNORM* = 0x82D2.GLenum
+  GL_PATH_DASH_CAPS_NV* = 0x907B.GLenum
+  GL_IGNORE_BORDER_HP* = 0x8150.GLenum
+  GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI* = 0x87F6.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT* = 0x8C8B.GLenum
+  GL_DRAW_BUFFER1_ATI* = 0x8826.GLenum
+  GL_TEXTURE_MIN_FILTER* = 0x2801.GLenum
+  GL_EVAL_VERTEX_ATTRIB12_NV* = 0x86D2.GLenum
+  GL_INT_IMAGE_2D_ARRAY* = 0x905E.GLenum
+  GL_SRC0_RGB* = 0x8580.GLenum
+  GL_MIN_EXT* = 0x8007.GLenum
+  GL_PROGRAM_PIPELINE_OBJECT_EXT* = 0x8A4F.GLenum
+  GL_STENCIL_BUFFER_BIT* = 0x00000400.GLbitfield
+  GL_SCREEN_COORDINATES_REND* = 0x8490.GLenum
+  GL_DOUBLE_VEC3_EXT* = 0x8FFD.GLenum
+  GL_SUBSAMPLE_DISTANCE_AMD* = 0x883F.GLenum
+  GL_VERTEX_SHADER_LOCALS_EXT* = 0x87D3.GLenum
+  GL_VERTEX_ATTRIB_ARRAY13_NV* = 0x865D.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR* = 0x93D9.GLenum
+  GL_UNSIGNED_NORMALIZED* = 0x8C17.GLenum
+  GL_DRAW_BUFFER10_NV* = 0x882F.GLenum
+  GL_PATH_STROKE_MASK_NV* = 0x9084.GLenum
+  GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB* = 0x88A7.GLenum
+  GL_SRGB_ALPHA_EXT* = 0x8C42.GLenum
+  GL_CONST_EYE_NV* = 0x86E5.GLenum
+  GL_MODELVIEW1_ARB* = 0x850A.GLenum
+  GL_FORMAT_SUBSAMPLE_244_244_OML* = 0x8983.GLenum
+  GL_LOGIC_OP_MODE* = 0x0BF0.GLenum
+  GL_CLIP_DISTANCE4* = 0x3004.GLenum
+  GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD* = 0x914A.GLenum
+  GL_SAMPLES* = 0x80A9.GLenum
+  GL_UNSIGNED_SHORT_5_5_5_1_EXT* = 0x8034.GLenum
+  GL_POINT_DISTANCE_ATTENUATION* = 0x8129.GLenum
+  GL_3D_COLOR* = 0x0602.GLenum
+  GL_BGRA* = 0x80E1.GLenum
+  GL_PARAMETER_BUFFER_BINDING_ARB* = 0x80EF.GLenum
+  GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM* = 103085.GLenum
+  GL_HSL_LUMINOSITY_NV* = 0x92B0.GLenum
+  GL_PROJECTION_STACK_DEPTH* = 0x0BA4.GLenum
+  GL_COMBINER_BIAS_NV* = 0x8549.GLenum
+  GL_AND* = 0x1501.GLenum
+  GL_TEXTURE27* = 0x84DB.GLenum
+  GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA* = 0x8BB7.GLenum
+  GL_DRAW_BUFFER13_ATI* = 0x8832.GLenum
+  GL_UNSIGNED_SHORT_5_5_5_1* = 0x8034.GLenum
+  GL_PERFMON_GLOBAL_MODE_QCOM* = 0x8FA0.GLenum
+  GL_RED_EXT* = 0x1903.GLenum
+  GL_INNOCENT_CONTEXT_RESET_EXT* = 0x8254.GLenum
+  GL_UNIFORM_BUFFER_START* = 0x8A29.GLenum
+  GL_MAX_UNIFORM_BUFFER_BINDINGS* = 0x8A2F.GLenum
+  GL_SLICE_ACCUM_SUN* = 0x85CC.GLenum
+  GL_DRAW_BUFFER9_ATI* = 0x882E.GLenum
+  GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV* = 0x8DA2.GLenum
+  GL_READ_FRAMEBUFFER_BINDING_APPLE* = 0x8CAA.GLenum
+  GL_INDEX_ARRAY_LENGTH_NV* = 0x8F2E.GLenum
+  GL_DETAIL_TEXTURE_MODE_SGIS* = 0x809B.GLenum
+  GL_MATRIX13_ARB* = 0x88CD.GLenum
+  GL_ADD_SIGNED_ARB* = 0x8574.GLenum
+  GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE* = 0x910A.GLenum
+  GL_DEPTH_BITS* = 0x0D56.GLenum
+  GL_LUMINANCE_ALPHA_SNORM* = 0x9012.GLenum
+  GL_VIEW_CLASS_RGTC1_RED* = 0x82D0.GLenum
+  GL_LINE_WIDTH* = 0x0B21.GLenum
+  GL_DRAW_BUFFER14_ATI* = 0x8833.GLenum
+  GL_CON_30_ATI* = 0x895F.GLenum
+  GL_POST_COLOR_MATRIX_BLUE_BIAS* = 0x80BA.GLenum
+  GL_PIXEL_TRANSFORM_2D_EXT* = 0x8330.GLenum
+  GL_CONTEXT_LOST_WEBGL* = 0x9242.GLenum
+  GL_COLOR_TABLE_BLUE_SIZE_SGI* = 0x80DC.GLenum
+  GL_CONSTANT_EXT* = 0x8576.GLenum
+  GL_IMPLEMENTATION_COLOR_READ_TYPE* = 0x8B9A.GLenum
+  GL_HSL_COLOR_NV* = 0x92AF.GLenum
+  GL_LOAD* = 0x0101.GLenum
+  GL_TEXTURE_BIT* = 0x00040000.GLbitfield
+  GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT* = 0x8CD9.GLenum
+  GL_IMAGE_ROTATE_ORIGIN_X_HP* = 0x815A.GLenum
+  GL_DEPTH_BUFFER_BIT6_QCOM* = 0x00004000.GLbitfield
+  GL_QUERY* = 0x82E3.GLenum
+  GL_INVALID_VALUE* = 0x0501.GLenum
+  GL_PACK_COMPRESSED_BLOCK_HEIGHT* = 0x912C.GLenum
+  GL_MAX_PROGRAM_GENERIC_RESULTS_NV* = 0x8DA6.GLenum
+  GL_BACK_PRIMARY_COLOR_NV* = 0x8C77.GLenum
+  GL_ALPHA8_OES* = 0x803C.GLenum
+  GL_INDEX* = 0x8222.GLenum
+  GL_ATTRIB_ARRAY_SIZE_NV* = 0x8623.GLenum
+  GL_INT_IMAGE_1D_ARRAY* = 0x905D.GLenum
+  GL_LOCATION* = 0x930E.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT* = 0x8CD7.GLenum
+  GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE* = 0x82AF.GLenum
+  GL_RESAMPLE_ZERO_FILL_SGIX* = 0x842F.GLenum
+  GL_VERTEX_ARRAY_BINDING_OES* = 0x85B5.GLenum
+  GL_MATRIX4_ARB* = 0x88C4.GLenum
+  GL_NEXT_BUFFER_NV* = -2
+  GL_ELEMENT_ARRAY_BARRIER_BIT* = 0x00000002.GLbitfield
+  GL_RGBA16_EXT* = 0x805B.GLenum
+  GL_SEPARABLE_2D_EXT* = 0x8012.GLenum
+  GL_R11F_G11F_B10F_EXT* = 0x8C3A.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT* = 0x8CD4.GLenum
+  GL_IMAGE_2D_EXT* = 0x904D.GLenum
+  GL_DRAW_BUFFER6_NV* = 0x882B.GLenum
+  GL_TEXTURE_RANGE_LENGTH_APPLE* = 0x85B7.GLenum
+  GL_TEXTURE_RED_TYPE_ARB* = 0x8C10.GLenum
+  GL_ALPHA16F_ARB* = 0x881C.GLenum
+  GL_DEBUG_LOGGED_MESSAGES_ARB* = 0x9145.GLenum
+  GL_TRANSPOSE_MODELVIEW_MATRIX_ARB* = 0x84E3.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT* = 0x8C8F.GLenum
+  GL_MAX_CONVOLUTION_WIDTH* = 0x801A.GLenum
+  GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV* = 0x8E5B.GLenum
+  GL_PIXEL_TILE_CACHE_SIZE_SGIX* = 0x8145.GLenum
+  GL_4PASS_0_SGIS* = 0x80A4.GLenum
+  GL_PRIMITIVE_RESTART* = 0x8F9D.GLenum
+  GL_RG16_SNORM* = 0x8F99.GLenum
+  GL_SAMPLER_2D_SHADOW_EXT* = 0x8B62.GLenum
+  GL_FRONT* = 0x0404.GLenum
+  GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY* = 0x9103.GLenum
+  GL_SAMPLER_BINDING* = 0x8919.GLenum
+  GL_TEXTURE_2D_STACK_MESAX* = 0x875A.GLenum
+  GL_ASYNC_HISTOGRAM_SGIX* = 0x832C.GLenum
+  GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES* = 0x8B9B.GLenum
+  GL_OP_SET_LT_EXT* = 0x878D.GLenum
+  GL_INTERNALFORMAT_RED_TYPE* = 0x8278.GLenum
+  GL_AUX2* = 0x040B.GLenum
+  GL_CLAMP_FRAGMENT_COLOR* = 0x891B.GLenum
+  GL_BROWSER_DEFAULT_WEBGL* = 0x9244.GLenum
+  GL_IMAGE_CLASS_11_11_10* = 0x82C2.GLenum
+  GL_BUMP_ENVMAP_ATI* = 0x877B.GLenum
+  GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV* = 0x8DAD.GLenum
+  GL_RG_SNORM* = 0x8F91.GLenum
+  GL_BUMP_ROT_MATRIX_ATI* = 0x8775.GLenum
+  GL_UNIFORM_TYPE* = 0x8A37.GLenum
+  GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX* = 0x8403.GLenum
+  GL_TEXTURE_BINDING_CUBE_MAP_ARRAY* = 0x900A.GLenum
+  GL_LUMINANCE12* = 0x8041.GLenum
+  GL_QUERY_NO_WAIT_NV* = 0x8E14.GLenum
+  GL_TEXTURE_CUBE_MAP_ARRAY_ARB* = 0x9009.GLenum
+  GL_QUERY_BY_REGION_NO_WAIT_NV* = 0x8E16.GLenum
+  GL_FOG_END* = 0x0B64.GLenum
+  GL_OBJECT_LINK_STATUS_ARB* = 0x8B82.GLenum
+  GL_TEXTURE_COORD_ARRAY_SIZE* = 0x8088.GLenum
+  GL_SOURCE0_ALPHA_ARB* = 0x8588.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB* = 0x8518.GLenum
+  GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX* = 0x840B.GLenum
+  GL_STATIC_COPY* = 0x88E6.GLenum
+  GL_LINE_WIDTH_RANGE* = 0x0B22.GLenum
+  GL_VERTEX_SOURCE_ATI* = 0x8774.GLenum
+  GL_FLOAT_MAT4x3* = 0x8B6A.GLenum
+  GL_HALF_APPLE* = 0x140B.GLenum
+  GL_TEXTURE11* = 0x84CB.GLenum
+  GL_DECODE_EXT* = 0x8A49.GLenum
+  GL_VERTEX_ARRAY_STRIDE_EXT* = 0x807C.GLenum
+  GL_SAMPLER_BUFFER_EXT* = 0x8DC2.GLenum
+  GL_TEXTURE_LOD_BIAS_EXT* = 0x8501.GLenum
+  GL_MODULATE_SIGNED_ADD_ATI* = 0x8745.GLenum
+  GL_DEPTH_CLEAR_VALUE* = 0x0B73.GLenum
+  GL_COMPRESSED_ALPHA* = 0x84E9.GLenum
+  GL_TEXTURE_1D_STACK_MESAX* = 0x8759.GLenum
+  GL_TEXTURE_FIXED_SAMPLE_LOCATIONS* = 0x9107.GLenum
+  GL_LARGE_CCW_ARC_TO_NV* = 0x16.GLenum
+  GL_COMBINER1_NV* = 0x8551.GLenum
+  GL_ARRAY_SIZE* = 0x92FB.GLenum
+  GL_MAX_COMPUTE_IMAGE_UNIFORMS* = 0x91BD.GLenum
+  GL_TEXTURE_BINDING_EXTERNAL_OES* = 0x8D67.GLenum
+  GL_REG_26_ATI* = 0x893B.GLenum
+  GL_MUL_ATI* = 0x8964.GLenum
+  GL_STENCIL_BUFFER_BIT6_QCOM* = 0x00400000.GLbitfield
+  GL_INVALID_OPERATION* = 0x0502.GLenum
+  GL_COLOR_SUM* = 0x8458.GLenum
+  GL_OP_CROSS_PRODUCT_EXT* = 0x8797.GLenum
+  GL_COLOR_ATTACHMENT4_NV* = 0x8CE4.GLenum
+  GL_MAX_RECTANGLE_TEXTURE_SIZE_NV* = 0x84F8.GLenum
+  GL_BOOL_ARB* = 0x8B56.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB* = 0x8625.GLenum
+  GL_MODELVIEW8_ARB* = 0x8728.GLenum
+  GL_STENCIL_TEST* = 0x0B90.GLenum
+  GL_SRC_OVER_NV* = 0x9288.GLenum
+  GL_COMPRESSED_LUMINANCE* = 0x84EA.GLenum
+  GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV* = 0x8E5A.GLenum
+  GL_WEIGHT_ARRAY_TYPE_ARB* = 0x86A9.GLenum
+  GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV* = 0x887C.GLenum
+  GL_COLOR_ARRAY_STRIDE_EXT* = 0x8083.GLenum
+  GL_BLEND_SRC_ALPHA_EXT* = 0x80CB.GLenum
+  GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB* = 0x88B4.GLenum
+  GL_SCALAR_EXT* = 0x87BE.GLenum
+  GL_DEBUG_SEVERITY_MEDIUM_KHR* = 0x9147.GLenum
+  GL_IMAGE_SCALE_X_HP* = 0x8155.GLenum
+  GL_LUMINANCE6_ALPHA2_EXT* = 0x8044.GLenum
+  GL_OUTPUT_TEXTURE_COORD22_EXT* = 0x87B3.GLenum
+  GL_CURRENT_PROGRAM* = 0x8B8D.GLenum
+  GL_FRAGMENT_PROGRAM_ARB* = 0x8804.GLenum
+  GL_INFO_LOG_LENGTH* = 0x8B84.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Z* = 0x8519.GLenum
+  GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES* = 0x898E.GLenum
+  GL_PRIMITIVE_RESTART_FIXED_INDEX* = 0x8D69.GLenum
+  GL_ARRAY_BUFFER_ARB* = 0x8892.GLenum
+  GL_DEPTH_STENCIL_MESA* = 0x8750.GLenum
+  GL_LUMINANCE8_OES* = 0x8040.GLenum
+  GL_REFLECTION_MAP_EXT* = 0x8512.GLenum
+  GL_PRIMITIVES_GENERATED* = 0x8C87.GLenum
+  GL_IMAGE_PIXEL_FORMAT* = 0x82A9.GLenum
+  GL_VERTEX_ARRAY_LIST_STRIDE_IBM* = 103080.GLenum
+  GL_MAP2_COLOR_4* = 0x0DB0.GLenum
+  GL_MULTIPLY_NV* = 0x9294.GLenum
+  GL_UNIFORM_BARRIER_BIT_EXT* = 0x00000004.GLbitfield
+  GL_STENCIL_BUFFER_BIT3_QCOM* = 0x00080000.GLbitfield
+  GL_REG_7_ATI* = 0x8928.GLenum
+  GL_STATIC_READ_ARB* = 0x88E5.GLenum
+  GL_MATRIX2_ARB* = 0x88C2.GLenum
+  GL_STENCIL_BUFFER_BIT5_QCOM* = 0x00200000.GLbitfield
+  GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB* = 0x8B4C.GLenum
+  GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG* = 0x8C03.GLenum
+  GL_R1UI_T2F_N3F_V3F_SUN* = 0x85CA.GLenum
+  GL_TEXTURE27_ARB* = 0x84DB.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES* = 0x8CDA.GLenum
+  GL_MAX_PROGRAM_TEXEL_OFFSET* = 0x8905.GLenum
+  GL_INT_SAMPLER_2D_ARRAY_EXT* = 0x8DCF.GLenum
+  GL_DRAW_BUFFER9_EXT* = 0x882E.GLenum
+  GL_RGB5_A1_EXT* = 0x8057.GLenum
+  GL_FIELDS_NV* = 0x8E27.GLenum
+  GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV* = 0x862E.GLenum
+  GL_SHADER_COMPILER* = 0x8DFA.GLenum
+  GL_SRC2_ALPHA* = 0x858A.GLenum
+  GL_TRACE_NAME_MESA* = 0x8756.GLenum
+  GL_MIRROR_CLAMP_TO_EDGE* = 0x8743.GLint
+  GL_OPERAND0_RGB_EXT* = 0x8590.GLenum
+  GL_UNSIGNED_BYTE_2_3_3_REV_EXT* = 0x8362.GLenum
+  GL_UNSIGNED_INT_2_10_10_10_REV* = 0x8368.GLenum
+  GL_MAX_CLIP_DISTANCES* = 0x0D32.GLenum
+  GL_MAP2_TEXTURE_COORD_3* = 0x0DB5.GLenum
+  GL_DUAL_LUMINANCE16_SGIS* = 0x8117.GLenum
+  GL_TEXTURE_UPDATE_BARRIER_BIT_EXT* = 0x00000100.GLbitfield
+  GL_IMAGE_BUFFER_EXT* = 0x9051.GLenum
+  GL_REDUCE_EXT* = 0x8016.GLenum
+  GL_EVAL_VERTEX_ATTRIB9_NV* = 0x86CF.GLenum
+  GL_IMAGE_CLASS_4_X_32* = 0x82B9.GLenum
+  GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT* = 0x8DE3.GLenum
+  GL_FRAGMENTS_INSTRUMENT_MAX_SGIX* = 0x8315.GLenum
+  GL_REG_28_ATI* = 0x893D.GLenum
+  GL_VARIABLE_B_NV* = 0x8524.GLenum
+  GL_GET_TEXTURE_IMAGE_TYPE* = 0x8292.GLenum
+  GL_PERCENTAGE_AMD* = 0x8BC3.GLenum
+  GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB* = 0x8DE1.GLenum
+  GL_MAX_COMPUTE_UNIFORM_BLOCKS* = 0x91BB.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE* = 0x8D56.GLenum
+  GL_PROVOKING_VERTEX* = 0x8E4F.GLenum
+  GL_FRAMEZOOM_FACTOR_SGIX* = 0x818C.GLenum
+  GL_COLOR_TABLE_ALPHA_SIZE* = 0x80DD.GLenum
+  GL_PIXEL_TEXTURE_SGIS* = 0x8353.GLenum
+  GL_MODELVIEW26_ARB* = 0x873A.GLenum
+  GL_MAX_DEBUG_MESSAGE_LENGTH_KHR* = 0x9143.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT* = 0x8519.GLenum
+  GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT* = 0x87D2.GLenum
+  GL_DRAW_INDIRECT_LENGTH_NV* = 0x8F42.GLenum
+  GL_OPERAND2_RGB_ARB* = 0x8592.GLenum
+  GL_TESS_EVALUATION_SHADER* = 0x8E87.GLenum
+  GL_INTERLACE_SGIX* = 0x8094.GLenum
+  GL_HARDLIGHT_NV* = 0x929B.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT* = 0x8CD0.GLenum
+  GL_OUTPUT_TEXTURE_COORD6_EXT* = 0x87A3.GLenum
+  GL_SIGNED_LUMINANCE_NV* = 0x8701.GLenum
+  GL_CON_13_ATI* = 0x894E.GLenum
+  GL_CURRENT_TANGENT_EXT* = 0x843B.GLenum
+  GL_UNSIGNED_INT_IMAGE_3D* = 0x9064.GLenum
+  GL_MODELVIEW24_ARB* = 0x8738.GLenum
+  GL_EVAL_FRACTIONAL_TESSELLATION_NV* = 0x86C5.GLenum
+  GL_POINT_SPRITE_NV* = 0x8861.GLenum
+  GL_MULTISAMPLE_EXT* = 0x809D.GLenum
+  GL_INT64_VEC3_NV* = 0x8FEA.GLenum
+  GL_ABGR_EXT* = 0x8000.GLenum
+  GL_MAX_GENERAL_COMBINERS_NV* = 0x854D.GLenum
+  GL_NUM_PROGRAM_BINARY_FORMATS* = 0x87FE.GLenum
+  GL_TEXTURE_LO_SIZE_NV* = 0x871C.GLenum
+  GL_INT_IMAGE_1D_ARRAY_EXT* = 0x905D.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT3_QCOM* = 0x08000000.GLbitfield
+  GL_TEXTURE_GEN_MODE_OES* = 0x2500.GLenum
+  GL_SECONDARY_COLOR_ARRAY_STRIDE* = 0x845C.GLenum
+  GL_ELEMENT_ARRAY_TYPE_APPLE* = 0x8A0D.GLenum
+  GL_UNPACK_IMAGE_HEIGHT_EXT* = 0x806E.GLenum
+  GL_PALETTE4_R5_G6_B5_OES* = 0x8B92.GLenum
+  GL_TEXTURE_RED_SIZE* = 0x805C.GLenum
+  GL_COLOR_ATTACHMENT7_EXT* = 0x8CE7.GLenum
+  GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET* = 0x8E5F.GLenum
+  GL_DRAW_BUFFER11* = 0x8830.GLenum
+  GL_MODELVIEW0_MATRIX_EXT* = 0x0BA6.GLenum
+  GL_LAYER_PROVOKING_VERTEX* = 0x825E.GLenum
+  GL_TEXTURE14* = 0x84CE.GLenum
+  GL_ALPHA8_EXT* = 0x803C.GLenum
+  GL_GENERIC_ATTRIB_NV* = 0x8C7D.GLenum
+  GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES* = 0x8B8B.GLenum
+  GL_STENCIL_ATTACHMENT_OES* = 0x8D20.GLenum
+  GL_MAX_VARYING_FLOATS* = 0x8B4B.GLenum
+  GL_RGB_SNORM* = 0x8F92.GLenum
+  GL_SECONDARY_COLOR_ARRAY_TYPE_EXT* = 0x845B.GLenum
+  GL_MAX_PROGRAM_LOOP_DEPTH_NV* = 0x88F7.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER* = 0x8CD4.GLenum
+  GL_MAX_MODELVIEW_STACK_DEPTH* = 0x0D36.GLenum
+  GL_CON_23_ATI* = 0x8958.GLenum
+  GL_VERTEX_ARRAY_RANGE_POINTER_APPLE* = 0x8521.GLenum
+  GL_VERTEX_ARRAY_BUFFER_BINDING* = 0x8896.GLenum
+  GL_VERTEX_STREAM2_ATI* = 0x876E.GLenum
+  GL_STENCIL* = 0x1802.GLenum
+  GL_IMAGE_2D_ARRAY_EXT* = 0x9053.GLenum
+  GL_RGBA8* = 0x8058.GLenum
+  GL_TEXTURE_SPARSE_ARB* = 0x91A6.GLenum
+  GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX* = 0x8188.GLenum
+  GL_SECONDARY_INTERPOLATOR_ATI* = 0x896D.GLenum
+  GL_MAX_COMBINED_DIMENSIONS* = 0x8282.GLenum
+  GL_DEBUG_TYPE_POP_GROUP* = 0x826A.GLenum
+  GL_IMAGE_CLASS_4_X_8* = 0x82BF.GLenum
+  GL_VERTEX_ARRAY_RANGE_VALID_NV* = 0x851F.GLenum
+  GL_LUMINANCE_ALPHA8UI_EXT* = 0x8D81.GLenum
+  GL_RGBA32F_ARB* = 0x8814.GLenum
+  GL_GLYPH_HEIGHT_BIT_NV* = 0x02.GLbitfield
+  GL_FOG_COORD_ARRAY_BUFFER_BINDING* = 0x889D.GLenum
+  GL_TRACE_OPERATIONS_BIT_MESA* = 0x0001.GLbitfield
+  GL_INT8_VEC4_NV* = 0x8FE3.GLenum
+  GL_VERTEX_BINDING_STRIDE* = 0x82D8.GLenum
+  GL_LIGHT_ENV_MODE_SGIX* = 0x8407.GLenum
+  GL_PROXY_TEXTURE_1D_EXT* = 0x8063.GLenum
+  GL_CON_31_ATI* = 0x8960.GLenum
+  GL_TEXTURE_BORDER_COLOR* = 0x1004.GLenum
+  GL_ELEMENT_ARRAY_POINTER_APPLE* = 0x8A0E.GLenum
+  GL_NAME_LENGTH* = 0x92F9.GLenum
+  GL_PIXEL_COUNT_AVAILABLE_NV* = 0x8867.GLenum
+  GL_IUI_V3F_EXT* = 0x81AE.GLenum
+  GL_OBJECT_LINE_SGIS* = 0x81F7.GLenum
+  GL_T2F_N3F_V3F* = 0x2A2B.GLenum
+  GL_TRUE* = true.GLboolean
+  GL_COMPARE_REF_TO_TEXTURE_EXT* = 0x884E.GLenum
+  GL_MAX_3D_TEXTURE_SIZE* = 0x8073.GLenum
+  GL_LUMINANCE16_ALPHA16_EXT* = 0x8048.GLenum
+  GL_DRAW_INDIRECT_ADDRESS_NV* = 0x8F41.GLenum
+  GL_TEXTURE_IMAGE_FORMAT* = 0x828F.GLenum
+  GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES* = 0x898D.GLenum
+  GL_TEXTURE_RECTANGLE_ARB* = 0x84F5.GLenum
+  GL_TEXTURE_INDEX_SIZE_EXT* = 0x80ED.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV* = 0x8F2A.GLenum
+  GL_DEBUG_CALLBACK_USER_PARAM* = 0x8245.GLenum
+  GL_INTENSITY8_SNORM* = 0x9017.GLenum
+  GL_DISTANCE_ATTENUATION_EXT* = 0x8129.GLenum
+  GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS* = 0x90CC.GLenum
+  GL_ATTRIB_ARRAY_POINTER_NV* = 0x8645.GLenum
+  GL_OBJECT_TYPE* = 0x9112.GLenum
+  GL_PROGRAM_KHR* = 0x82E2.GLenum
+  GL_SOURCE0_ALPHA_EXT* = 0x8588.GLenum
+  GL_PIXEL_MAP_I_TO_G_SIZE* = 0x0CB3.GLenum
+  GL_RGBA_MODE* = 0x0C31.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR* = 0x93D6.GLenum
+  GL_MAX_ELEMENTS_VERTICES_EXT* = 0x80E8.GLenum
+  GL_DEBUG_SOURCE_SHADER_COMPILER* = 0x8248.GLenum
+  GL_ARC_TO_NV* = 0xFE.GLenum
+  GL_CON_6_ATI* = 0x8947.GLenum
+  GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT* = 0x87CE.GLenum
+  GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE* = 0x8A05.GLenum
+  GL_R16_SNORM* = 0x8F98.GLenum
+  GL_DOUBLE_VEC2_EXT* = 0x8FFC.GLenum
+  GL_UNSIGNED_INT8_VEC4_NV* = 0x8FEF.GLenum
+  GL_POST_CONVOLUTION_RED_SCALE* = 0x801C.GLenum
+  GL_FULL_STIPPLE_HINT_PGI* = 0x1A219.GLenum
+  GL_ACTIVE_ATTRIBUTES* = 0x8B89.GLenum
+  GL_TEXTURE_MATERIAL_FACE_EXT* = 0x8351.GLenum
+  GL_INCR_WRAP_OES* = 0x8507.GLenum
+  GL_UNPACK_COMPRESSED_BLOCK_WIDTH* = 0x9127.GLenum
+  GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT* = 0x8C73.GLenum
+  GL_MAX_VERTEX_SHADER_LOCALS_EXT* = 0x87C9.GLenum
+  GL_NUM_VIDEO_CAPTURE_STREAMS_NV* = 0x9024.GLenum
+  GL_DRAW_BUFFER3_ARB* = 0x8828.GLenum
+  GL_COMBINER_COMPONENT_USAGE_NV* = 0x8544.GLenum
+  GL_ELEMENT_ARRAY_POINTER_ATI* = 0x876A.GLenum
+  GL_RGB8UI_EXT* = 0x8D7D.GLenum
+  GL_RGBA8I* = 0x8D8E.GLenum
+  GL_TEXTURE_WIDTH_QCOM* = 0x8BD2.GLenum
+  GL_DOT3_RGB* = 0x86AE.GLenum
+  GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV* = 0x903B.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_X* = 0x8516.GLenum
+  GL_UNIFORM_BUFFER_SIZE* = 0x8A2A.GLenum
+  GL_OPERAND1_ALPHA* = 0x8599.GLenum
+  GL_TEXTURE_INTENSITY_SIZE_EXT* = 0x8061.GLenum
+  GL_DEBUG_TYPE_OTHER* = 0x8251.GLenum
+  GL_MAX_TESS_PATCH_COMPONENTS* = 0x8E84.GLenum
+  GL_UNIFORM_BUFFER_BINDING* = 0x8A28.GLenum
+  GL_INTENSITY_FLOAT16_APPLE* = 0x881D.GLenum
+  GL_TEXTURE_BLUE_SIZE* = 0x805E.GLenum
+  GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT* = 0x919F.GLenum
+  GL_TEXTURE_SWIZZLE_G* = 0x8E43.GLenum
+  GL_MAX_PROGRAM_TEXEL_OFFSET_EXT* = 0x8905.GLenum
+  GL_COLOR_BUFFER_BIT* = 0x00004000.GLbitfield
+  GL_ALPHA_FLOAT32_APPLE* = 0x8816.GLenum
+  GL_PROXY_TEXTURE_2D_EXT* = 0x8064.GLenum
+  GL_STENCIL_COMPONENTS* = 0x8285.GLenum
+  GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV* = 0x9026.GLenum
+  GL_TEXTURE_COMPRESSED_ARB* = 0x86A1.GLenum
+  GL_OBJECT_SUBTYPE_ARB* = 0x8B4F.GLenum
+  GL_MAX_PROGRAM_PARAMETERS_ARB* = 0x88A9.GLenum
+  GL_OFFSET_TEXTURE_2D_MATRIX_NV* = 0x86E1.GLenum
+  GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI* = 0x87F7.GLenum
+  GL_PATCH_VERTICES* = 0x8E72.GLenum
+  GL_NEGATIVE_Y_EXT* = 0x87DA.GLenum
+  GL_INT_2_10_10_10_REV* = 0x8D9F.GLenum
+  GL_READ_FRAMEBUFFER_BINDING_NV* = 0x8CAA.GLenum
+  GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI* = 0x80D2.GLenum
+  GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS* = 0x90DA.GLenum
+  GL_IMAGE_COMPATIBILITY_CLASS* = 0x82A8.GLenum
+  GL_FLOAT_MAT4* = 0x8B5C.GLenum
+  GL_FIELD_LOWER_NV* = 0x9023.GLenum
+  GL_UNPACK_IMAGE_HEIGHT* = 0x806E.GLenum
+  GL_PATH_COMMAND_COUNT_NV* = 0x909D.GLenum
+  GL_UNSIGNED_SHORT_4_4_4_4_EXT* = 0x8033.GLenum
+  GL_VIEW_CLASS_S3TC_DXT3_RGBA* = 0x82CE.GLenum
+  GL_STENCIL_BUFFER_BIT1_QCOM* = 0x00020000.GLbitfield
+  GL_BLOCK_INDEX* = 0x92FD.GLenum
+  GL_BUMP_TARGET_ATI* = 0x877C.GLenum
+  GL_PATH_STROKE_COVER_MODE_NV* = 0x9083.GLenum
+  GL_INT_IMAGE_2D_RECT* = 0x905A.GLenum
+  GL_VECTOR_EXT* = 0x87BF.GLenum
+  GL_INDEX_ARRAY_BUFFER_BINDING* = 0x8899.GLenum
+  GL_SAMPLER_2D_SHADOW* = 0x8B62.GLenum
+  GL_OBJECT_BUFFER_SIZE_ATI* = 0x8764.GLenum
+  GL_NORMALIZED_RANGE_EXT* = 0x87E0.GLenum
+  GL_DEPTH_COMPONENT32_OES* = 0x81A7.GLenum
+  GL_CON_9_ATI* = 0x894A.GLenum
+  GL_VIRTUAL_PAGE_SIZE_X_ARB* = 0x9195.GLenum
+  GL_LESS* = 0x0201.GLenum
+  GL_FRAMEBUFFER_UNSUPPORTED_OES* = 0x8CDD.GLenum
+  GL_CON_19_ATI* = 0x8954.GLenum
+  GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB* = 0x88A2.GLenum
+  GL_MAX_TEXTURE_COORDS_ARB* = 0x8871.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_MODE* = 0x8C7F.GLenum
+  GL_TEXTURE_1D_BINDING_EXT* = 0x8068.GLenum
+  GL_LINE_TOKEN* = 0x0702.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES* = 0x8CD7.GLenum
+  GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV* = 0x9036.GLenum
+  GL_TEXTURE_SWIZZLE_R* = 0x8E42.GLenum
+  GL_PIXEL_UNPACK_BUFFER_ARB* = 0x88EC.GLenum
+  GL_UNKNOWN_CONTEXT_RESET_EXT* = 0x8255.GLenum
+  GL_PROGRAM_ERROR_POSITION_NV* = 0x864B.GLenum
+  GL_ONE_MINUS_CONSTANT_COLOR* = 0x8002.GLenum
+  GL_POST_COLOR_MATRIX_GREEN_SCALE* = 0x80B5.GLenum
+  GL_TEXTURE_CUBE_MAP_SEAMLESS* = 0x884F.GLenum
+  GL_DRAW_BUFFER2* = 0x8827.GLenum
+  GL_STENCIL_INDEX* = 0x1901.GLenum
+  GL_FOG_DENSITY* = 0x0B62.GLenum
+  GL_MATRIX27_ARB* = 0x88DB.GLenum
+  GL_CURRENT_NORMAL* = 0x0B02.GLenum
+  GL_AFFINE_3D_NV* = 0x9094.GLenum
+  GL_STATIC_COPY_ARB* = 0x88E6.GLenum
+  GL_4X_BIT_ATI* = 0x00000002.GLbitfield
+  GL_COLOR_BUFFER_BIT3_QCOM* = 0x00000008.GLbitfield
+  GL_TEXTURE_MATRIX* = 0x0BA8.GLenum
+  GL_UNDEFINED_APPLE* = 0x8A1C.GLenum
+  GL_COLOR_TABLE_LUMINANCE_SIZE_SGI* = 0x80DE.GLenum
+  GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY* = 0x9061.GLenum
+  GL_RELATIVE_ARC_TO_NV* = 0xFF.GLenum
+  GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL* = 0x9241.GLenum
+  GL_READ_FRAMEBUFFER_BINDING_EXT* = 0x8CAA.GLenum
+  GL_TEXTURE_WRAP_R_OES* = 0x8072.GLenum
+  GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT* = 0x8DDD.GLenum
+  GL_TEXTURE_CUBE_MAP_EXT* = 0x8513.GLenum
+  GL_COMMAND_BARRIER_BIT_EXT* = 0x00000040.GLbitfield
+  GL_DEBUG_SEVERITY_NOTIFICATION* = 0x826B.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR* = 0x93D8.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS* = 0x8C8B.GLenum
+  GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV* = 0x90D0.GLenum
+  GL_INT_IMAGE_2D_EXT* = 0x9058.GLenum
+  GL_RGB_S3TC* = 0x83A0.GLenum
+  GL_SUCCESS_NV* = 0x902F.GLenum
+  GL_MATRIX_INDEX_ARRAY_SIZE_OES* = 0x8846.GLenum
+  GL_VIEW_CLASS_8_BITS* = 0x82CB.GLenum
+  GL_DONT_CARE* = 0x1100.GLenum
+  GL_FOG_COORDINATE_ARRAY* = 0x8457.GLenum
+  GL_DRAW_BUFFER9* = 0x882E.GLenum
+  GL_TEXTURE28_ARB* = 0x84DC.GLenum
+  GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB* = 0x8E5F.GLenum
+  GL_TEXTURE21* = 0x84D5.GLenum
+  GL_TRANSLATE_Y_NV* = 0x908F.GLenum
+  GL_MODELVIEW17_ARB* = 0x8731.GLenum
+  GL_ALPHA_FLOAT16_ATI* = 0x881C.GLenum
+  GL_DEPTH_STENCIL_OES* = 0x84F9.GLenum
+  GL_QUAD_MESH_SUN* = 0x8614.GLenum
+  GL_PROGRAM_ADDRESS_REGISTERS_ARB* = 0x88B0.GLenum
+  GL_VERTEX_BINDING_OFFSET* = 0x82D7.GLenum
+  GL_FIRST_TO_REST_NV* = 0x90AF.GLenum
+  GL_SHADE_MODEL* = 0x0B54.GLenum
+  GL_INT_IMAGE_2D_ARRAY_EXT* = 0x905E.GLenum
+  GL_FRONT_FACE* = 0x0B46.GLenum
+  GL_PRIMITIVE_RESTART_INDEX* = 0x8F9E.GLenum
+  GL_LUMINANCE8* = 0x8040.GLenum
+  GL_COVERAGE_ALL_FRAGMENTS_NV* = 0x8ED5.GLenum
+  GL_FRAGMENT_ALPHA_MODULATE_IMG* = 0x8C08.GLenum
+  GL_CLIP_PLANE3_IMG* = 0x3003.GLenum
+  GL_EVAL_VERTEX_ATTRIB15_NV* = 0x86D5.GLenum
+  GL_SYNC_GPU_COMMANDS_COMPLETE* = 0x9117.GLenum
+  GL_FALSE* = false.GLboolean
+  GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR* = 0x826C.GLenum
+  GL_STENCIL_ATTACHMENT_EXT* = 0x8D20.GLenum
+  GL_DST_ATOP_NV* = 0x928F.GLenum
+  GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN* = 0x85C1.GLenum
+  GL_COMBINE4_NV* = 0x8503.GLenum
+  GL_MINMAX_SINK_EXT* = 0x8030.GLenum
+  GL_RG16I* = 0x8239.GLenum
+  GL_BGRA_IMG* = 0x80E1.GLenum
+  GL_REFERENCED_BY_COMPUTE_SHADER* = 0x930B.GLenum
+  GL_MIN_LOD_WARNING_AMD* = 0x919C.GLenum
+  GL_READ_BUFFER_EXT* = 0x0C02.GLenum
+  GL_RGBA8UI_EXT* = 0x8D7C.GLenum
+  GL_LINE_BIT* = 0x00000004.GLbitfield
+  GL_CONDITION_SATISFIED* = 0x911C.GLenum
+  GL_SLUMINANCE_ALPHA* = 0x8C44.GLenum
+  GL_FOG_COORDINATE_ARRAY_TYPE* = 0x8454.GLenum
+  GL_EXPAND_NORMAL_NV* = 0x8538.GLenum
+  GL_TEXTURE_2D_ARRAY_EXT* = 0x8C1A.GLenum
+  GL_SAMPLER_2D_RECT_ARB* = 0x8B63.GLenum
+  GL_CLAMP_TO_BORDER_NV* = 0x812D.GLint
+  GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB* = 0x8DE0.GLenum
+  GL_TEXCOORD2_BIT_PGI* = 0x20000000.GLbitfield
+  GL_MATRIX0_ARB* = 0x88C0.GLenum
+  GL_STENCIL_BUFFER_BIT2_QCOM* = 0x00040000.GLbitfield
+  GL_COLOR_MATRIX_SGI* = 0x80B1.GLenum
+  GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI* = 0x87F4.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT* = 0x8CDC.GLenum
+  GL_LEFT* = 0x0406.GLenum
+  GL_LO_SCALE_NV* = 0x870F.GLenum
+  GL_STRICT_DEPTHFUNC_HINT_PGI* = 0x1A216.GLenum
+  GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS* = 0x8E1E.GLenum
+  GL_REPEAT* = 0x2901.GLint
+  GL_DEBUG_TYPE_PORTABILITY_ARB* = 0x824F.GLenum
+  GL_MAX_FRAMEBUFFER_LAYERS* = 0x9317.GLenum
+  GL_TRIANGLE_STRIP* = 0x0005.GLenum
+  GL_RECLAIM_MEMORY_HINT_PGI* = 0x1A1FE.GLenum
+  GL_RELATIVE_LINE_TO_NV* = 0x05.GLenum
+  GL_MAX_LIGHTS* = 0x0D31.GLenum
+  GL_MULTISAMPLE_BIT* = 0x20000000.GLbitfield
+  GL_READ_PIXELS* = 0x828C.GLenum
+  GL_DISCRETE_AMD* = 0x9006.GLenum
+  GL_QUAD_TEXTURE_SELECT_SGIS* = 0x8125.GLenum
+  GL_CON_25_ATI* = 0x895A.GLenum
+  GL_BUFFER_IMMUTABLE_STORAGE* = 0x821F.GLenum
+  GL_FLOAT_R16_NV* = 0x8884.GLenum
+  GL_GREEN_INTEGER_EXT* = 0x8D95.GLenum
+  cGL_FIXED* = 0x140C.GLenum
+  GL_LIST_PRIORITY_SGIX* = 0x8182.GLenum
+  GL_DRAW_BUFFER6_EXT* = 0x882B.GLenum
+  GL_OFFSET_TEXTURE_BIAS_NV* = 0x86E3.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB* = 0x8645.GLenum
+  GL_MALI_SHADER_BINARY_ARM* = 0x8F60.GLenum
+  GL_RGB_422_APPLE* = 0x8A1F.GLenum
+  GL_R1UI_N3F_V3F_SUN* = 0x85C7.GLenum
+  GL_VERTEX_ARRAY_OBJECT_EXT* = 0x9154.GLenum
+  GL_UNSIGNED_INT_10F_11F_11F_REV* = 0x8C3B.GLenum
+  GL_VERSION_ES_CM_1_1* = 1.GLenum
+  GL_CLEAR_TEXTURE* = 0x9365.GLenum
+  GL_FLOAT16_VEC3_NV* = 0x8FFA.GLenum
+  GL_TEXTURE_LUMINANCE_TYPE* = 0x8C14.GLenum
+  GL_TRANSFORM_FEEDBACK* = 0x8E22.GLenum
+  GL_POST_CONVOLUTION_COLOR_TABLE* = 0x80D1.GLenum
+  GL_DEPTH_TEST* = 0x0B71.GLenum
+  GL_CON_1_ATI* = 0x8942.GLenum
+  GL_FRAGMENT_SHADER_ATI* = 0x8920.GLenum
+  GL_SAMPLER_1D_ARRAY_SHADOW* = 0x8DC3.GLenum
+  GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT* = 0x90DF.GLenum
+  GL_MAX_SERVER_WAIT_TIMEOUT* = 0x9111.GLenum
+  GL_VERTEX_SHADER_BIT_EXT* = 0x00000001.GLbitfield
+  GL_TEXTURE_BINDING_CUBE_MAP_OES* = 0x8514.GLenum
+  GL_PIXEL_MAP_S_TO_S_SIZE* = 0x0CB1.GLenum
+  GL_CURRENT_OCCLUSION_QUERY_ID_NV* = 0x8865.GLenum
+  GL_TIMEOUT_IGNORED_APPLE* = 0xFFFFFFFFFFFFFFFF'u64
+  GL_MAX_COMPUTE_UNIFORM_COMPONENTS* = 0x8263.GLenum
+  GL_COPY_PIXEL_TOKEN* = 0x0706.GLenum
+  GL_SPOT_CUTOFF* = 0x1206.GLenum
+  GL_FRACTIONAL_EVEN* = 0x8E7C.GLenum
+  GL_MAP1_VERTEX_ATTRIB6_4_NV* = 0x8666.GLenum
+  GL_TRIANGLE_LIST_SUN* = 0x81D7.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_START* = 0x92C2.GLenum
+  GL_MAX_ELEMENTS_VERTICES* = 0x80E8.GLenum
+  GL_COLOR_ATTACHMENT9_EXT* = 0x8CE9.GLenum
+  GL_ACCUM_CLEAR_VALUE* = 0x0B80.GLenum
+  GL_TEXTURE_COORD_ARRAY_LENGTH_NV* = 0x8F2F.GLenum
+  GL_DRAW_BUFFER3_EXT* = 0x8828.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT* = 0x8517.GLenum
+  GL_C4UB_V3F* = 0x2A23.GLenum
+  GL_MAX_PROGRAM_ATTRIBS_ARB* = 0x88AD.GLenum
+  GL_PIXEL_TILE_CACHE_INCREMENT_SGIX* = 0x813F.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB* = 0x8DA9.GLenum
+  GL_CON_8_ATI* = 0x8949.GLenum
+  GL_POST_COLOR_MATRIX_ALPHA_BIAS* = 0x80BB.GLenum
+  GL_RENDERBUFFER_WIDTH* = 0x8D42.GLenum
+  GL_VERTEX_ID_NV* = 0x8C7B.GLenum
+  GL_STRICT_LIGHTING_HINT_PGI* = 0x1A217.GLenum
+  GL_COMPRESSED_RGBA8_ETC2_EAC_OES* = 0x9278.GLenum
+  GL_PACK_COMPRESSED_BLOCK_WIDTH* = 0x912B.GLenum
+  GL_ZERO_EXT* = 0x87DD.GLenum
+  GL_DEBUG_SOURCE_OTHER* = 0x824B.GLenum
+  GL_MAP_UNSYNCHRONIZED_BIT* = 0x0020.GLbitfield
+  GL_VERTEX_ARRAY_POINTER* = 0x808E.GLenum
+  GL_FLOAT_RGBA_NV* = 0x8883.GLenum
+  GL_WEIGHT_ARRAY_STRIDE_OES* = 0x86AA.GLenum
+  GL_UNPACK_ROW_BYTES_APPLE* = 0x8A16.GLenum
+  GL_CURRENT_COLOR* = 0x0B00.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT* = 0x8CD7.GLenum
+  GL_MAX_NAME_STACK_DEPTH* = 0x0D37.GLenum
+  GL_SHADER_STORAGE_BUFFER_START* = 0x90D4.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT* = 0x8C7F.GLenum
+  GL_PATH_GEN_COMPONENTS_NV* = 0x90B3.GLenum
+  GL_AUTO_GENERATE_MIPMAP* = 0x8295.GLenum
+  GL_UNSIGNED_INT_5_9_9_9_REV* = 0x8C3E.GLenum
+  GL_VIEWPORT* = 0x0BA2.GLenum
+  GL_MAX_VERTEX_STREAMS_ATI* = 0x876B.GLenum
+  GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT* = 0x87CB.GLenum
+  GL_STENCIL_CLEAR_VALUE* = 0x0B91.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT* = 0x9069.GLenum
+  GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX* = 0x8409.GLenum
+  GL_FRAGMENT_SHADER_BIT_EXT* = 0x00000002.GLbitfield
+  GL_COLOR_SUM_ARB* = 0x8458.GLenum
+  GL_RGBA4_DXT5_S3TC* = 0x83A5.GLenum
+  GL_INT_IMAGE_CUBE* = 0x905B.GLenum
+  GL_ACTIVE_ATOMIC_COUNTER_BUFFERS* = 0x92D9.GLenum
+  GL_INTERNALFORMAT_GREEN_SIZE* = 0x8272.GLenum
+  GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV* = 0x8855.GLenum
+  GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI* = 0x87F1.GLenum
+  GL_REG_24_ATI* = 0x8939.GLenum
+  GL_MULT* = 0x0103.GLenum
+  GL_RGBA2* = 0x8055.GLenum
+  GL_CONVOLUTION_WIDTH_EXT* = 0x8018.GLenum
+  GL_STENCIL_EXT* = 0x1802.GLenum
+  GL_PATH_STROKE_WIDTH_NV* = 0x9075.GLenum
+  GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB* = 0x8247.GLenum
+  GL_QUERY_COUNTER_BITS* = 0x8864.GLenum
+  GL_OUTPUT_FOG_EXT* = 0x87BD.GLenum
+  GL_POST_COLOR_MATRIX_RED_BIAS* = 0x80B8.GLenum
+  GL_UNSIGNED_INT_10_10_10_2* = 0x8036.GLenum
+  GL_INT_SAMPLER_1D* = 0x8DC9.GLenum
+  GL_INT_IMAGE_2D_MULTISAMPLE_EXT* = 0x9060.GLenum
+  GL_RENDERBUFFER_INTERNAL_FORMAT_OES* = 0x8D44.GLenum
+  GL_TRACE_PIXELS_BIT_MESA* = 0x0010.GLbitfield
+  GL_FAILURE_NV* = 0x9030.GLenum
+  GL_INT_SAMPLER_3D_EXT* = 0x8DCB.GLenum
+  GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV* = 0x8DA1.GLenum
+  GL_OBJECT_DISTANCE_TO_POINT_SGIS* = 0x81F1.GLenum
+  GL_BLEND_SRC_RGB_OES* = 0x80C9.GLenum
+  GL_LUMINANCE4_ALPHA4_OES* = 0x8043.GLenum
+  GL_REG_4_ATI* = 0x8925.GLenum
+  GL_SHADING_LANGUAGE_VERSION_ARB* = 0x8B8C.GLenum
+  GL_RGBA16F_ARB* = 0x881A.GLenum
+  GL_R32F* = 0x822E.GLenum
+  GL_COMPRESSED_SRGB_S3TC_DXT1_NV* = 0x8C4C.GLenum
+  GL_TESS_CONTROL_OUTPUT_VERTICES* = 0x8E75.GLenum
+  GL_ONE_MINUS_DST_COLOR* = 0x0307.GLenum
+  GL_MATRIX19_ARB* = 0x88D3.GLenum
+  GL_INT_SAMPLER_2D_RECT* = 0x8DCD.GLenum
+  GL_POST_CONVOLUTION_GREEN_SCALE_EXT* = 0x801D.GLenum
+  GL_CLIP_DISTANCE5* = 0x3005.GLenum
+  GL_HISTOGRAM_RED_SIZE_EXT* = 0x8028.GLenum
+  GL_INTENSITY_FLOAT32_APPLE* = 0x8817.GLenum
+  GL_MODULATE_ADD_ATI* = 0x8744.GLenum
+  GL_NEGATIVE_X_EXT* = 0x87D9.GLenum
+  GL_REG_21_ATI* = 0x8936.GLenum
+  GL_STENCIL_RENDERABLE* = 0x8288.GLenum
+  GL_FOG_COORD_ARRAY_STRIDE* = 0x8455.GLenum
+  GL_FACTOR_MAX_AMD* = 0x901D.GLenum
+  GL_LUMINANCE16_EXT* = 0x8042.GLenum
+  GL_VARIANT_ARRAY_POINTER_EXT* = 0x87E9.GLenum
+  GL_DECAL* = 0x2101.GLenum
+  GL_SIGNED_ALPHA8_NV* = 0x8706.GLenum
+  GL_ALPHA_BITS* = 0x0D55.GLenum
+  GL_MATRIX29_ARB* = 0x88DD.GLenum
+  GL_FOG* = 0x0B60.GLenum
+  GL_INDEX_ARRAY_LIST_STRIDE_IBM* = 103083.GLenum
+  GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS* = 0x90C9.GLenum
+  GL_RGBA4_S3TC* = 0x83A3.GLenum
+  GL_LUMINANCE16_ALPHA16* = 0x8048.GLenum
+  GL_PROXY_TEXTURE_RECTANGLE* = 0x84F7.GLenum
+  GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV* = 0x8DA4.GLenum
+  GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER* = 0x84F0.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE* = 0x8CD3.GLenum
+  GL_COLOR_TABLE_GREEN_SIZE_SGI* = 0x80DB.GLenum
+  GL_TEXTURE_PRE_SPECULAR_HP* = 0x8169.GLenum
+  GL_SHADOW_ATTENUATION_EXT* = 0x834E.GLenum
+  GL_SIGNED_RGB_NV* = 0x86FE.GLenum
+  GL_CLIENT_ALL_ATTRIB_BITS* = 0xFFFFFFFF.GLbitfield
+  GL_DEPTH_ATTACHMENT_EXT* = 0x8D00.GLenum
+  GL_DEBUG_SOURCE_API_KHR* = 0x8246.GLenum
+  GL_COLOR_INDEXES* = 0x1603.GLenum
+  GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH* = 0x8243.GLenum
+  GL_TEXTURE_BINDING_1D* = 0x8068.GLenum
+  GL_UNSIGNED_INT_SAMPLER_2D* = 0x8DD2.GLenum
+  GL_DRAW_BUFFER9_NV* = 0x882E.GLenum
+  GL_RED* = 0x1903.GLenum
+  GL_LINE_STRIP_ADJACENCY_EXT* = 0x000B.GLenum
+  GL_NUM_PASSES_ATI* = 0x8970.GLenum
+  GL_MAT_DIFFUSE_BIT_PGI* = 0x00400000.GLbitfield
+  GL_LUMINANCE_INTEGER_EXT* = 0x8D9C.GLenum
+  GL_PIXEL_MAP_I_TO_I* = 0x0C70.GLenum
+  GL_SLUMINANCE8_ALPHA8_NV* = 0x8C45.GLenum
+  GL_RGBA4_OES* = 0x8056.GLenum
+  GL_COMPRESSED_SIGNED_R11_EAC* = 0x9271.GLenum
+  GL_FRAGMENT_LIGHT4_SGIX* = 0x8410.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV* = 0x8C80.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT* = 0x8C4D.GLenum
+  GL_READ_FRAMEBUFFER_APPLE* = 0x8CA8.GLenum
+  GL_DRAW_BUFFER15_ARB* = 0x8834.GLenum
+  GL_INSTRUMENT_MEASUREMENTS_SGIX* = 0x8181.GLenum
+  GL_REG_15_ATI* = 0x8930.GLenum
+  GL_UNSIGNED_INT_IMAGE_1D_ARRAY* = 0x9068.GLenum
+  GL_COMPUTE_LOCAL_WORK_SIZE* = 0x8267.GLenum
+  GL_RGBA32I* = 0x8D82.GLenum
+  GL_VERTEX_ATTRIB_MAP2_APPLE* = 0x8A01.GLenum
+  GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR* = 0x824D.GLenum
+  GL_READ_FRAMEBUFFER_BINDING_ANGLE* = 0x8CAA.GLenum
+  GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR* = 0x8247.GLenum
+  GL_OP_FRAC_EXT* = 0x8789.GLenum
+  GL_RGB_FLOAT32_APPLE* = 0x8815.GLenum
+  GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER* = 0x8A44.GLenum
+  GL_NORMAL_ARRAY* = 0x8075.GLenum
+  GL_TEXTURE21_ARB* = 0x84D5.GLenum
+  GL_WRITE_ONLY_OES* = 0x88B9.GLenum
+  GL_TEXTURE0_ARB* = 0x84C0.GLenum
+  GL_SPRITE_OBJECT_ALIGNED_SGIX* = 0x814D.GLenum
+  GL_POSITION* = 0x1203.GLenum
+  GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR* = 0x824E.GLenum
+  GL_GEOMETRY_OUTPUT_TYPE_ARB* = 0x8DDC.GLenum
+  GL_IMAGE_PIXEL_TYPE* = 0x82AA.GLenum
+  GL_UNSIGNED_INT64_AMD* = 0x8BC2.GLenum
+  GL_LIST_INDEX* = 0x0B33.GLenum
+  GL_UNSIGNED_INT_8_8_S8_S8_REV_NV* = 0x86DB.GLenum
+  GL_MAP_ATTRIB_U_ORDER_NV* = 0x86C3.GLenum
+  GL_PROXY_TEXTURE_RECTANGLE_ARB* = 0x84F7.GLenum
+  GL_CLIP_NEAR_HINT_PGI* = 0x1A220.GLenum
+  GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX* = 0x817B.GLenum
+  GL_MAX_UNIFORM_BLOCK_SIZE* = 0x8A30.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER* = 0x8CDB.GLenum
+  GL_SAMPLE_MASK_INVERT_EXT* = 0x80AB.GLenum
+  GL_MAP1_VERTEX_ATTRIB14_4_NV* = 0x866E.GLenum
+  GL_SYNC_FLAGS* = 0x9115.GLenum
+  GL_COMPRESSED_RGBA* = 0x84EE.GLenum
+  GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT* = 0x82B2.GLenum
+  GL_INDEX_ARRAY_STRIDE_EXT* = 0x8086.GLenum
+  GL_CLIP_DISTANCE_NV* = 0x8C7A.GLenum
+  GL_UNSIGNED_INT_VEC4* = 0x8DC8.GLenum
+  GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB* = 0x8E8E.GLenum
+  GL_MIRRORED_REPEAT_OES* = 0x8370.GLint
+  GL_WEIGHT_ARRAY_SIZE_ARB* = 0x86AB.GLenum
+  GL_MIN_SAMPLE_SHADING_VALUE* = 0x8C37.GLenum
+  GL_SOURCE0_RGB* = 0x8580.GLenum
+  GL_RG32I* = 0x823B.GLenum
+  GL_QUERY_BUFFER_BINDING_AMD* = 0x9193.GLenum
+  GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV* = 0x8851.GLenum
+  GL_POST_CONVOLUTION_BLUE_SCALE_EXT* = 0x801E.GLenum
+  GL_DOUBLE_MAT3x4_EXT* = 0x8F4C.GLenum
+  GL_MAX_VERTEX_HINT_PGI* = 0x1A22D.GLenum
+  GL_ADD* = 0x0104.GLenum
+  GL_PATH_FORMAT_SVG_NV* = 0x9070.GLenum
+  GL_VIDEO_BUFFER_BINDING_NV* = 0x9021.GLenum
+  GL_NUM_EXTENSIONS* = 0x821D.GLenum
+  GL_DEPTH_RANGE* = 0x0B70.GLenum
+  GL_FRAGMENT_SUBROUTINE* = 0x92EC.GLenum
+  GL_DEPTH24_STENCIL8_EXT* = 0x88F0.GLenum
+  GL_COMPRESSED_RGBA_S3TC_DXT3_EXT* = 0x83F2.GLenum
+  GL_COLOR_TABLE_SGI* = 0x80D0.GLenum
+  GL_OBJECT_ACTIVE_UNIFORMS_ARB* = 0x8B86.GLenum
+  GL_RGBA16F* = 0x881A.GLenum
+  GL_COORD_REPLACE_ARB* = 0x8862.GLenum
+  GL_SAMPLE_POSITION_NV* = 0x8E50.GLenum
+  GL_SRC_ALPHA* = 0x0302.GLenum
+  GL_COMBINE_ALPHA* = 0x8572.GLenum
+  GL_CLEAR* = 0x1500.GLenum
+  GL_HSL_HUE_NV* = 0x92AD.GLenum
+  GL_SCISSOR_TEST* = 0x0C11.GLenum
+  GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT* = 0x8DD8.GLenum
+  GL_RGB16UI* = 0x8D77.GLenum
+  GL_MATRIX9_ARB* = 0x88C9.GLenum
+  GL_COLOR_ATTACHMENT13* = 0x8CED.GLenum
+  GL_BUMP_ROT_MATRIX_SIZE_ATI* = 0x8776.GLenum
+  GL_PIXEL_PACK_BUFFER_BINDING_ARB* = 0x88ED.GLenum
+  GL_FONT_X_MAX_BOUNDS_BIT_NV* = 0x00040000.GLbitfield
+  GL_MODELVIEW31_ARB* = 0x873F.GLenum
+  GL_DRAW_BUFFER14_ARB* = 0x8833.GLenum
+  GL_EDGEFLAG_BIT_PGI* = 0x00040000.GLbitfield
+  GL_TEXTURE_LOD_BIAS_R_SGIX* = 0x8190.GLenum
+  GL_FIELD_UPPER_NV* = 0x9022.GLenum
+  GL_CLIP_PLANE3* = 0x3003.GLenum
+  GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX* = 0x8408.GLenum
+  GL_BLUE* = 0x1905.GLenum
+  GL_LUMINANCE_ALPHA_FLOAT32_ATI* = 0x8819.GLenum
+  GL_MATRIX31_ARB* = 0x88DF.GLenum
+  GL_OR_REVERSE* = 0x150B.GLenum
+  GL_INTERPOLATE_EXT* = 0x8575.GLenum
+  GL_MODELVIEW13_ARB* = 0x872D.GLenum
+  GL_UTF16_NV* = 0x909B.GLenum
+  GL_READ_FRAMEBUFFER_ANGLE* = 0x8CA8.GLenum
+  GL_LUMINANCE16F_EXT* = 0x881E.GLenum
+  GL_VERTEX_ATTRIB_ARRAY7_NV* = 0x8657.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT* = 0x8C8A.GLenum
+  GL_PRIMARY_COLOR_EXT* = 0x8577.GLenum
+  GL_VERTEX_ATTRIB_RELATIVE_OFFSET* = 0x82D5.GLenum
+  GL_LARGE_CW_ARC_TO_NV* = 0x18.GLenum
+  GL_PROGRAM_PARAMETER_NV* = 0x8644.GLenum
+  GL_ASYNC_MARKER_SGIX* = 0x8329.GLenum
+  GL_TEXTURE24_ARB* = 0x84D8.GLenum
+  GL_PIXEL_SUBSAMPLE_4242_SGIX* = 0x85A4.GLenum
+  GL_RGB10_A2_EXT* = 0x8059.GLenum
+  GL_IMAGE_CLASS_2_X_32* = 0x82BA.GLenum
+  GL_TEXTURE_INTENSITY_TYPE* = 0x8C15.GLenum
+  GL_TEXTURE_LOD_BIAS_S_SGIX* = 0x818E.GLenum
+  GL_PROGRAM_BINARY_LENGTH* = 0x8741.GLenum
+  GL_CURRENT_RASTER_NORMAL_SGIX* = 0x8406.GLenum
+  GL_DETAIL_TEXTURE_2D_SGIS* = 0x8095.GLenum
+  GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV* = 0x8E5C.GLenum
+  GL_CONVOLUTION_FILTER_BIAS_EXT* = 0x8015.GLenum
+  GL_DT_BIAS_NV* = 0x8717.GLenum
+  GL_RESET_NOTIFICATION_STRATEGY_EXT* = 0x8256.GLenum
+  GL_SHADER_STORAGE_BUFFER* = 0x90D2.GLenum
+  GL_RESET_NOTIFICATION_STRATEGY_ARB* = 0x8256.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT* = 0x8CD1.GLenum
+  GL_SRC_NV* = 0x9286.GLenum
+  GL_POINT_FADE_THRESHOLD_SIZE* = 0x8128.GLenum
+  GL_DEPENDENT_RGB_TEXTURE_3D_NV* = 0x8859.GLenum
+  GL_QUERY_RESULT_ARB* = 0x8866.GLenum
+  GL_GEOMETRY_VERTICES_OUT* = 0x8916.GLenum
+  GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB* = 0x90EB.GLenum
+  GL_MODELVIEW27_ARB* = 0x873B.GLenum
+  GL_DRAW_BUFFER11_NV* = 0x8830.GLenum
+  GL_COLOR_ATTACHMENT9_NV* = 0x8CE9.GLenum
+  GL_BLEND_SRC* = 0x0BE1.GLenum
+  GL_CONVOLUTION_2D_EXT* = 0x8011.GLenum
+  GL_MAX_ELEMENTS_INDICES* = 0x80E9.GLenum
+  GL_LUMINANCE_ALPHA_FLOAT32_APPLE* = 0x8819.GLenum
+  GL_INT_IMAGE_1D* = 0x9057.GLenum
+  GL_CONSTANT_COLOR* = 0x8001.GLenum
+  GL_FRAMEBUFFER_BARRIER_BIT* = 0x00000400.GLbitfield
+  GL_POST_CONVOLUTION_BLUE_SCALE* = 0x801E.GLenum
+  GL_DEBUG_SOURCE_SHADER_COMPILER_ARB* = 0x8248.GLenum
+  GL_RGB16I* = 0x8D89.GLenum
+  GL_MAX_WIDTH* = 0x827E.GLenum
+  GL_LIGHT_MODEL_AMBIENT* = 0x0B53.GLenum
+  GL_COVERAGE_ATTACHMENT_NV* = 0x8ED2.GLenum
+  GL_PROGRAM* = 0x82E2.GLenum
+  GL_IMAGE_ROTATE_ANGLE_HP* = 0x8159.GLenum
+  GL_SRC2_RGB* = 0x8582.GLenum
+  GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR* = 0x824E.GLenum
+  GL_PASS_THROUGH_NV* = 0x86E6.GLenum
+  GL_HALF_BIAS_NEGATE_NV* = 0x853B.GLenum
+  GL_SAMPLER_CUBE_SHADOW_EXT* = 0x8DC5.GLenum
+  GL_COMPRESSED_RGBA_BPTC_UNORM_ARB* = 0x8E8C.GLenum
+  GL_MAX_SERVER_WAIT_TIMEOUT_APPLE* = 0x9111.GLenum
+  GL_STORAGE_PRIVATE_APPLE* = 0x85BD.GLenum
+  GL_VERTEX_SHADER_BIT* = 0x00000001.GLbitfield
+  GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI* = 0x80B6.GLenum
+  GL_VERTEX_SHADER_VARIANTS_EXT* = 0x87D0.GLenum
+  GL_TRANSFORM_FEEDBACK_ACTIVE* = 0x8E24.GLenum
+  GL_ACTIVE_UNIFORMS* = 0x8B86.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT0_QCOM* = 0x01000000.GLbitfield
+  GL_OFFSET_TEXTURE_SCALE_NV* = 0x86E2.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB* = 0x88FE.GLenum
+  GL_BEVEL_NV* = 0x90A6.GLenum
+  GL_MAX_DRAW_BUFFERS_NV* = 0x8824.GLenum
+  GL_MAP1_TANGENT_EXT* = 0x8444.GLenum
+  GL_ANY_SAMPLES_PASSED* = 0x8C2F.GLenum
+  GL_MAX_IMAGE_SAMPLES* = 0x906D.GLenum
+  GL_PIXEL_UNPACK_BUFFER_BINDING* = 0x88EF.GLenum
+  GL_SRGB8_ALPHA8_EXT* = 0x8C43.GLenum
+  GL_2PASS_1_SGIS* = 0x80A3.GLenum
+  GL_PROGRAM_POINT_SIZE_ARB* = 0x8642.GLenum
+  GL_ALLOW_DRAW_WIN_HINT_PGI* = 0x1A20F.GLenum
+  GL_INTERNALFORMAT_RED_SIZE* = 0x8271.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES* = 0x8CD3.GLenum
+  GL_4PASS_2_SGIS* = 0x80A6.GLenum
+  GL_PROGRAM_OBJECT_EXT* = 0x8B40.GLenum
+  GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST* = 0x82AD.GLenum
+  GL_LIGHTING_BIT* = 0x00000040.GLbitfield
+  GL_DRAW_BUFFER13_EXT* = 0x8832.GLenum
+  GL_STREAM_DRAW_ARB* = 0x88E0.GLenum
+  GL_INDEX_ARRAY_TYPE* = 0x8085.GLenum
+  GL_DEBUG_SOURCE_THIRD_PARTY* = 0x8249.GLenum
+  GL_DYNAMIC_COPY_ARB* = 0x88EA.GLenum
+  GL_COMPARE_R_TO_TEXTURE_ARB* = 0x884E.GLenum
+  GL_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX* = 0x8314.GLenum
+  GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB* = 0x91A9.GLenum
+  GL_MAX_GEOMETRY_UNIFORM_COMPONENTS* = 0x8DDF.GLenum
+  GL_READ_PIXEL_DATA_RANGE_POINTER_NV* = 0x887D.GLenum
+  GL_BUFFER_MAPPED_OES* = 0x88BC.GLenum
+  GL_COLOR_ARRAY_COUNT_EXT* = 0x8084.GLenum
+  GL_SET_AMD* = 0x874A.GLenum
+  GL_BLEND_DST_RGB_OES* = 0x80C8.GLenum
+  GL_MAX_CONVOLUTION_HEIGHT_EXT* = 0x801B.GLenum
+  GL_DEBUG_SEVERITY_MEDIUM* = 0x9147.GLenum
+  GL_TEXTURE_INTENSITY_TYPE_ARB* = 0x8C15.GLenum
+  GL_IMAGE_CLASS_10_10_10_2* = 0x82C3.GLenum
+  GL_TEXTURE_BORDER_COLOR_NV* = 0x1004.GLenum
+  GL_VERTEX_ATTRIB_ARRAY12_NV* = 0x865C.GLenum
+  GL_MAX_GEOMETRY_SHADER_INVOCATIONS* = 0x8E5A.GLenum
+  GL_NEAREST_CLIPMAP_NEAREST_SGIX* = 0x844D.GLenum
+  GL_MAP2_VERTEX_ATTRIB12_4_NV* = 0x867C.GLenum
+  GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING* = 0x889A.GLenum
+  GL_SEPARATE_SPECULAR_COLOR_EXT* = 0x81FA.GLenum
+  GL_MATRIX_INDEX_ARRAY_SIZE_ARB* = 0x8846.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB* = 0x8517.GLenum
+  GL_DECR* = 0x1E03.GLenum
+  GL_DEPTH_BUFFER_BIT7_QCOM* = 0x00008000.GLbitfield
+  GL_LOCAL_EXT* = 0x87C4.GLenum
+  GL_FUNC_REVERSE_SUBTRACT_OES* = 0x800B.GLenum
+  GL_FLOAT_VEC3* = 0x8B51.GLenum
+  GL_POINT_SIZE_GRANULARITY* = 0x0B13.GLenum
+  GL_COLOR_ATTACHMENT9* = 0x8CE9.GLenum
+  GL_MAT_SPECULAR_BIT_PGI* = 0x04000000.GLbitfield
+  GL_VERTEX_ATTRIB_MAP1_APPLE* = 0x8A00.GLenum
+  GL_DEBUG_SOURCE_WINDOW_SYSTEM* = 0x8247.GLenum
+  GL_NEAREST_MIPMAP_NEAREST* = 0x2700.GLint
+  GL_MODELVIEW7_ARB* = 0x8727.GLenum
+  GL_OUTPUT_VERTEX_EXT* = 0x879A.GLenum
+  GL_FRAMEBUFFER_EXT* = 0x8D40.GLenum
+  GL_ATC_RGBA_EXPLICIT_ALPHA_AMD* = 0x8C93.GLenum
+  GL_RENDERBUFFER_WIDTH_OES* = 0x8D42.GLenum
+  GL_TEXTURE_VIEW_MIN_LAYER* = 0x82DD.GLenum
+  GL_TEXTURE25_ARB* = 0x84D9.GLenum
+  GL_LIGHT7* = 0x4007.GLenum
+  GL_TESS_EVALUATION_SHADER_BIT* = 0x00000010.GLbitfield
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT* = 0x8CD2.GLenum
+  GL_COLOR_ATTACHMENT15_NV* = 0x8CEF.GLenum
+  GL_RED_SNORM* = 0x8F90.GLenum
+  GL_VIVIDLIGHT_NV* = 0x92A6.GLenum
+  GL_OBJECT_COMPILE_STATUS_ARB* = 0x8B81.GLenum
+  GL_INTERNALFORMAT_PREFERRED* = 0x8270.GLenum
+  GL_OUT_OF_MEMORY* = 0x0505.GLenum
+  GL_422_REV_EXT* = 0x80CD.GLenum
+  GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV* = 0x86F0.GLenum
+  GL_PROXY_TEXTURE_1D* = 0x8063.GLenum
+  GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA* = 0x8BB2.GLenum
+  GL_YCBCR_422_APPLE* = 0x85B9.GLenum
+  GL_DRAW_BUFFER10_ATI* = 0x882F.GLenum
+  GL_COLOR_TABLE_ALPHA_SIZE_SGI* = 0x80DD.GLenum
+  GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS* = 0x8E86.GLenum
+  GL_MAX_PROGRAM_OUTPUT_VERTICES_NV* = 0x8C27.GLenum
+  GL_IMAGE_2D_MULTISAMPLE_EXT* = 0x9055.GLenum
+  GL_ACTIVE_TEXTURE_ARB* = 0x84E0.GLenum
+  GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV* = 0x02000000.GLbitfield
+  GL_QUERY_WAIT_NV* = 0x8E13.GLenum
+  GL_MAX_ELEMENT_INDEX* = 0x8D6B.GLenum
+  GL_OP_LOG_BASE_2_EXT* = 0x8792.GLenum
+  GL_ADD_SIGNED* = 0x8574.GLenum
+  GL_CONVOLUTION_FORMAT* = 0x8017.GLenum
+  GL_RENDERBUFFER_RED_SIZE_EXT* = 0x8D50.GLenum
+  GL_RENDERBUFFER_INTERNAL_FORMAT* = 0x8D44.GLenum
+  GL_COLOR_ATTACHMENT11_NV* = 0x8CEB.GLenum
+  GL_MATRIX14_ARB* = 0x88CE.GLenum
+  GL_COLOR_TABLE_RED_SIZE_SGI* = 0x80DA.GLenum
+  GL_CON_22_ATI* = 0x8957.GLenum
+  GL_TEXTURE_SWIZZLE_B_EXT* = 0x8E44.GLenum
+  GL_SAMPLES_SGIS* = 0x80A9.GLenum
+  GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV* = 0x887A.GLenum
+  GL_FONT_X_MIN_BOUNDS_BIT_NV* = 0x00010000.GLbitfield
+  GL_3_BYTES* = 0x1408.GLenum
+  GL_TEXTURE_MAX_CLAMP_S_SGIX* = 0x8369.GLenum
+  GL_PROXY_TEXTURE_CUBE_MAP_EXT* = 0x851B.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE* = 0x88FE.GLenum
+  GL_VERTEX_DATA_HINT_PGI* = 0x1A22A.GLenum
+  GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT* = 0x850D.GLenum
+  GL_MAX_INTEGER_SAMPLES* = 0x9110.GLenum
+  GL_TEXTURE_BUFFER_ARB* = 0x8C2A.GLenum
+  GL_FOG_COORD_ARRAY_POINTER* = 0x8456.GLenum
+  GL_UNSIGNED_SHORT_1_15_REV_MESA* = 0x8754.GLenum
+  GL_IMAGE_CUBIC_WEIGHT_HP* = 0x815E.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES* = 0x8CD6.GLenum
+  GL_RGBA_DXT5_S3TC* = 0x83A4.GLenum
+  GL_INT_IMAGE_2D_MULTISAMPLE* = 0x9060.GLenum
+  GL_ACTIVE_RESOURCES* = 0x92F5.GLenum
+  GL_TEXTURE_BINDING_2D* = 0x8069.GLenum
+  GL_SAMPLE_COVERAGE* = 0x80A0.GLenum
+  GL_SMOOTH* = 0x1D01.GLenum
+  GL_SAMPLER_1D_SHADOW_ARB* = 0x8B61.GLenum
+  GL_VIRTUAL_PAGE_SIZE_Y_AMD* = 0x9196.GLenum
+  GL_HORIZONTAL_LINE_TO_NV* = 0x06.GLenum
+  GL_HISTOGRAM_GREEN_SIZE_EXT* = 0x8029.GLenum
+  GL_COLOR_FLOAT_APPLE* = 0x8A0F.GLenum
+  GL_NUM_SHADER_BINARY_FORMATS* = 0x8DF9.GLenum
+  GL_TIMESTAMP* = 0x8E28.GLenum
+  GL_SRGB_EXT* = 0x8C40.GLenum
+  GL_MAX_VERTEX_UNIFORM_BLOCKS* = 0x8A2B.GLenum
+  GL_COLOR_ATTACHMENT2_EXT* = 0x8CE2.GLenum
+  GL_DEBUG_CALLBACK_FUNCTION_KHR* = 0x8244.GLenum
+  GL_DISPLAY_LIST* = 0x82E7.GLenum
+  GL_MAP1_NORMAL* = 0x0D92.GLenum
+  GL_COMPUTE_TEXTURE* = 0x82A0.GLenum
+  GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS* = 0x90DB.GLenum
+  GL_W_EXT* = 0x87D8.GLenum
+  GL_SAMPLE_SHADING_ARB* = 0x8C36.GLenum
+  GL_FRAGMENT_INTERPOLATION_OFFSET_BITS* = 0x8E5D.GLenum
+  GL_IMAGE_CLASS_4_X_16* = 0x82BC.GLenum
+  GL_FRAGMENT_DEPTH_EXT* = 0x8452.GLenum
+  GL_EVAL_BIT* = 0x00010000.GLbitfield
+  GL_UNSIGNED_INT_8_8_8_8* = 0x8035.GLenum
+  GL_MAX_TESS_CONTROL_INPUT_COMPONENTS* = 0x886C.GLenum
+  GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA* = 0x8BB3.GLenum
+  GL_SLUMINANCE8_ALPHA8* = 0x8C45.GLenum
+  GL_MODULATE_COLOR_IMG* = 0x8C04.GLenum
+  GL_TEXTURE20* = 0x84D4.GLenum
+  GL_ALPHA_INTEGER_EXT* = 0x8D97.GLenum
+  GL_TEXTURE_BINDING_CUBE_MAP_EXT* = 0x8514.GLenum
+  GL_BACK_LEFT* = 0x0402.GLenum
+  GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT* = 0x8F39.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_BUFFERS* = 0x8E70.GLenum
+  GL_TRANSFORM_BIT* = 0x00001000.GLbitfield
+  GL_RGB4_EXT* = 0x804F.GLenum
+  GL_FRAGMENT_COLOR_EXT* = 0x834C.GLenum
+  GL_PIXEL_MAP_S_TO_S* = 0x0C71.GLenum
+  GL_COMPRESSED_RGBA_S3TC_DXT5_EXT* = 0x83F3.GLenum
+  GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV* = 0x90BD.GLenum
+  GL_SOURCE0_RGB_EXT* = 0x8580.GLenum
+  GL_PIXEL_COUNTER_BITS_NV* = 0x8864.GLenum
+  GL_ALIASED_LINE_WIDTH_RANGE* = 0x846E.GLenum
+  GL_DRAW_BUFFER10* = 0x882F.GLenum
+  GL_T4F_C4F_N3F_V4F* = 0x2A2D.GLenum
+  GL_BLEND_EQUATION_OES* = 0x8009.GLenum
+  GL_DEPTH_COMPONENT32* = 0x81A7.GLenum
+  GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT* = 0x87CA.GLenum
+  GL_DEPTH_BUFFER_BIT5_QCOM* = 0x00002000.GLbitfield
+  GL_RED_MIN_CLAMP_INGR* = 0x8560.GLenum
+  GL_RGBA_INTEGER_MODE_EXT* = 0x8D9E.GLenum
+  GL_DOUBLE_MAT4_EXT* = 0x8F48.GLenum
+  GL_OBJECT_DELETE_STATUS_ARB* = 0x8B80.GLenum
+  GL_FOG_COORD_ARRAY_LENGTH_NV* = 0x8F32.GLenum
+  GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING* = 0x889C.GLenum
+  GL_MAP1_VERTEX_ATTRIB7_4_NV* = 0x8667.GLenum
+  GL_BLEND_SRC_RGB_EXT* = 0x80C9.GLenum
+  GL_VERTEX_PROGRAM_POINT_SIZE_ARB* = 0x8642.GLenum
+  GL_STENCIL_INDEX1_EXT* = 0x8D46.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT* = 0x8516.GLenum
+  GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT* = 0x8A52.GLenum
+  GL_FOG_COORD_SRC* = 0x8450.GLenum
+  GL_ANY_SAMPLES_PASSED_EXT* = 0x8C2F.GLenum
+  GL_ALPHA4* = 0x803B.GLenum
+  GL_TEXTURE_GEN_MODE* = 0x2500.GLenum
+  GL_FLOAT_MAT3_ARB* = 0x8B5B.GLenum
+  GL_PIXEL_MAP_A_TO_A_SIZE* = 0x0CB9.GLenum
+  GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB* = 0x8B8B.GLenum
+  GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI* = 0x8802.GLenum
+  GL_COPY_READ_BUFFER_BINDING* = 0x8F36.GLenum
+  GL_YCRCB_444_SGIX* = 0x81BC.GLenum
+  GL_SLUMINANCE_EXT* = 0x8C46.GLenum
+  GL_EDGE_FLAG_ARRAY_EXT* = 0x8079.GLenum
+  GL_STENCIL_INDEX8_OES* = 0x8D48.GLenum
+  GL_RGBA32UI* = 0x8D70.GLenum
+  GL_TEXTURE_CUBE_MAP* = 0x8513.GLenum
+  GL_STREAM_COPY* = 0x88E2.GLenum
+  GL_VIEWPORT_BOUNDS_RANGE* = 0x825D.GLenum
+  GL_ASYNC_READ_PIXELS_SGIX* = 0x835E.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_INTEGER* = 0x88FD.GLenum
+  GL_INTERNALFORMAT_STENCIL_TYPE* = 0x827D.GLenum
+  GL_OUTPUT_TEXTURE_COORD28_EXT* = 0x87B9.GLenum
+  GL_MATRIX_MODE* = 0x0BA0.GLenum
+  GL_MULTISAMPLE_SGIS* = 0x809D.GLenum
+  GL_R1UI_V3F_SUN* = 0x85C4.GLenum
+  GL_FLOAT_R32_NV* = 0x8885.GLenum
+  GL_MAX_DRAW_BUFFERS* = 0x8824.GLenum
+  GL_CIRCULAR_CCW_ARC_TO_NV* = 0xF8.GLenum
+  GL_PROGRAM_OUTPUT* = 0x92E4.GLenum
+  GL_MAX_CUBE_MAP_TEXTURE_SIZE* = 0x851C.GLenum
+  GL_TRIANGLE_STRIP_ADJACENCY_ARB* = 0x000D.GLenum
+  GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT* = 0x8A34.GLenum
+  GL_SRGB* = 0x8C40.GLenum
+  GL_BUFFER_ACCESS* = 0x88BB.GLenum
+  GL_TEXTURE_WRAP_S* = 0x2802.GLenum
+  GL_TRANSFORM_FEEDBACK_VARYINGS* = 0x8C83.GLenum
+  GL_RG16UI* = 0x823A.GLenum
+  GL_DUAL_LUMINANCE4_SGIS* = 0x8114.GLenum
+  GL_DOT_PRODUCT_DEPTH_REPLACE_NV* = 0x86ED.GLenum
+  GL_READ_FRAMEBUFFER_BINDING* = 0x8CAA.GLenum
+  GL_MAX_FOG_FUNC_POINTS_SGIS* = 0x812C.GLenum
+  GL_QUERY_RESULT_NO_WAIT* = 0x9194.GLenum
+  GL_FILE_NAME_NV* = 0x9074.GLenum
+  GL_DRAW_FRAMEBUFFER_BINDING* = 0x8CA6.GLenum
+  GL_FRAGMENT_SHADER* = 0x8B30.GLenum
+  GL_VIBRANCE_SCALE_NV* = 0x8713.GLenum
+  GL_PATH_FILL_COVER_MODE_NV* = 0x9082.GLenum
+  GL_LINEAR_MIPMAP_LINEAR* = 0x2703.GLint
+  GL_TEXTURE29* = 0x84DD.GLenum
+  GL_SCISSOR_BOX* = 0x0C10.GLenum
+  GL_PACK_SKIP_IMAGES* = 0x806B.GLenum
+  GL_BUFFER_MAP_OFFSET* = 0x9121.GLenum
+  GL_SLUMINANCE8_EXT* = 0x8C47.GLenum
+  GL_CONVOLUTION_1D* = 0x8010.GLenum
+  GL_MAX_GEOMETRY_IMAGE_UNIFORMS* = 0x90CD.GLenum
+  GL_MAP1_VERTEX_ATTRIB11_4_NV* = 0x866B.GLenum
+  GL_COLOR_LOGIC_OP* = 0x0BF2.GLenum
+  GL_SYNC_FLAGS_APPLE* = 0x9115.GLenum
+  GL_ACCUM_RED_BITS* = 0x0D58.GLenum
+  GL_VIEW_CLASS_128_BITS* = 0x82C4.GLenum
+  GL_INT_VEC3* = 0x8B54.GLenum
+  GL_INTENSITY12* = 0x804C.GLenum
+  GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER* = 0x90EC.GLenum
+  GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES* = 0x8D68.GLenum
+  GL_MAX_COLOR_MATRIX_STACK_DEPTH* = 0x80B3.GLenum
+  GL_GLOBAL_ALPHA_FACTOR_SUN* = 0x81DA.GLenum
+  GL_PACK_RESAMPLE_SGIX* = 0x842C.GLenum
+  GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB* = 0x91BF.GLenum
+  GL_DEPTH_BUFFER_FLOAT_MODE_NV* = 0x8DAF.GLenum
+  GL_SIGNED_LUMINANCE_ALPHA_NV* = 0x8703.GLenum
+  GL_OP_MIN_EXT* = 0x878B.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV* = 0x8C7F.GLenum
+  GL_COLOR_INDEX12_EXT* = 0x80E6.GLenum
+  GL_AUTO_NORMAL* = 0x0D80.GLenum
+  GL_ARRAY_BUFFER* = 0x8892.GLenum
+  GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT* = 0x8DE1.GLenum
+  GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV* = 0x903C.GLenum
+  GL_ACCUM_BLUE_BITS* = 0x0D5A.GLenum
+  GL_RENDERBUFFER_SAMPLES_ANGLE* = 0x8CAB.GLenum
+  GL_MAX_ASYNC_HISTOGRAM_SGIX* = 0x832D.GLenum
+  GL_GLYPH_HAS_KERNING_BIT_NV* = 0x100.GLbitfield
+  GL_TESS_CONTROL_SUBROUTINE_UNIFORM* = 0x92EF.GLenum
+  GL_DRAW_BUFFER1* = 0x8826.GLenum
+  GL_INT8_NV* = 0x8FE0.GLenum
+  GL_2PASS_0_EXT* = 0x80A2.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_INDEX* = 0x934B.GLenum
+  GL_NUM_VIRTUAL_PAGE_SIZES_ARB* = 0x91A8.GLenum
+  GL_INT_SAMPLER_3D* = 0x8DCB.GLenum
+  GL_RASTERIZER_DISCARD* = 0x8C89.GLenum
+  GL_SOURCE2_RGB_ARB* = 0x8582.GLenum
+  GL_LOCAL_CONSTANT_EXT* = 0x87C3.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT* = 0x8DA9.GLenum
+  GL_MODELVIEW12_ARB* = 0x872C.GLenum
+  GL_VERTEX_SUBROUTINE_UNIFORM* = 0x92EE.GLenum
+  GL_OPERAND0_ALPHA_ARB* = 0x8598.GLenum
+  GL_DEPTH24_STENCIL8* = 0x88F0.GLenum
+  GL_RENDERBUFFER_RED_SIZE* = 0x8D50.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING* = 0x8210.GLenum
+  GL_DRAW_BUFFER10_ARB* = 0x882F.GLenum
+  GL_UNSIGNED_INT_SAMPLER_3D* = 0x8DD3.GLenum
+  GL_SKIP_COMPONENTS2_NV* = -5
+  GL_PROGRAM_BINARY_LENGTH_OES* = 0x8741.GLenum
+  GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE* = 0x8A02.GLenum
+  GL_QUERY_RESULT_EXT* = 0x8866.GLenum
+  GL_CONSTANT_COLOR0_NV* = 0x852A.GLenum
+  GL_MAX_ASYNC_DRAW_PIXELS_SGIX* = 0x8360.GLenum
+  GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV* = 0x86F1.GLenum
+  GL_ALPHA_TEST_REF* = 0x0BC2.GLenum
+  GL_MAX_4D_TEXTURE_SIZE_SGIS* = 0x8138.GLenum
+  GL_INT_SAMPLER_2D_MULTISAMPLE* = 0x9109.GLenum
+  GL_DRAW_BUFFER6_ATI* = 0x882B.GLenum
+  GL_INTENSITY16UI_EXT* = 0x8D79.GLenum
+  GL_POINT_FADE_THRESHOLD_SIZE_ARB* = 0x8128.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING* = 0x889F.GLenum
+  GL_RENDERBUFFER_WIDTH_EXT* = 0x8D42.GLenum
+  GL_FIXED_ONLY* = 0x891D.GLenum
+  GL_HISTOGRAM_BLUE_SIZE* = 0x802A.GLenum
+  GL_PROGRAM_TEX_INSTRUCTIONS_ARB* = 0x8806.GLenum
+  GL_MAX_VERTEX_SHADER_VARIANTS_EXT* = 0x87C6.GLenum
+  GL_UNSIGNED_INT_10_10_10_2_EXT* = 0x8036.GLenum
+  GL_SAMPLE_ALPHA_TO_ONE_EXT* = 0x809F.GLenum
+  GL_INDEX_ARRAY* = 0x8077.GLenum
+  GL_GEQUAL* = 0x0206.GLenum
+  GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS* = 0x90D8.GLenum
+  GL_DITHER* = 0x0BD0.GLenum
+  GL_ATTACHED_SHADERS* = 0x8B85.GLenum
+  GL_FUNC_SUBTRACT* = 0x800A.GLenum
+  GL_ATOMIC_COUNTER_BARRIER_BIT_EXT* = 0x00001000.GLbitfield
+  GL_LUMINANCE4* = 0x803F.GLenum
+  GL_BLEND_EQUATION_RGB_EXT* = 0x8009.GLenum
+  GL_TEXTURE_MULTI_BUFFER_HINT_SGIX* = 0x812E.GLenum
+  GL_DEBUG_SEVERITY_LOW_KHR* = 0x9148.GLenum
+  GL_UNPACK_COMPRESSED_BLOCK_HEIGHT* = 0x9128.GLenum
+  GL_CULL_VERTEX_OBJECT_POSITION_EXT* = 0x81AC.GLenum
+  GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI* = 0x80BB.GLenum
+  GL_ADD_SIGNED_EXT* = 0x8574.GLenum
+  GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL* = 0x83F5.GLenum
+  GL_CURRENT_RASTER_SECONDARY_COLOR* = 0x845F.GLenum
+  GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV* = 0x8E5F.GLenum
+  GL_CONTINUOUS_AMD* = 0x9007.GLenum
+  GL_R1UI_T2F_C4F_N3F_V3F_SUN* = 0x85CB.GLenum
+  GL_COMPUTE_SHADER* = 0x91B9.GLenum
+  GL_CLIP_DISTANCE6* = 0x3006.GLenum
+  GL_SRC_ATOP_NV* = 0x928E.GLenum
+  GL_DEPTH_COMPONENT16_OES* = 0x81A5.GLenum
+  GL_DOUBLE_MAT4* = 0x8F48.GLenum
+  GL_MAT_SHININESS_BIT_PGI* = 0x02000000.GLbitfield
+  GL_SAMPLER_BUFFER_AMD* = 0x9001.GLenum
+  GL_ARRAY_BUFFER_BINDING_ARB* = 0x8894.GLenum
+  GL_VOLATILE_APPLE* = 0x8A1A.GLenum
+  GL_ALPHA32UI_EXT* = 0x8D72.GLenum
+  GL_COLOR_BUFFER_BIT1_QCOM* = 0x00000002.GLbitfield
+  GL_VERTEX_PROGRAM_CALLBACK_MESA* = 0x8BB4.GLenum
+  GL_CULL_VERTEX_EXT* = 0x81AA.GLenum
+  GL_RENDERBUFFER_STENCIL_SIZE_EXT* = 0x8D55.GLenum
+  GL_SELECT* = 0x1C02.GLenum
+  GL_LUMINANCE12_ALPHA4* = 0x8046.GLenum
+  GL_IMAGE_BINDING_LEVEL_EXT* = 0x8F3B.GLenum
+  GL_MATRIX_PALETTE_ARB* = 0x8840.GLenum
+  GL_DUAL_ALPHA4_SGIS* = 0x8110.GLenum
+  GL_BACK_NORMALS_HINT_PGI* = 0x1A223.GLenum
+  GL_UNSIGNED_SHORT_15_1_MESA* = 0x8753.GLenum
+  GL_UNSIGNED_SHORT_4_4_4_4_REV* = 0x8365.GLenum
+  GL_BUFFER* = 0x82E0.GLenum
+  GL_RENDERBUFFER_INTERNAL_FORMAT_EXT* = 0x8D44.GLenum
+  GL_MATRIX5_NV* = 0x8635.GLenum
+  GL_ATOMIC_COUNTER_BUFFER* = 0x92C0.GLenum
+  GL_SMOOTH_QUADRATIC_CURVE_TO_NV* = 0x0E.GLenum
+  GL_VARIABLE_D_NV* = 0x8526.GLenum
+  GL_PINLIGHT_NV* = 0x92A8.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT* = 0x88FD.GLenum
+  GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS* = 0x92CF.GLenum
+  GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV* = 0x9034.GLenum
+  GL_RESAMPLE_REPLICATE_SGIX* = 0x842E.GLenum
+  GL_UNSIGNED_SHORT_5_6_5_REV* = 0x8364.GLenum
+  GL_VERTEX_ATTRIB_ARRAY2_NV* = 0x8652.GLenum
+  GL_3D_COLOR_TEXTURE* = 0x0603.GLenum
+  GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS* = 0x8B4C.GLenum
+  GL_DEBUG_TYPE_PERFORMANCE_KHR* = 0x8250.GLenum
+  GL_MATRIX_INDEX_ARRAY_OES* = 0x8844.GLenum
+  GL_TEXTURE_TOO_LARGE_EXT* = 0x8065.GLenum
+  GL_PACK_IMAGE_HEIGHT_EXT* = 0x806C.GLenum
+  GL_YCBYCR8_422_NV* = 0x9031.GLenum
+  GL_COLOR_ATTACHMENT8* = 0x8CE8.GLenum
+  GL_SAMPLE_COVERAGE_ARB* = 0x80A0.GLenum
+  GL_CURRENT_VERTEX_EXT* = 0x87E2.GLenum
+  GL_LINEAR* = 0x2601.GLint
+  GL_STENCIL_TAG_BITS_EXT* = 0x88F2.GLenum
+  GL_T2F_IUI_V3F_EXT* = 0x81B2.GLenum
+  GL_TEXTURE_3D_BINDING_OES* = 0x806A.GLenum
+  GL_PATH_CLIENT_LENGTH_NV* = 0x907F.GLenum
+  GL_MAT_AMBIENT_BIT_PGI* = 0x00100000.GLbitfield
+  GL_DOUBLE_MAT4x3* = 0x8F4E.GLenum
+  GL_QUERY_BY_REGION_WAIT_NV* = 0x8E15.GLenum
+  GL_LEQUAL* = 0x0203.GLenum
+  GL_PROGRAM_ATTRIBS_ARB* = 0x88AC.GLenum
+  GL_BUFFER_MAPPED_ARB* = 0x88BC.GLenum
+  GL_VERTEX_SHADER_ARB* = 0x8B31.GLenum
+  GL_SOURCE1_ALPHA_EXT* = 0x8589.GLenum
+  GL_UNSIGNED_INT16_VEC3_NV* = 0x8FF2.GLenum
+  GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB* = 0x88B1.GLenum
+  GL_RGB16* = 0x8054.GLenum
+  GL_TEXTURE15_ARB* = 0x84CF.GLenum
+  GL_TEXTURE_GATHER_SHADOW* = 0x82A3.GLenum
+  GL_FENCE_APPLE* = 0x8A0B.GLenum
+  GL_TRIANGLES* = 0x0004.GLenum
+  GL_DOT4_ATI* = 0x8967.GLenum
+  GL_CURRENT_FOG_COORD* = 0x8453.GLenum
+  GL_DEPTH_CLAMP_NEAR_AMD* = 0x901E.GLenum
+  GL_SYNC_FENCE* = 0x9116.GLenum
+  GL_UNSIGNED_INT64_VEC3_NV* = 0x8FF6.GLenum
+  GL_DEPTH* = 0x1801.GLenum
+  GL_TEXTURE_COORD_NV* = 0x8C79.GLenum
+  GL_COMBINE* = 0x8570.GLenum
+  GL_MAX_VERTEX_UNITS_ARB* = 0x86A4.GLenum
+  GL_COLOR_INDEX2_EXT* = 0x80E3.GLenum
+  GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP* = 0x8162.GLenum
+  GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB* = 0x900E.GLenum
+  GL_MIRROR_CLAMP_EXT* = 0x8742.GLint
+  GL_STENCIL_VALUE_MASK* = 0x0B93.GLenum
+  GL_UNSIGNED_INT_SAMPLER_BUFFER* = 0x8DD8.GLenum
+  GL_TRACK_MATRIX_NV* = 0x8648.GLenum
+  GL_MAP1_VERTEX_3* = 0x0D97.GLenum
+  GL_OP_MOV_EXT* = 0x8799.GLenum
+  GL_MAP_INVALIDATE_RANGE_BIT_EXT* = 0x0004.GLbitfield
+  GL_MAX_CONVOLUTION_WIDTH_EXT* = 0x801A.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES* = 0x8518.GLenum
+  GL_RGBA_SNORM* = 0x8F93.GLenum
+  GL_MAX_TRACK_MATRICES_NV* = 0x862F.GLenum
+  GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS* = 0x886D.GLenum
+  GL_DOUBLE_VEC4_EXT* = 0x8FFE.GLenum
+  GL_COLOR_TABLE_BLUE_SIZE* = 0x80DC.GLenum
+  GL_T2F_C3F_V3F* = 0x2A2A.GLenum
+  GL_INTENSITY16_SNORM* = 0x901B.GLenum
+  GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT* = 0x905F.GLenum
+  GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD* = 0x914C.GLenum
+  GL_NORMAL_MAP_EXT* = 0x8511.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV* = 0x8C8B.GLenum
+  GL_DRAW_BUFFER4_EXT* = 0x8829.GLenum
+  GL_PIXEL_MAP_G_TO_G* = 0x0C77.GLenum
+  GL_TESS_GEN_POINT_MODE* = 0x8E79.GLenum
+  GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS* = 0x92CC.GLenum
+  GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT* = 0x8DD5.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT2_QCOM* = 0x04000000.GLbitfield
+  GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI* = 0x80B9.GLenum
+  GL_POST_COLOR_MATRIX_GREEN_BIAS* = 0x80B9.GLenum
+  GL_TEXTURE10* = 0x84CA.GLenum
+  GL_RGB32F* = 0x8815.GLenum
+  GL_DYNAMIC_READ_ARB* = 0x88E9.GLenum
+  GL_MODELVIEW22_ARB* = 0x8736.GLenum
+  GL_VERTEX_STREAM0_ATI* = 0x876C.GLenum
+  GL_TEXTURE_FETCH_BARRIER_BIT_EXT* = 0x00000008.GLbitfield
+  GL_COMBINER_INPUT_NV* = 0x8542.GLenum
+  GL_DRAW_BUFFER0_NV* = 0x8825.GLenum
+  GL_ALPHA_TEST* = 0x0BC0.GLenum
+  GL_PIXEL_UNPACK_BUFFER* = 0x88EC.GLenum
+  GL_SRC_IN_NV* = 0x928A.GLenum
+  GL_COMPRESSED_SIGNED_RED_RGTC1_EXT* = 0x8DBC.GLenum
+  GL_PACK_SUBSAMPLE_RATE_SGIX* = 0x85A0.GLenum
+  GL_FRAMEBUFFER_DEFAULT_SAMPLES* = 0x9313.GLenum
+  GL_ARRAY_OBJECT_OFFSET_ATI* = 0x8767.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES* = 0x8515.GLenum
+  GL_STENCIL_BITS* = 0x0D57.GLenum
+  GL_DEPTH_COMPONENT24_OES* = 0x81A6.GLenum
+  GL_FRAMEBUFFER* = 0x8D40.GLenum
+  GL_8X_BIT_ATI* = 0x00000004.GLbitfield
+  GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY* = 0x9105.GLenum
+  GL_BOOL_VEC2* = 0x8B57.GLenum
+  GL_EXP* = 0x0800.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT* = 0x851A.GLenum
+  GL_STENCIL_INDEX16* = 0x8D49.GLenum
+  GL_FRAGMENT_LIGHTING_SGIX* = 0x8400.GLenum
+  GL_PACK_SKIP_PIXELS* = 0x0D04.GLenum
+  GL_TEXTURE_MIN_LOD* = 0x813A.GLenum
+  GL_COMPRESSED_RGB* = 0x84ED.GLenum
+  GL_MAP1_VERTEX_ATTRIB2_4_NV* = 0x8662.GLenum
+  GL_CONJOINT_NV* = 0x9284.GLenum
+  GL_MAX_COMPUTE_SHARED_MEMORY_SIZE* = 0x8262.GLenum
+  GL_INTENSITY8* = 0x804B.GLenum
+  GL_SAMPLER_2D_MULTISAMPLE* = 0x9108.GLenum
+  GL_MAX_LIST_NESTING* = 0x0B31.GLenum
+  GL_DOUBLE_MAT3* = 0x8F47.GLenum
+  GL_TEXTURE_DEPTH* = 0x8071.GLenum
+  GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION* = 0x8E4C.GLenum
+  GL_TEXTURE12_ARB* = 0x84CC.GLenum
+  GL_R1UI_T2F_V3F_SUN* = 0x85C9.GLenum
+  GL_REPLACE* = 0x1E01.GLenum
+  GL_MAX_NUM_ACTIVE_VARIABLES* = 0x92F7.GLenum
+  GL_RGBA_INTEGER_EXT* = 0x8D99.GLenum
+  GL_TEXTURE_COMPRESSED_BLOCK_SIZE* = 0x82B3.GLenum
+  GL_INDEX_CLEAR_VALUE* = 0x0C20.GLenum
+  GL_PROGRAM_ERROR_POSITION_ARB* = 0x864B.GLenum
+  GL_LINEARBURN_NV* = 0x92A5.GLenum
+  GL_TEXTURE_BINDING_CUBE_MAP_ARB* = 0x8514.GLenum
+  GL_TESSELLATION_FACTOR_AMD* = 0x9005.GLenum
+  GL_SHADER_IMAGE_STORE* = 0x82A5.GLenum
+  GL_COMPRESSED_SLUMINANCE_ALPHA_EXT* = 0x8C4B.GLenum
+  GL_MAX_PALETTE_MATRICES_ARB* = 0x8842.GLenum
+  GL_UNPACK_CONSTANT_DATA_SUNX* = 0x81D5.GLenum
+  GL_FLOAT_MAT3x4* = 0x8B68.GLenum
+  GL_DRAW_BUFFER8_NV* = 0x882D.GLenum
+  GL_ATTENUATION_EXT* = 0x834D.GLenum
+  GL_REG_25_ATI* = 0x893A.GLenum
+  GL_UNSIGNED_INT_SAMPLER_1D* = 0x8DD1.GLenum
+  GL_TEXTURE_1D_STACK_BINDING_MESAX* = 0x875D.GLenum
+  GL_SYNC_STATUS_APPLE* = 0x9114.GLenum
+  GL_TEXTURE_CUBE_MAP_ARRAY* = 0x9009.GLenum
+  GL_EXP2* = 0x0801.GLenum
+  GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT* = 0x8C71.GLenum
+  GL_BUFFER_ACCESS_ARB* = 0x88BB.GLenum
+  GL_LO_BIAS_NV* = 0x8715.GLenum
+  GL_MIRROR_CLAMP_ATI* = 0x8742.GLint
+  GL_SAMPLE_COVERAGE_VALUE* = 0x80AA.GLenum
+  GL_UNSIGNED_INT_24_8_EXT* = 0x84FA.GLenum
+  GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT* = 0x8C88.GLenum
+  GL_R16UI* = 0x8234.GLenum
+  GL_BLEND_PREMULTIPLIED_SRC_NV* = 0x9280.GLenum
+  GL_COLOR_ATTACHMENT0* = 0x8CE0.GLenum
+  GL_GEOMETRY_VERTICES_OUT_EXT* = 0x8DDA.GLenum
+  GL_SAMPLE_MASK_NV* = 0x8E51.GLenum
+  GL_BGRA_INTEGER_EXT* = 0x8D9B.GLenum
+  GL_PALETTE8_RGBA8_OES* = 0x8B96.GLenum
+  GL_MAX_ARRAY_TEXTURE_LAYERS_EXT* = 0x88FF.GLenum
+  GL_TEXTURE_COLOR_TABLE_SGI* = 0x80BC.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT* = 0x8C80.GLenum
+  GL_TEXTURE10_ARB* = 0x84CA.GLenum
+  GL_TRIANGLES_ADJACENCY* = 0x000C.GLenum
+  GL_COLOR_ARRAY_EXT* = 0x8076.GLenum
+  GL_MAX_FRAMEBUFFER_SAMPLES* = 0x9318.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB* = 0x889F.GLenum
+  GL_IMAGE_TEXEL_SIZE* = 0x82A7.GLenum
+  GL_MAGNITUDE_BIAS_NV* = 0x8718.GLenum
+  GL_SHADOW_AMBIENT_SGIX* = 0x80BF.GLenum
+  GL_BUFFER_SERIALIZED_MODIFY_APPLE* = 0x8A12.GLenum
+  GL_TEXTURE_COORD_ARRAY_COUNT_EXT* = 0x808B.GLenum
+  GL_MAX_DRAW_BUFFERS_ARB* = 0x8824.GLenum
+  GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT* = 0x87CD.GLenum
+  GL_PASS_THROUGH_TOKEN* = 0x0700.GLenum
+  GL_BLEND_EQUATION* = 0x8009.GLenum
+  GL_FOG_HINT* = 0x0C54.GLenum
+  GL_FLOAT_RGB16_NV* = 0x8888.GLenum
+  GL_OUTPUT_TEXTURE_COORD18_EXT* = 0x87AF.GLenum
+  GL_T2F_IUI_N3F_V2F_EXT* = 0x81B3.GLenum
+  GL_SAMPLER_EXTERNAL_OES* = 0x8D66.GLenum
+  GL_MAX_SUBROUTINES* = 0x8DE7.GLenum
+  GL_RED_BIT_ATI* = 0x00000001.GLbitfield
+  GL_SOURCE2_ALPHA* = 0x858A.GLenum
+  GL_AUX0* = 0x0409.GLenum
+  GL_OPERAND1_ALPHA_ARB* = 0x8599.GLenum
+  GL_TEXTURE_MAX_ANISOTROPY_EXT* = 0x84FE.GLenum
+  GL_VERTEX_PROGRAM_POINT_SIZE_NV* = 0x8642.GLenum
+  GL_MULTIVIEW_EXT* = 0x90F1.GLenum
+  GL_FOG_OFFSET_SGIX* = 0x8198.GLenum
+  GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL* = 0x83F7.GLenum
+  GL_ELEMENT_ARRAY_ATI* = 0x8768.GLenum
+  GL_ALPHA16_SNORM* = 0x9018.GLenum
+  GL_COMPRESSED_SLUMINANCE_EXT* = 0x8C4A.GLenum
+  GL_TEXTURE_OBJECT_VALID_QCOM* = 0x8BDB.GLenum
+  GL_STENCIL_BACK_FUNC* = 0x8800.GLenum
+  GL_CULL_FACE* = 0x0B44.GLenum
+  GL_MAP1_COLOR_4* = 0x0D90.GLenum
+  GL_SHADER_OBJECT_ARB* = 0x8B48.GLenum
+  GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG* = 0x8C01.GLenum
+  GL_TANGENT_ARRAY_EXT* = 0x8439.GLenum
+  GL_NUM_FRAGMENT_CONSTANTS_ATI* = 0x896F.GLenum
+  GL_COLOR_RENDERABLE* = 0x8286.GLenum
+  GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS* = 0x8B4D.GLenum
+  GL_TRANSFORM_FEEDBACK_RECORD_NV* = 0x8C86.GLenum
+  GL_COLOR_ATTACHMENT1_NV* = 0x8CE1.GLenum
+  GL_ALPHA_SNORM* = 0x9010.GLenum
+  GL_PIXEL_TRANSFORM_2D_MATRIX_EXT* = 0x8338.GLenum
+  GL_SMOOTH_POINT_SIZE_GRANULARITY* = 0x0B13.GLenum
+  GL_R8I* = 0x8231.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT* = 0x8D56.GLenum
+  GL_POLYGON_OFFSET_BIAS_EXT* = 0x8039.GLenum
+  GL_DEPTH_COMPONENT24* = 0x81A6.GLenum
+  GL_TEXTURE_SWIZZLE_B* = 0x8E44.GLenum
+  GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS* = 0x8E81.GLenum
+  GL_MAP2_INDEX* = 0x0DB1.GLenum
+  GL_SAMPLER_CUBE_MAP_ARRAY* = 0x900C.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT* = 0x8CD6.GLenum
+  GL_UNSIGNED_INT_8_8_8_8_REV* = 0x8367.GLenum
+  GL_PATH_GEN_COEFF_NV* = 0x90B1.GLenum
+  GL_OPERAND3_ALPHA_NV* = 0x859B.GLenum
+  GL_LUMINANCE* = 0x1909.GLenum
+  GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS* = 0x8DE8.GLenum
+  GL_MAP_READ_BIT* = 0x0001.GLbitfield
+  GL_MAX_TEXTURE_STACK_DEPTH* = 0x0D39.GLenum
+  GL_ORDER* = 0x0A01.GLenum
+  GL_PATH_FILL_MODE_NV* = 0x9080.GLenum
+  GL_RENDERBUFFER_BLUE_SIZE* = 0x8D52.GLenum
+  GL_TEXTURE_INTENSITY_SIZE* = 0x8061.GLenum
+  GL_DRAW_BUFFER1_NV* = 0x8826.GLenum
+  GL_SCREEN_NV* = 0x9295.GLenum
+  GL_RGB8I_EXT* = 0x8D8F.GLenum
+  GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET* = 0x8E5E.GLenum
+  GL_DUAL_INTENSITY12_SGIS* = 0x811A.GLenum
+  GL_SPARE1_NV* = 0x852F.GLenum
+  GL_PALETTE8_R5_G6_B5_OES* = 0x8B97.GLenum
+  GL_COLOR_ATTACHMENT7_NV* = 0x8CE7.GLenum
+  GL_TEXTURE_HEIGHT* = 0x1001.GLenum
+  GL_RENDERBUFFER_BINDING* = 0x8CA7.GLenum
+  GL_DRAW_BUFFER7_EXT* = 0x882C.GLenum
+  GL_HISTOGRAM* = 0x8024.GLenum
+  GL_COLOR_ATTACHMENT0_OES* = 0x8CE0.GLenum
+  GL_BINORMAL_ARRAY_STRIDE_EXT* = 0x8441.GLenum
+  GL_DEBUG_SEVERITY_HIGH_AMD* = 0x9146.GLenum
+  GL_MIN_SPARSE_LEVEL_AMD* = 0x919B.GLenum
+  GL_MAP1_VERTEX_ATTRIB10_4_NV* = 0x866A.GLenum
+  GL_COEFF* = 0x0A00.GLenum
+  GL_COMPRESSED_RGBA_ASTC_6x5_KHR* = 0x93B3.GLenum
+  GL_TEXTURE_4D_BINDING_SGIS* = 0x814F.GLenum
+  GL_BUFFER_USAGE* = 0x8765.GLenum
+  GL_YCBCR_MESA* = 0x8757.GLenum
+  GL_CLAMP_VERTEX_COLOR* = 0x891A.GLenum
+  GL_RGBA8_EXT* = 0x8058.GLenum
+  GL_BITMAP_TOKEN* = 0x0704.GLenum
+  GL_IMAGE_SCALE_Y_HP* = 0x8156.GLenum
+  GL_OUTPUT_TEXTURE_COORD25_EXT* = 0x87B6.GLenum
+  GL_DEBUG_SOURCE_API* = 0x8246.GLenum
+  GL_STACK_UNDERFLOW* = 0x0504.GLenum
+  GL_COMBINER_CD_DOT_PRODUCT_NV* = 0x8546.GLenum
+  GL_FRAMEBUFFER_BINDING_EXT* = 0x8CA6.GLenum
+  GL_REG_20_ATI* = 0x8935.GLenum
+  GL_MAP1_TEXTURE_COORD_4* = 0x0D96.GLenum
+  GL_DEBUG_OUTPUT_SYNCHRONOUS* = 0x8242.GLenum
+  GL_ACCUM_ALPHA_BITS* = 0x0D5B.GLenum
+  GL_INT_10_10_10_2_OES* = 0x8DF7.GLenum
+  GL_FLOAT_MAT2_ARB* = 0x8B5A.GLenum
+  GL_FRONT_RIGHT* = 0x0401.GLenum
+  GL_COMBINER_AB_DOT_PRODUCT_NV* = 0x8545.GLenum
+  GL_LUMINANCE_ALPHA* = 0x190A.GLenum
+  GL_C4UB_V2F* = 0x2A22.GLenum
+  GL_COMBINER_MUX_SUM_NV* = 0x8547.GLenum
+  GL_MODELVIEW_STACK_DEPTH* = 0x0BA3.GLenum
+  GL_SAMPLES_ARB* = 0x80A9.GLenum
+  GL_ALPHA_TEST_FUNC* = 0x0BC1.GLenum
+  GL_DEPTH_CLAMP* = 0x864F.GLenum
+  GL_MAP2_VERTEX_ATTRIB8_4_NV* = 0x8678.GLenum
+  GL_INVALID_INDEX* = 0xFFFFFFFF.GLenum
+  GL_COMBINER_SCALE_NV* = 0x8548.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER* = 0x92CB.GLenum
+  GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV* = 0x864E.GLenum
+  GL_RELATIVE_SMALL_CW_ARC_TO_NV* = 0x15.GLenum
+  GL_UNSIGNED_INT_10_10_10_2_OES* = 0x8DF6.GLenum
+  GL_DISCARD_ATI* = 0x8763.GLenum
+  GL_PRIMITIVE_RESTART_INDEX_NV* = 0x8559.GLenum
+  GL_IMAGE_CLASS_2_X_8* = 0x82C0.GLenum
+  GL_MANUAL_GENERATE_MIPMAP* = 0x8294.GLenum
+  GL_FLOAT_R_NV* = 0x8880.GLenum
+  GL_SATURATE_BIT_ATI* = 0x00000040.GLbitfield
+  GL_BUFFER_SIZE* = 0x8764.GLenum
+  GL_FRAMEBUFFER_BARRIER_BIT_EXT* = 0x00000400.GLbitfield
+  GL_LUMINANCE8UI_EXT* = 0x8D80.GLenum
+  GL_T2F_IUI_V2F_EXT* = 0x81B1.GLenum
+  GL_OUTPUT_TEXTURE_COORD15_EXT* = 0x87AC.GLenum
+  GL_COVERAGE_AUTOMATIC_NV* = 0x8ED7.GLenum
+  GL_TEXTURE_INTERNAL_FORMAT_QCOM* = 0x8BD5.GLenum
+  GL_INT_IMAGE_CUBE_MAP_ARRAY* = 0x905F.GLenum
+  GL_BUFFER_UPDATE_BARRIER_BIT_EXT* = 0x00000200.GLbitfield
+  GL_GLYPH_WIDTH_BIT_NV* = 0x01.GLbitfield
+  GL_OP_MAX_EXT* = 0x878A.GLenum
+  GL_MINMAX_FORMAT_EXT* = 0x802F.GLenum
+  GL_R16I* = 0x8233.GLenum
+  GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB* = 0x8809.GLenum
+  GL_TEXTURE_MAX_LEVEL* = 0x813D.GLenum
+  GL_GEOMETRY_SHADER* = 0x8DD9.GLenum
+  GL_MAX_RENDERBUFFER_SIZE* = 0x84E8.GLenum
+  GL_RGB16_EXT* = 0x8054.GLenum
+  GL_DUAL_INTENSITY16_SGIS* = 0x811B.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT* = 0x8CD6.GLenum
+  GL_BLUE_SCALE* = 0x0D1A.GLenum
+  GL_RGBA_FLOAT16_APPLE* = 0x881A.GLenum
+  GL_RGBA8UI* = 0x8D7C.GLenum
+  GL_COLOR_ATTACHMENT5* = 0x8CE5.GLenum
+  GL_UNSIGNED_IDENTITY_NV* = 0x8536.GLenum
+  GL_COMPRESSED_RGBA_ASTC_10x8_KHR* = 0x93BA.GLenum
+  GL_FRAGMENT_SHADER_ARB* = 0x8B30.GLenum
+  GL_R8* = 0x8229.GLenum
+  GL_IMAGE_BINDING_LAYERED* = 0x8F3C.GLenum
+  GL_RGBA_FLOAT32_ATI* = 0x8814.GLenum
+  GL_TEXTURE_RED_SIZE_EXT* = 0x805C.GLenum
+  GL_INT8_VEC2_NV* = 0x8FE1.GLenum
+  GL_NEGATE_BIT_ATI* = 0x00000004.GLbitfield
+  GL_ALL_BARRIER_BITS_EXT* = 0xFFFFFFFF.GLbitfield
+  GL_LIGHT_MODEL_COLOR_CONTROL_EXT* = 0x81F8.GLenum
+  GL_LUMINANCE_ALPHA16UI_EXT* = 0x8D7B.GLenum
+  GL_COUNT_UP_NV* = 0x9088.GLenum
+  GL_QUERY_RESULT_AVAILABLE_ARB* = 0x8867.GLenum
+  GL_DRAW_INDIRECT_BUFFER* = 0x8F3F.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT* = 0x8CD3.GLenum
+  GL_OP_DOT3_EXT* = 0x8784.GLenum
+  GL_COLOR_ATTACHMENT10_NV* = 0x8CEA.GLenum
+  GL_STENCIL_INDEX4_OES* = 0x8D47.GLenum
+  GL_LUMINANCE_FLOAT32_ATI* = 0x8818.GLenum
+  GL_DRAW_BUFFER9_ARB* = 0x882E.GLenum
+  GL_RG8_EXT* = 0x822B.GLenum
+  GL_FONT_DESCENDER_BIT_NV* = 0x00400000.GLbitfield
+  GL_TEXTURE_ALPHA_SIZE_EXT* = 0x805F.GLenum
+  GL_Y_EXT* = 0x87D6.GLenum
+  GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT* = 0x8DE4.GLenum
+  GL_SAMPLER_3D_ARB* = 0x8B5F.GLenum
+  GL_INVERT_OVG_NV* = 0x92B4.GLenum
+  GL_REFERENCED_BY_TESS_EVALUATION_SHADER* = 0x9308.GLenum
+  GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL* = 0x83F8.GLenum
+  GL_LIGHT4* = 0x4004.GLenum
+  GL_VERTEX_STATE_PROGRAM_NV* = 0x8621.GLenum
+  GL_ZERO* = 0.GLenum
+  GL_SAMPLER_CUBE_MAP_ARRAY_ARB* = 0x900C.GLenum
+  GL_SAMPLE_MASK_EXT* = 0x80A0.GLenum
+  GL_COMBINER_CD_OUTPUT_NV* = 0x854B.GLenum
+  GL_SAMPLE_ALPHA_TO_MASK_SGIS* = 0x809E.GLenum
+  GL_RGBA16* = 0x805B.GLenum
+  GL_PATH_TERMINAL_DASH_CAP_NV* = 0x907D.GLenum
+  GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB* = 0x889C.GLenum
+  GL_DEBUG_SEVERITY_HIGH_KHR* = 0x9146.GLenum
+  GL_DRAW_BUFFER14_EXT* = 0x8833.GLenum
+  GL_READ_FRAMEBUFFER* = 0x8CA8.GLenum
+  GL_UNSIGNED_SHORT_8_8_APPLE* = 0x85BA.GLenum
+  GL_OR* = 0x1507.GLenum
+  GL_ONE_MINUS_DST_ALPHA* = 0x0305.GLenum
+  GL_RGB12* = 0x8053.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES* = 0x8CDB.GLenum
+  GL_OUTPUT_TEXTURE_COORD26_EXT* = 0x87B7.GLenum
+  GL_LOCAL_CONSTANT_VALUE_EXT* = 0x87EC.GLenum
+  GL_SURFACE_REGISTERED_NV* = 0x86FD.GLenum
+  GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV* = 0x8E5D.GLenum
+  GL_COMPRESSED_RG_RGTC2* = 0x8DBD.GLenum
+  GL_MAX_VERTEX_ATTRIB_STRIDE* = 0x82E5.GLenum
+  GL_COLOR_ARRAY_ADDRESS_NV* = 0x8F23.GLenum
+  GL_MATRIX_INDEX_ARRAY_POINTER_ARB* = 0x8849.GLenum
+  GL_DUAL_ALPHA8_SGIS* = 0x8111.GLenum
+  GL_TEXTURE_MAX_LOD* = 0x813B.GLenum
+  GL_INTERNALFORMAT_SHARED_SIZE* = 0x8277.GLenum
+  GL_LINEAR_DETAIL_SGIS* = 0x8097.GLenum
+  GL_RG16F_EXT* = 0x822F.GLenum
+  GL_LIST_MODE* = 0x0B30.GLenum
+  GL_VIEWPORT_INDEX_PROVOKING_VERTEX* = 0x825F.GLenum
+  GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW* = 0x900D.GLenum
+  GL_COLOR_TABLE_LUMINANCE_SIZE* = 0x80DE.GLenum
+  GL_COLOR_ARRAY_POINTER* = 0x8090.GLenum
+  GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT* = 0x84FF.GLenum
+  GL_LUMINANCE32F_EXT* = 0x8818.GLenum
+  GL_FRAMEBUFFER_COMPLETE_OES* = 0x8CD5.GLenum
+  GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB* = 0x8F9F.GLenum
+  GL_FEEDBACK* = 0x1C01.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_ARRAY* = 0x9069.GLenum
+  GL_VERTEX_STREAM1_ATI* = 0x876D.GLenum
+  GL_SLUMINANCE_ALPHA_NV* = 0x8C44.GLenum
+  GL_MAX_TEXTURE_UNITS_ARB* = 0x84E2.GLenum
+  GL_MODELVIEW11_ARB* = 0x872B.GLenum
+  GL_DRAW_FRAMEBUFFER_BINDING_ANGLE* = 0x8CA6.GLenum
+  GL_NEGATIVE_W_EXT* = 0x87DC.GLenum
+  GL_MODELVIEW25_ARB* = 0x8739.GLenum
+  GL_NORMAL_ARRAY_LIST_STRIDE_IBM* = 103081.GLenum
+  GL_CON_0_ATI* = 0x8941.GLenum
+  GL_VERTEX_SHADER_INSTRUCTIONS_EXT* = 0x87CF.GLenum
+  GL_TRANSPOSE_PROGRAM_MATRIX_EXT* = 0x8E2E.GLenum
+  GL_TEXTURE_DEPTH_TYPE* = 0x8C16.GLenum
+  GL_PROGRAM_TARGET_NV* = 0x8646.GLenum
+  GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT* = 0x87CC.GLenum
+  GL_NORMAL_ARRAY_STRIDE_EXT* = 0x807F.GLenum
+  GL_INT_SAMPLER_2D* = 0x8DCA.GLenum
+  GL_MAP2_VERTEX_ATTRIB10_4_NV* = 0x867A.GLenum
+  GL_STEREO* = 0x0C33.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT* = 0x9065.GLenum
+  GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV* = 0x8C75.GLenum
+  GL_TRACE_ERRORS_BIT_MESA* = 0x0020.GLbitfield
+  GL_MAX_GEOMETRY_UNIFORM_BLOCKS* = 0x8A2C.GLenum
+  GL_CONVOLUTION_2D* = 0x8011.GLenum
+  GL_RGB_SCALE_ARB* = 0x8573.GLenum
+  GL_VIDEO_COLOR_CONVERSION_MAX_NV* = 0x902A.GLenum
+  GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS* = 0x90DD.GLenum
+  GL_TABLE_TOO_LARGE_EXT* = 0x8031.GLenum
+  GL_TRANSFORM_FEEDBACK_BINDING_NV* = 0x8E25.GLenum
+  GL_TEXTURE16_ARB* = 0x84D0.GLenum
+  GL_FRAGMENT_SHADER_DERIVATIVE_HINT* = 0x8B8B.GLenum
+  GL_IUI_N3F_V2F_EXT* = 0x81AF.GLenum
+  GL_CLIP_PLANE2_IMG* = 0x3002.GLenum
+  GL_VERTEX_ATTRIB_ARRAY10_NV* = 0x865A.GLenum
+  GL_TEXTURE_FETCH_BARRIER_BIT* = 0x00000008.GLbitfield
+  GL_DOT3_RGBA_EXT* = 0x8741.GLenum
+  GL_RENDERBUFFER_GREEN_SIZE_EXT* = 0x8D51.GLenum
+  GL_MAX_CLIENT_ATTRIB_STACK_DEPTH* = 0x0D3B.GLenum
+  GL_UNPACK_COMPRESSED_BLOCK_SIZE* = 0x912A.GLenum
+  GL_SAMPLE_BUFFERS_SGIS* = 0x80A8.GLenum
+  GL_MAP1_VERTEX_ATTRIB1_4_NV* = 0x8661.GLenum
+  GL_BUFFER_OBJECT_EXT* = 0x9151.GLenum
+  GL_INT_SAMPLER_1D_ARRAY* = 0x8DCE.GLenum
+  GL_POST_TEXTURE_FILTER_SCALE_SGIX* = 0x817A.GLenum
+  GL_RED_MAX_CLAMP_INGR* = 0x8564.GLenum
+  GL_POST_COLOR_MATRIX_RED_SCALE_SGI* = 0x80B4.GLenum
+  GL_TEXTURE_COORD_ARRAY_TYPE* = 0x8089.GLenum
+  GL_COMPRESSED_SIGNED_RG11_EAC* = 0x9273.GLenum
+  GL_MULTISAMPLE_FILTER_HINT_NV* = 0x8534.GLenum
+  GL_COMPRESSED_RGBA8_ETC2_EAC* = 0x9278.GLenum
+  GL_FONT_UNDERLINE_THICKNESS_BIT_NV* = 0x08000000.GLbitfield
+  GL_READ_WRITE_ARB* = 0x88BA.GLenum
+  GL_RENDER_MODE* = 0x0C40.GLenum
+  GL_MAX_NUM_COMPATIBLE_SUBROUTINES* = 0x92F8.GLenum
+  GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI* = 0x87F8.GLenum
+  GL_MODELVIEW0_STACK_DEPTH_EXT* = 0x0BA3.GLenum
+  GL_CONTEXT_FLAG_DEBUG_BIT* = 0x00000002.GLbitfield
+  GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT* = 0x8C84.GLenum
+  GL_POINT_SIZE_MAX_EXT* = 0x8127.GLenum
+  GL_COLOR_ARRAY_LENGTH_NV* = 0x8F2D.GLenum
+  GL_COLOR_COMPONENTS* = 0x8283.GLenum
+  GL_LINEARDODGE_NV* = 0x92A4.GLenum
+  GL_TEXTURE20_ARB* = 0x84D4.GLenum
+  GL_UNSIGNED_INT64_VEC4_NV* = 0x8FF7.GLenum
+  GL_TEXTURE28* = 0x84DC.GLenum
+  GL_HISTOGRAM_FORMAT_EXT* = 0x8027.GLenum
+  GL_PROGRAM_MATRIX_EXT* = 0x8E2D.GLenum
+  GL_PIXEL_PACK_BUFFER_EXT* = 0x88EB.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT* = 0x8515.GLenum
+  GL_STANDARD_FONT_NAME_NV* = 0x9072.GLenum
+  GL_REG_13_ATI* = 0x892E.GLenum
+  GL_GREEN_SCALE* = 0x0D18.GLenum
+  GL_COLOR_BUFFER_BIT7_QCOM* = 0x00000080.GLbitfield
+  GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS* = 0x8264.GLenum
+  GL_LUMINANCE8_ALPHA8_SNORM* = 0x9016.GLenum
+  GL_GCCSO_SHADER_BINARY_FJ* = 0x9260.GLenum
+  GL_COORD_REPLACE_NV* = 0x8862.GLenum
+  GL_SOURCE2_RGB_EXT* = 0x8582.GLenum
+  GL_IR_INSTRUMENT1_SGIX* = 0x817F.GLenum
+  GL_CONTEXT_FLAG_DEBUG_BIT_KHR* = 0x00000002.GLbitfield
+  GL_SWIZZLE_STR_ATI* = 0x8976.GLenum
+  GL_OUTPUT_TEXTURE_COORD17_EXT* = 0x87AE.GLenum
+  GL_MODELVIEW2_ARB* = 0x8722.GLenum
+  GL_R1UI_C4F_N3F_V3F_SUN* = 0x85C8.GLenum
+  GL_MAX_TEXTURE_BUFFER_SIZE_ARB* = 0x8C2B.GLenum
+  GL_OUTPUT_TEXTURE_COORD0_EXT* = 0x879D.GLenum
+  GL_POINT_FADE_THRESHOLD_SIZE_EXT* = 0x8128.GLenum
+  GL_OUTPUT_TEXTURE_COORD30_EXT* = 0x87BB.GLenum
+  GL_EVAL_VERTEX_ATTRIB3_NV* = 0x86C9.GLenum
+  GL_SPHERE_MAP* = 0x2402.GLenum
+  GL_SHADER_IMAGE_ATOMIC* = 0x82A6.GLenum
+  GL_INDEX_BITS* = 0x0D51.GLenum
+  GL_INTERNALFORMAT_ALPHA_TYPE* = 0x827B.GLenum
+  GL_CON_15_ATI* = 0x8950.GLenum
+  GL_TESS_EVALUATION_TEXTURE* = 0x829D.GLenum
+  GL_EDGE_FLAG_ARRAY_STRIDE* = 0x808C.GLenum
+  GL_VERTEX_ATTRIB_ARRAY8_NV* = 0x8658.GLenum
+  GL_POST_COLOR_MATRIX_COLOR_TABLE* = 0x80D2.GLenum
+  GL_CLOSE_PATH_NV* = 0x00.GLenum
+  GL_SCALE_BY_TWO_NV* = 0x853E.GLenum
+  GL_PALETTE8_RGB8_OES* = 0x8B95.GLenum
+  GL_MAX_COMPUTE_ATOMIC_COUNTERS* = 0x8265.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_NORMALIZED* = 0x886A.GLenum
+  GL_MAX_VERTEX_ATTRIBS* = 0x8869.GLenum
+  GL_PROGRAM_POINT_SIZE_EXT* = 0x8642.GLenum
+  GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE* = 0x93A0.GLenum
+  GL_SIGNED_NORMALIZED* = 0x8F9C.GLenum
+  GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES* = 0x851C.GLenum
+  GL_OFFSET_TEXTURE_2D_SCALE_NV* = 0x86E2.GLenum
+  GL_COMPRESSED_SLUMINANCE* = 0x8C4A.GLenum
+  GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS* = 0x8E80.GLenum
+  GL_RASTER_POSITION_UNCLIPPED_IBM* = 0x19262.GLenum
+  GL_COMPRESSED_TEXTURE_FORMATS_ARB* = 0x86A3.GLenum
+  GL_TRANSPOSE_MODELVIEW_MATRIX* = 0x84E3.GLenum
+  GL_ALPHA_FLOAT16_APPLE* = 0x881C.GLenum
+  GL_PIXEL_MIN_FILTER_EXT* = 0x8332.GLenum
+  GL_MAX_SPARSE_TEXTURE_SIZE_AMD* = 0x9198.GLenum
+  GL_UNSIGNED_SHORT_5_6_5_REV_EXT* = 0x8364.GLenum
+  GL_DU8DV8_ATI* = 0x877A.GLenum
+  GL_COLOR_ARRAY_LIST_IBM* = 103072.GLenum
+  GL_RGBA8I_EXT* = 0x8D8E.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT4_QCOM* = 0x10000000.GLbitfield
+  GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB* = 0x824D.GLenum
+  GL_MODELVIEW20_ARB* = 0x8734.GLenum
+  GL_COLOR_TABLE_RED_SIZE* = 0x80DA.GLenum
+  GL_UNIFORM_BARRIER_BIT* = 0x00000004.GLbitfield
+  GL_TEXTURE* = 0x1702.GLenum
+  GL_CLIP_PLANE0* = 0x3000.GLenum
+  GL_FOG_COORDINATE_ARRAY_POINTER* = 0x8456.GLenum
+  GL_CONSTANT_ALPHA_EXT* = 0x8003.GLenum
+  GL_NAME_STACK_DEPTH* = 0x0D70.GLenum
+  GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE* = 0x83F2.GLenum
+  GL_LINEAR_DETAIL_ALPHA_SGIS* = 0x8098.GLenum
+  GL_EDGE_FLAG_ARRAY_POINTER_EXT* = 0x8093.GLenum
+  GL_UNSIGNED_SHORT* = 0x1403.GLenum
+  GL_MAP2_VERTEX_ATTRIB1_4_NV* = 0x8671.GLenum
+  GL_DEPTH_CLAMP_FAR_AMD* = 0x901F.GLenum
+  GL_OPERAND3_RGB_NV* = 0x8593.GLenum
+  GL_TEXTURE_SWIZZLE_R_EXT* = 0x8E42.GLenum
+  GL_PATCHES* = 0x000E.GLenum
+  GL_TEXTURE12* = 0x84CC.GLenum
+  GL_COLOR_ATTACHMENT12_EXT* = 0x8CEC.GLenum
+  GL_MAP2_VERTEX_ATTRIB15_4_NV* = 0x867F.GLenum
+  GL_DRAW_BUFFER15_ATI* = 0x8834.GLenum
+  GL_GEOMETRY_INPUT_TYPE* = 0x8917.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC_OES* = 0x9279.GLenum
+  GL_RGBA32UI_EXT* = 0x8D70.GLenum
+  GL_RGBA_FLOAT32_APPLE* = 0x8814.GLenum
+  GL_NORMAL_MAP_OES* = 0x8511.GLenum
+  GL_MAP2_GRID_DOMAIN* = 0x0DD2.GLenum
+  GL_RELATIVE_HORIZONTAL_LINE_TO_NV* = 0x07.GLenum
+  GL_TANGENT_ARRAY_STRIDE_EXT* = 0x843F.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT* = 0x8CDB.GLenum
+  GL_OBJECT_POINT_SGIS* = 0x81F5.GLenum
+  GL_IMAGE_2D_ARRAY* = 0x9053.GLenum
+  GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB* = 0x8DDF.GLenum
+  GL_SPRITE_MODE_SGIX* = 0x8149.GLenum
+  GL_WEIGHT_ARRAY_OES* = 0x86AD.GLenum
+  GL_MAX_VERTEX_STREAMS* = 0x8E71.GLenum
+  GL_R16F_EXT* = 0x822D.GLenum
+  GL_VERSION_ES_CL_1_0* = 1.GLenum
+  GL_PROXY_TEXTURE_COLOR_TABLE_SGI* = 0x80BD.GLenum
+  GL_MAX_PROGRAM_INSTRUCTIONS_ARB* = 0x88A1.GLenum
+  GL_PURGEABLE_APPLE* = 0x8A1D.GLenum
+  GL_TEXTURE_SWIZZLE_G_EXT* = 0x8E43.GLenum
+  GL_FIRST_VERTEX_CONVENTION_EXT* = 0x8E4D.GLenum
+  GL_DEBUG_SEVERITY_LOW* = 0x9148.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT* = 0x00000001.GLbitfield
+  GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB* = 0x8B8A.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR* = 0x93D4.GLenum
+  GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV* = 0x86F3.GLenum
+  GL_RENDERBUFFER_DEPTH_SIZE* = 0x8D54.GLenum
+  GL_OPERAND1_RGB_ARB* = 0x8591.GLenum
+  GL_REFLECTION_MAP_NV* = 0x8512.GLenum
+  GL_MATRIX17_ARB* = 0x88D1.GLenum
+  GL_EYE_PLANE_ABSOLUTE_NV* = 0x855C.GLenum
+  GL_SRC1_ALPHA* = 0x8589.GLenum
+  GL_UNSIGNED_BYTE_2_3_3_REV* = 0x8362.GLenum
+  GL_RGB5_EXT* = 0x8050.GLenum
+  GL_TEXTURE_2D_ARRAY* = 0x8C1A.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB* = 0x8515.GLenum
+  GL_TEXTURE26* = 0x84DA.GLenum
+  GL_MAX_3D_TEXTURE_SIZE_OES* = 0x8073.GLenum
+  GL_PIXEL_TILE_WIDTH_SGIX* = 0x8140.GLenum
+  GL_PIXEL_UNPACK_BUFFER_BINDING_EXT* = 0x88EF.GLenum
+  GL_TEXTURE_ALPHA_SIZE* = 0x805F.GLenum
+  GL_RELATIVE_QUADRATIC_CURVE_TO_NV* = 0x0B.GLenum
+  GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES* = 0x8B9F.GLenum
+  GL_GEOMETRY_DEFORMATION_BIT_SGIX* = 0x00000002.GLbitfield
+  GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS* = 0x8DA8.GLenum
+  GL_NAMED_STRING_LENGTH_ARB* = 0x8DE9.GLenum
+  GL_IMAGE_1D_ARRAY* = 0x9052.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES* = 0x8CD4.GLenum
+  GL_MATRIX28_ARB* = 0x88DC.GLenum
+  GL_FRAGMENT_LIGHT1_SGIX* = 0x840D.GLenum
+  GL_HARDMIX_NV* = 0x92A9.GLenum
+  GL_DEBUG_SOURCE_THIRD_PARTY_KHR* = 0x8249.GLenum
+  GL_PACK_SWAP_BYTES* = 0x0D00.GLenum
+  GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB* = 0x8B4A.GLenum
+  GL_SOURCE2_ALPHA_EXT* = 0x858A.GLenum
+  GL_DOUBLE_MAT2x4* = 0x8F4A.GLenum
+  GL_MEDIUM_FLOAT* = 0x8DF1.GLenum
+  GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX* = 0x813E.GLenum
+  GL_UNPACK_SKIP_ROWS* = 0x0CF3.GLenum
+  GL_PACK_COMPRESSED_BLOCK_SIZE* = 0x912E.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D* = 0x9063.GLenum
+  GL_COLOR_ARRAY_TYPE_EXT* = 0x8082.GLenum
+  GL_BUFFER_MAP_POINTER_ARB* = 0x88BD.GLenum
+  GL_CALLIGRAPHIC_FRAGMENT_SGIX* = 0x8183.GLenum
+  GL_ONE_MINUS_CONSTANT_COLOR_EXT* = 0x8002.GLenum
+  GL_COMPRESSED_RGBA_FXT1_3DFX* = 0x86B1.GLenum
+  GL_CLIP_PLANE1* = 0x3001.GLenum
+  GL_COVERAGE_BUFFERS_NV* = 0x8ED3.GLenum
+  GL_ADD_BLEND_IMG* = 0x8C09.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR* = 0x93D5.GLenum
+  GL_PIXEL_TILE_HEIGHT_SGIX* = 0x8141.GLenum
+  GL_SAMPLE_COVERAGE_INVERT_ARB* = 0x80AB.GLenum
+  GL_MAP1_VERTEX_ATTRIB9_4_NV* = 0x8669.GLenum
+  GL_COLOR_TABLE_BIAS_SGI* = 0x80D7.GLenum
+  GL_EDGE_FLAG_ARRAY_COUNT_EXT* = 0x808D.GLenum
+  GL_SAMPLE_BUFFERS_EXT* = 0x80A8.GLenum
+  GL_COLOR_INDEX* = 0x1900.GLenum
+  GL_REPLACEMENT_CODE_SUN* = 0x81D8.GLenum
+  GL_INT_SAMPLER_CUBE_EXT* = 0x8DCC.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE* = 0x8D56.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV* = 0x8F1E.GLenum
+  GL_DUAL_LUMINANCE_ALPHA8_SGIS* = 0x811D.GLenum
+  GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX* = 0x8189.GLenum
+  GL_CLIP_DISTANCE7* = 0x3007.GLenum
+  GL_DOT3_RGB_ARB* = 0x86AE.GLenum
+  GL_TEXTURE_WRAP_T* = 0x2803.GLenum
+  GL_LUMINANCE12_EXT* = 0x8041.GLenum
+  GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX* = 0x8174.GLenum
+  GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB* = 0x86A0.GLenum
+  GL_EVAL_2D_NV* = 0x86C0.GLenum
+  GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS* = 0x9314.GLenum
+  GL_CURRENT_WEIGHT_ARB* = 0x86A8.GLenum
+  GL_DEBUG_SOURCE_API_ARB* = 0x8246.GLenum
+  GL_FOG_SPECULAR_TEXTURE_WIN* = 0x80EC.GLenum
+  GL_BOOL_VEC4* = 0x8B59.GLenum
+  GL_FRAGMENTS_INSTRUMENT_SGIX* = 0x8313.GLenum
+  GL_GEOMETRY_OUTPUT_TYPE_EXT* = 0x8DDC.GLenum
+  GL_TEXTURE_2D* = 0x0DE1.GLenum
+  GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI* = 0x00200000.GLbitfield
+  GL_TEXTURE_BINDING_RECTANGLE_ARB* = 0x84F6.GLenum
+  GL_SAMPLE_BUFFERS_3DFX* = 0x86B3.GLenum
+  GL_INDEX_OFFSET* = 0x0D13.GLenum
+  GL_MAX_COLOR_ATTACHMENTS* = 0x8CDF.GLenum
+  GL_PLUS_CLAMPED_NV* = 0x92B1.GLenum
+  GL_SIGNED_NEGATE_NV* = 0x853D.GLenum
+  GL_PROXY_TEXTURE_2D_STACK_MESAX* = 0x875C.GLenum
+  GL_MAX_VERTEX_UNIFORM_COMPONENTS* = 0x8B4A.GLenum
+  GL_SAMPLE_MASK_VALUE_SGIS* = 0x80AA.GLenum
+  GL_QUADRATIC_ATTENUATION* = 0x1209.GLenum
+  GL_LUMINANCE32F_ARB* = 0x8818.GLenum
+  GL_COVERAGE_COMPONENT4_NV* = 0x8ED1.GLenum
+  GL_MINMAX_FORMAT* = 0x802F.GLenum
+  GL_SRGB_DECODE_ARB* = 0x8299.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT* = 0x8CDA.GLenum
+  GL_UNSIGNED_INT_SAMPLER_CUBE_EXT* = 0x8DD4.GLenum
+  GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2* = 0x9277.GLenum
+  GL_DISJOINT_NV* = 0x9283.GLenum
+  GL_TEXTURE_ENV_BIAS_SGIX* = 0x80BE.GLenum
+  GL_PROXY_TEXTURE_3D_EXT* = 0x8070.GLenum
+  GL_SGX_BINARY_IMG* = 0x8C0A.GLenum
+  GL_COPY_READ_BUFFER* = 0x8F36.GLenum
+  GL_POINT_FADE_THRESHOLD_SIZE_SGIS* = 0x8128.GLenum
+  GL_UNIFORM_MATRIX_STRIDE* = 0x8A3D.GLenum
+  GL_UNIFORM_BLOCK_NAME_LENGTH* = 0x8A41.GLenum
+  GL_HISTOGRAM_LUMINANCE_SIZE* = 0x802C.GLenum
+  GL_UNSIGNED_SHORT_4_4_4_4* = 0x8033.GLenum
+  GL_MAX_DEPTH* = 0x8280.GLenum
+  GL_IMAGE_1D* = 0x904C.GLenum
+  GL_LUMINANCE8_ALPHA8_EXT* = 0x8045.GLenum
+  GL_MAX_TEXTURE_IMAGE_UNITS* = 0x8872.GLenum
+  GL_MODELVIEW16_ARB* = 0x8730.GLenum
+  GL_CURRENT_PALETTE_MATRIX_OES* = 0x8843.GLenum
+  GL_SIGNED_HILO_NV* = 0x86F9.GLenum
+  GL_FRAMEBUFFER_DEFAULT_HEIGHT* = 0x9311.GLenum
+  GL_UNPACK_SKIP_IMAGES* = 0x806D.GLenum
+  GL_2_BYTES* = 0x1407.GLenum
+  GL_ALLOW_DRAW_FRG_HINT_PGI* = 0x1A210.GLenum
+  GL_INTENSITY16I_EXT* = 0x8D8B.GLenum
+  GL_MAX_SAMPLES_NV* = 0x8D57.GLenum
+  GL_VERTEX_ARRAY_STORAGE_HINT_APPLE* = 0x851F.GLenum
+  GL_LINE_STRIP_ADJACENCY_ARB* = 0x000B.GLenum
+  GL_COORD_REPLACE* = 0x8862.GLenum
+  GL_INDEX_MATERIAL_FACE_EXT* = 0x81BA.GLenum
+  GL_MODELVIEW15_ARB* = 0x872F.GLenum
+  GL_TEXTURE19* = 0x84D3.GLenum
+  GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT* = 0x9068.GLenum
+  GL_SIGNED_INTENSITY8_NV* = 0x8708.GLenum
+  GL_TEXTURE_MAG_SIZE_NV* = 0x871F.GLenum
+  GL_DISPATCH_INDIRECT_BUFFER* = 0x90EE.GLenum
+  GL_MAP1_INDEX* = 0x0D91.GLenum
+  GL_TEXTURE_BUFFER_DATA_STORE_BINDING* = 0x8C2D.GLenum
+  GL_MAX_HEIGHT* = 0x827F.GLenum
+  GL_BLEND_DST_ALPHA* = 0x80CA.GLenum
+  GL_R1UI_C3F_V3F_SUN* = 0x85C6.GLenum
+  GL_TEXTURE_PRIORITY_EXT* = 0x8066.GLenum
+  GL_INT_IMAGE_2D* = 0x9058.GLenum
+  GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV* = 0x8E11.GLenum
+  GL_DRAW_BUFFER4_ATI* = 0x8829.GLenum
+  GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB* = 0x8DDD.GLenum
+  GL_DEPTH_EXT* = 0x1801.GLenum
+  GL_SAMPLE_POSITION* = 0x8E50.GLenum
+  GL_INTERNALFORMAT_DEPTH_TYPE* = 0x827C.GLenum
+  GL_MATRIX23_ARB* = 0x88D7.GLenum
+  GL_DEBUG_TYPE_PUSH_GROUP* = 0x8269.GLenum
+  GL_POLYGON_OFFSET_FILL* = 0x8037.GLenum
+  GL_FRAGMENT_PROGRAM_BINDING_NV* = 0x8873.GLenum
+  GL_FRAMEBUFFER_SRGB_CAPABLE_EXT* = 0x8DBA.GLenum
+  GL_VERTEX_ATTRIB_BINDING* = 0x82D4.GLenum
+  GL_UNSIGNED_INT8_VEC2_NV* = 0x8FED.GLenum
+  GL_POLYGON_OFFSET_FACTOR* = 0x8038.GLenum
+  GL_BOLD_BIT_NV* = 0x01.GLbitfield
+  GL_CLAMP_TO_BORDER_ARB* = 0x812D.GLint
+  GL_INDEX_MODE* = 0x0C30.GLenum
+  GL_SAMPLER_CUBE_SHADOW_NV* = 0x8DC5.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT* = 0x8C4F.GLenum
+  GL_MATRIX21_ARB* = 0x88D5.GLenum
+  GL_UNPACK_ROW_LENGTH_EXT* = 0x0CF2.GLenum
+  GL_FRAGMENT_NORMAL_EXT* = 0x834A.GLenum
+  GL_DOT3_ATI* = 0x8966.GLenum
+  GL_IMPLEMENTATION_COLOR_READ_TYPE_OES* = 0x8B9A.GLenum
+  GL_IMAGE_BINDING_ACCESS_EXT* = 0x8F3E.GLenum
+  GL_SYNC_CL_EVENT_ARB* = 0x8240.GLenum
+  GL_UNSIGNED_INT_24_8* = 0x84FA.GLenum
+  GL_2PASS_1_EXT* = 0x80A3.GLenum
+  GL_POST_TEXTURE_FILTER_BIAS_SGIX* = 0x8179.GLenum
+  GL_TEXTURE_COMPRESSED_IMAGE_SIZE* = 0x86A0.GLenum
+  GL_LUMINANCE_ALPHA32UI_EXT* = 0x8D75.GLenum
+  GL_FORCE_BLUE_TO_ONE_NV* = 0x8860.GLenum
+  GL_FRAMEBUFFER_DEFAULT* = 0x8218.GLenum
+  GL_VIRTUAL_PAGE_SIZE_Z_ARB* = 0x9197.GLenum
+  GL_TEXTURE_LIGHT_EXT* = 0x8350.GLenum
+  GL_MULTISAMPLE_BUFFER_BIT5_QCOM* = 0x20000000.GLbitfield
+  GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY* = 0x910D.GLenum
+  GL_SYNC_CONDITION* = 0x9113.GLenum
+  GL_PERFMON_RESULT_SIZE_AMD* = 0x8BC5.GLenum
+  GL_PROGRAM_OBJECT_ARB* = 0x8B40.GLenum
+  GL_MAX_SHININESS_NV* = 0x8504.GLenum
+  GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB* = 0x880A.GLenum
+  GL_RENDERBUFFER_COLOR_SAMPLES_NV* = 0x8E10.GLenum
+  GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS* = 0x8A31.GLenum
+  GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH* = 0x8E49.GLenum
+  GL_MODELVIEW29_ARB* = 0x873D.GLenum
+  GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB* = 0x900B.GLenum
+  GL_SIGNED_HILO16_NV* = 0x86FA.GLenum
+  GL_TRANSFORM_HINT_APPLE* = 0x85B1.GLenum
+  GL_STENCIL_INDEX4* = 0x8D47.GLenum
+  GL_EXTENSIONS* = 0x1F03.GLenum
+  GL_RG16F* = 0x822F.GLenum
+  GL_MAP_UNSYNCHRONIZED_BIT_EXT* = 0x0020.GLbitfield
+  GL_LUMINANCE16F_ARB* = 0x881E.GLenum
+  GL_UNSIGNED_INT_IMAGE_BUFFER* = 0x9067.GLenum
+  GL_COMPRESSED_RGBA_ASTC_8x8_KHR* = 0x93B7.GLenum
+  GL_AVERAGE_HP* = 0x8160.GLenum
+  GL_INDEX_MATERIAL_EXT* = 0x81B8.GLenum
+  GL_COLOR_TABLE* = 0x80D0.GLenum
+  GL_FOG_COORDINATE_ARRAY_LIST_IBM* = 103076.GLenum
+  GL_DEBUG_CATEGORY_OTHER_AMD* = 0x9150.GLenum
+  GL_R1UI_C4UB_V3F_SUN* = 0x85C5.GLenum
+  GL_SYSTEM_FONT_NAME_NV* = 0x9073.GLenum
+  GL_STATIC_VERTEX_ARRAY_IBM* = 103061.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV* = 0x88FE.GLenum
+  GL_SCALE_BY_ONE_HALF_NV* = 0x8540.GLenum
+  GL_INTENSITY_FLOAT32_ATI* = 0x8817.GLenum
+  GL_FRAGMENT_LIGHT6_SGIX* = 0x8412.GLenum
+  GL_DECR_WRAP_OES* = 0x8508.GLenum
+  GL_MODELVIEW23_ARB* = 0x8737.GLenum
+  GL_PROXY_TEXTURE_1D_ARRAY* = 0x8C19.GLenum
+  GL_REFERENCED_BY_VERTEX_SHADER* = 0x9306.GLenum
+  GL_MAX_NAME_LENGTH* = 0x92F6.GLenum
+  GL_AFFINE_2D_NV* = 0x9092.GLenum
+  GL_SYNC_OBJECT_APPLE* = 0x8A53.GLenum
+  GL_PLUS_DARKER_NV* = 0x9292.GLenum
+  GL_TESS_CONTROL_PROGRAM_NV* = 0x891E.GLenum
+  GL_RGB_SCALE* = 0x8573.GLenum
+  GL_RGBA16UI_EXT* = 0x8D76.GLenum
+  GL_COMPATIBLE_SUBROUTINES* = 0x8E4B.GLenum
+  GL_COLOR_TABLE_WIDTH* = 0x80D9.GLenum
+  GL_MAX_COMBINED_UNIFORM_BLOCKS* = 0x8A2E.GLenum
+  GL_BACK_SECONDARY_COLOR_NV* = 0x8C78.GLenum
+  GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB* = 0x9344.GLenum
+  GL_SECONDARY_COLOR_NV* = 0x852D.GLenum
+  GL_RGB16UI_EXT* = 0x8D77.GLenum
+  GL_SHADER_STORAGE_BUFFER_SIZE* = 0x90D5.GLenum
+  GL_VERTEX_SUBROUTINE* = 0x92E8.GLenum
+  GL_MAP_COLOR* = 0x0D10.GLenum
+  GL_OBJECT_TYPE_ARB* = 0x8B4E.GLenum
+  GL_LAST_VIDEO_CAPTURE_STATUS_NV* = 0x9027.GLenum
+  GL_RGB12_EXT* = 0x8053.GLenum
+  GL_UNSIGNED_INT_IMAGE_3D_EXT* = 0x9064.GLenum
+  GL_LUMINANCE8_ALPHA8* = 0x8045.GLenum
+  GL_FLOAT_RGBA_MODE_NV* = 0x888E.GLenum
+  GL_CURRENT_RASTER_COLOR* = 0x0B04.GLenum
+  GL_CURRENT_RASTER_POSITION* = 0x0B07.GLenum
+  GL_UNIFORM_BLOCK_DATA_SIZE* = 0x8A40.GLenum
+  GL_MALI_PROGRAM_BINARY_ARM* = 0x8F61.GLenum
+  GL_QUERY_COUNTER_BITS_ARB* = 0x8864.GLenum
+  GL_VARIANT_ARRAY_EXT* = 0x87E8.GLenum
+  GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV* = 0x903A.GLenum
+  GL_DEPTH_COMPONENT24_ARB* = 0x81A6.GLenum
+  GL_UNSIGNED_INVERT_NV* = 0x8537.GLenum
+  GL_TEXTURE_IMMUTABLE_LEVELS* = 0x82DF.GLenum
+  GL_DRAW_BUFFER12_ATI* = 0x8831.GLenum
+  GL_MAP_FLUSH_EXPLICIT_BIT_EXT* = 0x0010.GLbitfield
+  GL_INDEX_WRITEMASK* = 0x0C21.GLenum
+  GL_POLYGON_SMOOTH* = 0x0B41.GLenum
+  GL_COMPRESSED_SIGNED_R11_EAC_OES* = 0x9271.GLenum
+  GL_TEXTURE_SWIZZLE_A_EXT* = 0x8E45.GLenum
+  GL_TEXTURE_COORD_ARRAY_STRIDE* = 0x808A.GLenum
+  GL_PIXEL_MAP_I_TO_R* = 0x0C72.GLenum
+  GL_CONVOLUTION_HEIGHT* = 0x8019.GLenum
+  GL_SIGNALED* = 0x9119.GLenum
+  GL_UNSIGNED_INT_24_8_OES* = 0x84FA.GLenum
+  GL_DRAW_BUFFER6_ARB* = 0x882B.GLenum
+  GL_BUFFER_SIZE_ARB* = 0x8764.GLenum
+  GL_CLEAR_BUFFER* = 0x82B4.GLenum
+  GL_LUMINANCE16UI_EXT* = 0x8D7A.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_ANGLE* = 0x93A3.GLenum
+  GL_STENCIL_ATTACHMENT* = 0x8D20.GLenum
+  GL_ALL_COMPLETED_NV* = 0x84F2.GLenum
+  GL_MIN* = 0x8007.GLenum
+  GL_COLOR_ATTACHMENT11* = 0x8CEB.GLenum
+  GL_PATH_STENCIL_FUNC_NV* = 0x90B7.GLenum
+  GL_MAX_LABEL_LENGTH* = 0x82E8.GLenum
+  GL_WEIGHT_ARRAY_TYPE_OES* = 0x86A9.GLenum
+  GL_ACCUM_BUFFER_BIT* = 0x00000200.GLbitfield
+  GL_WEIGHT_ARRAY_POINTER_ARB* = 0x86AC.GLenum
+  GL_WEIGHT_SUM_UNITY_ARB* = 0x86A6.GLenum
+  GL_COMPRESSED_SRGB_EXT* = 0x8C48.GLenum
+  GL_ATTRIB_ARRAY_TYPE_NV* = 0x8625.GLenum
+  GL_RED_INTEGER_EXT* = 0x8D94.GLenum
+  GL_ALWAYS_SOFT_HINT_PGI* = 0x1A20D.GLenum
+  GL_COMPRESSED_SRGB8_ETC2_OES* = 0x9275.GLenum
+  GL_LOW_FLOAT* = 0x8DF0.GLenum
+  GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS* = 0x8354.GLenum
+  GL_TEXTURE_LEQUAL_R_SGIX* = 0x819C.GLenum
+  GL_CONTEXT_COMPATIBILITY_PROFILE_BIT* = 0x00000002.GLbitfield
+  GL_INCR* = 0x1E02.GLenum
+  GL_3D* = 0x0601.GLenum
+  GL_SHADER_KHR* = 0x82E1.GLenum
+  GL_SRC_COLOR* = 0x0300.GLenum
+  GL_DRAW_BUFFER7_NV* = 0x882C.GLenum
+  GL_VERTEX_ARRAY_SIZE* = 0x807A.GLenum
+  GL_SAMPLER_2D_RECT* = 0x8B63.GLenum
+  GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG* = 0x8365.GLenum
+  GL_READ_PIXEL_DATA_RANGE_NV* = 0x8879.GLenum
+  GL_EDGE_FLAG* = 0x0B43.GLenum
+  GL_TEXTURE_3D_EXT* = 0x806F.GLenum
+  GL_DOT_PRODUCT_TEXTURE_1D_NV* = 0x885C.GLenum
+  GL_COLOR_SUM_CLAMP_NV* = 0x854F.GLenum
+  GL_RGB10_A2* = 0x8059.GLenum
+  GL_BOOL_VEC3* = 0x8B58.GLenum
+  GL_REG_3_ATI* = 0x8924.GLenum
+  GL_LINEAR_SHARPEN_ALPHA_SGIS* = 0x80AE.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT* = 0x8DA8.GLenum
+  GL_MAP1_VERTEX_ATTRIB5_4_NV* = 0x8665.GLenum
+  GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS* = 0x8F39.GLenum
+  GL_PIXEL_MAP_I_TO_B_SIZE* = 0x0CB4.GLenum
+  GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT* = 0x00000800.GLbitfield
+  GL_COLOR_BUFFER_BIT6_QCOM* = 0x00000040.GLbitfield
+  GL_PROGRAM_TEMPORARIES_ARB* = 0x88A4.GLenum
+  GL_ELEMENT_ARRAY_BUFFER* = 0x8893.GLenum
+  GL_ALWAYS_FAST_HINT_PGI* = 0x1A20C.GLenum
+  GL_INTENSITY_FLOAT16_ATI* = 0x881D.GLenum
+  GL_ACTIVE_ATTRIBUTE_MAX_LENGTH* = 0x8B8A.GLenum
+  GL_CON_12_ATI* = 0x894D.GLenum
+  GL_LINEAR_MIPMAP_NEAREST* = 0x2701.GLint
+  GL_TEXTURE_COVERAGE_SAMPLES_NV* = 0x9045.GLenum
+  GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB* = 0x88AB.GLenum
+  GL_DEPTH_SCALE* = 0x0D1E.GLenum
+  GL_SOURCE3_ALPHA_NV* = 0x858B.GLenum
+  GL_ACTIVE_VERTEX_UNITS_ARB* = 0x86A5.GLenum
+  GL_SWIZZLE_STR_DR_ATI* = 0x8978.GLenum
+  GL_RGB16I_EXT* = 0x8D89.GLenum
+  GL_INT_IMAGE_2D_RECT_EXT* = 0x905A.GLenum
+  GL_GREEN_BIAS* = 0x0D19.GLenum
+  GL_FRAMEBUFFER_RENDERABLE_LAYERED* = 0x828A.GLenum
+  GL_COMPRESSED_RGB8_ETC2* = 0x9274.GLenum
+  GL_COMPRESSED_RGBA_ARB* = 0x84EE.GLenum
+  GL_MAX_VERTEX_ATOMIC_COUNTERS* = 0x92D2.GLenum
+  GL_RGBA32I_EXT* = 0x8D82.GLenum
+  GL_WAIT_FAILED* = 0x911D.GLenum
+  GL_FOG_COORDINATE_SOURCE_EXT* = 0x8450.GLenum
+  GL_SAMPLE_MASK_VALUE_NV* = 0x8E52.GLenum
+  GL_OP_MUL_EXT* = 0x8786.GLenum
+  GL_FRAGMENT_TEXTURE* = 0x829F.GLenum
+  GL_GEOMETRY_PROGRAM_NV* = 0x8C26.GLenum
+  GL_MATRIX20_ARB* = 0x88D4.GLenum
+  GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT* = 0x845C.GLenum
+  GL_UNSIGNED_INT_2_10_10_10_REV_EXT* = 0x8368.GLenum
+  GL_PHONG_HINT_WIN* = 0x80EB.GLenum
+  GL_EYE_DISTANCE_TO_LINE_SGIS* = 0x81F2.GLenum
+  GL_SAMPLES_PASSED* = 0x8914.GLenum
+  GL_MAX_COLOR_ATTACHMENTS_NV* = 0x8CDF.GLenum
+  GL_WEIGHT_ARRAY_POINTER_OES* = 0x86AC.GLenum
+  GL_MAX_DEBUG_GROUP_STACK_DEPTH* = 0x826C.GLenum
+  GL_TEXTURE_2D_STACK_BINDING_MESAX* = 0x875E.GLenum
+  GL_VARIANT_VALUE_EXT* = 0x87E4.GLenum
+  GL_TEXTURE_GEN_R* = 0x0C62.GLenum
+  GL_COMPRESSED_RG11_EAC* = 0x9272.GLenum
+  GL_IMAGE_ROTATE_ORIGIN_Y_HP* = 0x815B.GLenum
+  GL_BLEND_ADVANCED_COHERENT_NV* = 0x9285.GLenum
+  GL_DEBUG_CALLBACK_FUNCTION* = 0x8244.GLenum
+  GL_PROXY_TEXTURE_4D_SGIS* = 0x8135.GLenum
+  GL_OCCLUSION_TEST_RESULT_HP* = 0x8166.GLenum
+  GL_COLOR_ATTACHMENT13_EXT* = 0x8CED.GLenum
+  GL_LINE_STRIP_ADJACENCY* = 0x000B.GLenum
+  GL_DEBUG_CATEGORY_APPLICATION_AMD* = 0x914F.GLenum
+  GL_CIRCULAR_TANGENT_ARC_TO_NV* = 0xFC.GLenum
+  GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB* = 0x88B3.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_STRIDE* = 0x8624.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_EXT* = 0x8C49.GLenum
+  GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY* = 0x900F.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY* = 0x906C.GLenum
+  GL_LIGHT_MODEL_COLOR_CONTROL* = 0x81F8.GLenum
+  GL_INT_VEC2_ARB* = 0x8B53.GLenum
+  GL_PARALLEL_ARRAYS_INTEL* = 0x83F4.GLenum
+  GL_COLOR_ATTACHMENT11_EXT* = 0x8CEB.GLenum
+  GL_SAMPLE_ALPHA_TO_ONE_SGIS* = 0x809F.GLenum
+  GL_FUNC_ADD_OES* = 0x8006.GLenum
+  GL_COMBINER_MAPPING_NV* = 0x8543.GLenum
+  GL_INT_IMAGE_BUFFER* = 0x905C.GLenum
+  GL_TEXTURE_SWIZZLE_A* = 0x8E45.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB* = 0x8DA7.GLenum
+  GL_EXPAND_NEGATE_NV* = 0x8539.GLenum
+  GL_COVERAGE_EDGE_FRAGMENTS_NV* = 0x8ED6.GLenum
+  GL_PATH_OBJECT_BOUNDING_BOX_NV* = 0x908A.GLenum
+  GL_MAX_RECTANGLE_TEXTURE_SIZE* = 0x84F8.GLenum
+  GL_FONT_ASCENDER_BIT_NV* = 0x00200000.GLbitfield
+  GL_INDEX_SHIFT* = 0x0D12.GLenum
+  GL_LUMINANCE6_ALPHA2* = 0x8044.GLenum
+  GL_FLOAT_CLEAR_COLOR_VALUE_NV* = 0x888D.GLenum
+  GL_V2F* = 0x2A20.GLenum
+  GL_DRAW_BUFFER12_NV* = 0x8831.GLenum
+  GL_RIGHT* = 0x0407.GLenum
+  GL_CON_28_ATI* = 0x895D.GLenum
+  GL_SAMPLER_CUBE_ARB* = 0x8B60.GLenum
+  GL_OUTPUT_TEXTURE_COORD27_EXT* = 0x87B8.GLenum
+  GL_MAX_DEPTH_TEXTURE_SAMPLES* = 0x910F.GLenum
+  GL_MODULATE* = 0x2100.GLenum
+  GL_NUM_FILL_STREAMS_NV* = 0x8E29.GLenum
+  GL_DT_SCALE_NV* = 0x8711.GLenum
+  GL_ONE_MINUS_SRC_COLOR* = 0x0301.GLenum
+  GL_OPERAND2_ALPHA* = 0x859A.GLenum
+  GL_MATRIX15_ARB* = 0x88CF.GLenum
+  GL_MULTISAMPLE* = 0x809D.GLenum
+  GL_DEPTH32F_STENCIL8* = 0x8CAD.GLenum
+  GL_COMPRESSED_RGBA_ASTC_4x4_KHR* = 0x93B0.GLenum
+  GL_DUAL_ALPHA16_SGIS* = 0x8113.GLenum
+  GL_COMPRESSED_RGB_FXT1_3DFX* = 0x86B0.GLenum
+  GL_PROXY_TEXTURE_2D_ARRAY* = 0x8C1B.GLenum
+  GL_UNIFORM_NAME_LENGTH* = 0x8A39.GLenum
+  GL_COMPILE_AND_EXECUTE* = 0x1301.GLenum
+  GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG* = 0x9138.GLenum
+  GL_PIXEL_CUBIC_WEIGHT_EXT* = 0x8333.GLenum
+  GL_GREEN_MIN_CLAMP_INGR* = 0x8561.GLenum
+  GL_MAX_TEXTURE_LOD_BIAS* = 0x84FD.GLenum
+  GL_NORMAL_MAP_NV* = 0x8511.GLenum
+  GL_PIXEL_UNPACK_BUFFER_BINDING_ARB* = 0x88EF.GLenum
+  GL_LUMINANCE_ALPHA32F_ARB* = 0x8819.GLenum
+  GL_LUMINANCE_FLOAT16_APPLE* = 0x881E.GLenum
+  GL_FACTOR_MIN_AMD* = 0x901C.GLenum
+  GL_BUFFER_GPU_ADDRESS_NV* = 0x8F1D.GLenum
+  GL_DEBUG_TYPE_PERFORMANCE_ARB* = 0x8250.GLenum
+  GL_TEXTURE_RESIDENT* = 0x8067.GLenum
+  GL_TESS_CONTROL_SHADER_BIT* = 0x00000008.GLbitfield
+  GL_VERTEX_SHADER* = 0x8B31.GLenum
+  GL_COLOR_ATTACHMENT15_EXT* = 0x8CEF.GLenum
+  GL_DRAW_BUFFER2_NV* = 0x8827.GLenum
+  GL_UNSIGNED_INT* = 0x1405.GLenum
+  GL_TEXTURE_SHARED_SIZE_EXT* = 0x8C3F.GLenum
+  GL_LIGHT5* = 0x4005.GLenum
+  GL_VERTEX_ARRAY_SIZE_EXT* = 0x807A.GLenum
+  GL_YCRCB_SGIX* = 0x8318.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER* = 0x92C9.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES* = 0x8CD1.GLenum
+  GL_QUADRATIC_CURVE_TO_NV* = 0x0A.GLenum
+  GL_POINTS* = 0x0000.GLenum
+  GL_OPERAND1_RGB* = 0x8591.GLenum
+  GL_POINT_DISTANCE_ATTENUATION_ARB* = 0x8129.GLenum
+  GL_QUERY_BUFFER_BARRIER_BIT* = 0x00008000.GLbitfield
+  GL_QUAD_LUMINANCE4_SGIS* = 0x8120.GLenum
+  GL_GENERATE_MIPMAP_SGIS* = 0x8191.GLenum
+  GL_FRAMEBUFFER_UNSUPPORTED_EXT* = 0x8CDD.GLenum
+  GL_PALETTE4_RGB5_A1_OES* = 0x8B94.GLenum
+  GL_TEXTURE_CROP_RECT_OES* = 0x8B9D.GLenum
+  GL_COMPUTE_SHADER_BIT* = 0x00000020.GLbitfield
+  GL_OUTPUT_TEXTURE_COORD2_EXT* = 0x879F.GLenum
+  GL_PALETTE4_RGBA4_OES* = 0x8B93.GLenum
+  GL_TEXTURE_CLIPMAP_CENTER_SGIX* = 0x8171.GLenum
+  GL_BLUE_BITS* = 0x0D54.GLenum
+  GL_RELATIVE_LARGE_CCW_ARC_TO_NV* = 0x17.GLenum
+  GL_UNSIGNED_SHORT_5_6_5_EXT* = 0x8363.GLenum
+  GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS* = 0x8DE1.GLenum
+  GL_UNCORRELATED_NV* = 0x9282.GLenum
+  GL_TESS_EVALUATION_SUBROUTINE* = 0x92EA.GLenum
+  GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB* = 0x8E5E.GLenum
+  GL_CON_11_ATI* = 0x894C.GLenum
+  GL_ACTIVE_TEXTURE* = 0x84E0.GLenum
+  GL_ASYNC_TEX_IMAGE_SGIX* = 0x835C.GLenum
+  GL_COLOR_CLEAR_VALUE* = 0x0C22.GLenum
+  GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY* = 0x910C.GLenum
+  GL_TESS_CONTROL_TEXTURE* = 0x829C.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES* = 0x851A.GLenum
+  GL_HISTOGRAM_BLUE_SIZE_EXT* = 0x802A.GLenum
+  GL_PATCH_DEFAULT_OUTER_LEVEL* = 0x8E74.GLenum
+  GL_PROGRAM_MATRIX_STACK_DEPTH_EXT* = 0x8E2F.GLenum
+  GL_RENDERBUFFER_BINDING_ANGLE* = 0x8CA7.GLenum
+  GL_CONSTANT_ATTENUATION* = 0x1207.GLenum
+  GL_SHADER_CONSISTENT_NV* = 0x86DD.GLenum
+  GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS* = 0x92D4.GLenum
+  GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD* = 0x9160.GLenum
+  GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS* = 0x809C.GLenum
+  GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT* = 0x9061.GLenum
+  GL_COUNT_DOWN_NV* = 0x9089.GLenum
+  GL_MATRIX12_ARB* = 0x88CC.GLenum
+  GL_MAX_VERTEX_SHADER_INVARIANTS_EXT* = 0x87C7.GLenum
+  GL_REPLICATE_BORDER_HP* = 0x8153.GLenum
+  GL_MODELVIEW9_ARB* = 0x8729.GLenum
+  GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT* = 0x8D6A.GLenum
+  GL_PROGRAM_PARAMETERS_ARB* = 0x88A8.GLenum
+  GL_LIST_BIT* = 0x00020000.GLbitfield
+  GL_MAX_GEOMETRY_ATOMIC_COUNTERS* = 0x92D5.GLenum
+  GL_CONSTANT_COLOR1_NV* = 0x852B.GLenum
+  GL_AVERAGE_EXT* = 0x8335.GLenum
+  GL_SINGLE_COLOR_EXT* = 0x81F9.GLenum
+  GL_VERTEX_ARRAY* = 0x8074.GLenum
+  GL_COLOR_INDEX1_EXT* = 0x80E2.GLenum
+  GL_COMPUTE_PROGRAM_NV* = 0x90FB.GLenum
+  GL_LINES_ADJACENCY* = 0x000A.GLenum
+  GL_OP_ROUND_EXT* = 0x8790.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE* = 0x934C.GLenum
+  GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV* = 0x90D1.GLenum
+  GL_REG_11_ATI* = 0x892C.GLenum
+  GL_SAMPLES_EXT* = 0x80A9.GLenum
+  GL_FUNC_REVERSE_SUBTRACT* = 0x800B.GLenum
+  GL_POINT_SPRITE_COORD_ORIGIN* = 0x8CA0.GLenum
+  GL_REG_27_ATI* = 0x893C.GLenum
+  GL_TEXTURE_VIEW_MIN_LEVEL* = 0x82DB.GLenum
+  GL_NICEST* = 0x1102.GLenum
+  GL_CLIP_PLANE4_IMG* = 0x3004.GLenum
+  GL_ARRAY_BUFFER_BINDING* = 0x8894.GLenum
+  GL_422_AVERAGE_EXT* = 0x80CE.GLenum
+  GL_RENDERER* = 0x1F01.GLenum
+  GL_OVERLAY_NV* = 0x9296.GLenum
+  GL_TEXTURE_SAMPLES_IMG* = 0x9136.GLenum
+  GL_DEBUG_SOURCE_SHADER_COMPILER_KHR* = 0x8248.GLenum
+  GL_EYE_DISTANCE_TO_POINT_SGIS* = 0x81F0.GLenum
+  GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV* = 0x8DA5.GLenum
+  GL_FILTER4_SGIS* = 0x8146.GLenum
+  GL_LIGHT_MODEL_LOCAL_VIEWER* = 0x0B51.GLenum
+  GL_TRIANGLE_MESH_SUN* = 0x8615.GLenum
+  GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB* = 0x900D.GLenum
+  GL_DEPTH_COMPONENTS* = 0x8284.GLenum
+  GL_NUM_GENERAL_COMBINERS_NV* = 0x854E.GLenum
+  GL_CLIENT_ACTIVE_TEXTURE_ARB* = 0x84E1.GLenum
+  GL_FRAGMENT_DEPTH* = 0x8452.GLenum
+  GL_SEPARATE_ATTRIBS* = 0x8C8D.GLenum
+  GL_HALF_FLOAT_OES* = 0x8D61.GLenum
+  GL_PROXY_TEXTURE_2D* = 0x8064.GLenum
+  GL_VARIANT_ARRAY_TYPE_EXT* = 0x87E7.GLenum
+  GL_DRAW_BUFFER11_ATI* = 0x8830.GLenum
+  GL_MATRIX_INDEX_ARRAY_POINTER_OES* = 0x8849.GLenum
+  GL_CURRENT_INDEX* = 0x0B01.GLenum
+  GL_UNSIGNED_INT_24_8_MESA* = 0x8751.GLenum
+  GL_PROGRAM_SEPARABLE* = 0x8258.GLenum
+  GL_TEXTURE8_ARB* = 0x84C8.GLenum
+  GL_OPERAND0_ALPHA_EXT* = 0x8598.GLenum
+  GL_PER_STAGE_CONSTANTS_NV* = 0x8535.GLenum
+  GL_LINE_LOOP* = 0x0002.GLenum
+  GL_DRAW_PIXEL_TOKEN* = 0x0705.GLenum
+  GL_DRAW_BUFFER3* = 0x8828.GLenum
+  GL_GEOMETRY_DEFORMATION_SGIX* = 0x8194.GLenum
+  GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT* = 0x851C.GLenum
+  GL_GLYPH_VERTICAL_BEARING_X_BIT_NV* = 0x20.GLbitfield
+  GL_TEXTURE30* = 0x84DE.GLenum
+  GL_4PASS_1_EXT* = 0x80A5.GLenum
+  GL_RGB16F_EXT* = 0x881B.GLenum
+  GL_2PASS_0_SGIS* = 0x80A2.GLenum
+  GL_CON_27_ATI* = 0x895C.GLenum
+  GL_SAMPLE_ALPHA_TO_ONE* = 0x809F.GLenum
+  GL_POLYGON_SMOOTH_HINT* = 0x0C53.GLenum
+  GL_COLOR_ATTACHMENT_EXT* = 0x90F0.GLenum
+  GL_PATCH_DEFAULT_INNER_LEVEL* = 0x8E73.GLenum
+  GL_TEXTURE_MAX_CLAMP_T_SGIX* = 0x836A.GLenum
+  GL_WEIGHT_ARRAY_BUFFER_BINDING_OES* = 0x889E.GLenum
+  GL_TEXTURE1* = 0x84C1.GLenum
+  GL_LINES* = 0x0001.GLenum
+  GL_PIXEL_TILE_GRID_DEPTH_SGIX* = 0x8144.GLenum
+  GL_TEXTURE2* = 0x84C2.GLenum
+  GL_IMAGE_CUBE_MAP_ARRAY_EXT* = 0x9054.GLenum
+  GL_DRAW_BUFFER4* = 0x8829.GLenum
+  GL_DRAW_BUFFER_EXT* = 0x0C01.GLenum
+  GL_STENCIL_INDEX1* = 0x8D46.GLenum
+  GL_DEPTH_COMPONENT32F_NV* = 0x8DAB.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_POINTER* = 0x8645.GLenum
+  GL_DOUBLE_MAT4x2* = 0x8F4D.GLenum
+  GL_MOVE_TO_NV* = 0x02.GLenum
+  GL_OP_RECIP_SQRT_EXT* = 0x8795.GLenum
+  GL_SAMPLER_1D_ARRAY* = 0x8DC0.GLenum
+  GL_MIN_FRAGMENT_INTERPOLATION_OFFSET* = 0x8E5B.GLenum
+  GL_TEXTURE_DEPTH_EXT* = 0x8071.GLenum
+  GL_STENCIL_INDEX8* = 0x8D48.GLenum
+  GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB* = 0x880C.GLenum
+  GL_INTERNALFORMAT_DEPTH_SIZE* = 0x8275.GLenum
+  GL_STATE_RESTORE* = 0x8BDC.GLenum
+  GL_SMALL_CW_ARC_TO_NV* = 0x14.GLenum
+  GL_LUMINANCE16* = 0x8042.GLenum
+  GL_VERTEX_ATTRIB_ARRAY1_NV* = 0x8651.GLenum
+  GL_TEXTURE_MAX_CLAMP_R_SGIX* = 0x836B.GLenum
+  GL_LUMINANCE_FLOAT16_ATI* = 0x881E.GLenum
+  GL_MAX_TEXTURE_UNITS* = 0x84E2.GLenum
+  GL_DRAW_BUFFER4_ARB* = 0x8829.GLenum
+  GL_DRAW_BUFFER12* = 0x8831.GLenum
+  GL_R8UI* = 0x8232.GLenum
+  GL_STENCIL_REF* = 0x0B97.GLenum
+  GL_VARIANT_EXT* = 0x87C1.GLenum
+  GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE* = 0x8A09.GLenum
+  GL_QUERY_OBJECT_AMD* = 0x9153.GLenum
+  GL_PLUS_NV* = 0x9291.GLenum
+  GL_UNPACK_SWAP_BYTES* = 0x0CF0.GLenum
+  GL_MAX_UNIFORM_LOCATIONS* = 0x826E.GLenum
+  GL_GUILTY_CONTEXT_RESET_EXT* = 0x8253.GLenum
+  GL_DOT3_RGBA_IMG* = 0x86AF.GLenum
+  GL_X_EXT* = 0x87D5.GLenum
+  GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB* = 0x900F.GLenum
+  GL_TEXTURE_COMPARE_FAIL_VALUE_ARB* = 0x80BF.GLenum
+  GL_ETC1_RGB8_OES* = 0x8D64.GLenum
+  GL_LUMINANCE_ALPHA_INTEGER_EXT* = 0x8D9D.GLenum
+  GL_MINMAX_SINK* = 0x8030.GLenum
+  GL_RG32F* = 0x8230.GLenum
+  GL_PROXY_TEXTURE_2D_MULTISAMPLE* = 0x9101.GLenum
+  GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV* = 0x86D9.GLenum
+  GL_R16* = 0x822A.GLenum
+  GL_BOUNDING_BOX_NV* = 0x908D.GLenum
+  GL_INVALID_ENUM* = 0x0500.GLenum
+  GL_MOVE_TO_RESETS_NV* = 0x90B5.GLenum
+  GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE* = 0x9117.GLenum
+  GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB* = 0x84F8.GLenum
+  GL_UNSIGNED_INT_10F_11F_11F_REV_EXT* = 0x8C3B.GLenum
+  GL_VERTEX_PRECLIP_HINT_SGIX* = 0x83EF.GLenum
+  GL_CLIENT_VERTEX_ARRAY_BIT* = 0x00000002.GLbitfield
+  GL_MAT_COLOR_INDEXES_BIT_PGI* = 0x01000000.GLbitfield
+  GL_PERFORMANCE_MONITOR_AMD* = 0x9152.GLenum
+  GL_QUAD_STRIP* = 0x0008.GLenum
+  GL_MAX_TEXTURE_COORDS_NV* = 0x8871.GLenum
+  GL_TESS_EVALUATION_SUBROUTINE_UNIFORM* = 0x92F0.GLenum
+  GL_DRAW_BUFFER1_EXT* = 0x8826.GLenum
+  GL_TEXTURE18* = 0x84D2.GLenum
+  GL_COLOR_ATTACHMENT5_NV* = 0x8CE5.GLenum
+  GL_MAX_COMPUTE_WORK_GROUP_SIZE* = 0x91BF.GLenum
+  GL_T2F_C4UB_V3F* = 0x2A29.GLenum
+  GL_MAP1_GRID_DOMAIN* = 0x0DD0.GLenum
+  GL_DEBUG_TYPE_PUSH_GROUP_KHR* = 0x8269.GLenum
+  GL_STATIC_READ* = 0x88E5.GLenum
+  GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB* = 0x880E.GLenum
+  GL_DOUBLE_EXT* = 0x140A.GLenum
+  GL_MAX_FRAGMENT_UNIFORM_VECTORS* = 0x8DFD.GLenum
+  GL_R32F_EXT* = 0x822E.GLenum
+  GL_MAX_RENDERBUFFER_SIZE_EXT* = 0x84E8.GLenum
+  GL_COMPRESSED_TEXTURE_FORMATS* = 0x86A3.GLenum
+  GL_MAX_EXT* = 0x8008.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB* = 0x8622.GLenum
+  GL_INTERPOLATE* = 0x8575.GLenum
+  GL_QUERY_RESULT_NO_WAIT_AMD* = 0x9194.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES* = 0x8516.GLenum
+  GL_LUMINANCE16_ALPHA16_SNORM* = 0x901A.GLenum
+  GL_SRC_ALPHA_SATURATE* = 0x0308.GLenum
+  GL_DRAW_INDIRECT_BUFFER_BINDING* = 0x8F43.GLenum
+  GL_T2F_IUI_N3F_V3F_EXT* = 0x81B4.GLenum
+  GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB* = 0x8B49.GLenum
+  GL_MAX_ASYNC_READ_PIXELS_SGIX* = 0x8361.GLenum
+  GL_VERTEX_ARRAY_RANGE_APPLE* = 0x851D.GLenum
+  GL_SAMPLER_2D_SHADOW_ARB* = 0x8B62.GLenum
+  GL_ETC1_SRGB8_NV* = 0x88EE.GLenum
+  GL_COLORBURN_NV* = 0x929A.GLenum
+  GL_SAMPLER_2D_ARRAY_SHADOW_EXT* = 0x8DC4.GLenum
+  GL_ALL_BARRIER_BITS* = 0xFFFFFFFF.GLbitfield
+  GL_TRIANGLE_STRIP_ADJACENCY_EXT* = 0x000D.GLenum
+  GL_MAX_TEXTURE_BUFFER_SIZE* = 0x8C2B.GLenum
+  GL_ALIASED_POINT_SIZE_RANGE* = 0x846D.GLenum
+  GL_STENCIL_BACK_VALUE_MASK* = 0x8CA4.GLenum
+  GL_CMYK_EXT* = 0x800C.GLenum
+  GL_OPERAND1_ALPHA_EXT* = 0x8599.GLenum
+  GL_TEXTURE_SHADOW* = 0x82A1.GLenum
+  GL_LINEAR_CLIPMAP_LINEAR_SGIX* = 0x8170.GLenum
+  GL_MIPMAP* = 0x8293.GLenum
+  GL_LINE_SMOOTH_HINT* = 0x0C52.GLenum
+  GL_DEPTH_STENCIL_TEXTURE_MODE* = 0x90EA.GLenum
+  GL_BUFFER_ACCESS_OES* = 0x88BB.GLenum
+  GL_PROXY_TEXTURE_1D_ARRAY_EXT* = 0x8C19.GLenum
+  GL_OBJECT_LINEAR* = 0x2401.GLenum
+  GL_MAP1_TEXTURE_COORD_3* = 0x0D95.GLenum
+  GL_TEXTURE_RENDERBUFFER_NV* = 0x8E55.GLenum
+  GL_FRAMEBUFFER_RENDERABLE* = 0x8289.GLenum
+  GL_DOT3_RGB_EXT* = 0x8740.GLenum
+  GL_QUAD_LUMINANCE8_SGIS* = 0x8121.GLenum
+  GL_UNIFORM_BLOCK_INDEX* = 0x8A3A.GLenum
+  GL_DS_SCALE_NV* = 0x8710.GLenum
+  GL_TYPE* = 0x92FA.GLenum
+  GL_MATRIX_EXT* = 0x87C0.GLenum
+  GL_VERTEX_STREAM4_ATI* = 0x8770.GLenum
+  GL_TOP_LEVEL_ARRAY_STRIDE* = 0x930D.GLenum
+  GL_INT_SAMPLER_2D_EXT* = 0x8DCA.GLenum
+  GL_PATH_FORMAT_PS_NV* = 0x9071.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR* = 0x93D2.GLenum
+  GL_MAX_TEXTURE_COORDS* = 0x8871.GLenum
+  GL_MAX_FRAGMENT_INTERPOLATION_OFFSET* = 0x8E5C.GLenum
+  GL_REG_17_ATI* = 0x8932.GLenum
+  GL_WAIT_FAILED_APPLE* = 0x911D.GLenum
+  GL_TEXTURE_BINDING_3D* = 0x806A.GLenum
+  GL_TEXTURE_VIEW* = 0x82B5.GLenum
+  GL_DOT3_RGBA_ARB* = 0x86AF.GLenum
+  GL_MAX_VARYING_FLOATS_ARB* = 0x8B4B.GLenum
+  GL_UNIFORM_IS_ROW_MAJOR* = 0x8A3E.GLenum
+  GL_FRAGMENT_SHADER_BIT* = 0x00000002.GLbitfield
+  GL_MATRIX_INDEX_ARRAY_ARB* = 0x8844.GLenum
+  GL_PIXEL_PACK_BUFFER_BINDING_EXT* = 0x88ED.GLenum
+  GL_MATRIX_PALETTE_OES* = 0x8840.GLenum
+  GL_INTENSITY_SNORM* = 0x9013.GLenum
+  GL_COLOR_BUFFER_BIT0_QCOM* = 0x00000001.GLbitfield
+  GL_BITMAP* = 0x1A00.GLenum
+  GL_CURRENT_MATRIX_NV* = 0x8641.GLenum
+  GL_QUERY_BUFFER_AMD* = 0x9192.GLenum
+  GL_EDGE_FLAG_ARRAY_BUFFER_BINDING* = 0x889B.GLenum
+  GL_4PASS_3_EXT* = 0x80A7.GLenum
+  GL_TEXTURE_4DSIZE_SGIS* = 0x8136.GLenum
+  GL_PATH_COORD_COUNT_NV* = 0x909E.GLenum
+  GL_SLUMINANCE* = 0x8C46.GLenum
+  GL_POINT_SMOOTH_HINT* = 0x0C51.GLenum
+  GL_ADJACENT_PAIRS_NV* = 0x90AE.GLenum
+  GL_BUFFER_BINDING* = 0x9302.GLenum
+  GL_ARRAY_OBJECT_BUFFER_ATI* = 0x8766.GLenum
+  GL_PATH_INITIAL_DASH_CAP_NV* = 0x907C.GLenum
+  GL_RGBA4* = 0x8056.GLenum
+  GL_PACK_LSB_FIRST* = 0x0D01.GLenum
+  GL_IMAGE_BINDING_NAME_EXT* = 0x8F3A.GLenum
+  GL_UNSIGNED_INT_SAMPLER_2D_EXT* = 0x8DD2.GLenum
+  GL_RGBA12_EXT* = 0x805A.GLenum
+  GL_COMBINER0_NV* = 0x8550.GLenum
+  GL_COLOR_BUFFER_BIT4_QCOM* = 0x00000010.GLbitfield
+  GL_TIME_ELAPSED* = 0x88BF.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_START* = 0x8C84.GLenum
+  GL_COMPRESSED_RGBA_ASTC_5x5_KHR* = 0x93B2.GLenum
+  GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD* = 0x9199.GLenum
+  GL_RENDERBUFFER_HEIGHT_EXT* = 0x8D43.GLenum
+  GL_QUARTER_BIT_ATI* = 0x00000010.GLbitfield
+  GL_TEXTURE_COMPRESSION_HINT_ARB* = 0x84EF.GLenum
+  GL_DRAW_BUFFER13* = 0x8832.GLenum
+  GL_CURRENT_MATRIX_STACK_DEPTH_ARB* = 0x8640.GLenum
+  GL_DEPENDENT_HILO_TEXTURE_2D_NV* = 0x8858.GLenum
+  GL_DST_NV* = 0x9287.GLenum
+  GL_DEBUG_OBJECT_MESA* = 0x8759.GLenum
+  GL_NUM_INSTRUCTIONS_TOTAL_ATI* = 0x8972.GLenum
+  GL_FLAT* = 0x1D00.GLenum
+  GL_EVAL_VERTEX_ATTRIB8_NV* = 0x86CE.GLenum
+  GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA* = 0x8BB6.GLenum
+  GL_TEXTURE_COORD_ARRAY_EXT* = 0x8078.GLenum
+  GL_LOCATION_INDEX* = 0x930F.GLenum
+  GL_SLIM10U_SGIX* = 0x831E.GLenum
+  GL_PHONG_WIN* = 0x80EA.GLenum
+  GL_EVAL_VERTEX_ATTRIB1_NV* = 0x86C7.GLenum
+  GL_SMOOTH_LINE_WIDTH_RANGE* = 0x0B22.GLenum
+  GL_SAMPLER_RENDERBUFFER_NV* = 0x8E56.GLenum
+  GL_UNPACK_LSB_FIRST* = 0x0CF1.GLenum
+  GL_SELECTION_BUFFER_POINTER* = 0x0DF3.GLenum
+  GL_PIXEL_SUBSAMPLE_4444_SGIX* = 0x85A2.GLenum
+  GL_COMPRESSED_R11_EAC* = 0x9270.GLenum
+  GL_MAX_CLIP_PLANES* = 0x0D32.GLenum
+  GL_POST_CONVOLUTION_GREEN_BIAS* = 0x8021.GLenum
+  GL_COLOR_EXT* = 0x1800.GLenum
+  GL_VENDOR* = 0x1F00.GLenum
+  GL_MAP1_VERTEX_ATTRIB8_4_NV* = 0x8668.GLenum
+  GL_TEXTURE_ALPHA_TYPE* = 0x8C13.GLenum
+  GL_CURRENT_VERTEX_ATTRIB_ARB* = 0x8626.GLenum
+  GL_COLOR_BUFFER_BIT2_QCOM* = 0x00000004.GLbitfield
+  GL_VERTEX_ATTRIB_ARRAY15_NV* = 0x865F.GLenum
+  GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV* = 0x8850.GLenum
+  GL_DRAW_BUFFER5_ARB* = 0x882A.GLenum
+  GL_SAMPLES_PASSED_ARB* = 0x8914.GLenum
+  GL_PRIMITIVE_RESTART_NV* = 0x8558.GLenum
+  GL_FRAGMENT_LIGHT3_SGIX* = 0x840F.GLenum
+  GL_COLOR_INDEX16_EXT* = 0x80E7.GLenum
+  GL_RGBA8_OES* = 0x8058.GLenum
+  GL_PACK_CMYK_HINT_EXT* = 0x800E.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE* = 0x8214.GLenum
+  GL_MODELVIEW0_EXT* = 0x1700.GLenum
+  GL_RETAINED_APPLE* = 0x8A1B.GLenum
+  GL_DRAW_PIXELS_APPLE* = 0x8A0A.GLenum
+  GL_POINT_BIT* = 0x00000002.GLbitfield
+  GL_PIXEL_MAP_B_TO_B_SIZE* = 0x0CB8.GLenum
+  GL_RELATIVE_SMALL_CCW_ARC_TO_NV* = 0x13.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB* = 0x8624.GLenum
+  GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV* = 0x885D.GLenum
+  GL_CON_2_ATI* = 0x8943.GLenum
+  GL_SAMPLER_2D_ARRAY* = 0x8DC1.GLenum
+  GL_LINE_STIPPLE_PATTERN* = 0x0B25.GLenum
+  GL_IMPLEMENTATION_COLOR_READ_FORMAT* = 0x8B9B.GLenum
+  GL_TRANSPOSE_AFFINE_2D_NV* = 0x9096.GLenum
+  GL_COLOR_ATTACHMENT7* = 0x8CE7.GLenum
+  GL_COLOR_ATTACHMENT14* = 0x8CEE.GLenum
+  GL_SHADER* = 0x82E1.GLenum
+  GL_SKIP_MISSING_GLYPH_NV* = 0x90A9.GLenum
+  GL_VERTEX_ARRAY_TYPE* = 0x807B.GLenum
+  GL_OP_POWER_EXT* = 0x8793.GLenum
+  GL_MAX_BINDABLE_UNIFORM_SIZE_EXT* = 0x8DED.GLenum
+  GL_SRGB8* = 0x8C41.GLenum
+  GL_INTERNALFORMAT_ALPHA_SIZE* = 0x8274.GLenum
+  GL_IMAGE_2D_MULTISAMPLE* = 0x9055.GLenum
+  GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV* = 0x9039.GLenum
+  GL_NEVER* = 0x0200.GLenum
+  GL_MAP2_TEXTURE_COORD_2* = 0x0DB4.GLenum
+  GL_PROGRAM_RESULT_COMPONENTS_NV* = 0x8907.GLenum
+  GL_SHADER_STORAGE_BARRIER_BIT* = 0x00002000.GLbitfield
+  GL_SLIM8U_SGIX* = 0x831D.GLenum
+  GL_DRAW_BUFFER7_ATI* = 0x882C.GLenum
+  GL_CLAMP_TO_EDGE* = 0x812F.GLint
+  GL_LUMINANCE32I_EXT* = 0x8D86.GLenum
+  GL_NORMAL_ARRAY_POINTER* = 0x808F.GLenum
+  GL_ALPHA_TEST_REF_QCOM* = 0x0BC2.GLenum
+  GL_MATRIX7_NV* = 0x8637.GLenum
+  GL_REFERENCED_BY_FRAGMENT_SHADER* = 0x930A.GLenum
+  GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG* = 0x8C02.GLenum
+  GL_DEBUG_TYPE_MARKER* = 0x8268.GLenum
+  GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR* = 0x8242.GLenum
+  GL_CON_26_ATI* = 0x895B.GLenum
+  GL_COMBINER7_NV* = 0x8557.GLenum
+  GL_MAP2_TANGENT_EXT* = 0x8445.GLenum
+  GL_COMPRESSED_RGBA_ASTC_10x6_KHR* = 0x93B9.GLenum
+  GL_RG8* = 0x822B.GLenum
+  GL_INT_SAMPLER_1D_ARRAY_EXT* = 0x8DCE.GLenum
+  GL_POINT_SPRITE_R_MODE_NV* = 0x8863.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_BINDING* = 0x92C1.GLenum
+  GL_INTENSITY16F_ARB* = 0x881D.GLenum
+  GL_DEFORMATIONS_MASK_SGIX* = 0x8196.GLenum
+  GL_PATH_TERMINAL_END_CAP_NV* = 0x9078.GLenum
+  GL_VERTEX_BINDING_DIVISOR* = 0x82D6.GLenum
+  GL_WIDE_LINE_HINT_PGI* = 0x1A222.GLenum
+  GL_LIGHTING* = 0x0B50.GLenum
+  GL_CURRENT_BIT* = 0x00000001.GLbitfield
+  GL_LOSE_CONTEXT_ON_RESET_ARB* = 0x8252.GLenum
+  GL_COLOR_ATTACHMENT15* = 0x8CEF.GLenum
+  GL_REGISTER_COMBINERS_NV* = 0x8522.GLenum
+  GL_UNSIGNED_INT64_VEC2_NV* = 0x8FF5.GLenum
+  GL_TEXTURE_CLIPMAP_DEPTH_SGIX* = 0x8176.GLenum
+  GL_HISTOGRAM_WIDTH* = 0x8026.GLenum
+  GL_RENDERBUFFER_ALPHA_SIZE* = 0x8D53.GLenum
+  GL_POST_CONVOLUTION_BLUE_BIAS_EXT* = 0x8022.GLenum
+  GL_SCALED_RESOLVE_FASTEST_EXT* = 0x90BA.GLenum
+  GL_DRAW_BUFFER15* = 0x8834.GLenum
+  GL_LUMINANCE4_ALPHA4* = 0x8043.GLenum
+  GL_SWIZZLE_STRQ_DQ_ATI* = 0x897B.GLenum
+  GL_OP_MADD_EXT* = 0x8788.GLenum
+  GL_MAX_ATTRIB_STACK_DEPTH* = 0x0D35.GLenum
+  GL_DEBUG_GROUP_STACK_DEPTH_KHR* = 0x826D.GLenum
+  GL_ACTIVE_VARYINGS_NV* = 0x8C81.GLenum
+  GL_DEBUG_SEVERITY_HIGH* = 0x9146.GLenum
+  GL_SRGB8_EXT* = 0x8C41.GLenum
+  GL_STENCIL_WRITEMASK* = 0x0B98.GLenum
+  GL_REG_14_ATI* = 0x892F.GLenum
+  GL_PROGRAM_BINARY_ANGLE* = 0x93A6.GLenum
+  GL_RENDERBUFFER_DEPTH_SIZE_EXT* = 0x8D54.GLenum
+  GL_ALPHA_BIAS* = 0x0D1D.GLenum
+  GL_STATIC_ATI* = 0x8760.GLenum
+  GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES* = 0x8B9E.GLenum
+  GL_SOFTLIGHT_NV* = 0x929C.GLenum
+  GL_INDEX_ARRAY_COUNT_EXT* = 0x8087.GLenum
+  GL_RENDERBUFFER_BLUE_SIZE_EXT* = 0x8D52.GLenum
+  GL_SHARED_TEXTURE_PALETTE_EXT* = 0x81FB.GLenum
+  GL_VERTEX_SHADER_OPTIMIZED_EXT* = 0x87D4.GLenum
+  GL_MAX_SAMPLE_MASK_WORDS_NV* = 0x8E59.GLenum
+  GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB* = 0x8841.GLenum
+  GL_MATRIX30_ARB* = 0x88DE.GLenum
+  GL_NORMAL_ARRAY_POINTER_EXT* = 0x808F.GLenum
+  GL_PIXEL_MAP_A_TO_A* = 0x0C79.GLenum
+  GL_MATRIX18_ARB* = 0x88D2.GLenum
+  GL_UNPACK_SKIP_ROWS_EXT* = 0x0CF3.GLenum
+  GL_INVARIANT_DATATYPE_EXT* = 0x87EB.GLenum
+  GL_INT_IMAGE_1D_EXT* = 0x9057.GLenum
+  GL_OUTPUT_TEXTURE_COORD24_EXT* = 0x87B5.GLenum
+  GL_MAP_WRITE_BIT_EXT* = 0x0002.GLbitfield
+  GL_MODELVIEW28_ARB* = 0x873C.GLenum
+  GL_MAX_VARYING_COMPONENTS_EXT* = 0x8B4B.GLenum
+  GL_OUTPUT_TEXTURE_COORD4_EXT* = 0x87A1.GLenum
+  GL_UNSIGNED_INT_VEC2_EXT* = 0x8DC6.GLenum
+  GL_READ_ONLY* = 0x88B8.GLenum
+  GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM* = 103087.GLenum
+  GL_UNSIGNED_INT64_NV* = 0x140F.GLenum
+  GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN* = 0x85C2.GLenum
+  GL_DEPTH_BUFFER_BIT0_QCOM* = 0x00000100.GLbitfield
+  GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE* = 0x8A06.GLenum
+  GL_POST_CONVOLUTION_ALPHA_SCALE* = 0x801F.GLenum
+  GL_TEXTURE_COLOR_SAMPLES_NV* = 0x9046.GLenum
+  GL_DEBUG_SEVERITY_HIGH_ARB* = 0x9146.GLenum
+  GL_MAP_WRITE_BIT* = 0x0002.GLbitfield
+  GL_SRC1_RGB* = 0x8581.GLenum
+  GL_LIGHT0* = 0x4000.GLenum
+  GL_READ_PIXELS_FORMAT* = 0x828D.GLenum
+  GL_COMBINE_RGB_EXT* = 0x8571.GLenum
+  GL_MATRIX2_NV* = 0x8632.GLenum
+  GL_INT16_VEC4_NV* = 0x8FE7.GLenum
+  GL_INT_SAMPLER_CUBE* = 0x8DCC.GLenum
+  GL_LUMINANCE_ALPHA8I_EXT* = 0x8D93.GLenum
+  GL_TRIANGLE_STRIP_ADJACENCY* = 0x000D.GLenum
+  GL_MAX_TEXTURE_BUFFER_SIZE_EXT* = 0x8C2B.GLenum
+  GL_COLOR_TABLE_BIAS* = 0x80D7.GLenum
+  GL_MAX_GEOMETRY_INPUT_COMPONENTS* = 0x9123.GLenum
+  GL_TEXTURE_RANGE_POINTER_APPLE* = 0x85B8.GLenum
+  GL_PIXEL_SUBSAMPLE_2424_SGIX* = 0x85A3.GLenum
+  GL_RESAMPLE_REPLICATE_OML* = 0x8986.GLenum
+  GL_ALL_STATIC_DATA_IBM* = 103060.GLenum
+  GL_DEBUG_CATEGORY_PERFORMANCE_AMD* = 0x914D.GLenum
+  GL_ALPHA_TEST_QCOM* = 0x0BC0.GLenum
+  GL_PREVIOUS_TEXTURE_INPUT_NV* = 0x86E4.GLenum
+  GL_SIGNED_RGBA_NV* = 0x86FB.GLenum
+  GL_GLOBAL_ALPHA_SUN* = 0x81D9.GLenum
+  GL_RGB_FLOAT16_APPLE* = 0x881B.GLenum
+  GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB* = 0x8808.GLenum
+  GL_UTF8_NV* = 0x909A.GLenum
+  GL_ALLOW_DRAW_OBJ_HINT_PGI* = 0x1A20E.GLenum
+  GL_INT_IMAGE_3D* = 0x9059.GLenum
+  GL_PACK_ROW_LENGTH* = 0x0D02.GLenum
+  GL_MAX_TEXTURE_LOD_BIAS_EXT* = 0x84FD.GLenum
+  GL_SCALED_RESOLVE_NICEST_EXT* = 0x90BB.GLenum
+  GL_422_EXT* = 0x80CC.GLenum
+  GL_SAMPLER_1D_ARRAY_SHADOW_EXT* = 0x8DC3.GLenum
+  GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT* = 0x8336.GLenum
+  GL_COMPRESSED_RED* = 0x8225.GLenum
+  GL_MAX_RATIONAL_EVAL_ORDER_NV* = 0x86D7.GLenum
+  GL_MAX_COMBINED_IMAGE_UNIFORMS* = 0x90CF.GLenum
+  GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV* = 0x10.GLbitfield
+  GL_TEXTURE_BINDING_1D_ARRAY* = 0x8C1C.GLenum
+  GL_FRAMEBUFFER_COMPLETE* = 0x8CD5.GLenum
+  GL_RG8I* = 0x8237.GLenum
+  GL_COLOR_ATTACHMENT2_NV* = 0x8CE2.GLenum
+  GL_INT64_VEC4_NV* = 0x8FEB.GLenum
+  GL_OP_SET_GE_EXT* = 0x878C.GLenum
+  GL_READ_WRITE* = 0x88BA.GLenum
+  GL_OPERAND1_RGB_EXT* = 0x8591.GLenum
+  GL_SHADER_STORAGE_BLOCK* = 0x92E6.GLenum
+  GL_TEXTURE_UPDATE_BARRIER_BIT* = 0x00000100.GLbitfield
+  GL_MAX_FRAGMENT_ATOMIC_COUNTERS* = 0x92D6.GLenum
+  GL_SHADER_INCLUDE_ARB* = 0x8DAE.GLenum
+  GL_UNSIGNED_SHORT_1_5_5_5_REV* = 0x8366.GLenum
+  GL_PROGRAM_PIPELINE* = 0x82E4.GLenum
+  GL_MAP1_TEXTURE_COORD_2* = 0x0D94.GLenum
+  GL_FOG_COORDINATE_ARRAY_STRIDE_EXT* = 0x8455.GLenum
+  GL_WEIGHT_ARRAY_SIZE_OES* = 0x86AB.GLenum
+  GL_R11F_G11F_B10F* = 0x8C3A.GLenum
+  GL_WRITE_PIXEL_DATA_RANGE_NV* = 0x8878.GLenum
+  GL_UNSIGNED_SHORT_8_8_REV_APPLE* = 0x85BB.GLenum
+  GL_CND_ATI* = 0x896A.GLenum
+  GL_IMAGE_2D_MULTISAMPLE_ARRAY* = 0x9056.GLenum
+  GL_MAX_TEXTURE_IMAGE_UNITS_NV* = 0x8872.GLenum
+  GL_COMPRESSED_SIGNED_RG11_EAC_OES* = 0x9273.GLenum
+  GL_DOT_PRODUCT_TEXTURE_3D_NV* = 0x86EF.GLenum
+  GL_IMAGE_TRANSLATE_Y_HP* = 0x8158.GLenum
+  GL_NORMAL_ARRAY_TYPE_EXT* = 0x807E.GLenum
+  GL_PIXEL_COUNT_NV* = 0x8866.GLenum
+  GL_INT_IMAGE_3D_EXT* = 0x9059.GLenum
+  GL_TEXTURE_TYPE_QCOM* = 0x8BD7.GLenum
+  GL_COMBINE_ALPHA_EXT* = 0x8572.GLenum
+  GL_POINT_TOKEN* = 0x0701.GLenum
+  GL_QUAD_ALPHA4_SGIS* = 0x811E.GLenum
+  GL_SIGNED_HILO8_NV* = 0x885F.GLenum
+  GL_MULTISAMPLE_ARB* = 0x809D.GLenum
+  GL_TEXTURE25* = 0x84D9.GLenum
+  GL_CURRENT_VERTEX_WEIGHT_EXT* = 0x850B.GLenum
+  GL_BLEND_DST_ALPHA_OES* = 0x80CA.GLenum
+  GL_UNSIGNED_SHORT_8_8_REV_MESA* = 0x85BB.GLenum
+  GL_CLAMP_TO_EDGE_SGIS* = 0x812F.GLint
+  GL_PATH_STENCIL_REF_NV* = 0x90B8.GLenum
+  GL_DEBUG_OUTPUT* = 0x92E0.GLenum
+  GL_OBJECT_TYPE_APPLE* = 0x9112.GLenum
+  GL_TEXTURE_COMPARE_MODE_ARB* = 0x884C.GLenum
+  GL_CONSTANT* = 0x8576.GLenum
+  GL_RGB5_A1_OES* = 0x8057.GLenum
+  GL_INT16_VEC2_NV* = 0x8FE5.GLenum
+  GL_CONVOLUTION_BORDER_MODE_EXT* = 0x8013.GLenum
+  GL_CONTEXT_FLAGS* = 0x821E.GLenum
+  GL_MAX_PROGRAM_SUBROUTINE_NUM_NV* = 0x8F45.GLenum
+  GL_SPRITE_SGIX* = 0x8148.GLenum
+  GL_CURRENT_QUERY* = 0x8865.GLenum
+  GL_STENCIL_OP_VALUE_AMD* = 0x874C.GLenum
+  GL_UNIFORM* = 0x92E1.GLenum
+  GL_TEXTURE_BINDING_RECTANGLE* = 0x84F6.GLenum
+  GL_TRIANGLES_ADJACENCY_EXT* = 0x000C.GLenum
+  GL_PROVOKING_VERTEX_EXT* = 0x8E4F.GLenum
+  GL_INT64_VEC2_NV* = 0x8FE9.GLenum
+  GL_INVERSE_NV* = 0x862B.GLenum
+  GL_CON_29_ATI* = 0x895E.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV* = 0x8E24.GLenum
+  GL_FRONT_AND_BACK* = 0x0408.GLenum
+  GL_MAX_LABEL_LENGTH_KHR* = 0x82E8.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_START_NV* = 0x8C84.GLenum
+  GL_EQUAL* = 0x0202.GLenum
+  GL_RGB10_EXT* = 0x8052.GLenum
+  GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB* = 0x8C29.GLenum
+  GL_OP_ADD_EXT* = 0x8787.GLenum
+  GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN* = 0x85C3.GLenum
+  GL_NORMAL_ARRAY_LIST_IBM* = 103071.GLenum
+  GL_RENDERBUFFER_GREEN_SIZE* = 0x8D51.GLenum
+  GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV* = 0x8C74.GLenum
+  GL_CURRENT_PALETTE_MATRIX_ARB* = 0x8843.GLenum
+  GL_DEBUG_TYPE_ERROR* = 0x824C.GLenum
+  GL_UNIFORM_BUFFER* = 0x8A11.GLenum
+  GL_NEAREST_CLIPMAP_LINEAR_SGIX* = 0x844E.GLenum
+  GL_LAST_VERTEX_CONVENTION* = 0x8E4E.GLenum
+  GL_COMPRESSED_RGBA_ASTC_12x10_KHR* = 0x93BC.GLenum
+  GL_FENCE_STATUS_NV* = 0x84F3.GLenum
+  GL_POST_CONVOLUTION_BLUE_BIAS* = 0x8022.GLenum
+  GL_BLEND_OVERLAP_NV* = 0x9281.GLenum
+  GL_COMBINE_RGB_ARB* = 0x8571.GLenum
+  GL_TESS_GEN_MODE* = 0x8E76.GLenum
+  GL_TEXTURE_ENV* = 0x2300.GLenum
+  GL_VERTEX_ATTRIB_ARRAY11_NV* = 0x865B.GLenum
+  GL_SHININESS* = 0x1601.GLenum
+  GL_DYNAMIC_STORAGE_BIT* = 0x0100.GLbitfield
+  GL_MODELVIEW30_ARB* = 0x873E.GLenum
+  GL_WRAP_BORDER_SUN* = 0x81D4.GLenum
+  GL_SKIP_COMPONENTS1_NV* = -6
+  GL_DEPTH_CLAMP_NV* = 0x864F.GLenum
+  GL_PROGRAM_BINARY_FORMATS* = 0x87FF.GLenum
+  GL_CURRENT_RASTER_POSITION_VALID* = 0x0B08.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER* = 0x92C8.GLenum
+  GL_T2F_C4F_N3F_V3F* = 0x2A2C.GLenum
+  GL_R16F* = 0x822D.GLenum
+  GL_SECONDARY_COLOR_ARRAY_LENGTH_NV* = 0x8F31.GLenum
+  GL_SEPARATE_ATTRIBS_EXT* = 0x8C8D.GLenum
+  GL_NEGATIVE_Z_EXT* = 0x87DB.GLenum
+  GL_Z400_BINARY_AMD* = 0x8740.GLenum
+  GL_DRAW_INDIRECT_UNIFIED_NV* = 0x8F40.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV* = 0x8C8A.GLenum
+  GL_UNSIGNED_INT_S8_S8_8_8_NV* = 0x86DA.GLenum
+  GL_SRGB8_NV* = 0x8C41.GLenum
+  GL_DEBUG_SEVERITY_MEDIUM_AMD* = 0x9147.GLenum
+  GL_MAX_DRAW_BUFFERS_ATI* = 0x8824.GLenum
+  GL_TEXTURE_COORD_ARRAY_POINTER_EXT* = 0x8092.GLenum
+  GL_RESAMPLE_AVERAGE_OML* = 0x8988.GLenum
+  GL_NO_ERROR* = 0.GLenum
+  GL_RGB5* = 0x8050.GLenum
+  GL_OP_CLAMP_EXT* = 0x878E.GLenum
+  GL_PROGRAM_RESIDENT_NV* = 0x8647.GLenum
+  GL_PROGRAM_ALU_INSTRUCTIONS_ARB* = 0x8805.GLenum
+  GL_ELEMENT_ARRAY_UNIFIED_NV* = 0x8F1F.GLenum
+  GL_SECONDARY_COLOR_ARRAY_LIST_IBM* = 103077.GLenum
+  GL_INTENSITY12_EXT* = 0x804C.GLenum
+  GL_STENCIL_BUFFER_BIT7_QCOM* = 0x00800000.GLbitfield
+  GL_SAMPLER* = 0x82E6.GLenum
+  GL_MAD_ATI* = 0x8968.GLenum
+  GL_STENCIL_BACK_FAIL* = 0x8801.GLenum
+  GL_LIGHT_MODEL_TWO_SIDE* = 0x0B52.GLenum
+  GL_UNPACK_SKIP_PIXELS* = 0x0CF4.GLenum
+  GL_PIXEL_TEX_GEN_SGIX* = 0x8139.GLenum
+  GL_FRACTIONAL_ODD* = 0x8E7B.GLenum
+  GL_LOW_INT* = 0x8DF3.GLenum
+  GL_MODELVIEW* = 0x1700.GLenum
+  GL_POST_CONVOLUTION_RED_SCALE_EXT* = 0x801C.GLenum
+  GL_DRAW_BUFFER11_EXT* = 0x8830.GLenum
+  GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH* = 0x8A35.GLenum
+  GL_CONVOLUTION_BORDER_MODE* = 0x8013.GLenum
+  GL_COMPRESSED_ALPHA_ARB* = 0x84E9.GLenum
+  GL_DEPTH_ATTACHMENT* = 0x8D00.GLenum
+  GL_ALPHA8_SNORM* = 0x9014.GLenum
+  GL_DOUBLE_MAT4x3_EXT* = 0x8F4E.GLenum
+  GL_INTERNALFORMAT_STENCIL_SIZE* = 0x8276.GLenum
+  GL_BOOL_VEC2_ARB* = 0x8B57.GLenum
+  GL_FASTEST* = 0x1101.GLenum
+  GL_MAX_FRAGMENT_INPUT_COMPONENTS* = 0x9125.GLenum
+  GL_STENCIL_BACK_FUNC_ATI* = 0x8800.GLenum
+  GL_POLYGON* = 0x0009.GLenum
+  GL_SAMPLER_1D_ARRAY_EXT* = 0x8DC0.GLenum
+  GL_OUTPUT_COLOR1_EXT* = 0x879C.GLenum
+  GL_IMAGE_2D_RECT* = 0x904F.GLenum
+  GL_RECT_NV* = 0xF6.GLenum
+  GL_OUTPUT_TEXTURE_COORD21_EXT* = 0x87B2.GLenum
+  GL_NOR* = 0x1508.GLenum
+  GL_FOG_COORD_ARRAY* = 0x8457.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES* = 0x8517.GLenum
+  GL_TANGENT_ARRAY_POINTER_EXT* = 0x8442.GLenum
+  GL_DST_OUT_NV* = 0x928D.GLenum
+  GL_RENDERBUFFER_BINDING_OES* = 0x8CA7.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR* = 0x93D3.GLenum
+  GL_TEXTURE_GEN_S* = 0x0C60.GLenum
+  GL_SLIM12S_SGIX* = 0x831F.GLenum
+  GL_VERTEX_ARRAY_BINDING* = 0x85B5.GLenum
+  GL_TRACE_PRIMITIVES_BIT_MESA* = 0x0002.GLbitfield
+  GL_MAX_DEBUG_MESSAGE_LENGTH* = 0x9143.GLenum
+  GL_EVAL_VERTEX_ATTRIB4_NV* = 0x86CA.GLenum
+  GL_ACTIVE_SUBROUTINE_UNIFORMS* = 0x8DE6.GLenum
+  GL_ACCUM_ADJACENT_PAIRS_NV* = 0x90AD.GLenum
+  GL_NEGATIVE_ONE_EXT* = 0x87DF.GLenum
+  GL_UNPACK_RESAMPLE_SGIX* = 0x842D.GLenum
+  GL_ACTIVE_SUBROUTINE_MAX_LENGTH* = 0x8E48.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT* = 0x8518.GLenum
+  GL_DEBUG_CATEGORY_API_ERROR_AMD* = 0x9149.GLenum
+  GL_INTERNALFORMAT_BLUE_SIZE* = 0x8273.GLenum
+  GL_DRAW_BUFFER13_NV* = 0x8832.GLenum
+  GL_DEBUG_SOURCE_THIRD_PARTY_ARB* = 0x8249.GLenum
+  GL_R8_EXT* = 0x8229.GLenum
+  GL_GENERATE_MIPMAP* = 0x8191.GLenum
+  cGL_SHORT* = 0x1402.GLenum
+  GL_PACK_REVERSE_ROW_ORDER_ANGLE* = 0x93A4.GLenum
+  GL_PATH_DASH_OFFSET_RESET_NV* = 0x90B4.GLenum
+  GL_PACK_SKIP_VOLUMES_SGIS* = 0x8130.GLenum
+  GL_TEXTURE_RED_TYPE* = 0x8C10.GLenum
+  GL_MAX_COLOR_ATTACHMENTS_EXT* = 0x8CDF.GLenum
+  GL_MAP2_VERTEX_ATTRIB5_4_NV* = 0x8675.GLenum
+  GL_CONSTANT_ALPHA* = 0x8003.GLenum
+  GL_COLOR_INDEX8_EXT* = 0x80E5.GLenum
+  GL_DOUBLE_MAT3_EXT* = 0x8F47.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_INDEX* = 0x9301.GLenum
+  GL_LINES_ADJACENCY_EXT* = 0x000A.GLenum
+  GL_RENDERBUFFER_SAMPLES_IMG* = 0x9133.GLenum
+  GL_COLOR_TABLE_FORMAT* = 0x80D8.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_TYPE* = 0x8625.GLenum
+  GL_QUERY_OBJECT_EXT* = 0x9153.GLenum
+  GL_STREAM_READ_ARB* = 0x88E1.GLenum
+  GL_MIRROR_CLAMP_TO_EDGE_ATI* = 0x8743.GLint
+  GL_FRAGMENT_SUBROUTINE_UNIFORM* = 0x92F2.GLenum
+  GL_UNIFORM_BUFFER_EXT* = 0x8DEE.GLenum
+  GL_SOURCE2_RGB* = 0x8582.GLenum
+  GL_PROGRAM_NATIVE_ATTRIBS_ARB* = 0x88AE.GLenum
+  GL_LUMINANCE12_ALPHA12* = 0x8047.GLenum
+  GL_INT_SAMPLER_1D_EXT* = 0x8DC9.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT* = 0x8D6C.GLenum
+  GL_DEPTH_RENDERABLE* = 0x8287.GLenum
+  GL_INTERNALFORMAT_BLUE_TYPE* = 0x827A.GLenum
+  GL_SLUMINANCE8_ALPHA8_EXT* = 0x8C45.GLenum
+  GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB* = 0x900A.GLenum
+  GL_COLOR_MATRIX* = 0x80B1.GLenum
+  GL_RGB8_SNORM* = 0x8F96.GLenum
+  GL_COLOR_ARRAY_SIZE* = 0x8081.GLenum
+  GL_DRAW_BUFFER4_NV* = 0x8829.GLenum
+  GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV* = 0x902D.GLenum
+  GL_PRESENT_TIME_NV* = 0x8E2A.GLenum
+  GL_COPY_WRITE_BUFFER* = 0x8F37.GLenum
+  GL_UNPACK_SKIP_PIXELS_EXT* = 0x0CF4.GLenum
+  GL_PRIMITIVES_GENERATED_NV* = 0x8C87.GLenum
+  GL_INT_SAMPLER_BUFFER* = 0x8DD0.GLenum
+  GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV* = 0x04.GLbitfield
+  GL_FOG_COORDINATE_EXT* = 0x8451.GLenum
+  GL_VERTEX_ARRAY_ADDRESS_NV* = 0x8F21.GLenum
+  GL_RENDERBUFFER_RED_SIZE_OES* = 0x8D50.GLenum
+  GL_BGR_INTEGER_EXT* = 0x8D9A.GLenum
+  GL_UNSIGNED_BYTE_3_3_2* = 0x8032.GLenum
+  GL_VBO_FREE_MEMORY_ATI* = 0x87FB.GLenum
+  GL_PATH_COMPUTED_LENGTH_NV* = 0x90A0.GLenum
+  GL_COLOR_MATRIX_STACK_DEPTH_SGI* = 0x80B2.GLenum
+  GL_STACK_OVERFLOW* = 0x0503.GLenum
+  GL_MODELVIEW1_MATRIX_EXT* = 0x8506.GLenum
+  GL_CURRENT_BINORMAL_EXT* = 0x843C.GLenum
+  GL_OP_MULTIPLY_MATRIX_EXT* = 0x8798.GLenum
+  GL_CLIENT_ATTRIB_STACK_DEPTH* = 0x0BB1.GLenum
+  GL_VERTEX_PROGRAM_TWO_SIDE_NV* = 0x8643.GLenum
+  GL_HISTOGRAM_WIDTH_EXT* = 0x8026.GLenum
+  GL_OBJECT_INFO_LOG_LENGTH_ARB* = 0x8B84.GLenum
+  GL_SAMPLER_2D_ARRAY_SHADOW* = 0x8DC4.GLenum
+  GL_UNSIGNED_INT_IMAGE_1D* = 0x9062.GLenum
+  GL_MAX_IMAGE_UNITS* = 0x8F38.GLenum
+  GL_TEXTURE31_ARB* = 0x84DF.GLenum
+  GL_CUBIC_HP* = 0x815F.GLenum
+  GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV* = 0x8856.GLenum
+  GL_ARRAY_STRIDE* = 0x92FE.GLenum
+  GL_DEPTH_PASS_INSTRUMENT_SGIX* = 0x8310.GLenum
+  GL_COMMAND_BARRIER_BIT* = 0x00000040.GLbitfield
+  GL_STATIC_DRAW_ARB* = 0x88E4.GLenum
+  GL_RGB16F* = 0x881B.GLenum
+  GL_INDEX_MATERIAL_PARAMETER_EXT* = 0x81B9.GLenum
+  GL_UNPACK_SKIP_VOLUMES_SGIS* = 0x8132.GLenum
+  GL_TEXTURE_1D* = 0x0DE0.GLenum
+  GL_VERTEX_PROGRAM_NV* = 0x8620.GLenum
+  GL_COLOR_ATTACHMENT0_NV* = 0x8CE0.GLenum
+  GL_READ_PIXEL_DATA_RANGE_LENGTH_NV* = 0x887B.GLenum
+  GL_FLOAT_32_UNSIGNED_INT_24_8_REV* = 0x8DAD.GLenum
+  GL_LINE_RESET_TOKEN* = 0x0707.GLenum
+  GL_WEIGHT_ARRAY_ARB* = 0x86AD.GLenum
+  GL_TEXTURE17* = 0x84D1.GLenum
+  GL_DEPTH_COMPONENT32_ARB* = 0x81A7.GLenum
+  GL_REFERENCED_BY_TESS_CONTROL_SHADER* = 0x9307.GLenum
+  GL_INVERT* = 0x150A.GLenum
+  GL_FOG_COORDINATE_ARRAY_STRIDE* = 0x8455.GLenum
+  GL_COMPRESSED_SIGNED_RG_RGTC2* = 0x8DBE.GLenum
+  GL_UNSIGNED_SHORT_8_8_MESA* = 0x85BA.GLenum
+  GL_ELEMENT_ARRAY_TYPE_ATI* = 0x8769.GLenum
+  GL_CLAMP_VERTEX_COLOR_ARB* = 0x891A.GLenum
+  GL_POINT_SIZE_ARRAY_STRIDE_OES* = 0x898B.GLenum
+  GL_RGB8* = 0x8051.GLenum
+  GL_MATRIX1_ARB* = 0x88C1.GLenum
+  GL_TEXTURE_POST_SPECULAR_HP* = 0x8168.GLenum
+  GL_TEXTURE_WRAP_Q_SGIS* = 0x8137.GLenum
+  GL_SAMPLER_2D_MULTISAMPLE_ARRAY* = 0x910B.GLenum
+  GL_INVALID_FRAMEBUFFER_OPERATION_OES* = 0x0506.GLenum
+  GL_VERTEX_ID_SWIZZLE_AMD* = 0x91A5.GLenum
+  GL_USE_MISSING_GLYPH_NV* = 0x90AA.GLenum
+  GL_LUMINANCE8_EXT* = 0x8040.GLenum
+  GL_INT_VEC2* = 0x8B53.GLenum
+  GL_TEXTURE9* = 0x84C9.GLenum
+  GL_RGB32UI_EXT* = 0x8D71.GLenum
+  GL_FENCE_CONDITION_NV* = 0x84F4.GLenum
+  GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT* = 0x8E4C.GLenum
+  GL_HSL_SATURATION_NV* = 0x92AE.GLenum
+  GL_CMYKA_EXT* = 0x800D.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_NV* = 0x8C8E.GLenum
+  GL_BUFFER_MAP_POINTER_OES* = 0x88BD.GLenum
+  GL_STORAGE_CLIENT_APPLE* = 0x85B4.GLenum
+  GL_VERTEX_ARRAY_BUFFER_BINDING_ARB* = 0x8896.GLenum
+  GL_TEXTURE_INTERNAL_FORMAT* = 0x1003.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED* = 0x8E23.GLenum
+  GL_UNSIGNED_INT_VEC3* = 0x8DC7.GLenum
+  GL_TRACE_MASK_MESA* = 0x8755.GLenum
+  GL_MAP_READ_BIT_EXT* = 0x0001.GLbitfield
+  GL_READ_FRAMEBUFFER_EXT* = 0x8CA8.GLenum
+  GL_HISTOGRAM_GREEN_SIZE* = 0x8029.GLenum
+  GL_COLOR_TABLE_INTENSITY_SIZE_SGI* = 0x80DF.GLenum
+  GL_SMALL_CCW_ARC_TO_NV* = 0x12.GLenum
+  GL_RELATIVE_LARGE_CW_ARC_TO_NV* = 0x19.GLenum
+  GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI* = 0x80BA.GLenum
+  GL_SCISSOR_BIT* = 0x00080000.GLbitfield
+  GL_DRAW_BUFFER0_ATI* = 0x8825.GLenum
+  GL_GEOMETRY_SHADER_BIT* = 0x00000004.GLbitfield
+  GL_CLIP_FAR_HINT_PGI* = 0x1A221.GLenum
+  GL_TEXTURE_COMPARE_FUNC_EXT* = 0x884D.GLenum
+  GL_IS_ROW_MAJOR* = 0x9300.GLenum
+  GL_MAP1_VERTEX_4* = 0x0D98.GLenum
+  GL_OUTPUT_TEXTURE_COORD8_EXT* = 0x87A5.GLenum
+  GL_MAX_VERTEX_IMAGE_UNIFORMS* = 0x90CA.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE* = 0x8211.GLenum
+  GL_SOURCE1_ALPHA_ARB* = 0x8589.GLenum
+  GL_VIRTUAL_PAGE_SIZE_X_AMD* = 0x9195.GLenum
+  GL_CULL_FRAGMENT_NV* = 0x86E7.GLenum
+  GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS* = 0x92DC.GLenum
+  GL_QUERY_COUNTER_BITS_EXT* = 0x8864.GLenum
+  GL_RGB565* = 0x8D62.GLenum
+  GL_OFFSET_TEXTURE_RECTANGLE_NV* = 0x864C.GLenum
+  GL_CONVOLUTION_FORMAT_EXT* = 0x8017.GLenum
+  GL_EYE_POINT_SGIS* = 0x81F4.GLenum
+  GL_ALPHA32F_ARB* = 0x8816.GLenum
+  GL_TEXTURE_DEPTH_SIZE* = 0x884A.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR* = 0x93D1.GLenum
+  GL_PRIMARY_COLOR_NV* = 0x852C.GLenum
+  GL_BLEND_DST_ALPHA_EXT* = 0x80CA.GLenum
+  GL_NORMALIZE* = 0x0BA1.GLenum
+  GL_POST_CONVOLUTION_GREEN_BIAS_EXT* = 0x8021.GLenum
+  GL_HI_SCALE_NV* = 0x870E.GLenum
+  GL_TESS_EVALUATION_PROGRAM_NV* = 0x891F.GLenum
+  GL_MAX_DUAL_SOURCE_DRAW_BUFFERS* = 0x88FC.GLenum
+  GL_SWIZZLE_STRQ_ATI* = 0x897A.GLenum
+  GL_READ_FRAMEBUFFER_NV* = 0x8CA8.GLenum
+  GL_MATRIX_INDEX_ARRAY_STRIDE_OES* = 0x8848.GLenum
+  GL_MIN_SPARSE_LEVEL_ARB* = 0x919B.GLenum
+  GL_RG32UI* = 0x823C.GLenum
+  GL_SAMPLER_2D_ARRAY_EXT* = 0x8DC1.GLenum
+  GL_TEXTURE22_ARB* = 0x84D6.GLenum
+  GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS* = 0x8A32.GLenum
+  GL_CULL_VERTEX_EYE_POSITION_EXT* = 0x81AB.GLenum
+  GL_TEXTURE_BUFFER* = 0x8C2A.GLenum
+  GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB* = 0x851C.GLenum
+  GL_NORMAL_ARRAY_COUNT_EXT* = 0x8080.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV* = 0x8D56.GLenum
+  GL_ELEMENT_ARRAY_BARRIER_BIT_EXT* = 0x00000002.GLbitfield
+  GL_VERTEX_ARRAY_COUNT_EXT* = 0x807D.GLenum
+  GL_PROGRAM_ERROR_STRING_NV* = 0x8874.GLenum
+  GL_INVALID_FRAMEBUFFER_OPERATION* = 0x0506.GLenum
+  GL_RGB9_E5* = 0x8C3D.GLenum
+  GL_GREEN_BITS* = 0x0D53.GLenum
+  GL_CLIP_DISTANCE0* = 0x3000.GLenum
+  GL_COMBINER_SUM_OUTPUT_NV* = 0x854C.GLenum
+  GL_COLOR_ARRAY* = 0x8076.GLenum
+  GL_RGBA8_SNORM* = 0x8F97.GLenum
+  GL_PROGRAM_BINDING_ARB* = 0x8677.GLenum
+  GL_4PASS_0_EXT* = 0x80A4.GLenum
+  GL_STATIC_DRAW* = 0x88E4.GLenum
+  GL_TEXTURE_COMPRESSED_BLOCK_WIDTH* = 0x82B1.GLenum
+  GL_TEXTURE_STORAGE_SPARSE_BIT_AMD* = 0x00000001.GLbitfield
+  GL_MEDIUM_INT* = 0x8DF4.GLenum
+  GL_TEXTURE13_ARB* = 0x84CD.GLenum
+  GL_LUMINANCE_ALPHA16F_ARB* = 0x881F.GLenum
+  GL_CONTEXT_CORE_PROFILE_BIT* = 0x00000001.GLbitfield
+  GL_LOCATION_COMPONENT* = 0x934A.GLenum
+  GL_TEXTURE_RECTANGLE* = 0x84F5.GLenum
+  GL_SAMPLER_2D_ARB* = 0x8B5E.GLenum
+  GL_FLOAT_RG32_NV* = 0x8887.GLenum
+  GL_SKIP_DECODE_EXT* = 0x8A4A.GLenum
+  GL_LIGHT6* = 0x4006.GLenum
+  GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD* = 0x87EE.GLenum
+  GL_NOOP* = 0x1505.GLenum
+  GL_DEPTH_BUFFER_BIT* = 0x00000100.GLbitfield
+  GL_FRAMEBUFFER_BINDING_ANGLE* = 0x8CA6.GLenum
+  GL_DEBUG_TYPE_POP_GROUP_KHR* = 0x826A.GLenum
+  GL_SAMPLER_2D_RECT_SHADOW* = 0x8B64.GLenum
+  GL_CONSERVE_MEMORY_HINT_PGI* = 0x1A1FD.GLenum
+  GL_QUERY_BY_REGION_NO_WAIT* = 0x8E16.GLenum
+  GL_UNSIGNED_INT_SAMPLER_CUBE* = 0x8DD4.GLenum
+  GL_LUMINANCE4_EXT* = 0x803F.GLenum
+  GL_COLOR_ARRAY_STRIDE* = 0x8083.GLenum
+  GL_SAMPLER_2D_ARRAY_SHADOW_NV* = 0x8DC4.GLenum
+  GL_REFERENCED_BY_GEOMETRY_SHADER* = 0x9309.GLenum
+  GL_SIGNED_RGB_UNSIGNED_ALPHA_NV* = 0x870C.GLenum
+  GL_OBJECT_PLANE* = 0x2501.GLenum
+  GL_Q* = 0x2003.GLenum
+  GL_MAX_SPOT_EXPONENT_NV* = 0x8505.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_LONG* = 0x874E.GLenum
+  GL_COLOR_ATTACHMENT3* = 0x8CE3.GLenum
+  GL_TEXTURE_BINDING_RENDERBUFFER_NV* = 0x8E53.GLenum
+  GL_EXCLUSION_NV* = 0x92A0.GLenum
+  GL_EDGE_FLAG_ARRAY_ADDRESS_NV* = 0x8F26.GLenum
+  GL_PRIMARY_COLOR_ARB* = 0x8577.GLenum
+  GL_LUMINANCE_ALPHA_FLOAT16_ATI* = 0x881F.GLenum
+  GL_TRACE_TEXTURES_BIT_MESA* = 0x0008.GLbitfield
+  GL_FRAMEBUFFER_OES* = 0x8D40.GLenum
+  GL_PIXEL_MAG_FILTER_EXT* = 0x8331.GLenum
+  GL_IMAGE_BINDING_LAYERED_EXT* = 0x8F3C.GLenum
+  GL_PATH_MITER_LIMIT_NV* = 0x907A.GLenum
+  GL_PROJECTION_MATRIX* = 0x0BA7.GLenum
+  GL_TEXTURE23_ARB* = 0x84D7.GLenum
+  GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE* = 0x8A07.GLenum
+  GL_RGB32F_ARB* = 0x8815.GLenum
+  GL_RED_SCALE* = 0x0D14.GLenum
+  GL_GEOMETRY_INPUT_TYPE_ARB* = 0x8DDB.GLenum
+  GL_EVAL_VERTEX_ATTRIB13_NV* = 0x86D3.GLenum
+  GL_INT64_NV* = 0x140E.GLenum
+  GL_VIEW_CLASS_24_BITS* = 0x82C9.GLenum
+  GL_FRAGMENT_LIGHT2_SGIX* = 0x840E.GLenum
+  GL_LUMINANCE12_ALPHA12_EXT* = 0x8047.GLenum
+  GL_MAP2_VERTEX_ATTRIB2_4_NV* = 0x8672.GLenum
+  GL_POINT_SIZE_MIN_SGIS* = 0x8126.GLenum
+  GL_DEBUG_TYPE_OTHER_ARB* = 0x8251.GLenum
+  GL_MAP2_VERTEX_ATTRIB0_4_NV* = 0x8670.GLenum
+  GL_DEBUG_PRINT_MESA* = 0x875A.GLenum
+  GL_TEXTURE_PRIORITY* = 0x8066.GLenum
+  GL_PIXEL_MAP_I_TO_G* = 0x0C73.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_DIVISOR* = 0x88FE.GLenum
+  GL_TEXTURE_CUBE_MAP_ARB* = 0x8513.GLenum
+  GL_LUMINANCE8_SNORM* = 0x9015.GLenum
+  GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT* = 0x00004000.GLbitfield
+  GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS* = 0x8E1F.GLenum
+  GL_BUFFER_STORAGE_FLAGS* = 0x8220.GLenum
+  GL_DEPTH_COMPONENT24_SGIX* = 0x81A6.GLenum
+  GL_UNIFORM_OFFSET* = 0x8A3B.GLenum
+  GL_TEXTURE_DT_SIZE_NV* = 0x871E.GLenum
+  GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI* = 0x80B7.GLenum
+  GL_DEPTH32F_STENCIL8_NV* = 0x8DAC.GLenum
+  GL_STENCIL_FUNC* = 0x0B92.GLenum
+  GL_NEAREST_MIPMAP_LINEAR* = 0x2702.GLint
+  GL_COMPRESSED_LUMINANCE_LATC1_EXT* = 0x8C70.GLenum
+  GL_TEXTURE_BORDER* = 0x1005.GLenum
+  GL_COLOR_ATTACHMENT14_NV* = 0x8CEE.GLenum
+  GL_TEXTURE_STORAGE_HINT_APPLE* = 0x85BC.GLenum
+  GL_VERTEX_ARRAY_RANGE_NV* = 0x851D.GLenum
+  GL_COLOR_ARRAY_SIZE_EXT* = 0x8081.GLenum
+  GL_INTERNALFORMAT_SUPPORTED* = 0x826F.GLenum
+  GL_MULTISAMPLE_BIT_ARB* = 0x20000000.GLbitfield
+  GL_RGB* = 0x1907.GLenum
+  GL_TRANSFORM_FEEDBACK_PAUSED* = 0x8E23.GLenum
+  GL_ALPHA8* = 0x803C.GLenum
+  GL_STENCIL_FAIL* = 0x0B94.GLenum
+  GL_PACK_SKIP_IMAGES_EXT* = 0x806B.GLenum
+  GL_FOG_COORDINATE_ARRAY_TYPE_EXT* = 0x8454.GLenum
+  GL_RESCALE_NORMAL_EXT* = 0x803A.GLenum
+  GL_LERP_ATI* = 0x8969.GLenum
+  GL_MATRIX_INDEX_ARRAY_STRIDE_ARB* = 0x8848.GLenum
+  GL_PROGRAM_LENGTH_NV* = 0x8627.GLenum
+  GL_UNSIGNED_INT_SAMPLER_3D_EXT* = 0x8DD3.GLenum
+  GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT* = 0x8DBE.GLenum
+  GL_UNSIGNED_INT_24_8_NV* = 0x84FA.GLenum
+  GL_POINT_SIZE_MIN_ARB* = 0x8126.GLenum
+  GL_COMP_BIT_ATI* = 0x00000002.GLbitfield
+  GL_NORMAL_ARRAY_ADDRESS_NV* = 0x8F22.GLenum
+  GL_TEXTURE9_ARB* = 0x84C9.GLenum
+  GL_MAX_GEOMETRY_OUTPUT_COMPONENTS* = 0x9124.GLenum
+  GL_DOUBLEBUFFER* = 0x0C32.GLenum
+  GL_OFFSET_TEXTURE_2D_BIAS_NV* = 0x86E3.GLenum
+  GL_ACTIVE_PROGRAM_EXT* = 0x8B8D.GLenum
+  GL_PARTIAL_SUCCESS_NV* = 0x902E.GLenum
+  GL_SUBTRACT* = 0x84E7.GLenum
+  GL_DUAL_INTENSITY4_SGIS* = 0x8118.GLenum
+  GL_FILL* = 0x1B02.GLenum
+  GL_COMPRESSED_SRGB_ALPHA* = 0x8C49.GLenum
+  GL_RENDERBUFFER_OES* = 0x8D41.GLenum
+  GL_PIXEL_MAP_R_TO_R_SIZE* = 0x0CB6.GLenum
+  GL_TEXTURE_LUMINANCE_TYPE_ARB* = 0x8C14.GLenum
+  GL_TEXTURE_BUFFER_FORMAT_EXT* = 0x8C2E.GLenum
+  GL_OUTPUT_TEXTURE_COORD13_EXT* = 0x87AA.GLenum
+  GL_LINES_ADJACENCY_ARB* = 0x000A.GLenum
+  GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV* = 0x8F44.GLenum
+  GL_INTENSITY32UI_EXT* = 0x8D73.GLenum
+  GL_PACK_IMAGE_HEIGHT* = 0x806C.GLenum
+  GL_HI_BIAS_NV* = 0x8714.GLenum
+  GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB* = 0x824E.GLenum
+  GL_LINE_STIPPLE* = 0x0B24.GLenum
+  GL_INDEX_LOGIC_OP* = 0x0BF1.GLenum
+  GL_CON_18_ATI* = 0x8953.GLenum
+  GL_QUERY_RESULT* = 0x8866.GLenum
+  GL_FRAGMENT_PROGRAM_NV* = 0x8870.GLenum
+  GL_MATRIX1_NV* = 0x8631.GLenum
+  GL_FUNC_SUBTRACT_OES* = 0x800A.GLenum
+  GL_PIXEL_MAP_I_TO_A_SIZE* = 0x0CB5.GLenum
+  GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT* = 0x8365.GLenum
+  GL_OUTPUT_TEXTURE_COORD20_EXT* = 0x87B1.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT* = 0x00000001.GLbitfield
+  GL_TRIANGULAR_NV* = 0x90A5.GLenum
+  GL_TEXTURE_COMPARE_MODE_EXT* = 0x884C.GLenum
+  GL_SECONDARY_COLOR_ARRAY_SIZE_EXT* = 0x845A.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT* = 0x8DA7.GLenum
+  GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE* = 0x83F3.GLenum
+  GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB* = 0x9345.GLenum
+  GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB* = 0x889A.GLenum
+  GL_PROGRAM_FORMAT_ARB* = 0x8876.GLenum
+  GL_QUAD_INTENSITY4_SGIS* = 0x8122.GLenum
+  GL_REPLICATE_BORDER* = 0x8153.GLenum
+  GL_PN_TRIANGLES_ATI* = 0x87F0.GLenum
+  GL_DEPTH_TEXTURE_MODE* = 0x884B.GLenum
+  GL_VARIABLE_C_NV* = 0x8525.GLenum
+  GL_CLIP_PLANE0_IMG* = 0x3000.GLenum
+  GL_FRONT_LEFT* = 0x0400.GLenum
+  GL_MATRIX3_ARB* = 0x88C3.GLenum
+  GL_BLEND_EQUATION_ALPHA_EXT* = 0x883D.GLenum
+  GL_BGRA8_EXT* = 0x93A1.GLenum
+  GL_INTERLACE_READ_INGR* = 0x8568.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE* = 0x8E24.GLenum
+  GL_MAP1_VERTEX_ATTRIB13_4_NV* = 0x866D.GLenum
+  GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX* = 0x8186.GLenum
+  GL_UNSIGNED_INT_SAMPLER_2D_ARRAY* = 0x8DD7.GLenum
+  GL_ALL_SHADER_BITS_EXT* = 0xFFFFFFFF.GLbitfield
+  GL_ONE_MINUS_SRC1_ALPHA* = 0x88FB.GLenum
+  GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE* = 0x851E.GLenum
+  GL_PROXY_COLOR_TABLE_SGI* = 0x80D3.GLenum
+  GL_MAX_RENDERBUFFER_SIZE_OES* = 0x84E8.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_ENABLED* = 0x8622.GLenum
+  GL_TEXTURE_BINDING_2D_MULTISAMPLE* = 0x9104.GLenum
+  GL_STENCIL_BUFFER_BIT0_QCOM* = 0x00010000.GLbitfield
+  GL_IMAGE_BINDING_FORMAT_EXT* = 0x906E.GLenum
+  GL_RENDERBUFFER_SAMPLES_NV* = 0x8CAB.GLenum
+  GL_ACCUM_GREEN_BITS* = 0x0D59.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER* = 0x90ED.GLenum
+  GL_FRAMEBUFFER_UNDEFINED* = 0x8219.GLenum
+  GL_OFFSET_TEXTURE_2D_NV* = 0x86E8.GLenum
+  GL_POST_CONVOLUTION_RED_BIAS* = 0x8020.GLenum
+  GL_DRAW_BUFFER8* = 0x882D.GLenum
+  GL_MAP_INVALIDATE_RANGE_BIT* = 0x0004.GLbitfield
+  GL_ALWAYS* = 0x0207.GLenum
+  GL_ALPHA_MIN_SGIX* = 0x8320.GLenum
+  GL_SOURCE0_RGB_ARB* = 0x8580.GLenum
+  GL_POINT_SIZE_ARRAY_POINTER_OES* = 0x898C.GLenum
+  GL_CUBIC_EXT* = 0x8334.GLenum
+  GL_MAP2_NORMAL* = 0x0DB2.GLenum
+  GL_TEXTURE_RESIDENT_EXT* = 0x8067.GLenum
+  GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB* = 0x8C2D.GLenum
+  GL_BUMP_NUM_TEX_UNITS_ATI* = 0x8777.GLenum
+  GL_TEXTURE_LOD_BIAS_T_SGIX* = 0x818F.GLenum
+  GL_FONT_UNDERLINE_POSITION_BIT_NV* = 0x04000000.GLbitfield
+  GL_NORMAL_ARRAY_STRIDE* = 0x807F.GLenum
+  GL_CONDITION_SATISFIED_APPLE* = 0x911C.GLenum
+  GL_POINT_SIZE_MIN* = 0x8126.GLenum
+  GL_SPARE0_PLUS_SECONDARY_COLOR_NV* = 0x8532.GLenum
+  GL_LAYOUT_DEFAULT_INTEL* = 0.GLenum
+  GL_FRAMEBUFFER_BINDING* = 0x8CA6.GLenum
+  GL_HIGH_FLOAT* = 0x8DF2.GLenum
+  GL_NO_RESET_NOTIFICATION_ARB* = 0x8261.GLenum
+  GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV* = 0x864D.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV* = 0x8F20.GLenum
+  GL_VIEW_CLASS_96_BITS* = 0x82C5.GLenum
+  GL_BACK_RIGHT* = 0x0403.GLenum
+  GL_BLEND_EQUATION_ALPHA* = 0x883D.GLenum
+  GL_DISTANCE_ATTENUATION_SGIS* = 0x8129.GLenum
+  GL_PROXY_TEXTURE_CUBE_MAP_ARRAY* = 0x900B.GLenum
+  GL_RG16* = 0x822C.GLenum
+  GL_UNDEFINED_VERTEX* = 0x8260.GLenum
+  GL_PATH_DASH_OFFSET_NV* = 0x907E.GLenum
+  GL_ALL_ATTRIB_BITS* = 0xFFFFFFFF.GLbitfield
+  GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE* = 0x8A04.GLenum
+  GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI* = 0x80B3.GLenum
+  GL_TIME_ELAPSED_EXT* = 0x88BF.GLenum
+  GL_MAP2_VERTEX_3* = 0x0DB7.GLenum
+  GL_MAX_PROGRAM_RESULT_COMPONENTS_NV* = 0x8909.GLenum
+  GL_SAMPLER_2D_RECT_SHADOW_ARB* = 0x8B64.GLenum
+  GL_REFERENCE_PLANE_SGIX* = 0x817D.GLenum
+  GL_LUMINANCE4_ALPHA4_EXT* = 0x8043.GLenum
+  GL_PATH_FILL_MASK_NV* = 0x9081.GLenum
+  GL_FILTER* = 0x829A.GLenum
+  GL_INT_SAMPLER_2D_ARRAY* = 0x8DCF.GLenum
+  GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV* = 0x8908.GLenum
+  GL_EVAL_VERTEX_ATTRIB2_NV* = 0x86C8.GLenum
+  GL_NAND* = 0x150E.GLenum
+  GL_BLEND_SRC_RGB* = 0x80C9.GLenum
+  GL_OPERAND2_ALPHA_EXT* = 0x859A.GLenum
+  GL_IMAGE_1D_EXT* = 0x904C.GLenum
+  GL_CONVOLUTION_FILTER_SCALE* = 0x8014.GLenum
+  GL_IMAGE_CLASS_2_X_16* = 0x82BD.GLenum
+  GL_VIEW_CLASS_BPTC_FLOAT* = 0x82D3.GLenum
+  GL_PROGRAM_INPUT* = 0x92E3.GLenum
+  GL_1PASS_SGIS* = 0x80A1.GLenum
+  GL_FOG_DISTANCE_MODE_NV* = 0x855A.GLenum
+  GL_STENCIL_INDEX16_EXT* = 0x8D49.GLenum
+  GL_POST_CONVOLUTION_RED_BIAS_EXT* = 0x8020.GLenum
+  GL_PIXEL_MAP_R_TO_R* = 0x0C76.GLenum
+  GL_3DC_XY_AMD* = 0x87FA.GLenum
+  GL_POINT_SIZE_MAX* = 0x8127.GLenum
+  GL_DOUBLE_MAT3x2* = 0x8F4B.GLenum
+  GL_DOUBLE_MAT4x2_EXT* = 0x8F4D.GLenum
+  GL_TEXTURE_HI_SIZE_NV* = 0x871B.GLenum
+  GL_MATRIX4_NV* = 0x8634.GLenum
+  GL_SPRITE_TRANSLATION_SGIX* = 0x814B.GLenum
+  GL_TEXTURE_FILTER_CONTROL_EXT* = 0x8500.GLenum
+  GL_SMOOTH_LINE_WIDTH_GRANULARITY* = 0x0B23.GLenum
+  GL_TEXTURE_BINDING_BUFFER* = 0x8C2C.GLenum
+  GL_INTENSITY4* = 0x804A.GLenum
+  GL_MAX_IMAGE_SAMPLES_EXT* = 0x906D.GLenum
+  GL_COLOR_ATTACHMENT12* = 0x8CEC.GLenum
+  GL_CLAMP_READ_COLOR* = 0x891C.GLenum
+  GL_ELEMENT_ARRAY_BUFFER_ARB* = 0x8893.GLenum
+  GL_MAP2_VERTEX_ATTRIB6_4_NV* = 0x8676.GLenum
+  GL_CONVOLUTION_HEIGHT_EXT* = 0x8019.GLenum
+  GL_SGX_PROGRAM_BINARY_IMG* = 0x9130.GLenum
+  GL_MAP1_TEXTURE_COORD_1* = 0x0D93.GLenum
+  GL_COMPRESSED_RGBA_ASTC_6x6_KHR* = 0x93B4.GLenum
+  GL_TEXTURE_APPLICATION_MODE_EXT* = 0x834F.GLenum
+  GL_TEXTURE_GATHER* = 0x82A2.GLenum
+  GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS* = 0x90DC.GLenum
+  GL_DEBUG_LOGGED_MESSAGES_KHR* = 0x9145.GLenum
+  GL_TEXTURE_VIEW_NUM_LEVELS* = 0x82DC.GLenum
+  GL_ENABLE_BIT* = 0x00002000.GLbitfield
+  GL_VERTEX_PROGRAM_TWO_SIDE_ARB* = 0x8643.GLenum
+  GL_INDEX_TEST_EXT* = 0x81B5.GLenum
+  GL_TEXTURE_WRAP_R* = 0x8072.GLenum
+  GL_MAX* = 0x8008.GLenum
+  GL_UNPACK_IMAGE_DEPTH_SGIS* = 0x8133.GLenum
+  GL_COLOR_ATTACHMENT13_NV* = 0x8CED.GLenum
+  GL_FOG_BIT* = 0x00000080.GLbitfield
+  GL_GEOMETRY_SHADER_EXT* = 0x8DD9.GLenum
+  GL_ALPHA_TEST_FUNC_QCOM* = 0x0BC1.GLenum
+  GL_DRAW_BUFFER10_EXT* = 0x882F.GLenum
+  GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB* = 0x880F.GLenum
+  GL_STENCIL_BACK_REF* = 0x8CA3.GLenum
+  GL_SAMPLER_1D_ARB* = 0x8B5D.GLenum
+  GL_DRAW_BUFFER* = 0x0C01.GLenum
+  GL_CLIENT_PIXEL_STORE_BIT* = 0x00000001.GLbitfield
+  GL_TEXTURE_STENCIL_SIZE* = 0x88F1.GLenum
+  GL_ELEMENT_ARRAY_APPLE* = 0x8A0C.GLenum
+  GL_CON_21_ATI* = 0x8956.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER* = 0x92C7.GLenum
+  GL_PIXEL_MAP_I_TO_B* = 0x0C74.GLenum
+  GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE* = 0x8A03.GLenum
+  GL_FOG_INDEX* = 0x0B61.GLenum
+  GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI* = 0x80D4.GLenum
+  GL_OUTPUT_TEXTURE_COORD29_EXT* = 0x87BA.GLenum
+  GL_TESS_CONTROL_SUBROUTINE* = 0x92E9.GLenum
+  GL_IMAGE_CUBE_MAP_ARRAY* = 0x9054.GLenum
+  GL_RGB_FLOAT32_ATI* = 0x8815.GLenum
+  GL_OBJECT_SHADER_SOURCE_LENGTH_ARB* = 0x8B88.GLenum
+  GL_COLOR_INDEX4_EXT* = 0x80E4.GLenum
+  GL_DRAW_BUFFER14* = 0x8833.GLenum
+  GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV* = 0x90BE.GLenum
+  GL_NATIVE_GRAPHICS_HANDLE_PGI* = 0x1A202.GLenum
+  GL_UNSIGNED_SHORT_5_6_5* = 0x8363.GLenum
+  GL_GREATER* = 0x0204.GLenum
+  GL_DATA_BUFFER_AMD* = 0x9151.GLenum
+  GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV* = 0x40.GLbitfield
+  GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2* = 0x9276.GLenum
+  GL_RELATIVE_MOVE_TO_NV* = 0x03.GLenum
+  GL_BLUE_INTEGER* = 0x8D96.GLenum
+  GL_BLUE_BIAS* = 0x0D1B.GLenum
+  GL_SHADER_TYPE* = 0x8B4F.GLenum
+  GL_TRANSFORM_FEEDBACK_BINDING* = 0x8E25.GLenum
+  GL_TEXTURE17_ARB* = 0x84D1.GLenum
+  GL_GREEN* = 0x1904.GLenum
+  GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS* = 0x8E89.GLenum
+  GL_DRAW_BUFFER6* = 0x882B.GLenum
+  GL_VALIDATE_STATUS* = 0x8B83.GLenum
+  GL_TEXTURE_COORD_ARRAY_ADDRESS_NV* = 0x8F25.GLenum
+  GL_MVP_MATRIX_EXT* = 0x87E3.GLenum
+  GL_PIXEL_BUFFER_BARRIER_BIT_EXT* = 0x00000080.GLbitfield
+  GL_MAX_VERTEX_VARYING_COMPONENTS_EXT* = 0x8DDE.GLenum
+  GL_STACK_OVERFLOW_KHR* = 0x0503.GLenum
+  GL_MAX_PROJECTION_STACK_DEPTH* = 0x0D38.GLenum
+  GL_SKIP_COMPONENTS3_NV* = -4
+  GL_DEBUG_ASSERT_MESA* = 0x875B.GLenum
+  GL_INSTRUMENT_BUFFER_POINTER_SGIX* = 0x8180.GLenum
+  GL_SAMPLE_ALPHA_TO_MASK_EXT* = 0x809E.GLenum
+  GL_REG_29_ATI* = 0x893E.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV* = 0x8C4E.GLenum
+  GL_DEBUG_CATEGORY_DEPRECATION_AMD* = 0x914B.GLenum
+  GL_DEPTH_STENCIL_TO_BGRA_NV* = 0x886F.GLenum
+  GL_UNSIGNED_INT_VEC3_EXT* = 0x8DC7.GLenum
+  GL_VERTEX_SHADER_EXT* = 0x8780.GLenum
+  GL_LIST_BASE* = 0x0B32.GLenum
+  GL_TEXTURE_STENCIL_SIZE_EXT* = 0x88F1.GLenum
+  GL_ACTIVE_PROGRAM* = 0x8259.GLenum
+  GL_RGBA_SIGNED_COMPONENTS_EXT* = 0x8C3C.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR* = 0x93DC.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE* = 0x8CD0.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE* = 0x8217.GLenum
+  GL_MATRIX7_ARB* = 0x88C7.GLenum
+  GL_FLOAT_VEC3_ARB* = 0x8B51.GLenum
+  GL_PACK_ROW_BYTES_APPLE* = 0x8A15.GLenum
+  GL_PIXEL_TILE_GRID_HEIGHT_SGIX* = 0x8143.GLenum
+  GL_UNIFORM_BLOCK* = 0x92E2.GLenum
+  GL_VIEWPORT_BIT* = 0x00000800.GLbitfield
+  GL_RENDERBUFFER_COVERAGE_SAMPLES_NV* = 0x8CAB.GLenum
+  GL_MAP1_BINORMAL_EXT* = 0x8446.GLenum
+  GL_SAMPLER_3D* = 0x8B5F.GLenum
+  GL_RENDERBUFFER_SAMPLES_APPLE* = 0x8CAB.GLenum
+  GL_DEPTH_WRITEMASK* = 0x0B72.GLenum
+  GL_MAP2_VERTEX_ATTRIB9_4_NV* = 0x8679.GLenum
+  GL_TEXTURE_COMPARE_FUNC* = 0x884D.GLenum
+  GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB* = 0x00000004.GLbitfield
+  GL_READ_BUFFER* = 0x0C02.GLenum
+  GL_ONE_MINUS_SRC1_COLOR* = 0x88FA.GLenum
+  GL_PROGRAM_FORMAT_ASCII_ARB* = 0x8875.GLenum
+  GL_DRAW_FRAMEBUFFER_APPLE* = 0x8CA9.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES* = 0x8CD0.GLenum
+  GL_BLEND_DST* = 0x0BE0.GLenum
+  GL_SHADER_OBJECT_EXT* = 0x8B48.GLenum
+  GL_UNSIGNALED* = 0x9118.GLenum
+  GL_VERTEX4_BIT_PGI* = 0x00000008.GLbitfield
+  GL_DRAW_FRAMEBUFFER_BINDING_APPLE* = 0x8CA6.GLenum
+  GL_IMAGE_CUBE_EXT* = 0x9050.GLenum
+  GL_CONTEXT_ROBUST_ACCESS_EXT* = 0x90F3.GLenum
+  GL_TEXTURE14_ARB* = 0x84CE.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_Y* = 0x8517.GLenum
+  GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV* = 0x8857.GLenum
+  GL_COMPRESSED_RG11_EAC_OES* = 0x9272.GLenum
+  GL_OP_DOT4_EXT* = 0x8785.GLenum
+  GL_FRAMEBUFFER_COMPLETE_EXT* = 0x8CD5.GLenum
+  GL_TEXTURE_COMPARE_FUNC_ARB* = 0x884D.GLenum
+  GL_TEXTURE_FILTER4_SIZE_SGIS* = 0x8147.GLenum
+  GL_ELEMENT_ARRAY_BUFFER_BINDING* = 0x8895.GLenum
+  GL_UNSIGNED_INT_IMAGE_BUFFER_EXT* = 0x9067.GLenum
+  GL_IMAGE_1D_ARRAY_EXT* = 0x9052.GLenum
+  GL_CLAMP_READ_COLOR_ARB* = 0x891C.GLenum
+  GL_COMPUTE_SUBROUTINE* = 0x92ED.GLenum
+  GL_R3_G3_B2* = 0x2A10.GLenum
+  GL_PATH_DASH_ARRAY_COUNT_NV* = 0x909F.GLenum
+  GL_SPOT_EXPONENT* = 0x1205.GLenum
+  GL_NUM_PROGRAM_BINARY_FORMATS_OES* = 0x87FE.GLenum
+  GL_SWIZZLE_STQ_ATI* = 0x8977.GLenum
+  GL_SYNC_FLUSH_COMMANDS_BIT_APPLE* = 0x00000001.GLbitfield
+  GL_VERTEX_STREAM6_ATI* = 0x8772.GLenum
+  GL_FRAGMENT_COLOR_MATERIAL_SGIX* = 0x8401.GLenum
+  GL_DYNAMIC_ATI* = 0x8761.GLenum
+  GL_SUB_ATI* = 0x8965.GLenum
+  GL_PREVIOUS_EXT* = 0x8578.GLenum
+  GL_MAP2_TEXTURE_COORD_1* = 0x0DB3.GLenum
+  GL_COLOR_SAMPLES_NV* = 0x8E20.GLenum
+  GL_HILO_NV* = 0x86F4.GLenum
+  GL_SHADER_STORAGE_BUFFER_BINDING* = 0x90D3.GLenum
+  GL_DUP_LAST_CUBIC_CURVE_TO_NV* = 0xF4.GLenum
+  GL_ACTIVE_SUBROUTINES* = 0x8DE5.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG* = 0x9134.GLenum
+  GL_INTENSITY16* = 0x804D.GLenum
+  GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB* = 0x88AF.GLenum
+  GL_TIMESTAMP_EXT* = 0x8E28.GLenum
+  GL_CLIENT_ACTIVE_TEXTURE* = 0x84E1.GLenum
+  GL_TEXTURE_BINDING_2D_ARRAY* = 0x8C1D.GLenum
+  GL_INT_SAMPLER_2D_RECT_EXT* = 0x8DCD.GLenum
+  GL_PREFER_DOUBLEBUFFER_HINT_PGI* = 0x1A1F8.GLenum
+  GL_TEXTURE_WIDTH* = 0x1000.GLenum
+  GL_CPU_OPTIMIZED_QCOM* = 0x8FB1.GLenum
+  GL_TEXTURE_IMAGE_TYPE* = 0x8290.GLenum
+  GL_MAX_VERTEX_UNIFORM_VECTORS* = 0x8DFB.GLenum
+  GL_MODULATE_SUBTRACT_ATI* = 0x8746.GLenum
+  GL_SYNC_STATUS* = 0x9114.GLenum
+  GL_IMAGE_2D_RECT_EXT* = 0x904F.GLenum
+  GL_MATRIX6_NV* = 0x8636.GLenum
+  GL_SOURCE1_RGB_ARB* = 0x8581.GLenum
+  GL_MAX_COMBINED_ATOMIC_COUNTERS* = 0x92D7.GLenum
+  GL_MAX_COMPUTE_LOCAL_INVOCATIONS* = 0x90EB.GLenum
+  GL_SAMPLER_CUBE* = 0x8B60.GLenum
+  GL_ALPHA_FLOAT32_ATI* = 0x8816.GLenum
+  GL_COMPRESSED_LUMINANCE_ARB* = 0x84EA.GLenum
+  GL_COMPRESSED_RGB8_ETC2_OES* = 0x9274.GLenum
+  GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR* = 0x8243.GLenum
+  GL_MINUS_CLAMPED_NV* = 0x92B3.GLenum
+  GL_REG_31_ATI* = 0x8940.GLenum
+  GL_ELEMENT_ARRAY_ADDRESS_NV* = 0x8F29.GLenum
+  GL_SRC1_COLOR* = 0x88F9.GLenum
+  GL_DEBUG_SEVERITY_LOW_ARB* = 0x9148.GLenum
+  GL_CON_3_ATI* = 0x8944.GLenum
+  GL_R32I* = 0x8235.GLenum
+  GL_BLEND_COLOR* = 0x8005.GLenum
+  GL_CLIP_PLANE4* = 0x3004.GLenum
+  GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT* = 0x00000001.GLbitfield
+  GL_FLOAT16_VEC4_NV* = 0x8FFB.GLenum
+  GL_DST_IN_NV* = 0x928B.GLenum
+  GL_VIRTUAL_PAGE_SIZE_Y_ARB* = 0x9196.GLenum
+  GL_COLOR_ATTACHMENT8_NV* = 0x8CE8.GLenum
+  GL_TESS_GEN_VERTEX_ORDER* = 0x8E78.GLenum
+  GL_LOSE_CONTEXT_ON_RESET_EXT* = 0x8252.GLenum
+  GL_PROGRAM_INSTRUCTIONS_ARB* = 0x88A0.GLenum
+  GL_TEXTURE_IMAGE_VALID_QCOM* = 0x8BD8.GLenum
+  GL_SAMPLE_MASK_VALUE_EXT* = 0x80AA.GLenum
+  GL_CURRENT_MATRIX_ARB* = 0x8641.GLenum
+  GL_DECR_WRAP_EXT* = 0x8508.GLenum
+  GL_BLUE_INTEGER_EXT* = 0x8D96.GLenum
+  GL_COMPRESSED_RG* = 0x8226.GLenum
+  GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV* = 0x88F4.GLenum
+  GL_MINMAX_EXT* = 0x802E.GLenum
+  GL_FLOAT_MAT4_ARB* = 0x8B5C.GLenum
+  GL_TEXTURE_CLIPMAP_FRAME_SGIX* = 0x8172.GLenum
+  GL_PIXEL_UNPACK_BUFFER_EXT* = 0x88EC.GLenum
+  GL_TEXTURE5_ARB* = 0x84C5.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_RECT* = 0x9065.GLenum
+  GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS* = 0x91BC.GLenum
+  GL_DEPTH_COMPONENT* = 0x1902.GLenum
+  GL_RG32F_EXT* = 0x8230.GLenum
+  GL_FACTOR_ALPHA_MODULATE_IMG* = 0x8C07.GLenum
+  GL_VERTEX_ARRAY_TYPE_EXT* = 0x807B.GLenum
+  GL_DS_BIAS_NV* = 0x8716.GLenum
+  GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI* = 0x1A203.GLenum
+  GL_ALPHA16UI_EXT* = 0x8D78.GLenum
+  GL_DOUBLE_VEC2* = 0x8FFC.GLenum
+  GL_MAP1_VERTEX_ATTRIB12_4_NV* = 0x866C.GLenum
+  GL_4D_COLOR_TEXTURE* = 0x0604.GLenum
+  GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS* = 0x90D6.GLenum
+  GL_SPECULAR* = 0x1202.GLenum
+  GL_TOP_LEVEL_ARRAY_SIZE* = 0x930C.GLenum
+  GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB* = 0x919A.GLenum
+  GL_COVERAGE_SAMPLES_NV* = 0x8ED4.GLenum
+  GL_SIGNALED_APPLE* = 0x9119.GLenum
+  GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR* = 0x824D.GLenum
+  GL_BUFFER_KHR* = 0x82E0.GLenum
+  GL_GEOMETRY_TEXTURE* = 0x829E.GLenum
+  GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV* = 0x8E5E.GLenum
+  GL_EVAL_VERTEX_ATTRIB7_NV* = 0x86CD.GLenum
+  GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV* = 0x80.GLbitfield
+  GL_BINORMAL_ARRAY_POINTER_EXT* = 0x8443.GLenum
+  GL_AUX3* = 0x040C.GLenum
+  GL_MULTISAMPLE_BIT_EXT* = 0x20000000.GLbitfield
+  GL_COLOR_TABLE_FORMAT_SGI* = 0x80D8.GLenum
+  GL_VERTEX_PROGRAM_POINT_SIZE* = 0x8642.GLenum
+  GL_LINE_WIDTH_GRANULARITY* = 0x0B23.GLenum
+  GL_MAX_VERTEX_ATTRIB_BINDINGS* = 0x82DA.GLenum
+  GL_TEXTURE_BINDING_2D_ARRAY_EXT* = 0x8C1D.GLenum
+  GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST* = 0x82AC.GLenum
+  GL_SCALE_BY_FOUR_NV* = 0x853F.GLenum
+  GL_VIRTUAL_PAGE_SIZE_Z_AMD* = 0x9197.GLenum
+  GL_TEXTURE16* = 0x84D0.GLenum
+  GL_DSDT8_MAG8_NV* = 0x870A.GLenum
+  GL_OP_FLOOR_EXT* = 0x878F.GLenum
+  GL_MAX_PROGRAM_IF_DEPTH_NV* = 0x88F6.GLenum
+  GL_VERTEX_ARRAY_LIST_IBM* = 103070.GLenum
+  GL_COMPRESSED_SIGNED_RED_RGTC1* = 0x8DBC.GLenum
+  GL_CUBIC_CURVE_TO_NV* = 0x0C.GLenum
+  GL_PROXY_POST_CONVOLUTION_COLOR_TABLE* = 0x80D4.GLenum
+  GL_SIGNED_IDENTITY_NV* = 0x853C.GLenum
+  GL_EVAL_VERTEX_ATTRIB6_NV* = 0x86CC.GLenum
+  GL_MODELVIEW10_ARB* = 0x872A.GLenum
+  GL_MULTISAMPLE_3DFX* = 0x86B2.GLenum
+  GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG* = 0x8C00.GLenum
+  GL_DSDT_MAG_VIB_NV* = 0x86F7.GLenum
+  GL_TEXCOORD4_BIT_PGI* = 0x80000000.GLbitfield
+  GL_TRANSFORM_FEEDBACK_BARRIER_BIT* = 0x00000800.GLbitfield
+  GL_EVAL_VERTEX_ATTRIB10_NV* = 0x86D0.GLenum
+  GL_DRAW_BUFFER13_ARB* = 0x8832.GLenum
+  GL_RENDERBUFFER_STENCIL_SIZE_OES* = 0x8D55.GLenum
+  GL_INTENSITY8I_EXT* = 0x8D91.GLenum
+  GL_STENCIL_BACK_PASS_DEPTH_FAIL* = 0x8802.GLenum
+  GL_INTENSITY32F_ARB* = 0x8817.GLenum
+  GL_CURRENT_ATTRIB_NV* = 0x8626.GLenum
+  GL_POLYGON_BIT* = 0x00000008.GLbitfield
+  GL_COMBINE_RGB* = 0x8571.GLenum
+  GL_MAX_FRAMEBUFFER_HEIGHT* = 0x9316.GLenum
+  GL_FRAMEBUFFER_BINDING_OES* = 0x8CA6.GLenum
+  GL_TEXTURE_GREEN_TYPE* = 0x8C11.GLenum
+  GL_LINE_TO_NV* = 0x04.GLenum
+  GL_FUNC_ADD_EXT* = 0x8006.GLenum
+  GL_TEXTURE_LOD_BIAS* = 0x8501.GLenum
+  GL_QUAD_INTENSITY8_SGIS* = 0x8123.GLenum
+  GL_SECONDARY_COLOR_ARRAY_EXT* = 0x845E.GLenum
+  GL_UNPACK_COMPRESSED_SIZE_SGIX* = 0x831A.GLenum
+  GL_RGBA_INTEGER* = 0x8D99.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_SIZE* = 0x92C3.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE* = 0x8D56.GLenum
+  GL_OBJECT_DISTANCE_TO_LINE_SGIS* = 0x81F3.GLenum
+  GL_DEPTH_BUFFER_BIT3_QCOM* = 0x00000800.GLbitfield
+  GL_RGB16_SNORM* = 0x8F9A.GLenum
+  GL_MATRIX_INDEX_ARRAY_TYPE_ARB* = 0x8847.GLenum
+  GL_TRANSLATE_X_NV* = 0x908E.GLenum
+  GL_BUFFER_ACCESS_FLAGS* = 0x911F.GLenum
+  GL_IS_PER_PATCH* = 0x92E7.GLenum
+  GL_PATH_GEN_MODE_NV* = 0x90B0.GLenum
+  GL_ALPHA_MIN_CLAMP_INGR* = 0x8563.GLenum
+  GL_LUMINANCE_ALPHA32I_EXT* = 0x8D87.GLenum
+  GL_BUFFER_USAGE_ARB* = 0x8765.GLenum
+  GL_POINT_SIZE* = 0x0B11.GLenum
+  GL_INVARIANT_EXT* = 0x87C2.GLenum
+  GL_IMAGE_BINDING_NAME* = 0x8F3A.GLenum
+  GL_BLEND_SRC_ALPHA* = 0x80CB.GLenum
+  GL_OUTPUT_TEXTURE_COORD23_EXT* = 0x87B4.GLenum
+  GL_EYE_PLANE* = 0x2502.GLenum
+  GL_BOOL_VEC4_ARB* = 0x8B59.GLenum
+  GL_MITER_REVERT_NV* = 0x90A7.GLenum
+  GL_SYNC_X11_FENCE_EXT* = 0x90E1.GLenum
+  GL_GEOMETRY_SHADER_INVOCATIONS* = 0x887F.GLenum
+  GL_DRAW_BUFFER5_ATI* = 0x882A.GLenum
+  GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB* = 0x889D.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT* = 0x906B.GLenum
+  GL_PIXEL_TEX_GEN_Q_ROUND_SGIX* = 0x8185.GLenum
+  GL_DOUBLE_MAT3x2_EXT* = 0x8F4B.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB* = 0x8516.GLenum
+  GL_MOV_ATI* = 0x8961.GLenum
+  GL_COLOR4_BIT_PGI* = 0x00020000.GLbitfield
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR* = 0x93DD.GLenum
+  GL_DEPTH_BOUNDS_TEST_EXT* = 0x8890.GLenum
+  GL_DST_OVER_NV* = 0x9289.GLenum
+  GL_PIXEL_MAP_I_TO_I_SIZE* = 0x0CB0.GLenum
+  GL_ALPHA16F_EXT* = 0x881C.GLenum
+  GL_RENDERBUFFER_BINDING_EXT* = 0x8CA7.GLenum
+  GL_MATRIX25_ARB* = 0x88D9.GLenum
+  GL_OUTPUT_TEXTURE_COORD19_EXT* = 0x87B0.GLenum
+  GL_NORMAL_MAP* = 0x8511.GLenum
+  GL_GPU_ADDRESS_NV* = 0x8F34.GLenum
+  GL_STREAM_READ* = 0x88E1.GLenum
+  GL_MIRRORED_REPEAT* = 0x8370.GLint
+  GL_TEXTURE_SWIZZLE_RGBA* = 0x8E46.GLenum
+  GL_HALF_BIAS_NORMAL_NV* = 0x853A.GLenum
+  GL_STENCIL_BACK_OP_VALUE_AMD* = 0x874D.GLenum
+  GL_TEXTURE_BLUE_TYPE_ARB* = 0x8C12.GLenum
+  GL_MODELVIEW_PROJECTION_NV* = 0x8629.GLenum
+  GL_ACTIVE_UNIFORM_MAX_LENGTH* = 0x8B87.GLenum
+  GL_TEXTURE_SWIZZLE_RGBA_EXT* = 0x8E46.GLenum
+  GL_TEXTURE_GEN_T* = 0x0C61.GLenum
+  GL_HILO16_NV* = 0x86F8.GLenum
+  GL_CURRENT_QUERY_EXT* = 0x8865.GLenum
+  GL_FLOAT16_VEC2_NV* = 0x8FF9.GLenum
+  GL_RGBA_FLOAT_MODE_ARB* = 0x8820.GLenum
+  GL_POINT_SIZE_ARRAY_TYPE_OES* = 0x898A.GLenum
+  GL_GENERATE_MIPMAP_HINT* = 0x8192.GLenum
+  GL_1PASS_EXT* = 0x80A1.GLenum
+  GL_SWIZZLE_STQ_DQ_ATI* = 0x8979.GLenum
+  GL_VERTICAL_LINE_TO_NV* = 0x08.GLenum
+  GL_MINMAX* = 0x802E.GLenum
+  GL_RENDERBUFFER_ALPHA_SIZE_EXT* = 0x8D53.GLenum
+  GL_DEPTH_COMPONENT32F* = 0x8CAC.GLenum
+  GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV* = 0x9025.GLenum
+  GL_CLIP_PLANE5_IMG* = 0x3005.GLenum
+  GL_TEXTURE_2D_MULTISAMPLE* = 0x9100.GLenum
+  GL_PREVIOUS* = 0x8578.GLenum
+  GL_CULL_MODES_NV* = 0x86E0.GLenum
+  GL_TRACE_ARRAYS_BIT_MESA* = 0x0004.GLbitfield
+  GL_MAX_ACTIVE_LIGHTS_SGIX* = 0x8405.GLenum
+  GL_PRIMITIVE_ID_NV* = 0x8C7C.GLenum
+  GL_DEPTH_COMPONENT16* = 0x81A5.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_LAYERED* = 0x8DA7.GLenum
+  GL_MAX_FRAGMENT_UNIFORM_BLOCKS* = 0x8A2D.GLenum
+  GL_OUTPUT_COLOR0_EXT* = 0x879B.GLenum
+  GL_RGBA16F_EXT* = 0x881A.GLenum
+  GL_MAX_PALETTE_MATRICES_OES* = 0x8842.GLenum
+  GL_VIEW_CLASS_64_BITS* = 0x82C6.GLenum
+  GL_TRACE_ALL_BITS_MESA* = 0xFFFF.GLbitfield
+  GL_REPLACE_VALUE_AMD* = 0x874B.GLenum
+  GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP* = 0x8163.GLenum
+  GL_BGR_INTEGER* = 0x8D9A.GLenum
+  GL_MAX_DEBUG_LOGGED_MESSAGES_ARB* = 0x9144.GLenum
+  GL_FOG_COLOR* = 0x0B66.GLenum
+  GL_MAX_MULTIVIEW_BUFFERS_EXT* = 0x90F2.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER* = 0x8C8E.GLenum
+  GL_E_TIMES_F_NV* = 0x8531.GLenum
+  GL_COLOR_TABLE_WIDTH_SGI* = 0x80D9.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_SIZE* = 0x8623.GLenum
+  GL_422_REV_AVERAGE_EXT* = 0x80CF.GLenum
+  GL_WRITE_DISCARD_NV* = 0x88BE.GLenum
+  GL_DRAW_BUFFER0_EXT* = 0x8825.GLenum
+  GL_FONT_HEIGHT_BIT_NV* = 0x00800000.GLbitfield
+  GL_INTERLACE_OML* = 0x8980.GLenum
+  GL_FUNC_REVERSE_SUBTRACT_EXT* = 0x800B.GLenum
+  GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT* = 0x87C8.GLenum
+  GL_PRIMARY_COLOR* = 0x8577.GLenum
+  GL_RGBA16I* = 0x8D88.GLenum
+  GL_TEXTURE6* = 0x84C6.GLenum
+  GL_PATH_FILL_BOUNDING_BOX_NV* = 0x90A1.GLenum
+  GL_WEIGHT_ARRAY_BUFFER_BINDING* = 0x889E.GLenum
+  GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI* = 0x8835.GLenum
+  GL_YCRCB_422_SGIX* = 0x81BB.GLenum
+  GL_RGB5_A1* = 0x8057.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT* = 0x8211.GLenum
+  GL_DRAW_FRAMEBUFFER_BINDING_EXT* = 0x8CA6.GLenum
+  GL_TEXTURE_1D_ARRAY* = 0x8C18.GLenum
+  GL_CLAMP_FRAGMENT_COLOR_ARB* = 0x891B.GLenum
+  GL_FULL_RANGE_EXT* = 0x87E1.GLenum
+  GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV* = 0x8DA3.GLenum
+  GL_CON_24_ATI* = 0x8959.GLenum
+  GL_2D* = 0x0600.GLenum
+  GL_DRAW_BUFFER5_NV* = 0x882A.GLenum
+  GL_PALETTE4_RGBA8_OES* = 0x8B91.GLenum
+  GL_READ_ONLY_ARB* = 0x88B8.GLenum
+  GL_NUM_SAMPLE_COUNTS* = 0x9380.GLenum
+  GL_MATRIX_STRIDE* = 0x92FF.GLenum
+  GL_HISTOGRAM_RED_SIZE* = 0x8028.GLenum
+  GL_COLOR_ATTACHMENT4* = 0x8CE4.GLenum
+  GL_PATH_INITIAL_END_CAP_NV* = 0x9077.GLenum
+  GL_TEXTURE_USAGE_ANGLE* = 0x93A2.GLenum
+  GL_DOUBLE_MAT2* = 0x8F46.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE* = 0x8212.GLenum
+  GL_SECONDARY_COLOR_ARRAY_POINTER* = 0x845D.GLenum
+  GL_MAX_VIEWPORTS* = 0x825B.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_EXT* = 0x8C8E.GLenum
+  GL_FRAMEBUFFER_SRGB_EXT* = 0x8DB9.GLenum
+  GL_STORAGE_SHARED_APPLE* = 0x85BF.GLenum
+  GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH* = 0x8C76.GLenum
+  GL_TRANSFORM_FEEDBACK_NV* = 0x8E22.GLenum
+  GL_MIRRORED_REPEAT_ARB* = 0x8370.GLint
+  GL_MAX_VERTEX_OUTPUT_COMPONENTS* = 0x9122.GLenum
+  GL_BUFFER_MAP_LENGTH* = 0x9120.GLenum
+  GL_BUFFER_OBJECT_APPLE* = 0x85B3.GLenum
+  GL_INT_VEC4_ARB* = 0x8B55.GLenum
+  GL_COMBINER3_NV* = 0x8553.GLenum
+  GL_INT16_VEC3_NV* = 0x8FE6.GLenum
+  GL_MAX_3D_TEXTURE_SIZE_EXT* = 0x8073.GLenum
+  GL_GENERATE_MIPMAP_HINT_SGIS* = 0x8192.GLenum
+  GL_SRC0_ALPHA* = 0x8588.GLenum
+  GL_IMAGE_2D* = 0x904D.GLenum
+  GL_VIEW_CLASS_S3TC_DXT1_RGB* = 0x82CC.GLenum
+  GL_DOT3_RGBA* = 0x86AF.GLenum
+  GL_TEXTURE_GREEN_SIZE* = 0x805D.GLenum
+  GL_DOUBLE_MAT2x3* = 0x8F49.GLenum
+  GL_COORD_REPLACE_OES* = 0x8862.GLenum
+  GL_MAX_DEBUG_MESSAGE_LENGTH_ARB* = 0x9143.GLenum
+  GL_TEXTURE_IMMUTABLE_FORMAT_EXT* = 0x912F.GLenum
+  GL_INDEX_ARRAY_POINTER_EXT* = 0x8091.GLenum
+  GL_NUM_SHADING_LANGUAGE_VERSIONS* = 0x82E9.GLenum
+  GL_DEBUG_CALLBACK_FUNCTION_ARB* = 0x8244.GLenum
+  GL_OFFSET_TEXTURE_MATRIX_NV* = 0x86E1.GLenum
+  GL_INTENSITY32I_EXT* = 0x8D85.GLenum
+  GL_BUMP_TEX_UNITS_ATI* = 0x8778.GLenum
+  GL_RENDERBUFFER* = 0x8D41.GLenum
+  GL_UPPER_LEFT* = 0x8CA2.GLenum
+  GL_GUILTY_CONTEXT_RESET_ARB* = 0x8253.GLenum
+  GL_MAP2_GRID_SEGMENTS* = 0x0DD3.GLenum
+  GL_REG_23_ATI* = 0x8938.GLenum
+  GL_UNSIGNED_INT16_NV* = 0x8FF0.GLenum
+  GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM* = 103084.GLenum
+  GL_INVARIANT_VALUE_EXT* = 0x87EA.GLenum
+  GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV* = 0x8C88.GLenum
+  GL_TEXTURE2_ARB* = 0x84C2.GLenum
+  GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT* = 0x8DD7.GLenum
+  GL_IMAGE_CUBE* = 0x9050.GLenum
+  GL_MAX_PROGRAM_MATRICES_ARB* = 0x862F.GLenum
+  GL_SIGNED_LUMINANCE8_ALPHA8_NV* = 0x8704.GLenum
+  GL_INDEX_ARRAY_LIST_IBM* = 103073.GLenum
+  GL_EVAL_VERTEX_ATTRIB5_NV* = 0x86CB.GLenum
+  GL_SHADER_SOURCE_LENGTH* = 0x8B88.GLenum
+  GL_TEXTURE4* = 0x84C4.GLenum
+  GL_VERTEX_ATTRIB_ARRAY6_NV* = 0x8656.GLenum
+  GL_PROXY_TEXTURE_1D_STACK_MESAX* = 0x875B.GLenum
+  GL_MAP_ATTRIB_V_ORDER_NV* = 0x86C4.GLenum
+  GL_DSDT_NV* = 0x86F5.GLenum
+  GL_DEBUG_SEVERITY_NOTIFICATION_KHR* = 0x826B.GLenum
+  GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM* = 103086.GLenum
+  GL_COMPRESSED_RGBA_ASTC_8x6_KHR* = 0x93B6.GLenum
+  GL_LINEAR_ATTENUATION* = 0x1208.GLenum
+  GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV* = 0x9035.GLenum
+  GL_CONVOLUTION_FILTER_BIAS* = 0x8015.GLenum
+  GL_IMAGE_MIN_FILTER_HP* = 0x815D.GLenum
+  GL_EYE_RADIAL_NV* = 0x855B.GLenum
+  GL_TEXTURE_MIN_LOD_SGIS* = 0x813A.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV* = 0x8C8F.GLenum
+  GL_TRANSLATE_2D_NV* = 0x9090.GLenum
+  GL_CONSTANT_ARB* = 0x8576.GLenum
+  GL_FLOAT_MAT2x3* = 0x8B65.GLenum
+  GL_MULTISAMPLE_COVERAGE_MODES_NV* = 0x8E12.GLenum
+  GL_TRANSPOSE_COLOR_MATRIX* = 0x84E6.GLenum
+  GL_PROGRAM_STRING_NV* = 0x8628.GLenum
+  GL_UNSIGNED_INT_SAMPLER_1D_EXT* = 0x8DD1.GLenum
+  GL_BLEND_SRC_ALPHA_OES* = 0x80CB.GLenum
+  GL_RGB32F_EXT* = 0x8815.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT* = 0x8CD4.GLenum
+  GL_RESTART_PATH_NV* = 0xF0.GLenum
+  GL_MAP2_VERTEX_ATTRIB11_4_NV* = 0x867B.GLenum
+  GL_VIEW_CLASS_16_BITS* = 0x82CA.GLenum
+  GL_BUFFER_DATA_SIZE* = 0x9303.GLenum
+  GL_BUFFER_FLUSHING_UNMAP_APPLE* = 0x8A13.GLenum
+  GL_RELATIVE_VERTICAL_LINE_TO_NV* = 0x09.GLenum
+  GL_SRGB_WRITE* = 0x8298.GLenum
+  GL_TEXTURE_LUMINANCE_SIZE_EXT* = 0x8060.GLenum
+  GL_VERTEX_PRECLIP_SGIX* = 0x83EE.GLenum
+  GL_LINEAR_DETAIL_COLOR_SGIS* = 0x8099.GLenum
+  GL_SOURCE2_ALPHA_ARB* = 0x858A.GLenum
+  GL_PATH_FOG_GEN_MODE_NV* = 0x90AC.GLenum
+  GL_RGB10_A2UI* = 0x906F.GLenum
+  GL_MULTISAMPLE_BIT_3DFX* = 0x20000000.GLbitfield
+  GL_PIXEL_MAP_G_TO_G_SIZE* = 0x0CB7.GLenum
+  GL_COVERAGE_BUFFER_BIT_NV* = 0x00008000.GLbitfield
+  GL_TEXTURE_COMPRESSED* = 0x86A1.GLenum
+  GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER* = 0x92CA.GLenum
+  GL_NAMED_STRING_TYPE_ARB* = 0x8DEA.GLenum
+  GL_RESCALE_NORMAL* = 0x803A.GLenum
+  GL_OUTPUT_TEXTURE_COORD3_EXT* = 0x87A0.GLenum
+  GL_RENDERBUFFER_EXT* = 0x8D41.GLenum
+  GL_QUERY_NO_WAIT* = 0x8E14.GLenum
+  GL_SAMPLE_ALPHA_TO_COVERAGE* = 0x809E.GLenum
+  GL_RG8UI* = 0x8238.GLenum
+  GL_MATRIX3_NV* = 0x8633.GLenum
+  GL_SAMPLE_BUFFERS_ARB* = 0x80A8.GLenum
+  GL_VERTEX_CONSISTENT_HINT_PGI* = 0x1A22B.GLenum
+  GL_SPRITE_AXIAL_SGIX* = 0x814C.GLenum
+  GL_MODELVIEW_MATRIX* = 0x0BA6.GLenum
+  GL_SAMPLE_PATTERN_SGIS* = 0x80AC.GLenum
+  GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE* = 0x906B.GLenum
+  GL_FLOAT_RG16_NV* = 0x8886.GLenum
+  GL_IMAGE_TRANSLATE_X_HP* = 0x8157.GLenum
+  GL_FRAMEBUFFER_SRGB* = 0x8DB9.GLenum
+  GL_DRAW_BUFFER7* = 0x882C.GLenum
+  GL_CONVOLUTION_BORDER_COLOR* = 0x8154.GLenum
+  GL_DRAW_BUFFER5* = 0x882A.GLenum
+  GL_GEOMETRY_INPUT_TYPE_EXT* = 0x8DDB.GLenum
+  GL_IUI_V2F_EXT* = 0x81AD.GLenum
+  GL_FLOAT_RG_NV* = 0x8881.GLenum
+  GL_VERTEX_SHADER_INVARIANTS_EXT* = 0x87D1.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV* = 0x8C4D.GLenum
+  GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB* = 0x862E.GLenum
+  GL_SAMPLE_PATTERN_EXT* = 0x80AC.GLenum
+  GL_DIFFERENCE_NV* = 0x929E.GLenum
+  GL_POST_CONVOLUTION_ALPHA_BIAS_EXT* = 0x8023.GLenum
+  GL_COLOR_ATTACHMENT1_EXT* = 0x8CE1.GLenum
+  GL_TEXTURE_ALPHA_MODULATE_IMG* = 0x8C06.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV* = 0x8E23.GLenum
+  GL_MAX_TEXTURE_IMAGE_UNITS_ARB* = 0x8872.GLenum
+  GL_FIXED_OES* = 0x140C.GLenum
+  GL_ALREADY_SIGNALED_APPLE* = 0x911A.GLenum
+  GL_SET* = 0x150F.GLenum
+  GL_PERFMON_RESULT_AMD* = 0x8BC6.GLenum
+  GL_VARIABLE_G_NV* = 0x8529.GLenum
+  GL_DRAW_FRAMEBUFFER_ANGLE* = 0x8CA9.GLenum
+  GL_GEOMETRY_SUBROUTINE_UNIFORM* = 0x92F1.GLenum
+  GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT* = 0x884E.GLenum
+  GL_POINT* = 0x1B00.GLenum
+  GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV* = 0x01000000.GLbitfield
+  GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS* = 0x90CB.GLenum
+  GL_PLUS_CLAMPED_ALPHA_NV* = 0x92B2.GLenum
+  GL_DRAW_BUFFER3_ATI* = 0x8828.GLenum
+  GL_LUMINANCE_ALPHA16I_EXT* = 0x8D8D.GLenum
+  GL_SUBPIXEL_BITS* = 0x0D50.GLenum
+  GL_POINT_SPRITE* = 0x8861.GLenum
+  GL_DRAW_BUFFER0* = 0x8825.GLenum
+  GL_DEPTH_BIAS* = 0x0D1F.GLenum
+  GL_COLOR_ARRAY_TYPE* = 0x8082.GLenum
+  GL_DEPENDENT_GB_TEXTURE_2D_NV* = 0x86EA.GLenum
+  GL_MAX_SAMPLES_ANGLE* = 0x8D57.GLenum
+  GL_ALLOW_DRAW_MEM_HINT_PGI* = 0x1A211.GLenum
+  GL_GEOMETRY_OUTPUT_TYPE* = 0x8918.GLenum
+  GL_MAX_DEBUG_LOGGED_MESSAGES_KHR* = 0x9144.GLenum
+  GL_VERTEX_ATTRIB_ARRAY0_NV* = 0x8650.GLenum
+  GL_PRIMITIVES_GENERATED_EXT* = 0x8C87.GLenum
+  GL_TEXTURE_FLOAT_COMPONENTS_NV* = 0x888C.GLenum
+  GL_CLIP_VOLUME_CLIPPING_HINT_EXT* = 0x80F0.GLenum
+  GL_FRAGMENT_PROGRAM_POSITION_MESA* = 0x8BB0.GLenum
+  GL_MAX_FRAGMENT_IMAGE_UNIFORMS* = 0x90CE.GLenum
+  GL_VERTEX_ARRAY_BINDING_APPLE* = 0x85B5.GLenum
+  GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV* = 0x00000010.GLbitfield
+  GL_FIRST_VERTEX_CONVENTION* = 0x8E4D.GLenum
+  GL_DECR_WRAP* = 0x8508.GLenum
+  GL_IMAGE_CLASS_1_X_32* = 0x82BB.GLenum
+  GL_MAX_CLIP_PLANES_IMG* = 0x0D32.GLenum
+  GL_MAX_VARYING_COMPONENTS* = 0x8B4B.GLenum
+  GL_POST_COLOR_MATRIX_RED_BIAS_SGI* = 0x80B8.GLenum
+  GL_DSDT_MAG_NV* = 0x86F6.GLenum
+  GL_DEBUG_SOURCE_APPLICATION* = 0x824A.GLenum
+  GL_OPERAND0_RGB_ARB* = 0x8590.GLenum
+  GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE* = 0x82AE.GLenum
+  GL_VIDEO_COLOR_CONVERSION_MATRIX_NV* = 0x9029.GLenum
+  GL_MAP2_VERTEX_ATTRIB13_4_NV* = 0x867D.GLenum
+  GL_DOT2_ADD_ATI* = 0x896C.GLenum
+  GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS* = 0x8A33.GLenum
+  GL_IMAGE_BINDING_LAYER_EXT* = 0x8F3D.GLenum
+  GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX* = 0x8402.GLenum
+  GL_PACK_IMAGE_DEPTH_SGIS* = 0x8131.GLenum
+  GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT* = 0x8DDF.GLenum
+  GL_Z_EXT* = 0x87D7.GLenum
+  GL_MAP1_VERTEX_ATTRIB15_4_NV* = 0x866F.GLenum
+  GL_RG8_SNORM* = 0x8F95.GLenum
+  GL_OUTPUT_TEXTURE_COORD5_EXT* = 0x87A2.GLenum
+  GL_TEXTURE_BINDING_1D_ARRAY_EXT* = 0x8C1C.GLenum
+  GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB* = 0x8B87.GLenum
+  GL_PATH_END_CAPS_NV* = 0x9076.GLenum
+  GL_COLOR_TABLE_GREEN_SIZE* = 0x80DB.GLenum
+  GL_MAX_ELEMENTS_INDICES_EXT* = 0x80E9.GLenum
+  GL_TEXTURE_IMMUTABLE_FORMAT* = 0x912F.GLenum
+  GL_WRITE_ONLY_ARB* = 0x88B9.GLenum
+  GL_COLOR_ATTACHMENT10_EXT* = 0x8CEA.GLenum
+  GL_INVERT_RGB_NV* = 0x92A3.GLenum
+  GL_CURRENT_RASTER_DISTANCE* = 0x0B09.GLenum
+  GL_DEPTH_STENCIL_TO_RGBA_NV* = 0x886E.GLenum
+  GL_INVERTED_SCREEN_W_REND* = 0x8491.GLenum
+  GL_TABLE_TOO_LARGE* = 0x8031.GLenum
+  GL_REG_16_ATI* = 0x8931.GLenum
+  GL_BLEND_EQUATION_ALPHA_OES* = 0x883D.GLenum
+  GL_DRAW_FRAMEBUFFER_BINDING_NV* = 0x8CA6.GLenum
+  GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS* = 0x8E47.GLenum
+  GL_TEXTURE_BLUE_SIZE_EXT* = 0x805E.GLenum
+  GL_TEXTURE_BORDER_VALUES_NV* = 0x871A.GLenum
+  GL_PROGRAM_LENGTH_ARB* = 0x8627.GLenum
+  GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV* = 0x909C.GLenum
+  GL_DOT_PRODUCT_NV* = 0x86EC.GLenum
+  GL_TRANSPOSE_PROJECTION_MATRIX_ARB* = 0x84E4.GLenum
+  GL_TEXTURE_2D_MULTISAMPLE_ARRAY* = 0x9102.GLenum
+  GL_MIN_PROGRAM_TEXEL_OFFSET_NV* = 0x8904.GLenum
+  GL_MAP2_BINORMAL_EXT* = 0x8447.GLenum
+  GL_COLOR_ARRAY_BUFFER_BINDING* = 0x8898.GLenum
+  GL_TEXTURE_COORD_ARRAY_POINTER* = 0x8092.GLenum
+  GL_TEXTURE4_ARB* = 0x84C4.GLenum
+  GL_VARIABLE_A_NV* = 0x8523.GLenum
+  GL_CURRENT_FOG_COORDINATE_EXT* = 0x8453.GLenum
+  GL_TEXTURE_CUBE_MAP_POSITIVE_X* = 0x8515.GLenum
+  GL_DEPENDENT_AR_TEXTURE_2D_NV* = 0x86E9.GLenum
+  GL_TEXTURE29_ARB* = 0x84DD.GLenum
+  GL_INVERSE_TRANSPOSE_NV* = 0x862D.GLenum
+  GL_TEXTURE_COLOR_WRITEMASK_SGIS* = 0x81EF.GLenum
+  GL_HISTOGRAM_SINK* = 0x802D.GLenum
+  GL_ALPHA12_EXT* = 0x803D.GLenum
+  GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX* = 0x8175.GLenum
+  GL_DSDT_MAG_INTENSITY_NV* = 0x86DC.GLenum
+  GL_ATC_RGB_AMD* = 0x8C92.GLenum
+  GL_PROGRAM_ATTRIB_COMPONENTS_NV* = 0x8906.GLenum
+  GL_UNIFORM_BLOCK_BINDING* = 0x8A3F.GLenum
+  GL_POLYGON_STIPPLE* = 0x0B42.GLenum
+  GL_BACK* = 0x0405.GLenum
+  GL_DEPTH_COMPONENT16_NONLINEAR_NV* = 0x8E2C.GLenum
+  GL_ALPHA32F_EXT* = 0x8816.GLenum
+  GL_CLAMP_TO_BORDER* = 0x812D.GLint
+  GL_FLOAT_RGBA16_NV* = 0x888A.GLenum
+  GL_VERTEX_ARRAY_RANGE_LENGTH_NV* = 0x851E.GLenum
+  GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV* = 0x8E58.GLenum
+  GL_SAMPLER_2D* = 0x8B5E.GLenum
+  GL_SMOOTH_POINT_SIZE_RANGE* = 0x0B12.GLenum
+  GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX* = 0x8312.GLenum
+  GL_INTERPOLATE_ARB* = 0x8575.GLenum
+  GL_VERTEX_ARRAY_LENGTH_NV* = 0x8F2B.GLenum
+  GL_FUNC_SUBTRACT_EXT* = 0x800A.GLenum
+  GL_OUTPUT_TEXTURE_COORD14_EXT* = 0x87AB.GLenum
+  GL_HISTOGRAM_SINK_EXT* = 0x802D.GLenum
+  GL_RG_EXT* = 0x8227.GLenum
+  GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS* = 0x80B0.GLenum
+  GL_COLOR_TABLE_SCALE* = 0x80D6.GLenum
+  GL_CURRENT_RASTER_TEXTURE_COORDS* = 0x0B06.GLenum
+  GL_PIXEL_BUFFER_BARRIER_BIT* = 0x00000080.GLbitfield
+  GL_SHADING_LANGUAGE_VERSION* = 0x8B8C.GLenum
+  GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES* = 0x898F.GLenum
+  GL_DUAL_LUMINANCE_ALPHA4_SGIS* = 0x811C.GLenum
+  GL_CLAMP* = 0x2900.GLint
+  GL_4PASS_2_EXT* = 0x80A6.GLenum
+  GL_POLYGON_OFFSET_LINE* = 0x2A02.GLenum
+  GL_LOGIC_OP* = 0x0BF1.GLenum
+  GL_RENDERBUFFER_HEIGHT* = 0x8D43.GLenum
+  GL_COPY_INVERTED* = 0x150C.GLenum
+  GL_NONE* = 0.GLenum
+  GL_COLOR_ENCODING* = 0x8296.GLenum
+  GL_ONE_MINUS_CONSTANT_ALPHA_EXT* = 0x8004.GLenum
+  GL_DEBUG_TYPE_ERROR_KHR* = 0x824C.GLenum
+  GL_PIXEL_TILE_GRID_WIDTH_SGIX* = 0x8142.GLenum
+  GL_UNIFORM_SIZE* = 0x8A38.GLenum
+  GL_VERTEX_SHADER_BINDING_EXT* = 0x8781.GLenum
+  GL_BLEND_DST_RGB_EXT* = 0x80C8.GLenum
+  GL_QUADS* = 0x0007.GLenum
+  cGL_INT* = 0x1404.GLenum
+  GL_PIXEL_TEX_GEN_MODE_SGIX* = 0x832B.GLenum
+  GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB* = 0x8E8F.GLenum
+  GL_SAMPLE_ALPHA_TO_ONE_ARB* = 0x809F.GLenum
+  GL_RGBA32F_EXT* = 0x8814.GLenum
+  GL_VERTEX_PROGRAM_POSITION_MESA* = 0x8BB4.GLenum
+  GL_GEOMETRY_SUBROUTINE* = 0x92EB.GLenum
+  GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT* = 0x8DD6.GLenum
+  GL_IMAGE_BINDING_LAYER* = 0x8F3D.GLenum
+  GL_PIXEL_PACK_BUFFER_ARB* = 0x88EB.GLenum
+  GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER* = 0x84F1.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB* = 0x8623.GLenum
+  GL_ALPHA8UI_EXT* = 0x8D7E.GLenum
+  GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV* = 0x11.GLenum
+  GL_CAVEAT_SUPPORT* = 0x82B8.GLenum
+  GL_ACCUM* = 0x0100.GLenum
+  GL_DRAW_BUFFER3_NV* = 0x8828.GLenum
+  GL_DEBUG_TYPE_OTHER_KHR* = 0x8251.GLenum
+  GL_TESS_GEN_SPACING* = 0x8E77.GLenum
+  GL_FLOAT_MAT4x2* = 0x8B69.GLenum
+  GL_TEXTURE_GEN_STR_OES* = 0x8D60.GLenum
+  GL_NUM_COMPATIBLE_SUBROUTINES* = 0x8E4A.GLenum
+  GL_CLIP_DISTANCE1* = 0x3001.GLenum
+  GL_DEPTH_COMPONENT32_SGIX* = 0x81A7.GLenum
+  GL_FRAMEZOOM_SGIX* = 0x818B.GLenum
+  GL_COLOR_ATTACHMENT14_EXT* = 0x8CEE.GLenum
+  GL_POLYGON_TOKEN* = 0x0703.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE* = 0x8213.GLenum
+  GL_DRAW_BUFFER2_EXT* = 0x8827.GLenum
+  GL_MATRIX_INDEX_ARRAY_TYPE_OES* = 0x8847.GLenum
+  GL_HISTOGRAM_LUMINANCE_SIZE_EXT* = 0x802C.GLenum
+  GL_DEPTH_BOUNDS_EXT* = 0x8891.GLenum
+  GL_TEXTURE24* = 0x84D8.GLenum
+  GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES* = 0x8A43.GLenum
+  GL_MAX_PATCH_VERTICES* = 0x8E7D.GLenum
+  GL_COMPILE_STATUS* = 0x8B81.GLenum
+  GL_MODELVIEW4_ARB* = 0x8724.GLenum
+  GL_SHADER_BINARY_VIV* = 0x8FC4.GLenum
+  GL_CON_10_ATI* = 0x894B.GLenum
+  GL_FRAGMENT_LIGHT5_SGIX* = 0x8411.GLenum
+  GL_CONVOLUTION_1D_EXT* = 0x8010.GLenum
+  GL_CONSTANT_BORDER_HP* = 0x8151.GLenum
+  GL_SAMPLE_BUFFERS* = 0x80A8.GLenum
+  GL_RGB8UI* = 0x8D7D.GLenum
+  GL_FRAGMENT_MATERIAL_EXT* = 0x8349.GLenum
+  GL_OP_RECIP_EXT* = 0x8794.GLenum
+  GL_SHADER_OPERATION_NV* = 0x86DF.GLenum
+  GL_COMPUTE_SUBROUTINE_UNIFORM* = 0x92F3.GLenum
+  GL_VIDEO_BUFFER_PITCH_NV* = 0x9028.GLenum
+  GL_UNKNOWN_CONTEXT_RESET_ARB* = 0x8255.GLenum
+  GL_COLOR_ATTACHMENT3_EXT* = 0x8CE3.GLenum
+  GL_QUERY_WAIT* = 0x8E13.GLenum
+  GL_SOURCE1_RGB* = 0x8581.GLenum
+  GL_DELETE_STATUS* = 0x8B80.GLenum
+  GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB* = 0x8243.GLenum
+  GL_HILO8_NV* = 0x885E.GLenum
+  GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT* = 0x906A.GLenum
+  GL_LUMINANCE_ALPHA_FLOAT16_APPLE* = 0x881F.GLenum
+  GL_LUMINANCE16_SNORM* = 0x9019.GLenum
+  GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX* = 0x8178.GLenum
+  GL_RENDER* = 0x1C00.GLenum
+  GL_RED_INTEGER* = 0x8D94.GLenum
+  GL_DEBUG_TYPE_ERROR_ARB* = 0x824C.GLenum
+  GL_IMAGE_BINDING_ACCESS* = 0x8F3E.GLenum
+  GL_COVERAGE_COMPONENT_NV* = 0x8ED0.GLenum
+  GL_TEXTURE_BINDING_BUFFER_EXT* = 0x8C2C.GLenum
+  GL_MAX_PROGRAM_PATCH_ATTRIBS_NV* = 0x86D8.GLenum
+  GL_DUAL_LUMINANCE12_SGIS* = 0x8116.GLenum
+  GL_QUAD_ALPHA8_SGIS* = 0x811F.GLenum
+  GL_COMPRESSED_RED_GREEN_RGTC2_EXT* = 0x8DBD.GLenum
+  GL_PACK_INVERT_MESA* = 0x8758.GLenum
+  GL_OUTPUT_TEXTURE_COORD11_EXT* = 0x87A8.GLenum
+  GL_DYNAMIC_DRAW_ARB* = 0x88E8.GLenum
+  GL_RGB565_OES* = 0x8D62.GLenum
+  GL_LINE* = 0x1B01.GLenum
+  GL_T2F_V3F* = 0x2A27.GLenum
+  GL_DIFFUSE* = 0x1201.GLenum
+  GL_FOG_COORDINATE_SOURCE* = 0x8450.GLenum
+  GL_TEXTURE_1D_ARRAY_EXT* = 0x8C18.GLenum
+  GL_TEXTURE_RECTANGLE_NV* = 0x84F5.GLenum
+  GL_STENCIL_INDEX4_EXT* = 0x8D47.GLenum
+  GL_VERTEX_PROGRAM_TWO_SIDE* = 0x8643.GLenum
+  GL_REDUCE* = 0x8016.GLenum
+  GL_DEBUG_CALLBACK_USER_PARAM_KHR* = 0x8245.GLenum
+  GL_DEBUG_LOGGED_MESSAGES_AMD* = 0x9145.GLenum
+  GL_FONT_UNITS_PER_EM_BIT_NV* = 0x00100000.GLbitfield
+  GL_INVALID_FRAMEBUFFER_OPERATION_EXT* = 0x0506.GLenum
+  GL_NORMAL_ARRAY_BUFFER_BINDING_ARB* = 0x8897.GLenum
+  GL_SAMPLE_MASK_INVERT_SGIS* = 0x80AB.GLenum
+  GL_MAX_SHADER_BUFFER_ADDRESS_NV* = 0x8F35.GLenum
+  GL_PIXEL_MAP_I_TO_A* = 0x0C75.GLenum
+  GL_MINOR_VERSION* = 0x821C.GLenum
+  GL_TEXTURE_BUFFER_EXT* = 0x8C2A.GLenum
+  GL_SKIP_COMPONENTS4_NV* = -3
+  GL_FLOAT16_NV* = 0x8FF8.GLenum
+  GL_FEEDBACK_BUFFER_TYPE* = 0x0DF2.GLenum
+  GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT* = 0x8C72.GLenum
+  GL_REG_6_ATI* = 0x8927.GLenum
+  GL_EDGE_FLAG_ARRAY_LIST_IBM* = 103075.GLenum
+  GL_MATRIX26_ARB* = 0x88DA.GLenum
+  GL_ALPHA16* = 0x803E.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME* = 0x8CD1.GLenum
+  GL_HISTOGRAM_ALPHA_SIZE* = 0x802B.GLenum
+  GL_COLOR_MATRIX_STACK_DEPTH* = 0x80B2.GLenum
+  GL_INTERNALFORMAT_GREEN_TYPE* = 0x8279.GLenum
+  GL_YCRCBA_SGIX* = 0x8319.GLenum
+  GL_VIEW_CLASS_48_BITS* = 0x82C7.GLenum
+  GL_VERTEX_ATTRIB_ARRAY3_NV* = 0x8653.GLenum
+  GL_CLIENT_STORAGE_BIT* = 0x0200.GLbitfield
+  GL_MIN_SAMPLE_SHADING_VALUE_ARB* = 0x8C37.GLenum
+  GL_PROXY_TEXTURE_CUBE_MAP* = 0x851B.GLenum
+  GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES* = 0x8F39.GLenum
+  GL_TEXTURE15* = 0x84CF.GLenum
+  GL_COLOR* = 0x1800.GLenum
+  GL_LIGHT1* = 0x4001.GLenum
+  GL_LUMINANCE_ALPHA16F_EXT* = 0x881F.GLenum
+  GL_TEXTURE_VIEW_NUM_LAYERS* = 0x82DE.GLenum
+  GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS* = 0x8E82.GLenum
+  GL_INTERLEAVED_ATTRIBS_NV* = 0x8C8C.GLenum
+  GL_INT_SAMPLER_BUFFER_EXT* = 0x8DD0.GLenum
+  GL_EVAL_VERTEX_ATTRIB14_NV* = 0x86D4.GLenum
+  GL_FRAGMENT_PROGRAM_CALLBACK_MESA* = 0x8BB1.GLenum
+  GL_EMISSION* = 0x1600.GLenum
+  GL_WEIGHT_ARRAY_STRIDE_ARB* = 0x86AA.GLenum
+  GL_ACTIVE_VARIABLES* = 0x9305.GLenum
+  GL_TIMEOUT_IGNORED* = 0xFFFFFFFFFFFFFFFF'u64
+  GL_VERTEX_STREAM5_ATI* = 0x8771.GLenum
+  GL_INDEX_ARRAY_POINTER* = 0x8091.GLenum
+  GL_POST_COLOR_MATRIX_ALPHA_SCALE* = 0x80B7.GLenum
+  GL_TESS_CONTROL_SHADER* = 0x8E88.GLenum
+  GL_POLYGON_MODE* = 0x0B40.GLenum
+  GL_ASYNC_DRAW_PIXELS_SGIX* = 0x835D.GLenum
+  GL_RGBA16_SNORM* = 0x8F9B.GLenum
+  GL_TEXTURE_NORMAL_EXT* = 0x85AF.GLenum
+  GL_REG_22_ATI* = 0x8937.GLenum
+  GL_FRAMEBUFFER_DEFAULT_WIDTH* = 0x9310.GLenum
+  GL_TEXCOORD1_BIT_PGI* = 0x10000000.GLbitfield
+  GL_REFERENCE_PLANE_EQUATION_SGIX* = 0x817E.GLenum
+  GL_COLOR_ALPHA_PAIRING_ATI* = 0x8975.GLenum
+  GL_SINGLE_COLOR* = 0x81F9.GLenum
+  GL_MODELVIEW21_ARB* = 0x8735.GLenum
+  GL_FORMAT_SUBSAMPLE_24_24_OML* = 0x8982.GLenum
+  GL_SOURCE1_ALPHA* = 0x8589.GLenum
+  GL_LINEARLIGHT_NV* = 0x92A7.GLenum
+  GL_REG_2_ATI* = 0x8923.GLenum
+  GL_QUERY_RESULT_AVAILABLE* = 0x8867.GLenum
+  GL_PERSPECTIVE_CORRECTION_HINT* = 0x0C50.GLenum
+  GL_COMBINE_ALPHA_ARB* = 0x8572.GLenum
+  GL_HISTOGRAM_ALPHA_SIZE_EXT* = 0x802B.GLenum
+  GL_SIGNED_RGB8_NV* = 0x86FF.GLenum
+  GL_DEPTH_TEXTURE_MODE_ARB* = 0x884B.GLenum
+  GL_PRESENT_DURATION_NV* = 0x8E2B.GLenum
+  GL_TRIANGLES_ADJACENCY_ARB* = 0x000C.GLenum
+  GL_TEXTURE_BUFFER_OFFSET* = 0x919D.GLenum
+  GL_PROGRAM_STRING_ARB* = 0x8628.GLenum
+  GL_UNSIGNED_INT_IMAGE_1D_EXT* = 0x9062.GLenum
+  GL_COLOR_ATTACHMENT2* = 0x8CE2.GLenum
+  GL_DOT_PRODUCT_TEXTURE_2D_NV* = 0x86EE.GLenum
+  GL_QUERY_BUFFER* = 0x9192.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z* = 0x851A.GLenum
+  GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX* = 0x8187.GLenum
+  GL_FULL_SUPPORT* = 0x82B7.GLenum
+  GL_MAX_PROGRAM_ENV_PARAMETERS_ARB* = 0x88B5.GLenum
+  GL_MAX_COMPUTE_WORK_GROUP_COUNT* = 0x91BE.GLenum
+  GL_DEBUG_TYPE_PERFORMANCE* = 0x8250.GLenum
+  GL_DRAW_BUFFER12_EXT* = 0x8831.GLenum
+  GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD* = 0x9003.GLenum
+  GL_CURRENT_FOG_COORDINATE* = 0x8453.GLenum
+  GL_INTENSITY_EXT* = 0x8049.GLenum
+  GL_TRANSPOSE_NV* = 0x862C.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV* = 0x8C4F.GLenum
+  GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS* = 0x8C80.GLenum
+  GL_COLOR_ARRAY_POINTER_EXT* = 0x8090.GLenum
+  GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT* = 0x8C2D.GLenum
+  GL_GEOMETRY_VERTICES_OUT_ARB* = 0x8DDA.GLenum
+  GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV* = 0x0F.GLenum
+  GL_OP_INDEX_EXT* = 0x8782.GLenum
+  GL_REG_1_ATI* = 0x8922.GLenum
+  GL_OFFSET* = 0x92FC.GLenum
+  GL_PATH_COVER_DEPTH_FUNC_NV* = 0x90BF.GLenum
+  GL_UNPACK_COMPRESSED_BLOCK_DEPTH* = 0x9129.GLenum
+  GL_POLYGON_OFFSET_UNITS* = 0x2A00.GLenum
+  GL_INDEX_TEST_FUNC_EXT* = 0x81B6.GLenum
+  GL_POINT_SMOOTH* = 0x0B10.GLenum
+  GL_SCALEBIAS_HINT_SGIX* = 0x8322.GLenum
+  GL_COMPRESSED_RGBA_ASTC_5x4_KHR* = 0x93B1.GLenum
+  GL_SEPARATE_SPECULAR_COLOR* = 0x81FA.GLenum
+  GL_VERTEX_ATTRIB_ARRAY14_NV* = 0x865E.GLenum
+  GL_INTENSITY16_EXT* = 0x804D.GLenum
+  GL_R8_SNORM* = 0x8F94.GLenum
+  GL_DEBUG_LOGGED_MESSAGES* = 0x9145.GLenum
+  GL_ALPHA8I_EXT* = 0x8D90.GLenum
+  GL_OPERAND2_RGB* = 0x8592.GLenum
+  GL_EMBOSS_LIGHT_NV* = 0x855D.GLenum
+  GL_EDGE_FLAG_ARRAY_STRIDE_EXT* = 0x808C.GLenum
+  GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV* = 0x88FD.GLenum
+  GL_NUM_LOOPBACK_COMPONENTS_ATI* = 0x8974.GLenum
+  GL_DEBUG_SOURCE_APPLICATION_KHR* = 0x824A.GLenum
+  GL_COMPRESSED_RGB_S3TC_DXT1_EXT* = 0x83F0.GLenum
+  GL_DEBUG_SOURCE_OTHER_ARB* = 0x824B.GLenum
+  cGL_DOUBLE* = 0x140A.GLenum
+  GL_STENCIL_TEST_TWO_SIDE_EXT* = 0x8910.GLenum
+  GL_MIN_PROGRAM_TEXEL_OFFSET* = 0x8904.GLenum
+  GL_3DC_X_AMD* = 0x87F9.GLenum
+  GL_FLOAT_RGB32_NV* = 0x8889.GLenum
+  GL_SECONDARY_COLOR_ARRAY_POINTER_EXT* = 0x845D.GLenum
+  GL_OPERAND2_ALPHA_ARB* = 0x859A.GLenum
+  GL_IMAGE_3D* = 0x904E.GLenum
+  GL_SECONDARY_COLOR_ARRAY_SIZE* = 0x845A.GLenum
+  GL_RELEASED_APPLE* = 0x8A19.GLenum
+  GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM* = 0x8FB3.GLenum
+  GL_FRAMEBUFFER_DEFAULT_LAYERS* = 0x9312.GLenum
+  GL_INTENSITY* = 0x8049.GLenum
+  GL_RENDERBUFFER_BLUE_SIZE_OES* = 0x8D52.GLenum
+  GL_FLOAT_RGB_NV* = 0x8882.GLenum
+  GL_ARRAY_ELEMENT_LOCK_FIRST_EXT* = 0x81A8.GLenum
+  GL_CON_4_ATI* = 0x8945.GLenum
+  GL_ROUND_NV* = 0x90A4.GLenum
+  GL_CLIP_DISTANCE2* = 0x3002.GLenum
+  GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB* = 0x880B.GLenum
+  GL_PROGRAM_ERROR_STRING_ARB* = 0x8874.GLenum
+  GL_STORAGE_CACHED_APPLE* = 0x85BE.GLenum
+  GL_LIGHTEN_NV* = 0x9298.GLenum
+  GL_TEXTURE23* = 0x84D7.GLenum
+  GL_SAMPLER_CUBE_SHADOW* = 0x8DC5.GLenum
+  GL_VERTEX_PROGRAM_ARB* = 0x8620.GLenum
+  GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT* = 0x8C4E.GLenum
+  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB* = 0x851A.GLenum
+  GL_RENDERBUFFER_SAMPLES* = 0x8CAB.GLenum
+  GL_RENDERBUFFER_STENCIL_SIZE* = 0x8D55.GLenum
+  GL_VIRTUAL_PAGE_SIZE_INDEX_ARB* = 0x91A7.GLenum
+  GL_CLIP_PLANE5* = 0x3005.GLenum
+  GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT* = 0x8510.GLenum
+  GL_COLOR_BUFFER_BIT5_QCOM* = 0x00000020.GLbitfield
+  GL_DOUBLE_MAT2x3_EXT* = 0x8F49.GLenum
+  GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS* = 0x8A42.GLenum
+  GL_COLOR_ATTACHMENT8_EXT* = 0x8CE8.GLenum
+  GL_UNIFORM_BUFFER_BINDING_EXT* = 0x8DEF.GLenum
+  GL_MATRIX8_ARB* = 0x88C8.GLenum
+  GL_COUNTER_TYPE_AMD* = 0x8BC0.GLenum
+  GL_INT8_VEC3_NV* = 0x8FE2.GLenum
+  GL_TEXTURE_BINDING_3D_OES* = 0x806A.GLenum
+  GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX* = 0x8311.GLenum
+  GL_IMAGE_BINDING_LEVEL* = 0x8F3B.GLenum
+  GL_STENCIL_BACK_FAIL_ATI* = 0x8801.GLenum
+  GL_TRANSFORM_FEEDBACK_ATTRIBS_NV* = 0x8C7E.GLenum
+  GL_COLOR_TABLE_INTENSITY_SIZE* = 0x80DF.GLenum
+  GL_TEXTURE_2D_BINDING_EXT* = 0x8069.GLenum
+  GL_CW* = 0x0900.GLenum
+  GL_COLOR_ATTACHMENT6* = 0x8CE6.GLenum
+  GL_R32UI* = 0x8236.GLenum
+  GL_PROXY_TEXTURE_3D* = 0x8070.GLenum
+  GL_FLOAT_VEC2_ARB* = 0x8B50.GLenum
+  GL_C3F_V3F* = 0x2A24.GLenum
+  GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV* = 0x8DA0.GLenum
+  GL_EVAL_VERTEX_ATTRIB11_NV* = 0x86D1.GLenum
+  GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV* = 0x8520.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES* = 0x8CDC.GLenum
+  GL_MAX_VIEWPORT_DIMS* = 0x0D3A.GLenum
+  GL_STENCIL_CLEAR_TAG_VALUE_EXT* = 0x88F3.GLenum
+  GL_TEXTURE_BUFFER_FORMAT_ARB* = 0x8C2E.GLenum
+  GL_PROGRAM_NATIVE_PARAMETERS_ARB* = 0x88AA.GLenum
+  GL_FLOAT_MAT3x2* = 0x8B67.GLenum
+  GL_BLUE_BIT_ATI* = 0x00000004.GLbitfield
+  GL_COLOR_ATTACHMENT6_NV* = 0x8CE6.GLenum
+  GL_AND_INVERTED* = 0x1504.GLenum
+  GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS* = 0x90D7.GLenum
+  GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR* = 0x93D0.GLenum
+  GL_PACK_COMPRESSED_BLOCK_DEPTH* = 0x912D.GLenum
+  GL_TEXTURE_COMPARE_SGIX* = 0x819A.GLenum
+  GL_SYNC_CL_EVENT_COMPLETE_ARB* = 0x8241.GLenum
+  GL_DEBUG_TYPE_PORTABILITY* = 0x824F.GLenum
+  GL_IMAGE_BINDING_FORMAT* = 0x906E.GLenum
+  GL_RESAMPLE_DECIMATE_OML* = 0x8989.GLenum
+  GL_MAX_PROGRAM_TEMPORARIES_ARB* = 0x88A5.GLenum
+  GL_ALL_SHADER_BITS* = 0xFFFFFFFF.GLbitfield
+  GL_TRANSFORM_FEEDBACK_VARYING* = 0x92F4.GLenum
+  GL_TRANSFORM_FEEDBACK_BUFFER_BINDING* = 0x8C8F.GLenum
+  GL_ACTIVE_STENCIL_FACE_EXT* = 0x8911.GLenum
+  GL_MAP1_VERTEX_ATTRIB4_4_NV* = 0x8664.GLenum
+  GL_LINK_STATUS* = 0x8B82.GLenum
+  GL_SYNC_FLUSH_COMMANDS_BIT* = 0x00000001.GLbitfield
+  GL_BLEND* = 0x0BE2.GLenum
+  GL_OUTPUT_TEXTURE_COORD12_EXT* = 0x87A9.GLenum
+  GL_DRAW_BUFFER11_ARB* = 0x8830.GLenum
+  GL_OBJECT_BUFFER_USAGE_ATI* = 0x8765.GLenum
+  GL_COLORDODGE_NV* = 0x9299.GLenum
+  GL_SHADER_IMAGE_LOAD* = 0x82A4.GLenum
+  GL_EMBOSS_CONSTANT_NV* = 0x855E.GLenum
+  GL_MAP_TESSELLATION_NV* = 0x86C2.GLenum
+  GL_MAX_DRAW_BUFFERS_EXT* = 0x8824.GLenum
+  GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT* = 0x850E.GLenum
+  GL_TEXTURE_ENV_COLOR* = 0x2201.GLenum
+  GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER* = 0x8A46.GLenum
+  GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV* = 0x86F2.GLenum
+  GL_QUERY_KHR* = 0x82E3.GLenum
+  GL_RG* = 0x8227.GLenum
+  GL_MAX_TEXTURE_SIZE* = 0x0D33.GLenum
+  GL_TEXTURE_NUM_LEVELS_QCOM* = 0x8BD9.GLenum
+  GL_MAP2_VERTEX_ATTRIB3_4_NV* = 0x8673.GLenum
+  GL_LUMINANCE_FLOAT32_APPLE* = 0x8818.GLenum
+  GL_MAP2_VERTEX_ATTRIB7_4_NV* = 0x8677.GLenum
+  GL_GEOMETRY_SHADER_ARB* = 0x8DD9.GLenum
+  GL_SYNC_FENCE_APPLE* = 0x9116.GLenum
+  GL_SAMPLE_MASK_VALUE* = 0x8E52.GLenum
+  GL_PROXY_TEXTURE_RECTANGLE_NV* = 0x84F7.GLenum
+  GL_DEPTH_FUNC* = 0x0B74.GLenum
+  GL_S* = 0x2000.GLenum
+  GL_CONSTANT_COLOR_EXT* = 0x8001.GLenum
+  GL_MAX_PROGRAM_LOOP_COUNT_NV* = 0x88F8.GLenum
+  GL_VIEW_COMPATIBILITY_CLASS* = 0x82B6.GLenum
+  GL_INT_SAMPLER_BUFFER_AMD* = 0x9002.GLenum
+  GL_COMPRESSED_SRGB* = 0x8C48.GLenum
+  GL_PROGRAM_SEPARABLE_EXT* = 0x8258.GLenum
+  GL_FOG_FUNC_POINTS_SGIS* = 0x812B.GLenum
+  GL_MITER_TRUNCATE_NV* = 0x90A8.GLenum
+  GL_POLYGON_OFFSET_POINT* = 0x2A01.GLenum
+  GL_SRGB_READ* = 0x8297.GLenum
+  GL_INDEX_ARRAY_ADDRESS_NV* = 0x8F24.GLenum
+  GL_MAX_FRAMEBUFFER_WIDTH* = 0x9315.GLenum
+  GL_COMPRESSED_RED_RGTC1_EXT* = 0x8DBB.GLenum
+  GL_RGB_INTEGER_EXT* = 0x8D98.GLenum
+  GL_OP_NEGATE_EXT* = 0x8783.GLenum
+  GL_POINT_SIZE_MAX_ARB* = 0x8127.GLenum
+  GL_TEXTURE_DEFORMATION_BIT_SGIX* = 0x00000001.GLbitfield
+  GL_SIGNED_LUMINANCE8_NV* = 0x8702.GLenum
+  GL_OPERAND2_RGB_EXT* = 0x8592.GLenum
+  GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT* = 0x8337.GLenum
+  GL_RECIP_ADD_SIGNED_ALPHA_IMG* = 0x8C05.GLenum
+  GL_VERTEX_STREAM7_ATI* = 0x8773.GLenum
+  GL_MODELVIEW1_STACK_DEPTH_EXT* = 0x8502.GLenum
+  GL_DYNAMIC_DRAW* = 0x88E8.GLenum
+  GL_DRAW_BUFFER15_EXT* = 0x8834.GLenum
+  GL_TEXTURE_COMPARE_OPERATOR_SGIX* = 0x819B.GLenum
+  GL_SQUARE_NV* = 0x90A3.GLenum
+  GL_COMPRESSED_SRGB_S3TC_DXT1_EXT* = 0x8C4C.GLenum
+  GL_DRAW_BUFFER0_ARB* = 0x8825.GLenum
+  GL_GPU_OPTIMIZED_QCOM* = 0x8FB2.GLenum
+  GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT* = 0x850F.GLenum
+  GL_SPRITE_EYE_ALIGNED_SGIX* = 0x814E.GLenum
+  GL_MAP1_VERTEX_ATTRIB3_4_NV* = 0x8663.GLenum
+  GL_SAMPLE_MASK_SGIS* = 0x80A0.GLenum
+  GL_TEXTURE_SAMPLES* = 0x9106.GLenum
+  GL_AND_REVERSE* = 0x1502.GLenum
+  GL_COMBINER4_NV* = 0x8554.GLenum
+  GL_FONT_Y_MIN_BOUNDS_BIT_NV* = 0x00020000.GLbitfield
+  GL_VIEW_CLASS_32_BITS* = 0x82C8.GLenum
+  GL_BGRA_EXT* = 0x80E1.GLenum
+  GL_TANGENT_ARRAY_TYPE_EXT* = 0x843E.GLenum
+  GL_BLEND_EQUATION_RGB_OES* = 0x8009.GLenum
+  GL_TRANSPOSE_TEXTURE_MATRIX_ARB* = 0x84E5.GLenum
+  GL_GET_TEXTURE_IMAGE_FORMAT* = 0x8291.GLenum
+  GL_PACK_MAX_COMPRESSED_SIZE_SGIX* = 0x831B.GLenum
+  GL_UNIFORM_ARRAY_STRIDE* = 0x8A3C.GLenum
+  GL_REFLECTION_MAP_ARB* = 0x8512.GLenum
+  GL_RGBA_FLOAT16_ATI* = 0x881A.GLenum
+  GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS* = 0x8E83.GLenum
+  GL_RED_BITS* = 0x0D52.GLenum
+  GL_VERTEX_TEXTURE* = 0x829B.GLenum
+  GL_UNSIGNALED_APPLE* = 0x9118.GLenum
+  GL_RENDERBUFFER_ALPHA_SIZE_OES* = 0x8D53.GLenum
+  GL_DRAW_BUFFER14_NV* = 0x8833.GLenum
+  GL_STREAM_COPY_ARB* = 0x88E2.GLenum
+  GL_SECONDARY_COLOR_ARRAY_TYPE* = 0x845B.GLenum
+  GL_MATRIX22_ARB* = 0x88D6.GLenum
+  GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV* = 0x8533.GLenum
+  GL_IUI_N3F_V3F_EXT* = 0x81B0.GLenum
+  GL_SPARE0_NV* = 0x852E.GLenum
+  GL_FOG_COORD* = 0x8451.GLenum
+  GL_DRAW_BUFFER8_ARB* = 0x882D.GLenum
+  GL_MATRIX24_ARB* = 0x88D8.GLenum
+  GL_MAX_DEBUG_MESSAGE_LENGTH_AMD* = 0x9143.GLenum
+  GL_POST_COLOR_MATRIX_BLUE_SCALE* = 0x80B6.GLenum
+  GL_TEXTURE_HEIGHT_QCOM* = 0x8BD3.GLenum
+  GL_NUM_FRAGMENT_REGISTERS_ATI* = 0x896E.GLenum
+  GL_IMAGE_3D_EXT* = 0x904E.GLenum
+  GL_TEXTURE_FILTER_CONTROL* = 0x8500.GLenum
+  GL_VIDEO_BUFFER_NV* = 0x9020.GLenum
+  GL_CURRENT_MATRIX_INDEX_ARB* = 0x8845.GLenum
+  GL_STENCIL_BUFFER_BIT4_QCOM* = 0x00100000.GLbitfield
+  GL_SIGNED_INTENSITY_NV* = 0x8707.GLenum
+  GL_RASTERIZER_DISCARD_NV* = 0x8C89.GLenum
+  GL_MAX_DEFORMATION_ORDER_SGIX* = 0x8197.GLenum
+  GL_SAMPLES_3DFX* = 0x86B4.GLenum
+  GL_DOT_PRODUCT_PASS_THROUGH_NV* = 0x885B.GLenum
+  GL_RGB_SCALE_EXT* = 0x8573.GLenum
+  GL_TEXTURE_UNSIGNED_REMAP_MODE_NV* = 0x888F.GLenum
+  GL_MIRROR_CLAMP_TO_EDGE_EXT* = 0x8743.GLint
+  GL_NATIVE_GRAPHICS_END_HINT_PGI* = 0x1A204.GLenum
+  GL_UNPACK_CLIENT_STORAGE_APPLE* = 0x85B2.GLenum
+  GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER* = 0x8CDC.GLenum
+  GL_FOG_START* = 0x0B63.GLenum
+  GL_MAX_PROGRAM_CALL_DEPTH_NV* = 0x88F5.GLenum
+  GL_MODELVIEW18_ARB* = 0x8732.GLenum
+  GL_MAX_FRAMEZOOM_FACTOR_SGIX* = 0x818D.GLenum
+  GL_EDGE_FLAG_ARRAY_POINTER* = 0x8093.GLenum
+  GL_GREEN_INTEGER* = 0x8D95.GLenum
+  GL_IMAGE_BUFFER* = 0x9051.GLenum
+  GL_PROJECTION* = 0x1701.GLenum
+  GL_UNSIGNED_INT_VEC4_EXT* = 0x8DC8.GLenum
+  GL_PALETTE8_RGB5_A1_OES* = 0x8B99.GLenum
+  GL_RENDERBUFFER_SAMPLES_EXT* = 0x8CAB.GLenum
+  GL_TEXTURE3* = 0x84C3.GLenum
+  GL_CURRENT_RASTER_INDEX* = 0x0B05.GLenum
+  GL_INTERLEAVED_ATTRIBS_EXT* = 0x8C8C.GLenum
+  GL_STENCIL_BACK_WRITEMASK* = 0x8CA5.GLenum
+  GL_POINT_SPRITE_ARB* = 0x8861.GLenum
+  GL_TRANSPOSE_TEXTURE_MATRIX* = 0x84E5.GLenum
+  GL_DRAW_BUFFER1_ARB* = 0x8826.GLenum
+  GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS* = 0x92D0.GLenum
+  GL_DEPTH_ATTACHMENT_OES* = 0x8D00.GLenum
+  GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG* = 0x9137.GLenum
+  GL_SRGB_ALPHA* = 0x8C42.GLenum
+  GL_UNSIGNED_INT64_ARB* = 0x140F.GLenum
+  GL_LAST_VERTEX_CONVENTION_EXT* = 0x8E4E.GLenum
+  GL_IMAGE_CLASS_1_X_8* = 0x82C1.GLenum
+  GL_COMPRESSED_RGBA_S3TC_DXT1_EXT* = 0x83F1.GLenum
+  GL_REFLECTION_MAP* = 0x8512.GLenum
+  GL_MAX_IMAGE_UNITS_EXT* = 0x8F38.GLenum
+  GL_DEPTH_STENCIL_NV* = 0x84F9.GLenum
+  GL_PROGRAM_TEX_INDIRECTIONS_ARB* = 0x8807.GLenum
+  GL_BINNING_CONTROL_HINT_QCOM* = 0x8FB0.GLenum
+  GL_T4F_V4F* = 0x2A28.GLenum
+  GL_FLOAT_VEC4* = 0x8B52.GLenum
+  GL_CONVEX_HULL_NV* = 0x908B.GLenum
+  GL_TEXTURE26_ARB* = 0x84DA.GLenum
+  GL_INDEX_BIT_PGI* = 0x00080000.GLbitfield
+  GL_TEXTURE_COORD_ARRAY_TYPE_EXT* = 0x8089.GLenum
+  GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES* = 0x8CD2.GLenum
+  GL_MAX_ARRAY_TEXTURE_LAYERS* = 0x88FF.GLenum
+  GL_COLOR_ATTACHMENT4_EXT* = 0x8CE4.GLenum
+  GL_SAMPLE_COVERAGE_VALUE_ARB* = 0x80AA.GLenum
+  GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE* = 0x8A08.GLenum
+  GL_MAX_LAYERS* = 0x8281.GLenum
+  GL_FOG_COORDINATE_ARRAY_POINTER_EXT* = 0x8456.GLenum
+  GL_INDEX_TEST_REF_EXT* = 0x81B7.GLenum
+  GL_GREEN_BIT_ATI* = 0x00000002.GLbitfield
+  GL_STRICT_SCISSOR_HINT_PGI* = 0x1A218.GLenum
+  GL_MAP2_VERTEX_ATTRIB4_4_NV* = 0x8674.GLenum
+  GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT* = 0x8DE0.GLenum
+  GL_OUTPUT_TEXTURE_COORD31_EXT* = 0x87BC.GLenum
+  GL_XOR* = 0x1506.GLenum
+  GL_VIDEO_CAPTURE_FRAME_WIDTH_NV* = 0x9038.GLenum
+  GL_RGBA* = 0x1908.GLenum
+  GL_TEXTURE_TARGET* = 0x1006.GLenum
+  GL_QUERY_TARGET* = 0x82EA.GLenum
+  GL_COMPUTE_WORK_GROUP_SIZE* = 0x8267.GLenum

+ 124 - 0
src/nodesnim/core/opengl/private/errors.nim

@@ -0,0 +1,124 @@
+import macros, sequtils
+
+proc glGetError*(): GLenum {.stdcall, importc, ogl.}
+
+macro wrapErrorChecking*(f: untyped): typed =
+  f.expectKind nnkStmtList
+  result = newStmtList()
+
+  for child in f.children:
+    if child.kind == nnkCommentStmt:
+      continue
+    child.expectKind nnkProcDef
+
+    let params = toSeq(child.params.children)
+    var glProc = copy child
+    glProc.pragma = newNimNode(nnkPragma).add(
+        newNimNode(nnkExprColonExpr).add(
+          ident"importc" , newLit($child.name))
+      ).add(ident"ogl")
+
+    let rawGLprocName = $glProc.name
+    glProc.name = ident(rawGLprocName & "Impl")
+    var
+      body = newStmtList glProc
+      returnsSomething = child.params[0].kind != nnkEmpty
+      callParams = newSeq[when defined(nimnode): NimNode else: PNimrodNode]()
+    for param in params[1 ..< params.len]:
+      callParams.add param[0]
+
+    let glCall = newCall(glProc.name, callParams)
+    body.add if returnsSomething:
+        newAssignment(ident"result", glCall)
+      else:
+        glCall
+
+    if rawGLprocName == "glBegin":
+      body.add newAssignment(ident"gInsideBeginEnd", ident"true")
+    if rawGLprocName == "glEnd":
+      body.add newAssignment(ident"gInsideBeginEnd", ident"false")
+
+    template errCheck: untyped =
+      when not (NoAutoGLerrorCheck):
+        if gAutoGLerrorCheck and not gInsideBeginEnd:
+          checkGLerror()
+
+    body.add getAst(errCheck())
+
+    var procc = newProc(child.name, params, body)
+    procc.pragma = newNimNode(nnkPragma).add(ident"inline")
+    procc.name = postfix(procc.name, "*")
+    result.add procc
+
+type
+  GLerrorCode* {.size: GLenum.sizeof.} = enum
+    glErrNoError = (0, "no error")
+    glErrInvalidEnum = (0x0500, "invalid enum")
+    glErrInvalidValue = (0x0501, "invalid value")
+    glErrInvalidOperation = (0x0502, "invalid operation")
+    glErrStackOverflow = (0x0503, "stack overflow")
+    glErrStackUnderflow = (0x0504, "stack underflow")
+    glErrOutOfMem = (0x0505, "out of memory")
+    glErrInvalidFramebufferOperation = (0x0506, "invalid framebuffer operation")
+    glErrTableTooLarge = (0x8031, "table too large")
+
+const AllErrorCodes = [
+    glErrNoError,
+    glErrInvalidEnum,
+    glErrInvalidValue,
+    glErrInvalidOperation,
+    glErrStackOverflow,
+    glErrStackUnderflow,
+    glErrOutOfMem,
+    glErrInvalidFramebufferOperation,
+    glErrTableTooLarge,
+]
+
+proc getGLerrorCode*: GLerrorCode = glGetError().GLerrorCode
+  ## Like ``glGetError`` but returns an enumerator instead.
+
+type
+  GLerror* = object of Exception
+    ## An exception for OpenGL errors.
+    code*: GLerrorCode ## The error code. This might be invalid for two reasons:
+                    ## an outdated list of errors or a bad driver.
+
+proc checkGLerror* =
+  ## Raise ``GLerror`` if the last call to an OpenGL function generated an error.
+  ## You might want to call this once every frame for example if automatic
+  ## error checking has been disabled.
+  let error = getGLerrorCode()
+  if error == glErrNoError:
+    return
+
+  var
+    exc = new(GLerror)
+  for e in AllErrorCodes:
+    if e == error:
+      exc.msg = "OpenGL error: " & $e
+      raise exc
+
+  exc.code = error
+  exc.msg = "OpenGL error: unknown (" & $error & ")"
+  raise exc
+
+{.push warning[User]: off.}
+
+const
+  NoAutoGLerrorCheck* = defined(noAutoGLerrorCheck) ##\
+  ## This determines (at compile time) whether an exception should be raised
+  ## if an OpenGL call generates an error. No additional code will be generated
+  ## and ``enableAutoGLerrorCheck(bool)`` will have no effect when
+  ## ``noAutoGLerrorCheck`` is defined.
+
+{.pop.} # warning[User]: off
+
+var
+  gAutoGLerrorCheck = true
+  gInsideBeginEnd* = false # do not change manually.
+
+proc enableAutoGLerrorCheck*(yes: bool) =
+  ## This determines (at run time) whether an exception should be raised if an
+  ## OpenGL call generates an error. This has no effect when
+  ## ``noAutoGLerrorCheck`` is defined.
+  gAutoGLerrorCheck = yes

+ 89 - 0
src/nodesnim/core/opengl/private/prelude.nim

@@ -0,0 +1,89 @@
+{.deadCodeElim: on.}
+{.push warning[User]: off.}
+
+when defined(windows):
+  const
+    ogldll* = "OpenGL32.dll"
+    gludll* = "GLU32.dll"
+elif defined(macosx):
+  #macosx has this notion of a framework, thus the path to the openGL dylib files
+  #is absolute
+  const
+    ogldll* = "/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries/libGL.dylib"
+    gludll* = "/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries/libGLU.dylib"
+else:
+  const
+    ogldll* = "libGL.so.1"
+    gludll* = "libGLU.so.1"
+
+when defined(useGlew):
+  {.pragma: ogl, header: "<GL/glew.h>".}
+  {.pragma: oglx, header: "<GL/glxew.h>".}
+  {.pragma: wgl, header: "<GL/wglew.h>".}
+  {.pragma: glu, dynlib: gludll.}
+elif defined(ios):
+  {.pragma: ogl.}
+  {.pragma: oglx.}
+  {.passC: "-framework OpenGLES", passL: "-framework OpenGLES".}
+elif defined(android) or defined(js) or defined(emscripten):
+  {.pragma: ogl.}
+  {.pragma: oglx.}
+else:
+  # quite complex ... thanks to extension support for various platforms:
+  import dynlib
+
+  let oglHandle = loadLib(ogldll)
+  if isNil(oglHandle): quit("could not load: " & ogldll)
+
+  when defined(windows):
+    var wglGetProcAddress = cast[proc (s: cstring): pointer {.stdcall.}](
+      symAddr(oglHandle, "wglGetProcAddress"))
+  elif defined(linux):
+    var glxGetProcAddress = cast[proc (s: cstring): pointer {.cdecl.}](
+      symAddr(oglHandle, "glXGetProcAddress"))
+    var glxGetProcAddressArb = cast[proc (s: cstring): pointer {.cdecl.}](
+      symAddr(oglHandle, "glXGetProcAddressARB"))
+
+  proc glGetProc(h: LibHandle; procName: cstring): pointer =
+    when defined(windows):
+      result = symAddr(h, procname)
+      if result != nil: return
+      if not isNil(wglGetProcAddress): result = wglGetProcAddress(procName)
+    elif defined(linux):
+      if not isNil(glxGetProcAddress): result = glxGetProcAddress(procName)
+      if result != nil: return
+      if not isNil(glxGetProcAddressArb):
+        result = glxGetProcAddressArb(procName)
+        if result != nil: return
+      result = symAddr(h, procname)
+    else:
+      result = symAddr(h, procName)
+    if result == nil: raiseInvalidLibrary(procName)
+
+  proc glGetProc*(name: cstring): pointer {.inline.} =
+    glGetProc(oglHandle, name)
+
+  var gluHandle: LibHandle
+
+  proc gluGetProc(procname: cstring): pointer =
+    if gluHandle == nil:
+      gluHandle = loadLib(gludll)
+      if gluHandle == nil: quit("could not load: " & gludll)
+    result = glGetProc(gluHandle, procname)
+
+  # undocumented 'dynlib' feature: the string literal is replaced by
+  # the imported proc name:
+  {.pragma: ogl, dynlib: glGetProc("0").}
+  {.pragma: oglx, dynlib: glGetProc("0").}
+  {.pragma: wgl, dynlib: glGetProc("0").}
+  {.pragma: glu, dynlib: gluGetProc("").}
+
+  proc nimLoadProcs0() {.importc.}
+
+  template loadExtensions*() =
+    ## call this after your rendering context has been setup if you use
+    ## extensions.
+    bind nimLoadProcs0
+    nimLoadProcs0()
+
+{.pop.} # warning[User]: off

+ 2939 - 0
src/nodesnim/core/opengl/private/procs.nim

@@ -0,0 +1,2939 @@
+{.push stdcall, hint[XDeclaredButNotUsed]: off, warning[SmallLshouldNotBeUsed]: off.}
+wrapErrorChecking:
+  proc glMultiTexCoord2d(target: GLenum, s: GLdouble, t: GLdouble)
+  proc glDrawElementsIndirect(mode: GLenum, `type`: GLenum, indirect: pointer)
+  proc glEnableVertexArrayEXT(vaobj: GLuint, `array`: GLenum)
+  proc glDeleteFramebuffers(n: GLsizei, framebuffers: ptr GLuint)
+  proc glMultiTexCoord3dv(target: GLenum, v: ptr GLdouble)
+  proc glVertexAttrib4d(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glLoadPaletteFromModelViewMatrixOES()
+  proc glVertex3xvOES(coords: ptr GLfixed)
+  proc glNormalStream3sATI(stream: GLenum, nx: GLshort, ny: GLshort, nz: GLshort)
+  proc glMatrixFrustumEXT(mode: GLenum, left: GLdouble, right: GLdouble, bottom: GLdouble, top: GLdouble, zNear: GLdouble, zFar: GLdouble)
+  proc glUniformMatrix2fvARB(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glColor4dv(v: ptr GLdouble)
+  proc glColor3fv(v: ptr GLfloat)
+  proc glVertexAttribI1uiEXT(index: GLuint, x: GLuint)
+  proc glGetDebugMessageLogKHR(count: GLuint, bufsize: GLsizei, sources: ptr GLenum, types: ptr GLenum, ids: ptr GLuint, severities: ptr GLenum, lengths: ptr GLsizei, messageLog: cstring): GLuint
+  proc glVertexAttribI2iv(index: GLuint, v: ptr GLint)
+  proc glTexCoord1xvOES(coords: ptr GLfixed)
+  proc glVertex3hNV(x: GLhalfNv, y: GLhalfNv, z: GLhalfNv)
+  proc glIsShader(shader: GLuint): GLboolean
+  proc glDeleteRenderbuffersEXT(n: GLsizei, renderbuffers: ptr GLuint)
+  proc glVertex3hvNV(v: ptr GLhalfNv)
+  proc glGetPointervKHR(pname: GLenum, params: ptr pointer)
+  proc glProgramUniform3i64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glNamedFramebufferTexture1DEXT(framebuffer: GLuint, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glGetNamedProgramLocalParameterfvEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glGenRenderbuffersOES(n: GLsizei, renderbuffers: ptr GLuint)
+  proc glVertex4dv(v: ptr GLdouble)
+  proc glTexCoord2fColor4ubVertex3fvSUN(tc: ptr GLfloat, c: ptr GLubyte, v: ptr GLfloat)
+  proc glTexStorage2DEXT(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glVertexAttrib2d(index: GLuint, x: GLdouble, y: GLdouble)
+  proc glVertexAttrib1dv(index: GLuint, v: ptr GLdouble)
+  proc glBindProgramARB(target: GLenum, program: GLuint)
+  proc glRasterPos2dv(v: ptr GLdouble)
+  proc glCompressedTextureSubImage2DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, bits: pointer)
+  proc glNormalPointervINTEL(`type`: GLenum, `pointer`: ptr pointer)
+  proc glGetInteger64vAPPLE(pname: GLenum, params: ptr GLint64)
+  proc glPushMatrix()
+  proc glGetCompressedTexImageARB(target: GLenum, level: GLint, img: pointer)
+  proc glBindMaterialParameterEXT(face: GLenum, value: GLenum): GLuint
+  proc glBlendEquationIndexedAMD(buf: GLuint, mode: GLenum)
+  proc glGetObjectBufferfvATI(buffer: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glMakeNamedBufferNonResidentNV(buffer: GLuint)
+  proc glUniform2ui64NV(location: GLint, x: GLuint64Ext, y: GLuint64Ext)
+  proc glRasterPos4fv(v: ptr GLfloat)
+  proc glDeleteTextures(n: GLsizei, textures: ptr GLuint)
+  proc glSecondaryColorPointer(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glTextureSubImage1DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glEndTilingQCOM(preserveMask: GLbitfield)
+  proc glBindBuffer(target: GLenum, buffer: GLuint)
+  proc glUniformMatrix3fvARB(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glSamplerParameterf(sampler: GLuint, pname: GLenum, param: GLfloat)
+  proc glSecondaryColor3d(red: GLdouble, green: GLdouble, blue: GLdouble)
+  proc glVertexAttrib4sARB(index: GLuint, x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glNamedProgramLocalParameterI4iEXT(program: GLuint, target: GLenum, index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glProgramUniform2iEXT(program: GLuint, location: GLint, v0: GLint, v1: GLint)
+  proc glPopAttrib()
+  proc glGetnColorTableARB(target: GLenum, format: GLenum, `type`: GLenum, bufSize: GLsizei, table: pointer)
+  proc glMatrixLoadIdentityEXT(mode: GLenum)
+  proc glGetNamedProgramivEXT(program: GLuint, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glCopyTextureSubImage2DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glUniform4i64NV(location: GLint, x: GLint64Ext, y: GLint64Ext, z: GLint64Ext, w: GLint64Ext)
+  proc glDeleteTexturesEXT(n: GLsizei, textures: ptr GLuint)
+  proc glMultiTexCoord1dv(target: GLenum, v: ptr GLdouble)
+  proc glMultiTexRenderbufferEXT(texunit: GLenum, target: GLenum, renderbuffer: GLuint)
+  proc glMultiDrawArraysIndirect(mode: GLenum, indirect: ptr pointer, drawcount: GLsizei, stride: GLsizei)
+  proc glGetUniformfvARB(programObj: GLhandleArb, location: GLint, params: ptr GLfloat)
+  proc glBufferDataARB(target: GLenum, size: GLsizeiptrArb, data: pointer, usage: GLenum)
+  proc glTexCoord2d(s: GLdouble, t: GLdouble)
+  proc glGetArrayObjectfvATI(`array`: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glShaderOp1EXT(op: GLenum, res: GLuint, arg1: GLuint)
+  proc glColor3s(red: GLshort, green: GLshort, blue: GLshort)
+  proc glStencilFuncSeparate(face: GLenum, fun: GLenum, `ref`: GLint, mask: GLuint)
+  proc glTextureImage2DMultisampleCoverageNV(texture: GLuint, target: GLenum, coverageSamples: GLsizei, colorSamples: GLsizei, internalFormat: GLint, width: GLsizei, height: GLsizei, fixedSampleLocations: GLboolean)
+  proc glMultiTexCoord2xvOES(texture: GLenum, coords: ptr GLfixed)
+  proc glGetVertexAttribLui64vNV(index: GLuint, pname: GLenum, params: ptr GLuint64Ext)
+  proc glNormal3xOES(nx: GLfixed, ny: GLfixed, nz: GLfixed)
+  proc glMapBufferRangeEXT(target: GLenum, offset: GLintptr, length: GLsizeiptr, access: GLbitfield): pointer
+  proc glCreateShader(`type`: GLenum): GLuint
+  proc glDrawRangeElementArrayAPPLE(mode: GLenum, start: GLuint, `end`: GLuint, first: GLint, count: GLsizei)
+  proc glVertex2bOES(x: GLbyte)
+  proc glGetMapxvOES(target: GLenum, query: GLenum, v: ptr GLfixed)
+  proc glRasterPos3sv(v: ptr GLshort)
+  proc glDeleteQueriesARB(n: GLsizei, ids: ptr GLuint)
+  proc glProgramUniform1iv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glVertexStream2dvATI(stream: GLenum, coords: ptr GLdouble)
+  proc glBindVertexArrayOES(`array`: GLuint)
+  proc glLightModelfv(pname: GLenum, params: ptr GLfloat)
+  proc glEvalCoord2dv(u: ptr GLdouble)
+  proc glColor3hNV(red: GLhalfNv, green: GLhalfNv, blue: GLhalfNv)
+  proc glSecondaryColor3iEXT(red: GLint, green: GLint, blue: GLint)
+  proc glBindTexture(target: GLenum, texture: GLuint)
+  proc glUniformBufferEXT(program: GLuint, location: GLint, buffer: GLuint)
+  proc glGetCombinerInputParameterfvNV(stage: GLenum, portion: GLenum, variable: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glUniform2ui64vNV(location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glMatrixMultTransposefEXT(mode: GLenum, m: ptr GLfloat)
+  proc glLineWidth(width: GLfloat)
+  proc glRotatef(angle: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glNormalStream3svATI(stream: GLenum, coords: ptr GLshort)
+  proc glTexCoordP4ui(`type`: GLenum, coords: GLuint)
+  proc glImageTransformParameterfvHP(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glUniform3uiEXT(location: GLint, v0: GLuint, v1: GLuint, v2: GLuint)
+  proc glGetInvariantIntegervEXT(id: GLuint, value: GLenum, data: ptr GLint)
+  proc glGetTransformFeedbackVaryingEXT(program: GLuint, index: GLuint, bufSize: GLsizei, length: ptr GLsizei, size: ptr GLsizei, `type`: ptr GLenum, name: cstring)
+  proc glSamplerParameterIuiv(sampler: GLuint, pname: GLenum, param: ptr GLuint)
+  proc glProgramUniform2fEXT(program: GLuint, location: GLint, v0: GLfloat, v1: GLfloat)
+  proc glMultiTexCoord2hvNV(target: GLenum, v: ptr GLhalfNv)
+  proc glDeleteRenderbuffersOES(n: GLsizei, renderbuffers: ptr GLuint)
+  proc glRenderbufferStorageMultisampleCoverageNV(target: GLenum, coverageSamples: GLsizei, colorSamples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glStencilClearTagEXT(stencilTagBits: GLsizei, stencilClearTag: GLuint)
+  proc glConvolutionParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glFenceSyncAPPLE(condition: GLenum, flags: GLbitfield): GLsync
+  proc glGetVariantArrayObjectivATI(id: GLuint, pname: GLenum, params: ptr GLint)
+  proc glProgramUniform4dvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glPushDebugGroupKHR(source: GLenum, id: GLuint, length: GLsizei, message: cstring)
+  proc glFragmentLightivSGIX(light: GLenum, pname: GLenum, params: ptr GLint)
+  proc glFramebufferTexture2DEXT(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glGetActiveSubroutineUniformiv(program: GLuint, shadertype: GLenum, index: GLuint, pname: GLenum, values: ptr GLint)
+  proc glFrustumf(l: GLfloat, r: GLfloat, b: GLfloat, t: GLfloat, n: GLfloat, f: GLfloat)
+  proc glEndQueryIndexed(target: GLenum, index: GLuint)
+  proc glCompressedTextureSubImage3DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, bits: pointer)
+  proc glGetProgramPipelineInfoLogEXT(pipeline: GLuint, bufSize: GLsizei, length: ptr GLsizei, infoLog: cstring)
+  proc glGetVertexAttribfvNV(index: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glVertexArrayIndexOffsetEXT(vaobj: GLuint, buffer: GLuint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glDrawTexsvOES(coords: ptr GLshort)
+  proc glMultiTexCoord1hNV(target: GLenum, s: GLhalfNv)
+  proc glWindowPos2iv(v: ptr GLint)
+  proc glMultiTexCoordP1ui(texture: GLenum, `type`: GLenum, coords: GLuint)
+  proc glTexCoord1i(s: GLint)
+  proc glVertex4hvNV(v: ptr GLhalfNv)
+  proc glCallLists(n: GLsizei, `type`: GLenum, lists: pointer)
+  proc glIndexFormatNV(`type`: GLenum, stride: GLsizei)
+  proc glPointParameterfARB(pname: GLenum, param: GLfloat)
+  proc glProgramUniform1dv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glGetVertexAttribArrayObjectfvATI(index: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glVDPAUUnmapSurfacesNV(numSurface: GLsizei, surfaces: ptr GLvdpauSurfaceNv)
+  proc glVertexAttribIFormat(attribindex: GLuint, size: GLint, `type`: GLenum, relativeoffset: GLuint)
+  proc glClearColorx(red: GLfixed, green: GLfixed, blue: GLfixed, alpha: GLfixed)
+  proc glColor3bv(v: ptr GLbyte)
+  proc glNamedProgramLocalParameter4dEXT(program: GLuint, target: GLenum, index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glVertexPointer(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glGetObjectLabelKHR(identifier: GLenum, name: GLuint, bufSize: GLsizei, length: ptr GLsizei, label: cstring)
+  proc glCombinerStageParameterfvNV(stage: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glNormal3hvNV(v: ptr GLhalfNv)
+  proc glUniform2i64NV(location: GLint, x: GLint64Ext, y: GLint64Ext)
+  proc glMultiTexCoord2iv(target: GLenum, v: ptr GLint)
+  proc glProgramUniform3i(program: GLuint, location: GLint, v0: GLint, v1: GLint, v2: GLint)
+  proc glDeleteAsyncMarkersSGIX(marker: GLuint, range: GLsizei)
+  proc glStencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum)
+  proc glColorP4ui(`type`: GLenum, color: GLuint)
+  proc glFinishAsyncSGIX(markerp: ptr GLuint): GLint
+  proc glDrawTexsOES(x: GLshort, y: GLshort, z: GLshort, width: GLshort, height: GLshort)
+  proc glLineStipple(factor: GLint, pattern: GLushort)
+  proc glAlphaFragmentOp1ATI(op: GLenum, dst: GLuint, dstMod: GLuint, arg1: GLuint, arg1Rep: GLuint, arg1Mod: GLuint)
+  proc glMapTexture2DINTEL(texture: GLuint, level: GLint, access: GLbitfield, stride: ptr GLint, layout: ptr GLenum): pointer
+  proc glVertex4f(x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glFramebufferTextureARB(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint)
+  proc glProgramUniform3ui64NV(program: GLuint, location: GLint, x: GLuint64Ext, y: GLuint64Ext, z: GLuint64Ext)
+  proc glMultTransposeMatrixxOES(m: ptr GLfixed)
+  proc glNormal3fv(v: ptr GLfloat)
+  proc glUniform4fARB(location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat, v3: GLfloat)
+  proc glBinormal3bEXT(bx: GLbyte, by: GLbyte, bz: GLbyte)
+  proc glGenProgramPipelinesEXT(n: GLsizei, pipelines: ptr GLuint)
+  proc glDispatchComputeIndirect(indirect: GLintptr)
+  proc glGetPerfMonitorCounterDataAMD(monitor: GLuint, pname: GLenum, dataSize: GLsizei, data: ptr GLuint, bytesWritten: ptr GLint)
+  proc glStencilOpValueAMD(face: GLenum, value: GLuint)
+  proc glTangent3fvEXT(v: ptr GLfloat)
+  proc glUniform3iARB(location: GLint, v0: GLint, v1: GLint, v2: GLint)
+  proc glMatrixScalefEXT(mode: GLenum, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glVertexAttrib2dARB(index: GLuint, x: GLdouble, y: GLdouble)
+  proc glIsVertexArray(`array`: GLuint): GLboolean
+  proc glGetMaterialx(face: GLenum, pname: GLenum, param: GLfixed)
+  proc glMultiTexCoord1dARB(target: GLenum, s: GLdouble)
+  proc glColor3usv(v: ptr GLushort)
+  proc glVertexStream3svATI(stream: GLenum, coords: ptr GLshort)
+  proc glRasterPos3s(x: GLshort, y: GLshort, z: GLshort)
+  proc glMultiTexCoord2bOES(texture: GLenum, s: GLbyte, t: GLbyte)
+  proc glGetClipPlanefOES(plane: GLenum, equation: ptr GLfloat)
+  proc glFramebufferTextureEXT(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint)
+  proc glVertexAttrib1dNV(index: GLuint, x: GLdouble)
+  proc glSampleCoverageOES(value: GLfixed, invert: GLboolean)
+  proc glCompressedTexSubImage2DARB(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glUniform1iv(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glExtGetProgramsQCOM(programs: ptr GLuint, maxPrograms: GLint, numPrograms: ptr GLint)
+  proc glFogx(pname: GLenum, param: GLfixed)
+  proc glMultiTexCoord3hNV(target: GLenum, s: GLhalfNv, t: GLhalfNv, r: GLhalfNv)
+  proc glClipPlane(plane: GLenum, equation: ptr GLdouble)
+  proc glConvolutionParameterxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glInvalidateBufferData(buffer: GLuint)
+  proc glCheckNamedFramebufferStatusEXT(framebuffer: GLuint, target: GLenum): GLenum
+  proc glLinkProgram(program: GLuint)
+  proc glCheckFramebufferStatus(target: GLenum): GLenum
+  proc glBlendFunci(buf: GLuint, src: GLenum, dst: GLenum)
+  proc glProgramUniform4uiv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glConvolutionFilter2D(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, image: pointer)
+  proc glVertex4bvOES(coords: ptr GLbyte)
+  proc glCopyTextureSubImage1DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, x: GLint, y: GLint, width: GLsizei)
+  proc glColor4uiv(v: ptr GLuint)
+  proc glGetBufferParameteri64v(target: GLenum, pname: GLenum, params: ptr GLint64)
+  proc glGetLocalConstantBooleanvEXT(id: GLuint, value: GLenum, data: ptr GLboolean)
+  proc glCoverStrokePathNV(path: GLuint, coverMode: GLenum)
+  proc glScaled(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glLightfv(light: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glTexParameterIiv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMakeImageHandleResidentNV(handle: GLuint64, access: GLenum)
+  proc glWindowPos3iARB(x: GLint, y: GLint, z: GLint)
+  proc glListBase(base: GLuint)
+  proc glFlushMappedBufferRangeEXT(target: GLenum, offset: GLintptr, length: GLsizeiptr)
+  proc glNormal3dv(v: ptr GLdouble)
+  proc glProgramUniform4d(program: GLuint, location: GLint, v0: GLdouble, v1: GLdouble, v2: GLdouble, v3: GLdouble)
+  proc glCreateShaderProgramEXT(`type`: GLenum, string: cstring): GLuint
+  proc glGetLightxvOES(light: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glGetObjectPtrLabelKHR(`ptr`: ptr pointer, bufSize: GLsizei, length: ptr GLsizei, label: cstring)
+  proc glTransformPathNV(resultPath: GLuint, srcPath: GLuint, transformType: GLenum, transformValues: ptr GLfloat)
+  proc glMultTransposeMatrixf(m: ptr GLfloat)
+  proc glMapVertexAttrib2dAPPLE(index: GLuint, size: GLuint, u1: GLdouble, u2: GLdouble, ustride: GLint, uorder: GLint, v1: GLdouble, v2: GLdouble, vstride: GLint, vorder: GLint, points: ptr GLdouble)
+  proc glIsSync(sync: GLsync): GLboolean
+  proc glMultMatrixx(m: ptr GLfixed)
+  proc glInterpolatePathsNV(resultPath: GLuint, pathA: GLuint, pathB: GLuint, weight: GLfloat)
+  proc glEnableClientStateIndexedEXT(`array`: GLenum, index: GLuint)
+  proc glProgramEnvParameter4fARB(target: GLenum, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glVertexAttrib2svARB(index: GLuint, v: ptr GLshort)
+  proc glLighti(light: GLenum, pname: GLenum, param: GLint)
+  proc glSelectBuffer(size: GLsizei, buffer: ptr GLuint)
+  proc glReplacementCodeusvSUN(code: ptr GLushort)
+  proc glMapVertexAttrib1fAPPLE(index: GLuint, size: GLuint, u1: GLfloat, u2: GLfloat, stride: GLint, order: GLint, points: ptr GLfloat)
+  proc glMaterialx(face: GLenum, pname: GLenum, param: GLfixed)
+  proc glDrawTransformFeedback(mode: GLenum, id: GLuint)
+  proc glWindowPos2i(x: GLint, y: GLint)
+  proc glMultiTexEnviEXT(texunit: GLenum, target: GLenum, pname: GLenum, param: GLint)
+  proc glProgramUniform1fv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glDrawBuffersARB(n: GLsizei, bufs: ptr GLenum)
+  proc glGetUniformLocationARB(programObj: GLhandleArb, name: cstring): GLint
+  proc glResumeTransformFeedback()
+  proc glMap1f(target: GLenum, u1: GLfloat, u2: GLfloat, stride: GLint, order: GLint, points: ptr GLfloat)
+  proc glVertex3xOES(x: GLfixed, y: GLfixed)
+  proc glPathCoordsNV(path: GLuint, numCoords: GLsizei, coordType: GLenum, coords: pointer)
+  proc glListParameterfSGIX(list: GLuint, pname: GLenum, param: GLfloat)
+  proc glGetUniformivARB(programObj: GLhandleArb, location: GLint, params: ptr GLint)
+  proc glBinormal3bvEXT(v: ptr GLbyte)
+  proc glVertexAttribP3ui(index: GLuint, `type`: GLenum, normalized: GLboolean, value: GLuint)
+  proc glGetVertexArrayPointeri_vEXT(vaobj: GLuint, index: GLuint, pname: GLenum, param: ptr pointer)
+  proc glProgramParameter4fvNV(target: GLenum, index: GLuint, v: ptr GLfloat)
+  proc glDiscardFramebufferEXT(target: GLenum, numAttachments: GLsizei, attachments: ptr GLenum)
+  proc glGetDebugMessageLogARB(count: GLuint, bufsize: GLsizei, sources: ptr GLenum, types: ptr GLenum, ids: ptr GLuint, severities: ptr GLenum, lengths: ptr GLsizei, messageLog: cstring): GLuint
+  proc glResolveMultisampleFramebufferAPPLE()
+  proc glGetIntegeri_vEXT(target: GLenum, index: GLuint, data: ptr GLint)
+  proc glDepthBoundsdNV(zmin: GLdouble, zmax: GLdouble)
+  proc glEnd()
+  proc glBindBufferBaseEXT(target: GLenum, index: GLuint, buffer: GLuint)
+  proc glVertexAttribDivisor(index: GLuint, divisor: GLuint)
+  proc glFogCoorddEXT(coord: GLdouble)
+  proc glFrontFace(mode: GLenum)
+  proc glVertexAttrib1hNV(index: GLuint, x: GLhalfNv)
+  proc glNamedProgramLocalParametersI4uivEXT(program: GLuint, target: GLenum, index: GLuint, count: GLsizei, params: ptr GLuint)
+  proc glTexCoord1dv(v: ptr GLdouble)
+  proc glBindVideoCaptureStreamTextureNV(video_capture_slot: GLuint, stream: GLuint, frame_region: GLenum, target: GLenum, texture: GLuint)
+  proc glWindowPos2iARB(x: GLint, y: GLint)
+  proc glVertexAttribFormatNV(index: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, stride: GLsizei)
+  proc glUniform1uivEXT(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glGetVideoivNV(video_slot: GLuint, pname: GLenum, params: ptr GLint)
+  proc glVertexAttrib3fvARB(index: GLuint, v: ptr GLfloat)
+  proc glVertexArraySecondaryColorOffsetEXT(vaobj: GLuint, buffer: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glSecondaryColor3bv(v: ptr GLbyte)
+  proc glDispatchComputeGroupSizeARB(num_groups_x: GLuint, num_groups_y: GLuint, num_groups_z: GLuint, group_size_x: GLuint, group_size_y: GLuint, group_size_z: GLuint)
+  proc glNamedCopyBufferSubDataEXT(readBuffer: GLuint, writeBuffer: GLuint, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr)
+  proc glSampleCoverage(value: GLfloat, invert: GLboolean)
+  proc glGetnMapfvARB(target: GLenum, query: GLenum, bufSize: GLsizei, v: ptr GLfloat)
+  proc glVertexStream2svATI(stream: GLenum, coords: ptr GLshort)
+  proc glProgramParameters4fvNV(target: GLenum, index: GLuint, count: GLsizei, v: ptr GLfloat)
+  proc glVertexAttrib4fARB(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glIndexd(c: GLdouble)
+  proc glGetInteger64v(pname: GLenum, params: ptr GLint64)
+  proc glGetMultiTexImageEXT(texunit: GLenum, target: GLenum, level: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glLightModelx(pname: GLenum, param: GLfixed)
+  proc glMap2f(target: GLenum, u1: GLfloat, u2: GLfloat, ustride: GLint, uorder: GLint, v1: GLfloat, v2: GLfloat, vstride: GLint, vorder: GLint, points: ptr GLfloat)
+  proc glSecondaryColorPointerListIBM(size: GLint, `type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glVertexArrayVertexAttribIOffsetEXT(vaobj: GLuint, buffer: GLuint, index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glProgramUniformHandleui64vARB(program: GLuint, location: GLint, count: GLsizei, values: ptr GLuint64)
+  proc glActiveProgramEXT(program: GLuint)
+  proc glProgramUniformMatrix4x3fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glCompressedTexSubImage3DARB(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glBindProgramPipelineEXT(pipeline: GLuint)
+  proc glDetailTexFuncSGIS(target: GLenum, n: GLsizei, points: ptr GLfloat)
+  proc glSecondaryColor3ubEXT(red: GLubyte, green: GLubyte, blue: GLubyte)
+  proc glDrawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instancecount: GLsizei)
+  proc glWindowPos3fARB(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glNamedProgramLocalParameter4fEXT(program: GLuint, target: GLenum, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glTextureParameterfvEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glProgramUniformHandleui64ARB(program: GLuint, location: GLint, value: GLuint64)
+  proc glHistogramEXT(target: GLenum, width: GLsizei, internalformat: GLenum, sink: GLboolean)
+  proc glResumeTransformFeedbackNV()
+  proc glGetMaterialxv(face: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glMultiTexCoord1sv(target: GLenum, v: ptr GLshort)
+  proc glReadInstrumentsSGIX(marker: GLint)
+  proc glTexCoord4hNV(s: GLhalfNv, t: GLhalfNv, r: GLhalfNv, q: GLhalfNv)
+  proc glVertexAttribL4i64vNV(index: GLuint, v: ptr GLint64Ext)
+  proc glEnableVariantClientStateEXT(id: GLuint)
+  proc glSyncTextureINTEL(texture: GLuint)
+  proc glGetObjectPtrLabel(`ptr`: ptr pointer, bufSize: GLsizei, length: ptr GLsizei, label: cstring)
+  proc glCopyTexSubImage1D(target: GLenum, level: GLint, xoffset: GLint, x: GLint, y: GLint, width: GLsizei)
+  proc glOrthofOES(l: GLfloat, r: GLfloat, b: GLfloat, t: GLfloat, n: GLfloat, f: GLfloat)
+  proc glWindowPos3sARB(x: GLshort, y: GLshort, z: GLshort)
+  proc glIsBufferARB(buffer: GLuint): GLboolean
+  proc glColor3sv(v: ptr GLshort)
+  proc glEvalMesh1(mode: GLenum, i1: GLint, i2: GLint)
+  proc glMultiDrawArrays(mode: GLenum, first: ptr GLint, count: ptr GLsizei, drawcount: GLsizei)
+  proc glGetMultiTexEnvfvEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glWindowPos3fMESA(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glExtGetFramebuffersQCOM(framebuffers: ptr GLuint, maxFramebuffers: GLint, numFramebuffers: ptr GLint)
+  proc glTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glVertexAttrib4uiv(index: GLuint, v: ptr GLuint)
+  proc glProgramUniformui64NV(program: GLuint, location: GLint, value: GLuint64Ext)
+  proc glMultiTexCoord2ivARB(target: GLenum, v: ptr GLint)
+  proc glProgramUniform4i64NV(program: GLuint, location: GLint, x: GLint64Ext, y: GLint64Ext, z: GLint64Ext, w: GLint64Ext)
+  proc glWindowPos2svMESA(v: ptr GLshort)
+  proc glVertexAttrib3dv(index: GLuint, v: ptr GLdouble)
+  proc glColor4i(red: GLint, green: GLint, blue: GLint, alpha: GLint)
+  proc glClampColor(target: GLenum, clamp: GLenum)
+  proc glVertexP2ui(`type`: GLenum, value: GLuint)
+  proc glGenQueries(n: GLsizei, ids: ptr GLuint)
+  proc glBindBufferOffsetNV(target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr)
+  proc glGetFragDataLocation(program: GLuint, name: cstring): GLint
+  proc glVertexAttribs2svNV(index: GLuint, count: GLsizei, v: ptr GLshort)
+  proc glGetPathLengthNV(path: GLuint, startSegment: GLsizei, numSegments: GLsizei): GLfloat
+  proc glVertexAttrib3dARB(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glMultiTexGenfvEXT(texunit: GLenum, coord: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glFlushPixelDataRangeNV(target: GLenum)
+  proc glReplacementCodeuiNormal3fVertex3fSUN(rc: GLuint, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glPathParameteriNV(path: GLuint, pname: GLenum, value: GLint)
+  proc glVertexAttribI2iEXT(index: GLuint, x: GLint, y: GLint)
+  proc glPixelStorei(pname: GLenum, param: GLint)
+  proc glGetNamedFramebufferParameterivEXT(framebuffer: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetTexEnvxv(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glPathStringNV(path: GLuint, format: GLenum, length: GLsizei, pathString: pointer)
+  proc glDepthMask(flag: GLboolean)
+  proc glCopyTexImage1D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, border: GLint)
+  proc glDepthRangexOES(n: GLfixed, f: GLfixed)
+  proc glUniform2i64vNV(location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glSetFragmentShaderConstantATI(dst: GLuint, value: ptr GLfloat)
+  proc glAttachShader(program: GLuint, shader: GLuint)
+  proc glGetFramebufferParameterivEXT(framebuffer: GLuint, pname: GLenum, params: ptr GLint)
+  proc glPointParameteriNV(pname: GLenum, param: GLint)
+  proc glWindowPos2dMESA(x: GLdouble, y: GLdouble)
+  proc glGetTextureParameterfvEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glTexBumpParameterfvATI(pname: GLenum, param: ptr GLfloat)
+  proc glCompressedTexImage1DARB(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glGetTexGendv(coord: GLenum, pname: GLenum, params: ptr GLdouble)
+  proc glGetFragmentMaterialfvSGIX(face: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glBeginConditionalRenderNVX(id: GLuint)
+  proc glLightModelxOES(pname: GLenum, param: GLfixed)
+  proc glTexCoord2xOES(s: GLfixed, t: GLfixed)
+  proc glProgramUniformMatrix2x4fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glRasterPos2xvOES(coords: ptr GLfixed)
+  proc glGetMapiv(target: GLenum, query: GLenum, v: ptr GLint)
+  proc glGetImageHandleARB(texture: GLuint, level: GLint, layered: GLboolean, layer: GLint, format: GLenum): GLuint64
+  proc glVDPAURegisterVideoSurfaceNV(vdpSurface: pointer, target: GLenum, numTextureNames: GLsizei, textureNames: ptr GLuint): GLvdpauSurfaceNv
+  proc glVertexAttribL2dEXT(index: GLuint, x: GLdouble, y: GLdouble)
+  proc glVertexAttrib1dvNV(index: GLuint, v: ptr GLdouble)
+  proc glPollAsyncSGIX(markerp: ptr GLuint): GLint
+  proc glCullParameterfvEXT(pname: GLenum, params: ptr GLfloat)
+  proc glMakeNamedBufferResidentNV(buffer: GLuint, access: GLenum)
+  proc glPointParameterfSGIS(pname: GLenum, param: GLfloat)
+  proc glGenLists(range: GLsizei): GLuint
+  proc glGetTexBumpParameterfvATI(pname: GLenum, param: ptr GLfloat)
+  proc glCompressedMultiTexSubImage2DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, bits: pointer)
+  proc glFinishFenceNV(fence: GLuint)
+  proc glPointSize(size: GLfloat)
+  proc glCompressedTextureImage2DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, bits: pointer)
+  proc glGetUniformui64vNV(program: GLuint, location: GLint, params: ptr GLuint64Ext)
+  proc glGetMapControlPointsNV(target: GLenum, index: GLuint, `type`: GLenum, ustride: GLsizei, vstride: GLsizei, packed: GLboolean, points: pointer)
+  proc glGetPathColorGenfvNV(color: GLenum, pname: GLenum, value: ptr GLfloat)
+  proc glTexCoord2f(s: GLfloat, t: GLfloat)
+  proc glSampleMaski(index: GLuint, mask: GLbitfield)
+  proc glReadBufferIndexedEXT(src: GLenum, index: GLint)
+  proc glCoverFillPathNV(path: GLuint, coverMode: GLenum)
+  proc glColorTableParameterfvSGI(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glDeleteVertexArraysAPPLE(n: GLsizei, arrays: ptr GLuint)
+  proc glGetVertexAttribIiv(index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glWeightbvARB(size: GLint, weights: ptr GLbyte)
+  proc glGetNamedBufferPointervEXT(buffer: GLuint, pname: GLenum, params: ptr pointer)
+  proc glTexCoordPointer(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glColor4fv(v: ptr GLfloat)
+  proc glGetnUniformfvARB(program: GLuint, location: GLint, bufSize: GLsizei, params: ptr GLfloat)
+  proc glMaterialxOES(face: GLenum, pname: GLenum, param: GLfixed)
+  proc glGetFixedv(pname: GLenum, params: ptr GLfixed)
+  proc glMaterialf(face: GLenum, pname: GLenum, param: GLfloat)
+  proc glVideoCaptureStreamParameterfvNV(video_capture_slot: GLuint, stream: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glGetDebugMessageLogAMD(count: GLuint, bufsize: GLsizei, categories: ptr GLenum, severities: ptr GLuint, ids: ptr GLuint, lengths: ptr GLsizei, message: cstring): GLuint
+  proc glProgramUniform2uiv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glMatrixMultTransposedEXT(mode: GLenum, m: ptr GLdouble)
+  proc glIsPointInStrokePathNV(path: GLuint, x: GLfloat, y: GLfloat): GLboolean
+  proc glDisable(cap: GLenum)
+  proc glCompileShader(shader: GLuint)
+  proc glLoadTransposeMatrixd(m: ptr GLdouble)
+  proc glGetMultiTexParameterIuivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glGetHistogram(target: GLenum, reset: GLboolean, format: GLenum, `type`: GLenum, values: pointer)
+  proc glMultiTexCoord3fvARB(target: GLenum, v: ptr GLfloat)
+  proc glColor4xvOES(components: ptr GLfixed)
+  proc glIsBuffer(buffer: GLuint): GLboolean
+  proc glVertex2dv(v: ptr GLdouble)
+  proc glNamedProgramLocalParameterI4uivEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLuint)
+  proc glPixelTexGenParameteriSGIS(pname: GLenum, param: GLint)
+  proc glBindVertexBuffers(first: GLuint, count: GLsizei, buffers: ptr GLuint, offsets: ptr GLintptr, strides: ptr GLsizei)
+  proc glUniform1ui64vNV(location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glColor4ub(red: GLubyte, green: GLubyte, blue: GLubyte, alpha: GLubyte)
+  proc glConvolutionParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glReplacementCodeuiColor4fNormal3fVertex3fSUN(rc: GLuint, r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glVertexAttribI2ui(index: GLuint, x: GLuint, y: GLuint)
+  proc glDeleteNamesAMD(identifier: GLenum, num: GLuint, names: ptr GLuint)
+  proc glPixelTransferxOES(pname: GLenum, param: GLfixed)
+  proc glVertexAttrib4ivARB(index: GLuint, v: ptr GLint)
+  proc glLightModeli(pname: GLenum, param: GLint)
+  proc glGetHistogramEXT(target: GLenum, reset: GLboolean, format: GLenum, `type`: GLenum, values: pointer)
+  proc glWindowPos3svMESA(v: ptr GLshort)
+  proc glRasterPos3iv(v: ptr GLint)
+  proc glCopyTextureSubImage3DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glTextureStorage3DMultisampleEXT(texture: GLuint, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, fixedsamplelocations: GLboolean)
+  proc glIsNameAMD(identifier: GLenum, name: GLuint): GLboolean
+  proc glProgramUniformMatrix3fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glGetProgramParameterfvNV(target: GLenum, index: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glTexStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei)
+  proc glMultiTexCoord2xOES(texture: GLenum, s: GLfixed, t: GLfixed)
+  proc glWindowPos2fARB(x: GLfloat, y: GLfloat)
+  proc glGetProgramResourceIndex(program: GLuint, programInterface: GLenum, name: cstring): GLuint
+  proc glProgramUniform2uivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glMakeImageHandleNonResidentNV(handle: GLuint64)
+  proc glNamedProgramLocalParameter4fvEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glInvalidateFramebuffer(target: GLenum, numAttachments: GLsizei, attachments: ptr GLenum)
+  proc glTexStorage3DMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, fixedsamplelocations: GLboolean)
+  proc glMapVertexAttrib2fAPPLE(index: GLuint, size: GLuint, u1: GLfloat, u2: GLfloat, ustride: GLint, uorder: GLint, v1: GLfloat, v2: GLfloat, vstride: GLint, vorder: GLint, points: ptr GLfloat)
+  proc glCombinerParameterfNV(pname: GLenum, param: GLfloat)
+  proc glCopyMultiTexImage2DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint)
+  proc glBindVertexShaderEXT(id: GLuint)
+  proc glPathGlyphsNV(firstPathName: GLuint, fontTarget: GLenum, fontName: pointer, fontStyle: GLbitfield, numGlyphs: GLsizei, `type`: GLenum, charcodes: pointer, handleMissingGlyphs: GLenum, pathParameterTemplate: GLuint, emScale: GLfloat)
+  proc glProgramLocalParametersI4uivNV(target: GLenum, index: GLuint, count: GLsizei, params: ptr GLuint)
+  proc glMultiTexCoord3hvNV(target: GLenum, v: ptr GLhalfNv)
+  proc glMultiTexCoordP2uiv(texture: GLenum, `type`: GLenum, coords: ptr GLuint)
+  proc glDisableVariantClientStateEXT(id: GLuint)
+  proc glGetTexLevelParameterxvOES(target: GLenum, level: GLint, pname: GLenum, params: ptr GLfixed)
+  proc glRasterPos2sv(v: ptr GLshort)
+  proc glWeightPathsNV(resultPath: GLuint, numPaths: GLsizei, paths: ptr GLuint, weights: ptr GLfloat)
+  proc glDrawBuffersNV(n: GLsizei, bufs: ptr GLenum)
+  proc glBindBufferARB(target: GLenum, buffer: GLuint)
+  proc glVariantbvEXT(id: GLuint, `addr`: ptr GLbyte)
+  proc glColorP3uiv(`type`: GLenum, color: ptr GLuint)
+  proc glBlendEquationEXT(mode: GLenum)
+  proc glProgramLocalParameterI4uivNV(target: GLenum, index: GLuint, params: ptr GLuint)
+  proc glRenderMode(mode: GLenum): GLint
+  proc glVertexStream4fATI(stream: GLenum, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glGetObjectLabelEXT(`type`: GLenum, `object`: GLuint, bufSize: GLsizei, length: ptr GLsizei, label: cstring)
+  proc glNamedFramebufferTexture3DEXT(framebuffer: GLuint, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, zoffset: GLint)
+  proc glLoadMatrixf(m: ptr GLfloat)
+  proc glGetQueryObjectuivEXT(id: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glBindVideoCaptureStreamBufferNV(video_capture_slot: GLuint, stream: GLuint, frame_region: GLenum, offset: GLintPtrArb)
+  proc glMatrixOrthoEXT(mode: GLenum, left: GLdouble, right: GLdouble, bottom: GLdouble, top: GLdouble, zNear: GLdouble, zFar: GLdouble)
+  proc glBlendFunc(sfactor: GLenum, dfactor: GLenum)
+  proc glTexGenxvOES(coord: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glMatrixMode(mode: GLenum)
+  proc glColorTableParameterivSGI(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetProgramInfoLog(program: GLuint, bufSize: GLsizei, length: ptr GLsizei, infoLog: cstring)
+  proc glGetSeparableFilter(target: GLenum, format: GLenum, `type`: GLenum, row: pointer, column: pointer, span: pointer)
+  proc glFogfv(pname: GLenum, params: ptr GLfloat)
+  proc glDrawTexfvOES(coords: ptr GLfloat)
+  proc glClipPlanexIMG(p: GLenum, eqn: ptr GLfixed)
+  proc glResetHistogramEXT(target: GLenum)
+  proc glMemoryBarrier(barriers: GLbitfield)
+  proc glGetPixelMapusv(map: GLenum, values: ptr GLushort)
+  proc glEvalCoord2f(u: GLfloat, v: GLfloat)
+  proc glUniform4uiv(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glIsProgramARB(program: GLuint): GLboolean
+  proc glPointParameterfv(pname: GLenum, params: ptr GLfloat)
+  proc glTexBuffer(target: GLenum, internalformat: GLenum, buffer: GLuint)
+  proc glVertexAttrib1s(index: GLuint, x: GLshort)
+  proc glRenderbufferStorageMultisampleEXT(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glMapNamedBufferEXT(buffer: GLuint, access: GLenum): pointer
+  proc glDebugMessageCallbackAMD(callback: GLdebugProcAmd, userParam: ptr pointer)
+  proc glGetTexEnvfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttribI3uivEXT(index: GLuint, v: ptr GLuint)
+  proc glMultiTexEnvfEXT(texunit: GLenum, target: GLenum, pname: GLenum, param: GLfloat)
+  proc glGetUniformiv(program: GLuint, location: GLint, params: ptr GLint)
+  proc glProgramLocalParameters4fvEXT(target: GLenum, index: GLuint, count: GLsizei, params: ptr GLfloat)
+  proc glStencilStrokePathInstancedNV(numPaths: GLsizei, pathNameType: GLenum, paths: pointer, pathBase: GLuint, reference: GLint, mask: GLuint, transformType: GLenum, transformValues: ptr GLfloat)
+  proc glBeginConditionalRender(id: GLuint, mode: GLenum)
+  proc glVertexAttribI3uiEXT(index: GLuint, x: GLuint, y: GLuint, z: GLuint)
+  proc glVDPAUMapSurfacesNV(numSurfaces: GLsizei, surfaces: ptr GLvdpauSurfaceNv)
+  proc glGetProgramResourceName(program: GLuint, programInterface: GLenum, index: GLuint, bufSize: GLsizei, length: ptr GLsizei, name: cstring)
+  proc glMultiTexCoord4f(target: GLenum, s: GLfloat, t: GLfloat, r: GLfloat, q: GLfloat)
+  proc glVertexAttrib2hNV(index: GLuint, x: GLhalfNv, y: GLhalfNv)
+  proc glDrawArraysInstancedNV(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei)
+  proc glClearAccum(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat)
+  proc glVertexAttribI4usv(index: GLuint, v: ptr GLushort)
+  proc glGetProgramNamedParameterfvNV(id: GLuint, len: GLsizei, name: ptr GLubyte, params: ptr GLfloat)
+  proc glTextureLightEXT(pname: GLenum)
+  proc glPathSubCoordsNV(path: GLuint, coordStart: GLsizei, numCoords: GLsizei, coordType: GLenum, coords: pointer)
+  proc glBindImageTexture(unit: GLuint, texture: GLuint, level: GLint, layered: GLboolean, layer: GLint, access: GLenum, format: GLenum)
+  proc glGenVertexArraysAPPLE(n: GLsizei, arrays: ptr GLuint)
+  proc glFogCoordf(coord: GLfloat)
+  proc glFrameTerminatorGREMEDY()
+  proc glValidateProgramPipelineEXT(pipeline: GLuint)
+  proc glScalexOES(x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glReplacementCodeuiColor3fVertex3fvSUN(rc: ptr GLuint, c: ptr GLfloat, v: ptr GLfloat)
+  proc glProgramNamedParameter4dNV(id: GLuint, len: GLsizei, name: ptr GLubyte, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glMultiDrawElementsIndirectCountARB(mode: GLenum, `type`: GLenum, indirect: GLintptr, drawcount: GLintptr, maxdrawcount: GLsizei, stride: GLsizei)
+  proc glReferencePlaneSGIX(equation: ptr GLdouble)
+  proc glNormalStream3iATI(stream: GLenum, nx: GLint, ny: GLint, nz: GLint)
+  proc glGetColorTableParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glGetAttribLocation(program: GLuint, name: cstring): GLint
+  proc glMultiTexParameterfEXT(texunit: GLenum, target: GLenum, pname: GLenum, param: GLfloat)
+  proc glGenFencesNV(n: GLsizei, fences: ptr GLuint)
+  proc glUniform4dv(location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glGetTexLevelParameterfv(target: GLenum, level: GLint, pname: GLenum, params: ptr GLfloat)
+  proc glProgramUniform1ivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glProgramUniform1dvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glLoadTransposeMatrixdARB(m: ptr GLdouble)
+  proc glVertexAttrib2fvARB(index: GLuint, v: ptr GLfloat)
+  proc glMultiTexGendEXT(texunit: GLenum, coord: GLenum, pname: GLenum, param: GLdouble)
+  proc glProgramUniformMatrix4x3dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glUniform4ui(location: GLint, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint)
+  proc glTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glVertexAttrib3hNV(index: GLuint, x: GLhalfNv, y: GLhalfNv, z: GLhalfNv)
+  proc glRotatexOES(angle: GLfixed, x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glGenTextures(n: GLsizei, textures: ptr GLuint)
+  proc glCheckFramebufferStatusOES(target: GLenum): GLenum
+  proc glGetVideoCaptureStreamdvNV(video_capture_slot: GLuint, stream: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glCompressedTextureSubImage1DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, imageSize: GLsizei, bits: pointer)
+  proc glCurrentPaletteMatrixOES(matrixpaletteindex: GLuint)
+  proc glCompressedMultiTexSubImage1DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, imageSize: GLsizei, bits: pointer)
+  proc glNormal3d(nx: GLdouble, ny: GLdouble, nz: GLdouble)
+  proc glMultiTexCoord1fv(target: GLenum, v: ptr GLfloat)
+  proc glProgramUniform2uiEXT(program: GLuint, location: GLint, v0: GLuint, v1: GLuint)
+  proc glMultiTexCoord3fARB(target: GLenum, s: GLfloat, t: GLfloat, r: GLfloat)
+  proc glRasterPos3xOES(x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glEGLImageTargetRenderbufferStorageOES(target: GLenum, image: GLeglImageOes)
+  proc glGetAttribLocationARB(programObj: GLhandleArb, name: cstring): GLint
+  proc glProgramNamedParameter4dvNV(id: GLuint, len: GLsizei, name: ptr GLubyte, v: ptr GLdouble)
+  proc glProgramLocalParameterI4uiNV(target: GLenum, index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint)
+  proc glNamedFramebufferTextureFaceEXT(framebuffer: GLuint, attachment: GLenum, texture: GLuint, level: GLint, face: GLenum)
+  proc glIndexf(c: GLfloat)
+  proc glExtTexObjectStateOverrideiQCOM(target: GLenum, pname: GLenum, param: GLint)
+  proc glCoverageOperationNV(operation: GLenum)
+  proc glColorP4uiv(`type`: GLenum, color: ptr GLuint)
+  proc glDeleteSync(sync: GLsync)
+  proc glGetHistogramParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glTexCoord4fColor4fNormal3fVertex4fSUN(s: GLfloat, t: GLfloat, p: GLfloat, q: GLfloat, r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glEndPerfMonitorAMD(monitor: GLuint)
+  proc glGetInternalformati64v(target: GLenum, internalformat: GLenum, pname: GLenum, bufSize: GLsizei, params: ptr GLint64)
+  proc glGenNamesAMD(identifier: GLenum, num: GLuint, names: ptr GLuint)
+  proc glDrawElementsInstancedBaseVertexBaseInstance(mode: GLenum, count: GLsizei, `type`: GLenum, indices: ptr pointer, instancecount: GLsizei, basevertex: GLint, baseinstance: GLuint)
+  proc glMultiTexCoord4i(target: GLenum, s: GLint, t: GLint, r: GLint, q: GLint)
+  proc glVertexAttribL1dv(index: GLuint, v: ptr GLdouble)
+  proc glGetProgramNamedParameterdvNV(id: GLuint, len: GLsizei, name: ptr GLubyte, params: ptr GLdouble)
+  proc glSetLocalConstantEXT(id: GLuint, `type`: GLenum, `addr`: pointer)
+  proc glProgramBinary(program: GLuint, binaryFormat: GLenum, binary: pointer, length: GLsizei)
+  proc glVideoCaptureNV(video_capture_slot: GLuint, sequence_num: ptr GLuint, capture_time: ptr GLuint64Ext): GLenum
+  proc glDebugMessageEnableAMD(category: GLenum, severity: GLenum, count: GLsizei, ids: ptr GLuint, enabled: GLboolean)
+  proc glVertexAttribI1i(index: GLuint, x: GLint)
+  proc glVertexWeighthNV(weight: GLhalfNv)
+  proc glTextureParameterIivEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glClipPlanefIMG(p: GLenum, eqn: ptr GLfloat)
+  proc glGetLightxv(light: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glGetAttachedObjectsARB(containerObj: GLhandleArb, maxCount: GLsizei, count: ptr GLsizei, obj: ptr GLhandleArb)
+  proc glVertexAttrib4fv(index: GLuint, v: ptr GLfloat)
+  proc glDisableVertexAttribArrayARB(index: GLuint)
+  proc glWindowPos3fvARB(v: ptr GLfloat)
+  proc glClearDepthdNV(depth: GLdouble)
+  proc glMapParameterivNV(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glEndConditionalRenderNVX()
+  proc glGetFragmentLightivSGIX(light: GLenum, pname: GLenum, params: ptr GLint)
+  proc glProgramUniformMatrix4fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glVertexStream1iATI(stream: GLenum, x: GLint)
+  proc glColorP3ui(`type`: GLenum, color: GLuint)
+  proc glGetLightxOES(light: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glGetLightiv(light: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertexStream3dATI(stream: GLenum, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glProgramUniform1iEXT(program: GLuint, location: GLint, v0: GLint)
+  proc glSecondaryColorFormatNV(size: GLint, `type`: GLenum, stride: GLsizei)
+  proc glDrawElementsBaseVertex(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer, basevertex: GLint)
+  proc glGenFencesAPPLE(n: GLsizei, fences: ptr GLuint)
+  proc glBinormal3svEXT(v: ptr GLshort)
+  proc glUseProgramStagesEXT(pipeline: GLuint, stages: GLbitfield, program: GLuint)
+  proc glDebugMessageCallbackKHR(callback: GLdebugProcKhr, userParam: ptr pointer)
+  proc glCopyMultiTexSubImage3DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glColor4hvNV(v: ptr GLhalfNv)
+  proc glFenceSync(condition: GLenum, flags: GLbitfield): GLsync
+  proc glTexCoordPointerListIBM(size: GLint, `type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glPopName()
+  proc glColor3fVertex3fvSUN(c: ptr GLfloat, v: ptr GLfloat)
+  proc glGetUniformfv(program: GLuint, location: GLint, params: ptr GLfloat)
+  proc glMultiTexCoord2hNV(target: GLenum, s: GLhalfNv, t: GLhalfNv)
+  proc glLightxv(light: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glVideoCaptureStreamParameterivNV(video_capture_slot: GLuint, stream: GLuint, pname: GLenum, params: ptr GLint)
+  proc glEvalCoord1xvOES(coords: ptr GLfixed)
+  proc glGetProgramEnvParameterIivNV(target: GLenum, index: GLuint, params: ptr GLint)
+  proc glObjectPurgeableAPPLE(objectType: GLenum, name: GLuint, option: GLenum): GLenum
+  proc glRequestResidentProgramsNV(n: GLsizei, programs: ptr GLuint)
+  proc glIsImageHandleResidentNV(handle: GLuint64): GLboolean
+  proc glColor3hvNV(v: ptr GLhalfNv)
+  proc glMultiTexCoord2dARB(target: GLenum, s: GLdouble, t: GLdouble)
+  proc glDeletePathsNV(path: GLuint, range: GLsizei)
+  proc glVertexAttrib4Nsv(index: GLuint, v: ptr GLshort)
+  proc glTexEnvf(target: GLenum, pname: GLenum, param: GLfloat)
+  proc glGlobalAlphaFactoriSUN(factor: GLint)
+  proc glBlendColorEXT(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat)
+  proc glSecondaryColor3usvEXT(v: ptr GLushort)
+  proc glProgramEnvParameterI4uiNV(target: GLenum, index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint)
+  proc glTexImage4DSGIS(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, size4d: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glMatrixPushEXT(mode: GLenum)
+  proc glGetPixelTexGenParameterivSGIS(pname: GLenum, params: ptr GLint)
+  proc glVariantuivEXT(id: GLuint, `addr`: ptr GLuint)
+  proc glTexParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glGetSubroutineUniformLocation(program: GLuint, shadertype: GLenum, name: cstring): GLint
+  proc glProgramUniformMatrix3fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glDrawBuffersATI(n: GLsizei, bufs: ptr GLenum)
+  proc glGetVertexAttribivNV(index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glMultiTexCoord4bvOES(texture: GLenum, coords: ptr GLbyte)
+  proc glCompressedTexSubImage1DARB(target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glClientActiveTexture(texture: GLenum)
+  proc glVertexAttrib2fARB(index: GLuint, x: GLfloat, y: GLfloat)
+  proc glProgramUniform2fvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetBufferParameterui64vNV(target: GLenum, pname: GLenum, params: ptr GLuint64Ext)
+  proc glVertexStream3dvATI(stream: GLenum, coords: ptr GLdouble)
+  proc glReplacementCodeuiNormal3fVertex3fvSUN(rc: ptr GLuint, n: ptr GLfloat, v: ptr GLfloat)
+  proc glVertexAttrib4svNV(index: GLuint, v: ptr GLshort)
+  proc glClearBufferSubData(target: GLenum, internalformat: GLenum, offset: GLintptr, size: GLsizeiptr, format: GLenum, `type`: GLenum, data: ptr pointer)
+  proc glVertexStream2sATI(stream: GLenum, x: GLshort, y: GLshort)
+  proc glTextureImage2DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetListParameterfvSGIX(list: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glUniform3uiv(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glIsTexture(texture: GLuint): GLboolean
+  proc glObjectUnpurgeableAPPLE(objectType: GLenum, name: GLuint, option: GLenum): GLenum
+  proc glGetVertexAttribdv(index: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glGetPointeri_vEXT(pname: GLenum, index: GLuint, params: ptr pointer)
+  proc glSampleCoveragex(value: GLclampx, invert: GLboolean)
+  proc glColor3f(red: GLfloat, green: GLfloat, blue: GLfloat)
+  proc glGetnMapivARB(target: GLenum, query: GLenum, bufSize: GLsizei, v: ptr GLint)
+  proc glMakeTextureHandleResidentARB(handle: GLuint64)
+  proc glSecondaryColorP3ui(`type`: GLenum, color: GLuint)
+  proc glMultiTexCoord4sARB(target: GLenum, s: GLshort, t: GLshort, r: GLshort, q: GLshort)
+  proc glUniform3i64NV(location: GLint, x: GLint64Ext, y: GLint64Ext, z: GLint64Ext)
+  proc glVDPAUGetSurfaceivNV(surface: GLvdpauSurfaceNv, pname: GLenum, bufSize: GLsizei, length: ptr GLsizei, values: ptr GLint)
+  proc glTexBufferEXT(target: GLenum, internalformat: GLenum, buffer: GLuint)
+  proc glVertexAttribI4ubvEXT(index: GLuint, v: ptr GLubyte)
+  proc glDeleteFramebuffersOES(n: GLsizei, framebuffers: ptr GLuint)
+  proc glColor3fVertex3fSUN(r: GLfloat, g: GLfloat, b: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glCombinerInputNV(stage: GLenum, portion: GLenum, variable: GLenum, input: GLenum, mapping: GLenum, componentUsage: GLenum)
+  proc glPolygonOffsetEXT(factor: GLfloat, bias: GLfloat)
+  proc glWindowPos4dMESA(x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glVertex3f(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glTexCoord3f(s: GLfloat, t: GLfloat, r: GLfloat)
+  proc glMultiTexCoord1fARB(target: GLenum, s: GLfloat)
+  proc glVertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glGetFragDataLocationEXT(program: GLuint, name: cstring): GLint
+  proc glFlushMappedNamedBufferRangeEXT(buffer: GLuint, offset: GLintptr, length: GLsizeiptr)
+  proc glVertexAttrib1sARB(index: GLuint, x: GLshort)
+  proc glBitmapxOES(width: GLsizei, height: GLsizei, xorig: GLfixed, yorig: GLfixed, xmove: GLfixed, ymove: GLfixed, bitmap: ptr GLubyte)
+  proc glEnableVertexArrayAttribEXT(vaobj: GLuint, index: GLuint)
+  proc glDeleteRenderbuffers(n: GLsizei, renderbuffers: ptr GLuint)
+  proc glFramebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint)
+  proc glInvalidateTexImage(texture: GLuint, level: GLint)
+  proc glProgramUniform2i64NV(program: GLuint, location: GLint, x: GLint64Ext, y: GLint64Ext)
+  proc glTextureImage3DMultisampleNV(texture: GLuint, target: GLenum, samples: GLsizei, internalFormat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, fixedSampleLocations: GLboolean)
+  proc glValidateProgram(program: GLuint)
+  proc glUniform1dv(location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glNormalStream3dvATI(stream: GLenum, coords: ptr GLdouble)
+  proc glMultiDrawElementsIndirect(mode: GLenum, `type`: GLenum, indirect: ptr pointer, drawcount: GLsizei, stride: GLsizei)
+  proc glVertexBlendARB(count: GLint)
+  proc glIsSampler(sampler: GLuint): GLboolean
+  proc glVariantdvEXT(id: GLuint, `addr`: ptr GLdouble)
+  proc glProgramUniformMatrix3x2fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glVertexStream4fvATI(stream: GLenum, coords: ptr GLfloat)
+  proc glOrthoxOES(l: GLfixed, r: GLfixed, b: GLfixed, t: GLfixed, n: GLfixed, f: GLfixed)
+  proc glColorFormatNV(size: GLint, `type`: GLenum, stride: GLsizei)
+  proc glFogCoordPointer(`type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glVertexAttrib3dvARB(index: GLuint, v: ptr GLdouble)
+  proc glVertex3bOES(x: GLbyte, y: GLbyte)
+  proc glVertexAttribFormat(attribindex: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, relativeoffset: GLuint)
+  proc glTexCoord4fVertex4fSUN(s: GLfloat, t: GLfloat, p: GLfloat, q: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glEnableDriverControlQCOM(driverControl: GLuint)
+  proc glPointParameteri(pname: GLenum, param: GLint)
+  proc glVertexAttribI2i(index: GLuint, x: GLint, y: GLint)
+  proc glGetDriverControlStringQCOM(driverControl: GLuint, bufSize: GLsizei, length: ptr GLsizei, driverControlString: cstring)
+  proc glGetTexLevelParameteriv(target: GLenum, level: GLint, pname: GLenum, params: ptr GLint)
+  proc glGetTextureSubImage(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; `type`: GLenum; bufSize: GLsizei; pixels: pointer)
+  proc glGetHandleARB(pname: GLenum): GLhandleArb
+  proc glIndexubv(c: ptr GLubyte)
+  proc glBlendFunciARB(buf: GLuint, src: GLenum, dst: GLenum)
+  proc glColor4usv(v: ptr GLushort)
+  proc glBlendEquationSeparateOES(modeRgb: GLenum, modeAlpha: GLenum)
+  proc glVertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint)
+  proc glProgramUniform3f(program: GLuint, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)
+  proc glVertexAttribL3i64vNV(index: GLuint, v: ptr GLint64Ext)
+  proc glWeightdvARB(size: GLint, weights: ptr GLdouble)
+  proc glVertexArrayRangeAPPLE(length: GLsizei, `pointer`: pointer)
+  proc glMapGrid2d(un: GLint, u1: GLdouble, u2: GLdouble, vn: GLint, v1: GLdouble, v2: GLdouble)
+  proc glFogiv(pname: GLenum, params: ptr GLint)
+  proc glUniform2f(location: GLint, v0: GLfloat, v1: GLfloat)
+  proc glGetDoublei_v(target: GLenum, index: GLuint, data: ptr GLdouble)
+  proc glGetVertexAttribfv(index: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttribI2ivEXT(index: GLuint, v: ptr GLint)
+  proc glIsProgramNV(id: GLuint): GLboolean
+  proc glTexCoord1hNV(s: GLhalfNv)
+  proc glMinSampleShadingARB(value: GLfloat)
+  proc glMultiDrawElements(mode: GLenum, count: ptr GLsizei, `type`: GLenum, indices: ptr pointer, drawcount: GLsizei)
+  proc glGetQueryObjectuiv(id: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glReadBuffer(mode: GLenum)
+  proc glMultiTexCoordP3uiv(texture: GLenum, `type`: GLenum, coords: ptr GLuint)
+  proc glUniformMatrix3x2fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glBindRenderbuffer(target: GLenum, renderbuffer: GLuint)
+  proc glBinormal3sEXT(bx: GLshort, by: GLshort, bz: GLshort)
+  proc glUniform4iARB(location: GLint, v0: GLint, v1: GLint, v2: GLint, v3: GLint)
+  proc glGetUniformOffsetEXT(program: GLuint, location: GLint): GLintptr
+  proc glDeleteLists(list: GLuint, range: GLsizei)
+  proc glVertexAttribI1iEXT(index: GLuint, x: GLint)
+  proc glFramebufferTexture1D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glVertexAttribI2uiv(index: GLuint, v: ptr GLuint)
+  proc glBindFragDataLocation(program: GLuint, color: GLuint, name: cstring)
+  proc glClearStencil(s: GLint)
+  proc glVertexAttrib4Nubv(index: GLuint, v: ptr GLubyte)
+  proc glConvolutionFilter2DEXT(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, image: pointer)
+  proc glGenFramebuffersEXT(n: GLsizei, framebuffers: ptr GLuint)
+  proc glFogCoordfvEXT(coord: ptr GLfloat)
+  proc glGetRenderbufferParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertexAttribs1fvNV(index: GLuint, count: GLsizei, v: ptr GLfloat)
+  proc glTexCoord2fColor3fVertex3fSUN(s: GLfloat, t: GLfloat, r: GLfloat, g: GLfloat, b: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glRasterPos3i(x: GLint, y: GLint, z: GLint)
+  proc glMultiTexSubImage2DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glConvolutionParameteriEXT(target: GLenum, pname: GLenum, params: GLint)
+  proc glVertexAttribI4iEXT(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glVertexAttribL2i64vNV(index: GLuint, v: ptr GLint64Ext)
+  proc glBlendColor(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat)
+  proc glGetPathColorGenivNV(color: GLenum, pname: GLenum, value: ptr GLint)
+  proc glCompressedTextureImage1DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, border: GLint, imageSize: GLsizei, bits: pointer)
+  proc glDrawElementsInstanced(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer, instancecount: GLsizei)
+  proc glFogCoordd(coord: GLdouble)
+  proc glTexParameterxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glWindowPos3svARB(v: ptr GLshort)
+  proc glGetVertexArrayPointervEXT(vaobj: GLuint, pname: GLenum, param: ptr pointer)
+  proc glDrawTextureNV(texture: GLuint, sampler: GLuint, x0: GLfloat, y0: GLfloat, x1: GLfloat, y1: GLfloat, z: GLfloat, s0: GLfloat, t0: GLfloat, s1: GLfloat, t1: GLfloat)
+  proc glUniformMatrix2dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glTexImage3DOES(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glClampColorARB(target: GLenum, clamp: GLenum)
+  proc glTexParameteri(target: GLenum, pname: GLenum, param: GLint)
+  proc glWindowPos4svMESA(v: ptr GLshort)
+  proc glMultiTexCoordP4ui(texture: GLenum, `type`: GLenum, coords: GLuint)
+  proc glVertexP4uiv(`type`: GLenum, value: ptr GLuint)
+  proc glProgramUniform4iEXT(program: GLuint, location: GLint, v0: GLint, v1: GLint, v2: GLint, v3: GLint)
+  proc glTexCoord3xvOES(coords: ptr GLfixed)
+  proc glCopyTexImage2DEXT(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint)
+  proc glGenSamplers(count: GLsizei, samplers: ptr GLuint)
+  proc glRasterPos4iv(v: ptr GLint)
+  proc glWindowPos4sMESA(x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glProgramUniform2dvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glPrioritizeTexturesEXT(n: GLsizei, textures: ptr GLuint, priorities: ptr GLclampf)
+  proc glRects(x1: GLshort, y1: GLshort, x2: GLshort, y2: GLshort)
+  proc glMultiDrawElementsBaseVertex(mode: GLenum, count: ptr GLsizei, `type`: GLenum, indices: ptr pointer, drawcount: GLsizei, basevertex: ptr GLint)
+  proc glProgramBinaryOES(program: GLuint, binaryFormat: GLenum, binary: pointer, length: GLint)
+  proc glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN(rc: ptr GLuint, tc: ptr GLfloat, c: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glGetMinmaxParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glColor4fNormal3fVertex3fSUN(r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glWindowPos2d(x: GLdouble, y: GLdouble)
+  proc glGetPerfMonitorGroupStringAMD(group: GLuint, bufSize: GLsizei, length: ptr GLsizei, groupString: cstring)
+  proc glUniformHandleui64vNV(location: GLint, count: GLsizei, value: ptr GLuint64)
+  proc glBlendEquation(mode: GLenum)
+  proc glMapBufferARB(target: GLenum, access: GLenum): pointer
+  proc glGetMaterialxvOES(face: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glVertexAttribI1ivEXT(index: GLuint, v: ptr GLint)
+  proc glTexCoord4hvNV(v: ptr GLhalfNv)
+  proc glVertexArrayVertexAttribLOffsetEXT(vaobj: GLuint, buffer: GLuint, index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glExtGetShadersQCOM(shaders: ptr GLuint, maxShaders: GLint, numShaders: ptr GLint)
+  proc glWindowPos4ivMESA(v: ptr GLint)
+  proc glVertexAttrib1sNV(index: GLuint, x: GLshort)
+  proc glNormalStream3ivATI(stream: GLenum, coords: ptr GLint)
+  proc glSecondaryColor3fEXT(red: GLfloat, green: GLfloat, blue: GLfloat)
+  proc glVertexArrayFogCoordOffsetEXT(vaobj: GLuint, buffer: GLuint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glGetTextureImageEXT(texture: GLuint, target: GLenum, level: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glVertexAttrib4hNV(index: GLuint, x: GLhalfNv, y: GLhalfNv, z: GLhalfNv, w: GLhalfNv)
+  proc glReplacementCodeusSUN(code: GLushort)
+  proc glPixelTexGenSGIX(mode: GLenum)
+  proc glMultiDrawRangeElementArrayAPPLE(mode: GLenum, start: GLuint, `end`: GLuint, first: ptr GLint, count: ptr GLsizei, primcount: GLsizei)
+  proc glDrawElements(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer)
+  proc glTexCoord1hvNV(v: ptr GLhalfNv)
+  proc glGetPixelMapuiv(map: GLenum, values: ptr GLuint)
+  proc glRasterPos4d(x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glTexImage1D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glConvolutionParameterxOES(target: GLenum, pname: GLenum, param: GLfixed)
+  proc glSecondaryColor3dEXT(red: GLdouble, green: GLdouble, blue: GLdouble)
+  proc glGetCombinerOutputParameterivNV(stage: GLenum, portion: GLenum, pname: GLenum, params: ptr GLint)
+  proc glQueryCounter(id: GLuint, target: GLenum)
+  proc glGetUniformi64vNV(program: GLuint, location: GLint, params: ptr GLint64Ext)
+  proc glTexCoord2fv(v: ptr GLfloat)
+  proc glWindowPos3d(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glBlendFuncSeparateINGR(sfactorRgb: GLenum, dfactorRgb: GLenum, sfactorAlpha: GLenum, dfactorAlpha: GLenum)
+  proc glTextureNormalEXT(mode: GLenum)
+  proc glVertexStream2fATI(stream: GLenum, x: GLfloat, y: GLfloat)
+  proc glViewportIndexedf(index: GLuint, x: GLfloat, y: GLfloat, w: GLfloat, h: GLfloat)
+  proc glMultiTexCoord4ivARB(target: GLenum, v: ptr GLint)
+  proc glBindBufferOffsetEXT(target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr)
+  proc glTexCoord3sv(v: ptr GLshort)
+  proc glVertexArrayVertexAttribBindingEXT(vaobj: GLuint, attribindex: GLuint, bindingindex: GLuint)
+  proc glVertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat)
+  proc glMultiTexGenivEXT(texunit: GLenum, coord: GLenum, pname: GLenum, params: ptr GLint)
+  proc glUniformui64vNV(location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glGetInfoLogARB(obj: GLhandleArb, maxLength: GLsizei, length: ptr GLsizei, infoLog: cstring)
+  proc glGetNamedProgramLocalParameterIivEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLint)
+  proc glVertexAttrib4s(index: GLuint, x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glUniformMatrix4x2dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glVertexAttribs3dvNV(index: GLuint, count: GLsizei, v: ptr GLdouble)
+  proc glSecondaryColor3dvEXT(v: ptr GLdouble)
+  proc glTextureRenderbufferEXT(texture: GLuint, target: GLenum, renderbuffer: GLuint)
+  proc glVertexAttribL2ui64vNV(index: GLuint, v: ptr GLuint64Ext)
+  proc glBlendFuncSeparateOES(srcRgb: GLenum, dstRgb: GLenum, srcAlpha: GLenum, dstAlpha: GLenum)
+  proc glVertexAttribDivisorARB(index: GLuint, divisor: GLuint)
+  proc glWindowPos2sv(v: ptr GLshort)
+  proc glMultiTexCoord3svARB(target: GLenum, v: ptr GLshort)
+  proc glCombinerParameterfvNV(pname: GLenum, params: ptr GLfloat)
+  proc glGetImageTransformParameterfvHP(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glTexParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetArrayObjectivATI(`array`: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetTexParameterIuiv(target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glGetProgramPipelineInfoLog(pipeline: GLuint, bufSize: GLsizei, length: ptr GLsizei, infoLog: cstring)
+  proc glGetOcclusionQueryuivNV(id: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glVertexAttrib4bvARB(index: GLuint, v: ptr GLbyte)
+  proc glListParameterfvSGIX(list: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glDeleteSamplers(count: GLsizei, samplers: ptr GLuint)
+  proc glNormalStream3dATI(stream: GLenum, nx: GLdouble, ny: GLdouble, nz: GLdouble)
+  proc glProgramUniform4i64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glBlendFuncSeparateiARB(buf: GLuint, srcRgb: GLenum, dstRgb: GLenum, srcAlpha: GLenum, dstAlpha: GLenum)
+  proc glEndTransformFeedbackEXT()
+  proc glMultiTexCoord3i(target: GLenum, s: GLint, t: GLint, r: GLint)
+  proc glMakeBufferResidentNV(target: GLenum, access: GLenum)
+  proc glTangent3dvEXT(v: ptr GLdouble)
+  proc glMatrixPopEXT(mode: GLenum)
+  proc glVertexAttrib4NivARB(index: GLuint, v: ptr GLint)
+  proc glProgramUniform2ui64NV(program: GLuint, location: GLint, x: GLuint64Ext, y: GLuint64Ext)
+  proc glWeightPointerARB(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glCullParameterdvEXT(pname: GLenum, params: ptr GLdouble)
+  proc glFramebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glGenVertexArrays(n: GLsizei, arrays: ptr GLuint)
+  proc glUniformHandleui64NV(location: GLint, value: GLuint64)
+  proc glIndexPointer(`type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glGetProgramSubroutineParameteruivNV(target: GLenum, index: GLuint, param: ptr GLuint)
+  proc glVertexAttrib1svARB(index: GLuint, v: ptr GLshort)
+  proc glDetachObjectARB(containerObj: GLhandleArb, attachedObj: GLhandleArb)
+  proc glCompressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glBlendFuncSeparate(sfactorRgb: GLenum, dfactorRgb: GLenum, sfactorAlpha: GLenum, dfactorAlpha: GLenum)
+  proc glExecuteProgramNV(target: GLenum, id: GLuint, params: ptr GLfloat)
+  proc glAttachObjectARB(containerObj: GLhandleArb, obj: GLhandleArb)
+  proc glCompressedTexSubImage1D(target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glProgramUniform4iv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glVertexAttrib3sv(index: GLuint, v: ptr GLshort)
+  proc glTexCoord3bvOES(coords: ptr GLbyte)
+  proc glGenTexturesEXT(n: GLsizei, textures: ptr GLuint)
+  proc glColor4f(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat)
+  proc glGetFramebufferAttachmentParameterivOES(target: GLenum, attachment: GLenum, pname: GLenum, params: ptr GLint)
+  proc glClearColor(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat)
+  proc glNamedProgramLocalParametersI4ivEXT(program: GLuint, target: GLenum, index: GLuint, count: GLsizei, params: ptr GLint)
+  proc glMakeImageHandleNonResidentARB(handle: GLuint64)
+  proc glGenRenderbuffers(n: GLsizei, renderbuffers: ptr GLuint)
+  proc glVertexAttribL1ui64vARB(index: GLuint, v: ptr GLuint64Ext)
+  proc glBindFramebufferEXT(target: GLenum, framebuffer: GLuint)
+  proc glProgramUniform2dEXT(program: GLuint, location: GLint, x: GLdouble, y: GLdouble)
+  proc glCompressedMultiTexImage2DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, bits: pointer)
+  proc glDeleteSyncAPPLE(sync: GLsync)
+  proc glDebugMessageInsertAMD(category: GLenum, severity: GLenum, id: GLuint, length: GLsizei, buf: cstring)
+  proc glSecondaryColorPointerEXT(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glTextureImage2DMultisampleNV(texture: GLuint, target: GLenum, samples: GLsizei, internalFormat: GLint, width: GLsizei, height: GLsizei, fixedSampleLocations: GLboolean)
+  proc glBeginFragmentShaderATI()
+  proc glClearDepth(depth: GLdouble)
+  proc glBindTextures(first: GLuint, count: GLsizei, textures: ptr GLuint)
+  proc glEvalCoord1d(u: GLdouble)
+  proc glSecondaryColor3b(red: GLbyte, green: GLbyte, blue: GLbyte)
+  proc glExtGetTexSubImageQCOM(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, texels: pointer)
+  proc glClearColorIiEXT(red: GLint, green: GLint, blue: GLint, alpha: GLint)
+  proc glVertex2xOES(x: GLfixed)
+  proc glVertexAttrib2s(index: GLuint, x: GLshort, y: GLshort)
+  proc glUniformHandleui64vARB(location: GLint, count: GLsizei, value: ptr GLuint64)
+  proc glAreTexturesResidentEXT(n: GLsizei, textures: ptr GLuint, residences: ptr GLboolean): GLboolean
+  proc glDrawElementsInstancedBaseInstance(mode: GLenum, count: GLsizei, `type`: GLenum, indices: ptr pointer, instancecount: GLsizei, baseinstance: GLuint)
+  proc glGetString(name: GLenum): ptr GLubyte
+  proc glDrawTransformFeedbackStream(mode: GLenum, id: GLuint, stream: GLuint)
+  proc glSecondaryColor3uiv(v: ptr GLuint)
+  proc glNamedFramebufferParameteriEXT(framebuffer: GLuint, pname: GLenum, param: GLint)
+  proc glVertexAttrib4hvNV(index: GLuint, v: ptr GLhalfNv)
+  proc glGetnUniformuivARB(program: GLuint, location: GLint, bufSize: GLsizei, params: ptr GLuint)
+  proc glProgramUniform4ui(program: GLuint, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint)
+  proc glPointParameterxvOES(pname: GLenum, params: ptr GLfixed)
+  proc glIsEnabledi(target: GLenum, index: GLuint): GLboolean
+  proc glColorPointerEXT(size: GLint, `type`: GLenum, stride: GLsizei, count: GLsizei, `pointer`: pointer)
+  proc glFragmentLightModelfvSGIX(pname: GLenum, params: ptr GLfloat)
+  proc glRasterPos3f(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glDeleteObjectARB(obj: GLhandleArb)
+  proc glSetFenceNV(fence: GLuint, condition: GLenum)
+  proc glTransformFeedbackAttribsNV(count: GLuint, attribs: ptr GLint, bufferMode: GLenum)
+  proc glProgramUniformMatrix2fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glGetPointerv(pname: GLenum, params: ptr pointer)
+  proc glWindowPos2dvMESA(v: ptr GLdouble)
+  proc glTexImage2DMultisample(target: GLenum, samples: GLsizei, internalformat: GLint, width: GLsizei, height: GLsizei, fixedsamplelocations: GLboolean)
+  proc glGenFragmentShadersATI(range: GLuint): GLuint
+  proc glTexCoord4fv(v: ptr GLfloat)
+  proc glCompressedTexImage1D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glGetNamedBufferSubDataEXT(buffer: GLuint, offset: GLintptr, size: GLsizeiptr, data: pointer)
+  proc glFinish()
+  proc glDeleteVertexShaderEXT(id: GLuint)
+  proc glFinishObjectAPPLE(`object`: GLenum, name: GLint)
+  proc glGetActiveAttribARB(programObj: GLhandleArb, index: GLuint, maxLength: GLsizei, length: ptr GLsizei, size: ptr GLint, `type`: ptr GLenum, name: cstring)
+  proc glPointParameterx(pname: GLenum, param: GLfixed)
+  proc glProgramUniformui64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glSecondaryColor3ubv(v: ptr GLubyte)
+  proc glGetProgramLocalParameterIivNV(target: GLenum, index: GLuint, params: ptr GLint)
+  proc glDeleteProgramPipelinesEXT(n: GLsizei, pipelines: ptr GLuint)
+  proc glVertexAttrib4fNV(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glGetColorTableParameterfvSGI(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glGetFloati_v(target: GLenum, index: GLuint, data: ptr GLfloat)
+  proc glGenBuffers(n: GLsizei, buffers: ptr GLuint)
+  proc glNormal3b(nx: GLbyte, ny: GLbyte, nz: GLbyte)
+  proc glDrawArraysInstancedARB(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei)
+  proc glTexStorage2DMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, fixedsamplelocations: GLboolean)
+  proc glGetVariantIntegervEXT(id: GLuint, value: GLenum, data: ptr GLint)
+  proc glColor3ubv(v: ptr GLubyte)
+  proc glVertexAttribP4uiv(index: GLuint, `type`: GLenum, normalized: GLboolean, value: ptr GLuint)
+  proc glProgramUniform2ivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glVertexStream4dATI(stream: GLenum, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glVertexAttribL2ui64NV(index: GLuint, x: GLuint64Ext, y: GLuint64Ext)
+  proc glSecondaryColor3bEXT(red: GLbyte, green: GLbyte, blue: GLbyte)
+  proc glGetBufferPointervOES(target: GLenum, pname: GLenum, params: ptr pointer)
+  proc glGetMaterialfv(face: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glVertexStream3sATI(stream: GLenum, x: GLshort, y: GLshort, z: GLshort)
+  proc glUniform1i(location: GLint, v0: GLint)
+  proc glVertexAttribL2d(index: GLuint, x: GLdouble, y: GLdouble)
+  proc glTestObjectAPPLE(`object`: GLenum, name: GLuint): GLboolean
+  proc glGetTransformFeedbackVarying(program: GLuint, index: GLuint, bufSize: GLsizei, length: ptr GLsizei, size: ptr GLsizei, `type`: ptr GLenum, name: cstring)
+  proc glFramebufferRenderbufferOES(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint)
+  proc glVertexStream3iATI(stream: GLenum, x: GLint, y: GLint, z: GLint)
+  proc glMakeTextureHandleNonResidentNV(handle: GLuint64)
+  proc glVertexAttrib4fvNV(index: GLuint, v: ptr GLfloat)
+  proc glArrayElement(i: GLint)
+  proc glClearBufferData(target: GLenum, internalformat: GLenum, format: GLenum, `type`: GLenum, data: ptr pointer)
+  proc glSecondaryColor3usEXT(red: GLushort, green: GLushort, blue: GLushort)
+  proc glRenderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glTexCoord2xvOES(coords: ptr GLfixed)
+  proc glWindowPos3f(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glTangent3svEXT(v: ptr GLshort)
+  proc glPointParameterf(pname: GLenum, param: GLfloat)
+  proc glVertexAttribI4uivEXT(index: GLuint, v: ptr GLuint)
+  proc glColorTableParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMatrixMultdEXT(mode: GLenum, m: ptr GLdouble)
+  proc glUseProgramStages(pipeline: GLuint, stages: GLbitfield, program: GLuint)
+  proc glVertexStream4sATI(stream: GLenum, x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glDrawElementsInstancedNV(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer, primcount: GLsizei)
+  proc glUniform3d(location: GLint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glDebugMessageControlARB(source: GLenum, `type`: GLenum, severity: GLenum, count: GLsizei, ids: ptr GLuint, enabled: GLboolean)
+  proc glVertexAttribs3svNV(index: GLuint, count: GLsizei, v: ptr GLshort)
+  proc glElementPointerATI(`type`: GLenum, `pointer`: pointer)
+  proc glColor4fNormal3fVertex3fvSUN(c: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glGetPerfMonitorCountersAMD(group: GLuint, numCounters: ptr GLint, maxActiveCounters: ptr GLint, counterSize: GLsizei, counters: ptr GLuint)
+  proc glDispatchCompute(num_groups_x: GLuint, num_groups_y: GLuint, num_groups_z: GLuint)
+  proc glVertexAttribDivisorNV(index: GLuint, divisor: GLuint)
+  proc glProgramUniform3uiEXT(program: GLuint, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint)
+  proc glRenderbufferStorageMultisampleNV(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glBinormalPointerEXT(`type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glRectxvOES(v1: ptr GLfixed, v2: ptr GLfixed)
+  proc glGenVertexArraysOES(n: GLsizei, arrays: ptr GLuint)
+  proc glDebugMessageControlKHR(source: GLenum, `type`: GLenum, severity: GLenum, count: GLsizei, ids: ptr GLuint, enabled: GLboolean)
+  proc glProgramUniform1uiEXT(program: GLuint, location: GLint, v0: GLuint)
+  proc glPixelTransferi(pname: GLenum, param: GLint)
+  proc glIsPointInFillPathNV(path: GLuint, mask: GLuint, x: GLfloat, y: GLfloat): GLboolean
+  proc glVertexBindingDivisor(bindingindex: GLuint, divisor: GLuint)
+  proc glGetVertexAttribLui64vARB(index: GLuint, pname: GLenum, params: ptr GLuint64Ext)
+  proc glProgramUniformMatrix3dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glDrawBuffer(mode: GLenum)
+  proc glMultiTexCoord1sARB(target: GLenum, s: GLshort)
+  proc glSeparableFilter2DEXT(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, row: pointer, column: pointer)
+  proc glTangent3bvEXT(v: ptr GLbyte)
+  proc glTexParameterIuiv(target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glVertexAttribL4i64NV(index: GLuint, x: GLint64Ext, y: GLint64Ext, z: GLint64Ext, w: GLint64Ext)
+  proc glDebugMessageCallbackARB(callback: GLdebugProcArb, userParam: ptr pointer)
+  proc glMultiTexCoordP1uiv(texture: GLenum, `type`: GLenum, coords: ptr GLuint)
+  proc glLabelObjectEXT(`type`: GLenum, `object`: GLuint, length: GLsizei, label: cstring)
+  proc glGetnPolygonStippleARB(bufSize: GLsizei, pattern: ptr GLubyte)
+  proc glTexCoord3xOES(s: GLfixed, t: GLfixed, r: GLfixed)
+  proc glCopyPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, `type`: GLenum)
+  proc glGetnUniformfvEXT(program: GLuint, location: GLint, bufSize: GLsizei, params: ptr GLfloat)
+  proc glColorMaski(index: GLuint, r: GLboolean, g: GLboolean, b: GLboolean, a: GLboolean)
+  proc glRasterPos2fv(v: ptr GLfloat)
+  proc glBindBuffersBase(target: GLenum, first: GLuint, count: GLsizei, buffers: ptr GLuint)
+  proc glSpriteParameterfvSGIX(pname: GLenum, params: ptr GLfloat)
+  proc glGetSyncivAPPLE(sync: GLsync, pname: GLenum, bufSize: GLsizei, length: ptr GLsizei, values: ptr GLint)
+  proc glVertexAttribI3i(index: GLuint, x: GLint, y: GLint, z: GLint)
+  proc glPixelTransformParameteriEXT(target: GLenum, pname: GLenum, param: GLint)
+  proc glMultiDrawArraysEXT(mode: GLenum, first: ptr GLint, count: ptr GLsizei, primcount: GLsizei)
+  proc glGetTextureHandleNV(texture: GLuint): GLuint64
+  proc glTexCoordP2ui(`type`: GLenum, coords: GLuint)
+  proc glDeleteQueries(n: GLsizei, ids: ptr GLuint)
+  proc glGetVertexAttribArrayObjectivATI(index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glVertexArrayVertexBindingDivisorEXT(vaobj: GLuint, bindingindex: GLuint, divisor: GLuint)
+  proc glVertex3i(x: GLint, y: GLint, z: GLint)
+  proc glBlendEquationSeparatei(buf: GLuint, modeRgb: GLenum, modeAlpha: GLenum)
+  proc glGetMapAttribParameterivNV(target: GLenum, index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetVideoCaptureivNV(video_capture_slot: GLuint, pname: GLenum, params: ptr GLint)
+  proc glFragmentMaterialfvSGIX(face: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glEGLImageTargetTexture2DOES(target: GLenum, image: GLeglImageOes)
+  proc glCopyImageSubDataNV(srcName: GLuint, srcTarget: GLenum, srcLevel: GLint, srcX: GLint, srcY: GLint, srcZ: GLint, dstName: GLuint, dstTarget: GLenum, dstLevel: GLint, dstX: GLint, dstY: GLint, dstZ: GLint, width: GLsizei, height: GLsizei, depth: GLsizei)
+  proc glUniform2i(location: GLint, v0: GLint, v1: GLint)
+  proc glVertexAttrib3fvNV(index: GLuint, v: ptr GLfloat)
+  proc glNamedBufferStorageEXT(buffer: GLuint, size: GLsizeiptr, data: ptr pointer, flags: GLbitfield)
+  proc glProgramEnvParameterI4uivNV(target: GLenum, index: GLuint, params: ptr GLuint)
+  proc glGetVertexAttribdvARB(index: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glVertexAttribL3ui64vNV(index: GLuint, v: ptr GLuint64Ext)
+  proc glUniform4fvARB(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glWeightsvARB(size: GLint, weights: ptr GLshort)
+  proc glMakeTextureHandleNonResidentARB(handle: GLuint64)
+  proc glEvalCoord1xOES(u: GLfixed)
+  proc glVertexAttrib2sv(index: GLuint, v: ptr GLshort)
+  proc glVertexAttrib4dvNV(index: GLuint, v: ptr GLdouble)
+  proc glProgramNamedParameter4fNV(id: GLuint, len: GLsizei, name: ptr GLubyte, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glCompileShaderARB(shaderObj: GLhandleArb)
+  proc glProgramEnvParameter4fvARB(target: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glGetVertexAttribiv(index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glEvalPoint1(i: GLint)
+  proc glEvalMapsNV(target: GLenum, mode: GLenum)
+  proc glGetTexGenxvOES(coord: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glBlendEquationSeparate(modeRgb: GLenum, modeAlpha: GLenum)
+  proc glGetColorTableParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glQueryCounterEXT(id: GLuint, target: GLenum)
+  proc glExtGetProgramBinarySourceQCOM(program: GLuint, shadertype: GLenum, source: cstring, length: ptr GLint)
+  proc glGetConvolutionParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glIsProgramPipeline(pipeline: GLuint): GLboolean
+  proc glVertexWeightfvEXT(weight: ptr GLfloat)
+  proc glDisableDriverControlQCOM(driverControl: GLuint)
+  proc glVertexStream1fvATI(stream: GLenum, coords: ptr GLfloat)
+  proc glMakeTextureHandleResidentNV(handle: GLuint64)
+  proc glSamplerParameteriv(sampler: GLuint, pname: GLenum, param: ptr GLint)
+  proc glTexEnvxOES(target: GLenum, pname: GLenum, param: GLfixed)
+  proc glEndOcclusionQueryNV()
+  proc glFlushMappedBufferRangeAPPLE(target: GLenum, offset: GLintptr, size: GLsizeiptr)
+  proc glVertex4iv(v: ptr GLint)
+  proc glVertexArrayVertexAttribIFormatEXT(vaobj: GLuint, attribindex: GLuint, size: GLint, `type`: GLenum, relativeoffset: GLuint)
+  proc glDisableIndexedEXT(target: GLenum, index: GLuint)
+  proc glVertexAttribL1dEXT(index: GLuint, x: GLdouble)
+  proc glBeginPerfMonitorAMD(monitor: GLuint)
+  proc glConvolutionFilter1DEXT(target: GLenum, internalformat: GLenum, width: GLsizei, format: GLenum, `type`: GLenum, image: pointer)
+  proc glPrimitiveRestartIndex(index: GLuint)
+  proc glWindowPos2dv(v: ptr GLdouble)
+  proc glBindFramebufferOES(target: GLenum, framebuffer: GLuint)
+  proc glTessellationModeAMD(mode: GLenum)
+  proc glIsVariantEnabledEXT(id: GLuint, cap: GLenum): GLboolean
+  proc glColor3iv(v: ptr GLint)
+  proc glFogCoordFormatNV(`type`: GLenum, stride: GLsizei)
+  proc glClearNamedBufferDataEXT(buffer: GLuint, internalformat: GLenum, format: GLenum, `type`: GLenum, data: ptr pointer)
+  proc glTextureRangeAPPLE(target: GLenum, length: GLsizei, `pointer`: pointer)
+  proc glTexCoord4bvOES(coords: ptr GLbyte)
+  proc glRotated(angle: GLdouble, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glAccum(op: GLenum, value: GLfloat)
+  proc glVertex3d(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glGetPathMetricRangeNV(metricQueryMask: GLbitfield, firstPathName: GLuint, numPaths: GLsizei, stride: GLsizei, metrics: ptr GLfloat)
+  proc glUniform4d(location: GLint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glTextureSubImage2DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glMultiTexCoord1iv(target: GLenum, v: ptr GLint)
+  proc glFogFuncSGIS(n: GLsizei, points: ptr GLfloat)
+  proc glGetMaterialxOES(face: GLenum, pname: GLenum, param: GLfixed)
+  proc glGlobalAlphaFactorbSUN(factor: GLbyte)
+  proc glGetProgramLocalParameterdvARB(target: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glDeleteProgramsARB(n: GLsizei, programs: ptr GLuint)
+  proc glVertexStream1sATI(stream: GLenum, x: GLshort)
+  proc glMatrixTranslatedEXT(mode: GLenum, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glTexSubImage1D(target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetBufferSubData(target: GLenum, offset: GLintptr, size: GLsizeiptr, data: pointer)
+  proc glUniform4uiEXT(location: GLint, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint)
+  proc glGetShaderiv(shader: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetQueryIndexediv(target: GLenum, index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glDebugMessageInsert(source: GLenum, `type`: GLenum, id: GLuint, severity: GLenum, length: GLsizei, buf: cstring)
+  proc glVertexAttribs2dvNV(index: GLuint, count: GLsizei, v: ptr GLdouble)
+  proc glGetFixedvOES(pname: GLenum, params: ptr GLfixed)
+  proc glUniform2iv(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glTextureView(texture: GLuint, target: GLenum, origtexture: GLuint, internalformat: GLenum, minlevel: GLuint, numlevels: GLuint, minlayer: GLuint, numlayers: GLuint)
+  proc glMultiTexCoord1xvOES(texture: GLenum, coords: ptr GLfixed)
+  proc glTexBufferRange(target: GLenum, internalformat: GLenum, buffer: GLuint, offset: GLintptr, size: GLsizeiptr)
+  proc glMultiTexCoordPointerEXT(texunit: GLenum, size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glBlendColorxOES(red: GLfixed, green: GLfixed, blue: GLfixed, alpha: GLfixed)
+  proc glReadPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glWindowPos3dARB(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glPixelTexGenParameterivSGIS(pname: GLenum, params: ptr GLint)
+  proc glSecondaryColor3svEXT(v: ptr GLshort)
+  proc glPopGroupMarkerEXT()
+  proc glImportSyncEXT(external_sync_type: GLenum, external_sync: GLintptr, flags: GLbitfield): GLsync
+  proc glVertexAttribLFormatNV(index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei)
+  proc glVertexAttrib2sNV(index: GLuint, x: GLshort, y: GLshort)
+  proc glGetIntegeri_v(target: GLenum, index: GLuint, data: ptr GLint)
+  proc glProgramUniform3uiv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glGetActiveUniformBlockiv(program: GLuint, uniformBlockIndex: GLuint, pname: GLenum, params: ptr GLint)
+  proc glCreateShaderProgramv(`type`: GLenum, count: GLsizei, strings: cstringArray): GLuint
+  proc glUniform2fARB(location: GLint, v0: GLfloat, v1: GLfloat)
+  proc glVertexStream4ivATI(stream: GLenum, coords: ptr GLint)
+  proc glNormalP3uiv(`type`: GLenum, coords: ptr GLuint)
+  proc glVertexAttribLFormat(attribindex: GLuint, size: GLint, `type`: GLenum, relativeoffset: GLuint)
+  proc glTexCoord2bvOES(coords: ptr GLbyte)
+  proc glGetActiveUniformName(program: GLuint, uniformIndex: GLuint, bufSize: GLsizei, length: ptr GLsizei, uniformName: cstring)
+  proc glTexCoord2sv(v: ptr GLshort)
+  proc glVertexAttrib2dNV(index: GLuint, x: GLdouble, y: GLdouble)
+  proc glGetFogFuncSGIS(points: ptr GLfloat)
+  proc glSetFenceAPPLE(fence: GLuint)
+  proc glRasterPos2f(x: GLfloat, y: GLfloat)
+  proc glVertexWeightPointerEXT(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glEndList()
+  proc glVDPAUFiniNV()
+  proc glTbufferMask3DFX(mask: GLuint)
+  proc glVertexP4ui(`type`: GLenum, value: GLuint)
+  proc glTexEnviv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glColor4xOES(red: GLfixed, green: GLfixed, blue: GLfixed, alpha: GLfixed)
+  proc glBlendEquationi(buf: GLuint, mode: GLenum)
+  proc glLoadMatrixxOES(m: ptr GLfixed)
+  proc glFogxOES(pname: GLenum, param: GLfixed)
+  proc glTexCoord4dv(v: ptr GLdouble)
+  proc glFogCoordPointerListIBM(`type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glGetPerfMonitorGroupsAMD(numGroups: ptr GLint, groupsSize: GLsizei, groups: ptr GLuint)
+  proc glVertex2hNV(x: GLhalfNv, y: GLhalfNv)
+  proc glDeleteFragmentShaderATI(id: GLuint)
+  proc glGetSamplerParameterIiv(sampler: GLuint, pname: GLenum, params: ptr GLint)
+  proc glUniform2fvARB(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glFogf(pname: GLenum, param: GLfloat)
+  proc glMultiTexCoord1iARB(target: GLenum, s: GLint)
+  proc glGetActiveUniformARB(programObj: GLhandleArb, index: GLuint, maxLength: GLsizei, length: ptr GLsizei, size: ptr GLint, `type`: ptr GLenum, name: cstring)
+  proc glMapGrid1xOES(n: GLint, u1: GLfixed, u2: GLfixed)
+  proc glIndexsv(c: ptr GLshort)
+  proc glFragmentMaterialfSGIX(face: GLenum, pname: GLenum, param: GLfloat)
+  proc glBindTextureEXT(target: GLenum, texture: GLuint)
+  proc glRectiv(v1: ptr GLint, v2: ptr GLint)
+  proc glTangent3dEXT(tx: GLdouble, ty: GLdouble, tz: GLdouble)
+  proc glProgramUniformMatrix3x4fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glNormal3hNV(nx: GLhalfNv, ny: GLhalfNv, nz: GLhalfNv)
+  proc glPushClientAttribDefaultEXT(mask: GLbitfield)
+  proc glUnmapBufferARB(target: GLenum): GLboolean
+  proc glVertexAttribs1dvNV(index: GLuint, count: GLsizei, v: ptr GLdouble)
+  proc glUniformMatrix2x3dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glUniform3f(location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)
+  proc glTexEnvxv(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glMapBufferOES(target: GLenum, access: GLenum): pointer
+  proc glBufferData(target: GLenum, size: GLsizeiptr, data: pointer, usage: GLenum)
+  proc glDrawElementsInstancedANGLE(mode: GLenum, count: GLsizei, `type`: GLenum, indices: ptr pointer, primcount: GLsizei)
+  proc glGetTextureHandleARB(texture: GLuint): GLuint64
+  proc glNormal3f(nx: GLfloat, ny: GLfloat, nz: GLfloat)
+  proc glTexCoordP3uiv(`type`: GLenum, coords: ptr GLuint)
+  proc glTexParameterx(target: GLenum, pname: GLenum, param: GLfixed)
+  proc glMapBufferRange(target: GLenum, offset: GLintptr, length: GLsizeiptr, access: GLbitfield): pointer
+  proc glTexCoord2fVertex3fSUN(s: GLfloat, t: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glVariantArrayObjectATI(id: GLuint, `type`: GLenum, stride: GLsizei, buffer: GLuint, offset: GLuint)
+  proc glGetnHistogramARB(target: GLenum, reset: GLboolean, format: GLenum, `type`: GLenum, bufSize: GLsizei, values: pointer)
+  proc glWindowPos3sv(v: ptr GLshort)
+  proc glGetVariantPointervEXT(id: GLuint, value: GLenum, data: ptr pointer)
+  proc glGetLightfv(light: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glGetnTexImageARB(target: GLenum, level: GLint, format: GLenum, `type`: GLenum, bufSize: GLsizei, img: pointer)
+  proc glGenRenderbuffersEXT(n: GLsizei, renderbuffers: ptr GLuint)
+  proc glMultiDrawArraysIndirectBindlessNV(mode: GLenum, indirect: pointer, drawCount: GLsizei, stride: GLsizei, vertexBufferCount: GLint)
+  proc glDisableClientStateIndexedEXT(`array`: GLenum, index: GLuint)
+  proc glMapGrid1f(un: GLint, u1: GLfloat, u2: GLfloat)
+  proc glTexStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glShaderStorageBlockBinding(program: GLuint, storageBlockIndex: GLuint, storageBlockBinding: GLuint)
+  proc glBlendBarrierNV()
+  proc glGetVideoui64vNV(video_slot: GLuint, pname: GLenum, params: ptr GLuint64Ext)
+  proc glUniform3ui64NV(location: GLint, x: GLuint64Ext, y: GLuint64Ext, z: GLuint64Ext)
+  proc glUniform4ivARB(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glGetQueryObjectivARB(id: GLuint, pname: GLenum, params: ptr GLint)
+  proc glCompressedTexSubImage3DOES(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glEnableIndexedEXT(target: GLenum, index: GLuint)
+  proc glNamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer: GLuint, coverageSamples: GLsizei, colorSamples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glVertexAttribI3iEXT(index: GLuint, x: GLint, y: GLint, z: GLint)
+  proc glUniform4uivEXT(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glGetUniformLocation(program: GLuint, name: cstring): GLint
+  proc glCurrentPaletteMatrixARB(index: GLint)
+  proc glVertexAttribLPointerEXT(index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glFogCoorddvEXT(coord: ptr GLdouble)
+  proc glInitNames()
+  proc glGetPathSpacingNV(pathListMode: GLenum, numPaths: GLsizei, pathNameType: GLenum, paths: pointer, pathBase: GLuint, advanceScale: GLfloat, kerningScale: GLfloat, transformType: GLenum, returnedSpacing: ptr GLfloat)
+  proc glNormal3fVertex3fvSUN(n: ptr GLfloat, v: ptr GLfloat)
+  proc glTexCoord2iv(v: ptr GLint)
+  proc glWindowPos3s(x: GLshort, y: GLshort, z: GLshort)
+  proc glProgramUniformMatrix3x4fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glVertexAttribP4ui(index: GLuint, `type`: GLenum, normalized: GLboolean, value: GLuint)
+  proc glVertexAttribs4ubvNV(index: GLuint, count: GLsizei, v: ptr GLubyte)
+  proc glProgramLocalParameterI4iNV(target: GLenum, index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glStencilMaskSeparate(face: GLenum, mask: GLuint)
+  proc glClientWaitSync(sync: GLsync, flags: GLbitfield, timeout: GLuint64): GLenum
+  proc glPolygonOffsetx(factor: GLfixed, units: GLfixed)
+  proc glCreateProgramObjectARB(): GLhandleArb
+  proc glClearColorIuiEXT(red: GLuint, green: GLuint, blue: GLuint, alpha: GLuint)
+  proc glDeleteTransformFeedbacksNV(n: GLsizei, ids: ptr GLuint)
+  proc glFramebufferDrawBuffersEXT(framebuffer: GLuint, n: GLsizei, bufs: ptr GLenum)
+  proc glAreTexturesResident(n: GLsizei, textures: ptr GLuint, residences: ptr GLboolean): GLboolean
+  proc glNamedBufferDataEXT(buffer: GLuint, size: GLsizeiptr, data: pointer, usage: GLenum)
+  proc glGetInvariantFloatvEXT(id: GLuint, value: GLenum, data: ptr GLfloat)
+  proc glMultiTexCoord4d(target: GLenum, s: GLdouble, t: GLdouble, r: GLdouble, q: GLdouble)
+  proc glGetPixelTransformParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glGetStringi(name: GLenum, index: GLuint): ptr GLubyte
+  proc glMakeBufferNonResidentNV(target: GLenum)
+  proc glVertex4bOES(x: GLbyte, y: GLbyte, z: GLbyte)
+  proc glGetObjectLabel(identifier: GLenum, name: GLuint, bufSize: GLsizei, length: ptr GLsizei, label: cstring)
+  proc glClipPlanexOES(plane: GLenum, equation: ptr GLfixed)
+  proc glElementPointerAPPLE(`type`: GLenum, `pointer`: pointer)
+  proc glIsAsyncMarkerSGIX(marker: GLuint): GLboolean
+  proc glUseShaderProgramEXT(`type`: GLenum, program: GLuint)
+  proc glReplacementCodeuiColor4ubVertex3fSUN(rc: GLuint, r: GLubyte, g: GLubyte, b: GLubyte, a: GLubyte, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glIsTransformFeedback(id: GLuint): GLboolean
+  proc glEdgeFlag(flag: GLboolean)
+  proc glGetTexGeniv(coord: GLenum, pname: GLenum, params: ptr GLint)
+  proc glBeginQueryEXT(target: GLenum, id: GLuint)
+  proc glUniform1uiEXT(location: GLint, v0: GLuint)
+  proc glProgramUniform3fvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetVideoi64vNV(video_slot: GLuint, pname: GLenum, params: ptr GLint64Ext)
+  proc glProgramUniform3ui(program: GLuint, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint)
+  proc glSecondaryColor3uiEXT(red: GLuint, green: GLuint, blue: GLuint)
+  proc glPathStencilFuncNV(fun: GLenum, `ref`: GLint, mask: GLuint)
+  proc glVertexAttribP1ui(index: GLuint, `type`: GLenum, normalized: GLboolean, value: GLuint)
+  proc glStencilFillPathInstancedNV(numPaths: GLsizei, pathNameType: GLenum, paths: pointer, pathBase: GLuint, fillMode: GLenum, mask: GLuint, transformType: GLenum, transformValues: ptr GLfloat)
+  proc glFogCoordfEXT(coord: GLfloat)
+  proc glTextureParameterIuivEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glProgramUniform4dEXT(program: GLuint, location: GLint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glFramebufferTextureFaceARB(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, face: GLenum)
+  proc glTexCoord3s(s: GLshort, t: GLshort, r: GLshort)
+  proc glGetFramebufferAttachmentParameteriv(target: GLenum, attachment: GLenum, pname: GLenum, params: ptr GLint)
+  proc glEndVideoCaptureNV(video_capture_slot: GLuint)
+  proc glProgramUniformMatrix2x4dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glGetFloatIndexedvEXT(target: GLenum, index: GLuint, data: ptr GLfloat)
+  proc glTexCoord1xOES(s: GLfixed)
+  proc glTexCoord4f(s: GLfloat, t: GLfloat, r: GLfloat, q: GLfloat)
+  proc glShaderSource(shader: GLuint, count: GLsizei, string: cstringArray, length: ptr GLint)
+  proc glGetDetailTexFuncSGIS(target: GLenum, points: ptr GLfloat)
+  proc glResetHistogram(target: GLenum)
+  proc glVertexAttribP2ui(index: GLuint, `type`: GLenum, normalized: GLboolean, value: GLuint)
+  proc glDrawTransformFeedbackNV(mode: GLenum, id: GLuint)
+  proc glWindowPos2fMESA(x: GLfloat, y: GLfloat)
+  proc glObjectLabelKHR(identifier: GLenum, name: GLuint, length: GLsizei, label: cstring)
+  proc glMultiTexCoord2iARB(target: GLenum, s: GLint, t: GLint)
+  proc glVertexAttrib4usv(index: GLuint, v: ptr GLushort)
+  proc glGetGraphicsResetStatusARB(): GLenum
+  proc glProgramUniform3dEXT(program: GLuint, location: GLint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glPathSubCommandsNV(path: GLuint, commandStart: GLsizei, commandsToDelete: GLsizei, numCommands: GLsizei, commands: ptr GLubyte, numCoords: GLsizei, coordType: GLenum, coords: pointer)
+  proc glEndTransformFeedbackNV()
+  proc glWindowPos2sMESA(x: GLshort, y: GLshort)
+  proc glTangent3sEXT(tx: GLshort, ty: GLshort, tz: GLshort)
+  proc glLineWidthx(width: GLfixed)
+  proc glGetUniformBufferSizeEXT(program: GLuint, location: GLint): GLint
+  proc glTexCoord2bOES(s: GLbyte, t: GLbyte)
+  proc glWindowPos3iMESA(x: GLint, y: GLint, z: GLint)
+  proc glTexGend(coord: GLenum, pname: GLenum, param: GLdouble)
+  proc glRenderbufferStorageMultisampleANGLE(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glGetProgramiv(program: GLuint, pname: GLenum, params: ptr GLint)
+  proc glDrawTransformFeedbackStreamInstanced(mode: GLenum, id: GLuint, stream: GLuint, instancecount: GLsizei)
+  proc glMatrixTranslatefEXT(mode: GLenum, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glColor4iv(v: ptr GLint)
+  proc glSecondaryColor3ivEXT(v: ptr GLint)
+  proc glIsNamedStringARB(namelen: GLint, name: cstring): GLboolean
+  proc glVertexAttribL4dv(index: GLuint, v: ptr GLdouble)
+  proc glEndTransformFeedback()
+  proc glVertexStream3fvATI(stream: GLenum, coords: ptr GLfloat)
+  proc glProgramUniformMatrix4x2dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glTextureBufferRangeEXT(texture: GLuint, target: GLenum, internalformat: GLenum, buffer: GLuint, offset: GLintptr, size: GLsizeiptr)
+  proc glTexCoord2fNormal3fVertex3fvSUN(tc: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glProgramUniform2f(program: GLuint, location: GLint, v0: GLfloat, v1: GLfloat)
+  proc glMultiTexCoord2sv(target: GLenum, v: ptr GLshort)
+  proc glTexCoord3bOES(s: GLbyte, t: GLbyte, r: GLbyte)
+  proc glGenFramebuffersOES(n: GLsizei, framebuffers: ptr GLuint)
+  proc glMultiTexCoord3sv(target: GLenum, v: ptr GLshort)
+  proc glVertexAttrib4Nub(index: GLuint, x: GLubyte, y: GLubyte, z: GLubyte, w: GLubyte)
+  proc glColor3d(red: GLdouble, green: GLdouble, blue: GLdouble)
+  proc glGetActiveAttrib(program: GLuint, index: GLuint, bufSize: GLsizei, length: ptr GLsizei, size: ptr GLint, `type`: ptr GLenum, name: cstring)
+  proc glConvolutionParameterfEXT(target: GLenum, pname: GLenum, params: GLfloat)
+  proc glTexSubImage2DEXT(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glBinormal3fvEXT(v: ptr GLfloat)
+  proc glDebugMessageControl(source: GLenum, `type`: GLenum, severity: GLenum, count: GLsizei, ids: ptr GLuint, enabled: GLboolean)
+  proc glProgramUniform3uivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glPNTrianglesiATI(pname: GLenum, param: GLint)
+  proc glGetPerfMonitorCounterInfoAMD(group: GLuint, counter: GLuint, pname: GLenum, data: pointer)
+  proc glVertexAttribL3ui64NV(index: GLuint, x: GLuint64Ext, y: GLuint64Ext, z: GLuint64Ext)
+  proc glIsRenderbufferOES(renderbuffer: GLuint): GLboolean
+  proc glColorSubTable(target: GLenum, start: GLsizei, count: GLsizei, format: GLenum, `type`: GLenum, data: pointer)
+  proc glCompressedMultiTexImage1DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, border: GLint, imageSize: GLsizei, bits: pointer)
+  proc glBindSampler(unit: GLuint, sampler: GLuint)
+  proc glVariantubvEXT(id: GLuint, `addr`: ptr GLubyte)
+  proc glDisablei(target: GLenum, index: GLuint)
+  proc glVertexAttribI2uiEXT(index: GLuint, x: GLuint, y: GLuint)
+  proc glDrawElementArrayATI(mode: GLenum, count: GLsizei)
+  proc glTagSampleBufferSGIX()
+  proc glVertexPointerEXT(size: GLint, `type`: GLenum, stride: GLsizei, count: GLsizei, `pointer`: pointer)
+  proc glFragmentLightiSGIX(light: GLenum, pname: GLenum, param: GLint)
+  proc glLoadTransposeMatrixxOES(m: ptr GLfixed)
+  proc glProgramLocalParameter4fvARB(target: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glGetVariantFloatvEXT(id: GLuint, value: GLenum, data: ptr GLfloat)
+  proc glProgramUniform4ui64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glFragmentLightfSGIX(light: GLenum, pname: GLenum, param: GLfloat)
+  proc glIsVertexArrayAPPLE(`array`: GLuint): GLboolean
+  proc glTexCoord1bvOES(coords: ptr GLbyte)
+  proc glUniform4fv(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glPixelDataRangeNV(target: GLenum, length: GLsizei, `pointer`: pointer)
+  proc glUniformMatrix4x2fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glRectf(x1: GLfloat, y1: GLfloat, x2: GLfloat, y2: GLfloat)
+  proc glCoverageMaskNV(mask: GLboolean)
+  proc glPointParameterfvSGIS(pname: GLenum, params: ptr GLfloat)
+  proc glProgramUniformMatrix4x2dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glFragmentLightModelfSGIX(pname: GLenum, param: GLfloat)
+  proc glDisableVertexAttribAPPLE(index: GLuint, pname: GLenum)
+  proc glMultiTexCoord3dvARB(target: GLenum, v: ptr GLdouble)
+  proc glTexCoord4iv(v: ptr GLint)
+  proc glUniform1f(location: GLint, v0: GLfloat)
+  proc glVertexAttribParameteriAMD(index: GLuint, pname: GLenum, param: GLint)
+  proc glGetConvolutionParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glRecti(x1: GLint, y1: GLint, x2: GLint, y2: GLint)
+  proc glTexEnvxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glGetRenderbufferParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glBlendFuncIndexedAMD(buf: GLuint, src: GLenum, dst: GLenum)
+  proc glProgramUniformMatrix3x2fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glDrawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei)
+  proc glTextureBarrierNV()
+  proc glDrawBuffersIndexedEXT(n: GLint, location: ptr GLenum, indices: ptr GLint)
+  proc glUniformMatrix4fvARB(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glInstrumentsBufferSGIX(size: GLsizei, buffer: ptr GLint)
+  proc glAlphaFuncQCOM(fun: GLenum, `ref`: GLclampf)
+  proc glUniformMatrix4fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glGetMinmaxParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetInvariantBooleanvEXT(id: GLuint, value: GLenum, data: ptr GLboolean)
+  proc glVDPAUIsSurfaceNV(surface: GLvdpauSurfaceNv)
+  proc glGenProgramsARB(n: GLsizei, programs: ptr GLuint)
+  proc glDrawRangeElementArrayATI(mode: GLenum, start: GLuint, `end`: GLuint, count: GLsizei)
+  proc glFramebufferRenderbufferEXT(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint)
+  proc glClearIndex(c: GLfloat)
+  proc glDepthRangeIndexed(index: GLuint, n: GLdouble, f: GLdouble)
+  proc glDrawTexivOES(coords: ptr GLint)
+  proc glTangent3iEXT(tx: GLint, ty: GLint, tz: GLint)
+  proc glStringMarkerGREMEDY(len: GLsizei, string: pointer)
+  proc glTexCoordP1ui(`type`: GLenum, coords: GLuint)
+  proc glOrthox(l: GLfixed, r: GLfixed, b: GLfixed, t: GLfixed, n: GLfixed, f: GLfixed)
+  proc glReplacementCodeuiVertex3fvSUN(rc: ptr GLuint, v: ptr GLfloat)
+  proc glMultiTexCoord1bvOES(texture: GLenum, coords: ptr GLbyte)
+  proc glDrawArraysInstancedBaseInstance(mode: GLenum, first: GLint, count: GLsizei, instancecount: GLsizei, baseinstance: GLuint)
+  proc glMultMatrixf(m: ptr GLfloat)
+  proc glProgramUniform4i(program: GLuint, location: GLint, v0: GLint, v1: GLint, v2: GLint, v3: GLint)
+  proc glScissorArrayv(first: GLuint, count: GLsizei, v: ptr GLint)
+  proc glGetnUniformivEXT(program: GLuint, location: GLint, bufSize: GLsizei, params: ptr GLint)
+  proc glGetTexEnvxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glWindowPos3ivARB(v: ptr GLint)
+  proc glProgramStringARB(target: GLenum, format: GLenum, len: GLsizei, string: pointer)
+  proc glTextureColorMaskSGIS(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean)
+  proc glMultiTexCoord4fv(target: GLenum, v: ptr GLfloat)
+  proc glUniformMatrix4x3fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glIsPathNV(path: GLuint): GLboolean
+  proc glStartTilingQCOM(x: GLuint, y: GLuint, width: GLuint, height: GLuint, preserveMask: GLbitfield)
+  proc glVariantivEXT(id: GLuint, `addr`: ptr GLint)
+  proc glGetnMinmaxARB(target: GLenum, reset: GLboolean, format: GLenum, `type`: GLenum, bufSize: GLsizei, values: pointer)
+  proc glTransformFeedbackVaryings(program: GLuint, count: GLsizei, varyings: cstringArray, bufferMode: GLenum)
+  proc glShaderOp2EXT(op: GLenum, res: GLuint, arg1: GLuint, arg2: GLuint)
+  proc glVertexAttribPointer(index: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, stride: GLsizei, `pointer`: pointer)
+  proc glMultiTexCoord4dvARB(target: GLenum, v: ptr GLdouble)
+  proc glProgramUniform1ui64NV(program: GLuint, location: GLint, x: GLuint64Ext)
+  proc glGetShaderSourceARB(obj: GLhandleArb, maxLength: GLsizei, length: ptr GLsizei, source: cstring)
+  proc glGetBufferSubDataARB(target: GLenum, offset: GLintPtrArb, size: GLsizeiptrArb, data: pointer)
+  proc glCopyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glProgramEnvParameterI4iNV(target: GLenum, index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glGetVertexAttribivARB(index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetFinalCombinerInputParameterivNV(variable: GLenum, pname: GLenum, params: ptr GLint)
+  proc glIndexFuncEXT(fun: GLenum, `ref`: GLclampf)
+  proc glProgramUniformMatrix3dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glTexStorage1DEXT(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei)
+  proc glUniformMatrix2fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glConvolutionParameterf(target: GLenum, pname: GLenum, params: GLfloat)
+  proc glGlobalAlphaFactordSUN(factor: GLdouble)
+  proc glCopyTextureImage2DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint)
+  proc glVertex4xOES(x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glClearDepthx(depth: GLfixed)
+  proc glGetColorTableParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGenProgramPipelines(n: GLsizei, pipelines: ptr GLuint)
+  proc glVertexAttribL4ui64vNV(index: GLuint, v: ptr GLuint64Ext)
+  proc glUniform1fARB(location: GLint, v0: GLfloat)
+  proc glUniformMatrix3fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glUniform3dv(location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glVertexAttribI4iv(index: GLuint, v: ptr GLint)
+  proc glPixelZoom(xfactor: GLfloat, yfactor: GLfloat)
+  proc glShadeModel(mode: GLenum)
+  proc glFramebufferTexture3DOES(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, zoffset: GLint)
+  proc glMultiTexCoord2i(target: GLenum, s: GLint, t: GLint)
+  proc glBlendEquationSeparateIndexedAMD(buf: GLuint, modeRgb: GLenum, modeAlpha: GLenum)
+  proc glIsEnabled(cap: GLenum): GLboolean
+  proc glTexImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glPolygonOffsetxOES(factor: GLfixed, units: GLfixed)
+  proc glDrawBuffersEXT(n: GLsizei, bufs: ptr GLenum)
+  proc glPixelTexGenParameterfSGIS(pname: GLenum, param: GLfloat)
+  proc glExtGetRenderbuffersQCOM(renderbuffers: ptr GLuint, maxRenderbuffers: GLint, numRenderbuffers: ptr GLint)
+  proc glBindImageTextures(first: GLuint, count: GLsizei, textures: ptr GLuint)
+  proc glVertexAttribP2uiv(index: GLuint, `type`: GLenum, normalized: GLboolean, value: ptr GLuint)
+  proc glTextureImage3DMultisampleCoverageNV(texture: GLuint, target: GLenum, coverageSamples: GLsizei, colorSamples: GLsizei, internalFormat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, fixedSampleLocations: GLboolean)
+  proc glRasterPos2s(x: GLshort, y: GLshort)
+  proc glVertexAttrib4dvARB(index: GLuint, v: ptr GLdouble)
+  proc glProgramUniformMatrix2x3fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glProgramUniformMatrix2x4dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glMultiTexCoord1d(target: GLenum, s: GLdouble)
+  proc glGetProgramParameterdvNV(target: GLenum, index: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glPNTrianglesfATI(pname: GLenum, param: GLfloat)
+  proc glUniformMatrix3x4fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glVertexAttrib3sNV(index: GLuint, x: GLshort, y: GLshort, z: GLshort)
+  proc glGetVideoCaptureStreamfvNV(video_capture_slot: GLuint, stream: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glCombinerParameterivNV(pname: GLenum, params: ptr GLint)
+  proc glGetTexGenfvOES(coord: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glCopyTexSubImage2DEXT(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glGetProgramLocalParameterfvARB(target: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glTexCoord3iv(v: ptr GLint)
+  proc glVertexAttribs2hvNV(index: GLuint, n: GLsizei, v: ptr GLhalfNv)
+  proc glNormal3sv(v: ptr GLshort)
+  proc glUniform2dv(location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glSecondaryColor3hvNV(v: ptr GLhalfNv)
+  proc glDrawArraysInstancedEXT(mode: GLenum, start: GLint, count: GLsizei, primcount: GLsizei)
+  proc glBeginTransformFeedback(primitiveMode: GLenum)
+  proc glTexParameterIuivEXT(target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glProgramBufferParametersfvNV(target: GLenum, bindingIndex: GLuint, wordIndex: GLuint, count: GLsizei, params: ptr GLfloat)
+  proc glVertexArrayBindVertexBufferEXT(vaobj: GLuint, bindingindex: GLuint, buffer: GLuint, offset: GLintptr, stride: GLsizei)
+  proc glPathParameterfNV(path: GLuint, pname: GLenum, value: GLfloat)
+  proc glGetClipPlanexOES(plane: GLenum, equation: ptr GLfixed)
+  proc glSecondaryColor3ubvEXT(v: ptr GLubyte)
+  proc glGetPixelMapxv(map: GLenum, size: GLint, values: ptr GLfixed)
+  proc glVertexAttribI1uivEXT(index: GLuint, v: ptr GLuint)
+  proc glMultiTexImage3DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glAlphaFuncxOES(fun: GLenum, `ref`: GLfixed)
+  proc glMultiTexCoord2dv(target: GLenum, v: ptr GLdouble)
+  proc glBindRenderbufferOES(target: GLenum, renderbuffer: GLuint)
+  proc glPathStencilDepthOffsetNV(factor: GLfloat, units: GLfloat)
+  proc glPointParameterfvEXT(pname: GLenum, params: ptr GLfloat)
+  proc glSampleCoverageARB(value: GLfloat, invert: GLboolean)
+  proc glVertexAttrib3dNV(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glNamedProgramLocalParameter4dvEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glGenFramebuffers(n: GLsizei, framebuffers: ptr GLuint)
+  proc glMultiDrawElementsEXT(mode: GLenum, count: ptr GLsizei, `type`: GLenum, indices: ptr pointer, primcount: GLsizei)
+  proc glVertexAttrib2fNV(index: GLuint, x: GLfloat, y: GLfloat)
+  proc glProgramUniform4ivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glTexGeniOES(coord: GLenum, pname: GLenum, param: GLint)
+  proc glBindProgramPipeline(pipeline: GLuint)
+  proc glBindSamplers(first: GLuint, count: GLsizei, samplers: ptr GLuint)
+  proc glColorTableSGI(target: GLenum, internalformat: GLenum, width: GLsizei, format: GLenum, `type`: GLenum, table: pointer)
+  proc glMultiTexCoord3xOES(texture: GLenum, s: GLfixed, t: GLfixed, r: GLfixed)
+  proc glIsQueryEXT(id: GLuint): GLboolean
+  proc glGenBuffersARB(n: GLsizei, buffers: ptr GLuint)
+  proc glVertex4xvOES(coords: ptr GLfixed)
+  proc glPixelMapuiv(map: GLenum, mapsize: GLsizei, values: ptr GLuint)
+  proc glDrawTexfOES(x: GLfloat, y: GLfloat, z: GLfloat, width: GLfloat, height: GLfloat)
+  proc glPointParameterfEXT(pname: GLenum, param: GLfloat)
+  proc glPathDashArrayNV(path: GLuint, dashCount: GLsizei, dashArray: ptr GLfloat)
+  proc glClearTexImage(texture: GLuint, level: GLint, format: GLenum, `type`: GLenum, data: ptr pointer)
+  proc glIndexdv(c: ptr GLdouble)
+  proc glMultTransposeMatrixfARB(m: ptr GLfloat)
+  proc glVertexAttribL3d(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glUniform3fv(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetProgramInterfaceiv(program: GLuint, programInterface: GLenum, pname: GLenum, params: ptr GLint)
+  proc glFogCoordfv(coord: ptr GLfloat)
+  proc glTexSubImage3DOES(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetPolygonStipple(mask: ptr GLubyte)
+  proc glGetQueryObjectivEXT(id: GLuint, pname: GLenum, params: ptr GLint)
+  proc glColor3xOES(red: GLfixed, green: GLfixed, blue: GLfixed)
+  proc glMultiTexParameterIivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetMaterialiv(face: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertex2fv(v: ptr GLfloat)
+  proc glConvolutionParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGenOcclusionQueriesNV(n: GLsizei, ids: ptr GLuint)
+  proc glGetVertexAttribdvNV(index: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glVertexAttribs4fvNV(index: GLuint, count: GLsizei, v: ptr GLfloat)
+  proc glVertexAttribL3dv(index: GLuint, v: ptr GLdouble)
+  proc glTexEnvi(target: GLenum, pname: GLenum, param: GLint)
+  proc glObjectPtrLabel(`ptr`: ptr pointer, length: GLsizei, label: cstring)
+  proc glGetTexGenfv(coord: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glMapVertexAttrib1dAPPLE(index: GLuint, size: GLuint, u1: GLdouble, u2: GLdouble, stride: GLint, order: GLint, points: ptr GLdouble)
+  proc glTexCoord3dv(v: ptr GLdouble)
+  proc glIsEnabledIndexedEXT(target: GLenum, index: GLuint): GLboolean
+  proc glGlobalAlphaFactoruiSUN(factor: GLuint)
+  proc glMatrixIndexPointerARB(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glUniformHandleui64ARB(location: GLint, value: GLuint64)
+  proc glUniform1fvARB(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetActiveSubroutineUniformName(program: GLuint, shadertype: GLenum, index: GLuint, bufsize: GLsizei, length: ptr GLsizei, name: cstring)
+  proc glProgramUniformMatrix4x2fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glMultiTexCoord4fARB(target: GLenum, s: GLfloat, t: GLfloat, r: GLfloat, q: GLfloat)
+  proc glGetDriverControlsQCOM(num: ptr GLint, size: GLsizei, driverControls: ptr GLuint)
+  proc glBindBufferRange(target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr)
+  proc glMapGrid2f(un: GLint, u1: GLfloat, u2: GLfloat, vn: GLint, v1: GLfloat, v2: GLfloat)
+  proc glUniform2fv(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glOrtho(left: GLdouble, right: GLdouble, bottom: GLdouble, top: GLdouble, zNear: GLdouble, zFar: GLdouble)
+  proc glGetImageHandleNV(texture: GLuint, level: GLint, layered: GLboolean, layer: GLint, format: GLenum): GLuint64
+  proc glIsImageHandleResidentARB(handle: GLuint64): GLboolean
+  proc glGetConvolutionParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glLineWidthxOES(width: GLfixed)
+  proc glPathCommandsNV(path: GLuint, numCommands: GLsizei, commands: ptr GLubyte, numCoords: GLsizei, coordType: GLenum, coords: pointer)
+  proc glMaterialxvOES(face: GLenum, pname: GLenum, param: ptr GLfixed)
+  proc glPauseTransformFeedbackNV()
+  proc glTexCoord4d(s: GLdouble, t: GLdouble, r: GLdouble, q: GLdouble)
+  proc glUniform3ui64vNV(location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glMultiTexCoord3dARB(target: GLenum, s: GLdouble, t: GLdouble, r: GLdouble)
+  proc glProgramUniform3fEXT(program: GLuint, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)
+  proc glTexImage3DMultisampleCoverageNV(target: GLenum, coverageSamples: GLsizei, colorSamples: GLsizei, internalFormat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, fixedSampleLocations: GLboolean)
+  proc glNormalPointerEXT(`type`: GLenum, stride: GLsizei, count: GLsizei, `pointer`: pointer)
+  proc glPathColorGenNV(color: GLenum, genMode: GLenum, colorFormat: GLenum, coeffs: ptr GLfloat)
+  proc glGetMultiTexGendvEXT(texunit: GLenum, coord: GLenum, pname: GLenum, params: ptr GLdouble)
+  proc glColor3i(red: GLint, green: GLint, blue: GLint)
+  proc glPointSizex(size: GLfixed)
+  proc glGetConvolutionFilterEXT(target: GLenum, format: GLenum, `type`: GLenum, image: pointer)
+  proc glBindBufferBaseNV(target: GLenum, index: GLuint, buffer: GLuint)
+  proc glInsertComponentEXT(res: GLuint, src: GLuint, num: GLuint)
+  proc glVertex2d(x: GLdouble, y: GLdouble)
+  proc glGetPathDashArrayNV(path: GLuint, dashArray: ptr GLfloat)
+  proc glVertexAttrib2sARB(index: GLuint, x: GLshort, y: GLshort)
+  proc glScissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glLoadMatrixd(m: ptr GLdouble)
+  proc glVertex2bvOES(coords: ptr GLbyte)
+  proc glTexCoord2i(s: GLint, t: GLint)
+  proc glWriteMaskEXT(res: GLuint, `in`: GLuint, outX: GLenum, outY: GLenum, outZ: GLenum, outW: GLenum)
+  proc glClientWaitSyncAPPLE(sync: GLsync, flags: GLbitfield, timeout: GLuint64): GLenum
+  proc glGetObjectBufferivATI(buffer: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetNamedBufferParameterivEXT(buffer: GLuint, pname: GLenum, params: ptr GLint)
+  proc glTexCoord1bOES(s: GLbyte)
+  proc glVertexAttrib4dARB(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glUniform3fARB(location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat)
+  proc glWindowPos2ivARB(v: ptr GLint)
+  proc glCreateShaderProgramvEXT(`type`: GLenum, count: GLsizei, strings: cstringArray): GLuint
+  proc glListParameterivSGIX(list: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetGraphicsResetStatusEXT(): GLenum
+  proc glActiveShaderProgramEXT(pipeline: GLuint, program: GLuint)
+  proc glTexCoordP1uiv(`type`: GLenum, coords: ptr GLuint)
+  proc glVideoCaptureStreamParameterdvNV(video_capture_slot: GLuint, stream: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glGetVertexAttribPointerv(index: GLuint, pname: GLenum, `pointer`: ptr pointer)
+  proc glGetCompressedMultiTexImageEXT(texunit: GLenum, target: GLenum, lod: GLint, img: pointer)
+  proc glWindowPos4fMESA(x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glDrawElementsInstancedARB(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer, primcount: GLsizei)
+  proc glVertexStream1dATI(stream: GLenum, x: GLdouble)
+  proc glMatrixMultfEXT(mode: GLenum, m: ptr GLfloat)
+  proc glGetPathParameterivNV(path: GLuint, pname: GLenum, value: ptr GLint)
+  proc glCombinerParameteriNV(pname: GLenum, param: GLint)
+  proc glUpdateObjectBufferATI(buffer: GLuint, offset: GLuint, size: GLsizei, `pointer`: pointer, preserve: GLenum)
+  proc glVertexAttrib4uivARB(index: GLuint, v: ptr GLuint)
+  proc glVertexAttrib4iv(index: GLuint, v: ptr GLint)
+  proc glFrustum(left: GLdouble, right: GLdouble, bottom: GLdouble, top: GLdouble, zNear: GLdouble, zFar: GLdouble)
+  proc glDrawTexxvOES(coords: ptr GLfixed)
+  proc glTexCoord2fColor4ubVertex3fSUN(s: GLfloat, t: GLfloat, r: GLubyte, g: GLubyte, b: GLubyte, a: GLubyte, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glMultiTexCoord2fARB(target: GLenum, s: GLfloat, t: GLfloat)
+  proc glGenTransformFeedbacksNV(n: GLsizei, ids: ptr GLuint)
+  proc glMultiTexGenfEXT(texunit: GLenum, coord: GLenum, pname: GLenum, param: GLfloat)
+  proc glGetMinmax(target: GLenum, reset: GLboolean, format: GLenum, `type`: GLenum, values: pointer)
+  proc glBindTransformFeedback(target: GLenum, id: GLuint)
+  proc glEnableVertexAttribArrayARB(index: GLuint)
+  proc glIsFenceAPPLE(fence: GLuint): GLboolean
+  proc glMultiTexGendvEXT(texunit: GLenum, coord: GLenum, pname: GLenum, params: ptr GLdouble)
+  proc glRotatex(angle: GLfixed, x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glGetFragmentLightfvSGIX(light: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glMultiTexCoord4dv(target: GLenum, v: ptr GLdouble)
+  proc glBlendFuncSeparateEXT(sfactorRgb: GLenum, dfactorRgb: GLenum, sfactorAlpha: GLenum, dfactorAlpha: GLenum)
+  proc glMultiTexCoord1f(target: GLenum, s: GLfloat)
+  proc glWindowPos2f(x: GLfloat, y: GLfloat)
+  proc glGetPathTexGenivNV(texCoordSet: GLenum, pname: GLenum, value: ptr GLint)
+  proc glIndexxvOES(component: ptr GLfixed)
+  proc glDisableVertexArrayAttribEXT(vaobj: GLuint, index: GLuint)
+  proc glGetProgramivARB(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glPatchParameteri(pname: GLenum, value: GLint)
+  proc glMultiTexCoord2fv(target: GLenum, v: ptr GLfloat)
+  proc glTexSubImage3DEXT(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glFramebufferTexture1DEXT(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glTangent3fEXT(tx: GLfloat, ty: GLfloat, tz: GLfloat)
+  proc glIsVertexAttribEnabledAPPLE(index: GLuint, pname: GLenum): GLboolean
+  proc glGetShaderInfoLog(shader: GLuint, bufSize: GLsizei, length: ptr GLsizei, infoLog: cstring)
+  proc glFrustumx(l: GLfixed, r: GLfixed, b: GLfixed, t: GLfixed, n: GLfixed, f: GLfixed)
+  proc glTexGenfv(coord: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glCompressedTexImage2DARB(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glMultiTexCoord2bvOES(texture: GLenum, coords: ptr GLbyte)
+  proc glGetTexBumpParameterivATI(pname: GLenum, param: ptr GLint)
+  proc glMultiTexCoord2svARB(target: GLenum, v: ptr GLshort)
+  proc glProgramBufferParametersIivNV(target: GLenum, bindingIndex: GLuint, wordIndex: GLuint, count: GLsizei, params: ptr GLint)
+  proc glIsQueryARB(id: GLuint): GLboolean
+  proc glFramebufferTextureLayer(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, layer: GLint)
+  proc glUniform4i(location: GLint, v0: GLint, v1: GLint, v2: GLint, v3: GLint)
+  proc glDrawArrays(mode: GLenum, first: GLint, count: GLsizei)
+  proc glWeightubvARB(size: GLint, weights: ptr GLubyte)
+  proc glGetUniformSubroutineuiv(shadertype: GLenum, location: GLint, params: ptr GLuint)
+  proc glMultTransposeMatrixdARB(m: ptr GLdouble)
+  proc glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN(rc: ptr GLuint, tc: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glGetMapdv(target: GLenum, query: GLenum, v: ptr GLdouble)
+  proc glGetMultisamplefvNV(pname: GLenum, index: GLuint, val: ptr GLfloat)
+  proc glVertex2hvNV(v: ptr GLhalfNv)
+  proc glProgramUniformMatrix2x3fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glProgramUniform3iEXT(program: GLuint, location: GLint, v0: GLint, v1: GLint, v2: GLint)
+  proc glGetnPixelMapusvARB(map: GLenum, bufSize: GLsizei, values: ptr GLushort)
+  proc glVertexWeighthvNV(weight: ptr GLhalfNv)
+  proc glDrawTransformFeedbackInstanced(mode: GLenum, id: GLuint, instancecount: GLsizei)
+  proc glFlushStaticDataIBM(target: GLenum)
+  proc glWindowPos2fvARB(v: ptr GLfloat)
+  proc glMultiTexCoord3sARB(target: GLenum, s: GLshort, t: GLshort, r: GLshort)
+  proc glWindowPos3fv(v: ptr GLfloat)
+  proc glFlushVertexArrayRangeNV()
+  proc glTangent3bEXT(tx: GLbyte, ty: GLbyte, tz: GLbyte)
+  proc glIglooInterfaceSGIX(pname: GLenum, params: pointer)
+  proc glProgramUniformMatrix4x2fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glVertexAttribIFormatNV(index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei)
+  proc glNamedRenderbufferStorageMultisampleEXT(renderbuffer: GLuint, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glCopyTexImage1DEXT(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, border: GLint)
+  proc glBindTexGenParameterEXT(unit: GLenum, coord: GLenum, value: GLenum): GLuint
+  proc glVertex4hNV(x: GLhalfNv, y: GLhalfNv, z: GLhalfNv, w: GLhalfNv)
+  proc glGetMapfv(target: GLenum, query: GLenum, v: ptr GLfloat)
+  proc glSamplePatternEXT(pattern: GLenum)
+  proc glIndexxOES(component: GLfixed)
+  proc glVertexAttrib4ubv(index: GLuint, v: ptr GLubyte)
+  proc glGetColorTable(target: GLenum, format: GLenum, `type`: GLenum, table: pointer)
+  proc glFragmentLightModelivSGIX(pname: GLenum, params: ptr GLint)
+  proc glPixelTransformParameterfEXT(target: GLenum, pname: GLenum, param: GLfloat)
+  proc glSamplerParameterfv(sampler: GLuint, pname: GLenum, param: ptr GLfloat)
+  proc glBindTextureUnitParameterEXT(unit: GLenum, value: GLenum): GLuint
+  proc glColor3ub(red: GLubyte, green: GLubyte, blue: GLubyte)
+  proc glGetMultiTexGenivEXT(texunit: GLenum, coord: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVariantusvEXT(id: GLuint, `addr`: ptr GLushort)
+  proc glMaterialiv(face: GLenum, pname: GLenum, params: ptr GLint)
+  proc glPassTexCoordATI(dst: GLuint, coord: GLuint, swizzle: GLenum)
+  proc glGetIntegerui64vNV(value: GLenum, result: ptr GLuint64Ext)
+  proc glProgramParameteriEXT(program: GLuint, pname: GLenum, value: GLint)
+  proc glVertexArrayEdgeFlagOffsetEXT(vaobj: GLuint, buffer: GLuint, stride: GLsizei, offset: GLintptr)
+  proc glGetCombinerInputParameterivNV(stage: GLenum, portion: GLenum, variable: GLenum, pname: GLenum, params: ptr GLint)
+  proc glLogicOp(opcode: GLenum)
+  proc glConvolutionParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glIsBufferResidentNV(target: GLenum): GLboolean
+  proc glIsProgram(program: GLuint): GLboolean
+  proc glEndQueryARB(target: GLenum)
+  proc glRenderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glMaterialfv(face: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glTranslatex(x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glPathParameterivNV(path: GLuint, pname: GLenum, value: ptr GLint)
+  proc glLightxOES(light: GLenum, pname: GLenum, param: GLfixed)
+  proc glSampleMaskEXT(value: GLclampf, invert: GLboolean)
+  proc glReplacementCodeubvSUN(code: ptr GLubyte)
+  proc glVertexAttribArrayObjectATI(index: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, stride: GLsizei, buffer: GLuint, offset: GLuint)
+  proc glBeginTransformFeedbackNV(primitiveMode: GLenum)
+  proc glEvalCoord1fv(u: ptr GLfloat)
+  proc glProgramUniformMatrix2x3dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glMaterialxv(face: GLenum, pname: GLenum, param: ptr GLfixed)
+  proc glGetIntegerui64i_vNV(value: GLenum, index: GLuint, result: ptr GLuint64Ext)
+  proc glUniformBlockBinding(program: GLuint, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint)
+  proc glColor4ui(red: GLuint, green: GLuint, blue: GLuint, alpha: GLuint)
+  proc glColor4ubVertex2fvSUN(c: ptr GLubyte, v: ptr GLfloat)
+  proc glRectd(x1: GLdouble, y1: GLdouble, x2: GLdouble, y2: GLdouble)
+  proc glGenVertexShadersEXT(range: GLuint): GLuint
+  proc glLinkProgramARB(programObj: GLhandleArb)
+  proc glVertexAttribL4dEXT(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glBlitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum)
+  proc glUseProgram(program: GLuint)
+  proc glNamedProgramLocalParameterI4ivEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLint)
+  proc glMatrixLoadTransposedEXT(mode: GLenum, m: ptr GLdouble)
+  proc glTranslatef(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glGetBooleani_v(target: GLenum, index: GLuint, data: ptr GLboolean)
+  proc glEndFragmentShaderATI()
+  proc glVertexAttribI4ivEXT(index: GLuint, v: ptr GLint)
+  proc glMultiDrawElementsIndirectBindlessNV(mode: GLenum, `type`: GLenum, indirect: pointer, drawCount: GLsizei, stride: GLsizei, vertexBufferCount: GLint)
+  proc glTexCoord2s(s: GLshort, t: GLshort)
+  proc glProgramUniform1i64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glPointSizePointerOES(`type`: GLenum, stride: GLsizei, `pointer`: ptr pointer)
+  proc glGetTexFilterFuncSGIS(target: GLenum, filter: GLenum, weights: ptr GLfloat)
+  proc glMapGrid2xOES(n: GLint, u1: GLfixed, u2: GLfixed, v1: GLfixed, v2: GLfixed)
+  proc glRasterPos4xvOES(coords: ptr GLfixed)
+  proc glGetProgramBinary(program: GLuint, bufSize: GLsizei, length: ptr GLsizei, binaryFormat: ptr GLenum, binary: pointer)
+  proc glNamedProgramLocalParameterI4uiEXT(program: GLuint, target: GLenum, index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint)
+  proc glGetTexImage(target: GLenum, level: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glColor4d(red: GLdouble, green: GLdouble, blue: GLdouble, alpha: GLdouble)
+  proc glTexCoord2fColor4fNormal3fVertex3fSUN(s: GLfloat, t: GLfloat, r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glIndexi(c: GLint)
+  proc glGetSamplerParameterIuiv(sampler: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glGetnUniformivARB(program: GLuint, location: GLint, bufSize: GLsizei, params: ptr GLint)
+  proc glCopyTexSubImage3DEXT(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glVertexAttribI2uivEXT(index: GLuint, v: ptr GLuint)
+  proc glVertexStream2fvATI(stream: GLenum, coords: ptr GLfloat)
+  proc glArrayElementEXT(i: GLint)
+  proc glVertexAttrib2fv(index: GLuint, v: ptr GLfloat)
+  proc glCopyMultiTexSubImage1DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, x: GLint, y: GLint, width: GLsizei)
+  proc glTexCoord4sv(v: ptr GLshort)
+  proc glTexGenfvOES(coord: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glPointParameteriv(pname: GLenum, params: ptr GLint)
+  proc glGetNamedRenderbufferParameterivEXT(renderbuffer: GLuint, pname: GLenum, params: ptr GLint)
+  proc glProgramVertexLimitNV(target: GLenum, limit: GLint)
+  proc glSetMultisamplefvAMD(pname: GLenum, index: GLuint, val: ptr GLfloat)
+  proc glLoadIdentityDeformationMapSGIX(mask: GLbitfield)
+  proc glIsSyncAPPLE(sync: GLsync): GLboolean
+  proc glProgramUniform1ui64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glEdgeFlagPointerListIBM(stride: GLint, `pointer`: ptr ptr GLboolean, ptrstride: GLint)
+  proc glBeginVertexShaderEXT()
+  proc glGetIntegerv(pname: GLenum, params: ptr GLint)
+  proc glVertexAttrib2dvARB(index: GLuint, v: ptr GLdouble)
+  proc glBeginConditionalRenderNV(id: GLuint, mode: GLenum)
+  proc glEdgeFlagv(flag: ptr GLboolean)
+  proc glReplacementCodeubSUN(code: GLubyte)
+  proc glObjectLabel(identifier: GLenum, name: GLuint, length: GLsizei, label: cstring)
+  proc glMultiTexCoord3xvOES(texture: GLenum, coords: ptr GLfixed)
+  proc glNormal3iv(v: ptr GLint)
+  proc glSamplerParameteri(sampler: GLuint, pname: GLenum, param: GLint)
+  proc glTextureStorage1DEXT(texture: GLuint, target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei)
+  proc glVertexStream4dvATI(stream: GLenum, coords: ptr GLdouble)
+  proc glWindowPos2fv(v: ptr GLfloat)
+  proc glTexCoord4i(s: GLint, t: GLint, r: GLint, q: GLint)
+  proc glVertexAttrib4NusvARB(index: GLuint, v: ptr GLushort)
+  proc glVertexAttribL4d(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glVertexAttribDivisorANGLE(index: GLuint, divisor: GLuint)
+  proc glMatrixIndexPointerOES(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glMultMatrixxOES(m: ptr GLfixed)
+  proc glMultiTexCoordP2ui(texture: GLenum, `type`: GLenum, coords: GLuint)
+  proc glDeformationMap3dSGIX(target: GLenum, u1: GLdouble, u2: GLdouble, ustride: GLint, uorder: GLint, v1: GLdouble, v2: GLdouble, vstride: GLint, vorder: GLint, w1: GLdouble, w2: GLdouble, wstride: GLint, worder: GLint, points: ptr GLdouble)
+  proc glClearDepthfOES(depth: GLclampf)
+  proc glVertexStream1ivATI(stream: GLenum, coords: ptr GLint)
+  proc glHint(target: GLenum, mode: GLenum)
+  proc glVertex3fv(v: ptr GLfloat)
+  proc glWaitSyncAPPLE(sync: GLsync, flags: GLbitfield, timeout: GLuint64)
+  proc glWindowPos3i(x: GLint, y: GLint, z: GLint)
+  proc glCompressedTexImage3DARB(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glVertexAttrib1fvARB(index: GLuint, v: ptr GLfloat)
+  proc glMultiTexCoord4xOES(texture: GLenum, s: GLfixed, t: GLfixed, r: GLfixed, q: GLfixed)
+  proc glUniform4ui64NV(location: GLint, x: GLuint64Ext, y: GLuint64Ext, z: GLuint64Ext, w: GLuint64Ext)
+  proc glProgramUniform4uiEXT(program: GLuint, location: GLint, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint)
+  proc glUnmapNamedBufferEXT(buffer: GLuint): GLboolean
+  proc glBitmap(width: GLsizei, height: GLsizei, xorig: GLfloat, yorig: GLfloat, xmove: GLfloat, ymove: GLfloat, bitmap: ptr GLubyte)
+  proc glNamedProgramLocalParameters4fvEXT(program: GLuint, target: GLenum, index: GLuint, count: GLsizei, params: ptr GLfloat)
+  proc glGetPathCommandsNV(path: GLuint, commands: ptr GLubyte)
+  proc glVertexAttrib3fNV(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glNamedProgramStringEXT(program: GLuint, target: GLenum, format: GLenum, len: GLsizei, string: pointer)
+  proc glMatrixIndexusvARB(size: GLint, indices: ptr GLushort)
+  proc glBlitFramebufferNV(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum)
+  proc glVertexAttribI1uiv(index: GLuint, v: ptr GLuint)
+  proc glEndConditionalRenderNV()
+  proc glFeedbackBuffer(size: GLsizei, `type`: GLenum, buffer: ptr GLfloat)
+  proc glMultiTexCoord3bvOES(texture: GLenum, coords: ptr GLbyte)
+  proc glCopyColorTableSGI(target: GLenum, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei)
+  proc glActiveTexture(texture: GLenum)
+  proc glFogCoordhNV(fog: GLhalfNv)
+  proc glColorMaskIndexedEXT(index: GLuint, r: GLboolean, g: GLboolean, b: GLboolean, a: GLboolean)
+  proc glGetCompressedTexImage(target: GLenum, level: GLint, img: pointer)
+  proc glRasterPos2iv(v: ptr GLint)
+  proc glGetBufferParameterivARB(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glProgramUniform3d(program: GLuint, location: GLint, v0: GLdouble, v1: GLdouble, v2: GLdouble)
+  proc glRasterPos3xvOES(coords: ptr GLfixed)
+  proc glGetTextureParameterIuivEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glBindImageTextureEXT(index: GLuint, texture: GLuint, level: GLint, layered: GLboolean, layer: GLint, access: GLenum, format: GLint)
+  proc glWindowPos2iMESA(x: GLint, y: GLint)
+  proc glVertexPointervINTEL(size: GLint, `type`: GLenum, `pointer`: ptr pointer)
+  proc glPixelTexGenParameterfvSGIS(pname: GLenum, params: ptr GLfloat)
+  proc glUniform1iARB(location: GLint, v0: GLint)
+  proc glTextureSubImage3DEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glStencilOpSeparate(face: GLenum, sfail: GLenum, dpfail: GLenum, dppass: GLenum)
+  proc glVertexAttrib1dARB(index: GLuint, x: GLdouble)
+  proc glGetVideoCaptureStreamivNV(video_capture_slot: GLuint, stream: GLuint, pname: GLenum, params: ptr GLint)
+  proc glIsFramebufferEXT(framebuffer: GLuint): GLboolean
+  proc glPointParameterxv(pname: GLenum, params: ptr GLfixed)
+  proc glProgramUniform4dv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glPassThrough(token: GLfloat)
+  proc glGetProgramPipelineiv(pipeline: GLuint, pname: GLenum, params: ptr GLint)
+  proc glApplyTextureEXT(mode: GLenum)
+  proc glVertexArrayNormalOffsetEXT(vaobj: GLuint, buffer: GLuint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glTexFilterFuncSGIS(target: GLenum, filter: GLenum, n: GLsizei, weights: ptr GLfloat)
+  proc glRenderbufferStorageOES(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glBindParameterEXT(value: GLenum): GLuint
+  proc glVertex4s(x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glLoadTransposeMatrixf(m: ptr GLfloat)
+  proc glDepthFunc(fun: GLenum)
+  proc glGetFramebufferAttachmentParameterivEXT(target: GLenum, attachment: GLenum, pname: GLenum, params: ptr GLint)
+  proc glSampleMaskSGIS(value: GLclampf, invert: GLboolean)
+  proc glGetPointerIndexedvEXT(target: GLenum, index: GLuint, data: ptr pointer)
+  proc glVertexStream4iATI(stream: GLenum, x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glUnlockArraysEXT()
+  proc glReplacementCodeuivSUN(code: ptr GLuint)
+  proc glMatrixScaledEXT(mode: GLenum, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glMultiTexImage2DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glFeedbackBufferxOES(n: GLsizei, `type`: GLenum, buffer: ptr GLfixed)
+  proc glLightEnviSGIX(pname: GLenum, param: GLint)
+  proc glMultiTexCoord4dARB(target: GLenum, s: GLdouble, t: GLdouble, r: GLdouble, q: GLdouble)
+  proc glExtGetTexLevelParameterivQCOM(texture: GLuint, face: GLenum, level: GLint, pname: GLenum, params: ptr GLint)
+  proc glVertexAttribI4usvEXT(index: GLuint, v: ptr GLushort)
+  proc glWindowPos2dvARB(v: ptr GLdouble)
+  proc glBindFramebuffer(target: GLenum, framebuffer: GLuint)
+  proc glGetProgramPipelineivEXT(pipeline: GLuint, pname: GLenum, params: ptr GLint)
+  proc glProgramUniformHandleui64vNV(program: GLuint, location: GLint, count: GLsizei, values: ptr GLuint64)
+  proc glFogCoordhvNV(fog: ptr GLhalfNv)
+  proc glTextureImage1DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetActiveAtomicCounterBufferiv(program: GLuint, bufferIndex: GLuint, pname: GLenum, params: ptr GLint)
+  proc glBeginQueryARB(target: GLenum, id: GLuint)
+  proc glGetTexParameterIuivEXT(target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glUniform4ui64vNV(location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glClearAccumxOES(red: GLfixed, green: GLfixed, blue: GLfixed, alpha: GLfixed)
+  proc glFreeObjectBufferATI(buffer: GLuint)
+  proc glGetVideouivNV(video_slot: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glVertexAttribL4ui64NV(index: GLuint, x: GLuint64Ext, y: GLuint64Ext, z: GLuint64Ext, w: GLuint64Ext)
+  proc glGetUniformBlockIndex(program: GLuint, uniformBlockName: cstring): GLuint
+  proc glCopyMultiTexSubImage2DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glVertex3bvOES(coords: ptr GLbyte)
+  proc glMultiDrawElementArrayAPPLE(mode: GLenum, first: ptr GLint, count: ptr GLsizei, primcount: GLsizei)
+  proc glPrimitiveRestartNV()
+  proc glMateriali(face: GLenum, pname: GLenum, param: GLint)
+  proc glBegin(mode: GLenum)
+  proc glFogCoordPointerEXT(`type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glTexCoord1sv(v: ptr GLshort)
+  proc glVertexAttribI4sv(index: GLuint, v: ptr GLshort)
+  proc glTexEnvx(target: GLenum, pname: GLenum, param: GLfixed)
+  proc glTexParameterIivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glLoadTransposeMatrixfARB(m: ptr GLfloat)
+  proc glGetTextureSamplerHandleARB(texture: GLuint, sampler: GLuint): GLuint64
+  proc glVertexP3uiv(`type`: GLenum, value: ptr GLuint)
+  proc glProgramUniform2dv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glTexCoord4xvOES(coords: ptr GLfixed)
+  proc glTexStorage1D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei)
+  proc glTextureParameterfEXT(texture: GLuint, target: GLenum, pname: GLenum, param: GLfloat)
+  proc glVertexAttrib1d(index: GLuint, x: GLdouble)
+  proc glGetnPixelMapfvARB(map: GLenum, bufSize: GLsizei, values: ptr GLfloat)
+  proc glDisableVertexAttribArray(index: GLuint)
+  proc glUniformMatrix4x3dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glRasterPos4f(x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glProgramUniform1fEXT(program: GLuint, location: GLint, v0: GLfloat)
+  proc glPathTexGenNV(texCoordSet: GLenum, genMode: GLenum, components: GLint, coeffs: ptr GLfloat)
+  proc glUniform3ui(location: GLint, v0: GLuint, v1: GLuint, v2: GLuint)
+  proc glVDPAURegisterOutputSurfaceNV(vdpSurface: pointer, target: GLenum, numTextureNames: GLsizei, textureNames: ptr GLuint): GLvdpauSurfaceNv
+  proc glGetProgramLocalParameterIuivNV(target: GLenum, index: GLuint, params: ptr GLuint)
+  proc glIsTextureHandleResidentNV(handle: GLuint64): GLboolean
+  proc glProgramEnvParameters4fvEXT(target: GLenum, index: GLuint, count: GLsizei, params: ptr GLfloat)
+  proc glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN(rc: GLuint, s: GLfloat, t: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glGetMultiTexEnvivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetFloatv(pname: GLenum, params: ptr GLfloat)
+  proc glInsertEventMarkerEXT(length: GLsizei, marker: cstring)
+  proc glRasterPos3d(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glNamedFramebufferRenderbufferEXT(framebuffer: GLuint, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: GLuint)
+  proc glGetConvolutionFilter(target: GLenum, format: GLenum, `type`: GLenum, image: pointer)
+  proc glIsOcclusionQueryNV(id: GLuint): GLboolean
+  proc glGetnPixelMapuivARB(map: GLenum, bufSize: GLsizei, values: ptr GLuint)
+  proc glMapParameterfvNV(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glPushDebugGroup(source: GLenum, id: GLuint, length: GLsizei, message: cstring)
+  proc glMakeImageHandleResidentARB(handle: GLuint64, access: GLenum)
+  proc glProgramUniformMatrix2fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glUniform3i64vNV(location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glImageTransformParameteriHP(target: GLenum, pname: GLenum, param: GLint)
+  proc glMultiTexCoord1s(target: GLenum, s: GLshort)
+  proc glVertexAttribL4dvEXT(index: GLuint, v: ptr GLdouble)
+  proc glGetProgramEnvParameterfvARB(target: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glVertexArrayColorOffsetEXT(vaobj: GLuint, buffer: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glGetHistogramParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetRenderbufferParameterivOES(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetBufferPointerv(target: GLenum, pname: GLenum, params: ptr pointer)
+  proc glSecondaryColor3ui(red: GLuint, green: GLuint, blue: GLuint)
+  proc glGetDebugMessageLog(count: GLuint, bufsize: GLsizei, sources: ptr GLenum, types: ptr GLenum, ids: ptr GLuint, severities: ptr GLenum, lengths: ptr GLsizei, messageLog: cstring): GLuint
+  proc glNormal3i(nx: GLint, ny: GLint, nz: GLint)
+  proc glTestFenceNV(fence: GLuint): GLboolean
+  proc glSecondaryColor3usv(v: ptr GLushort)
+  proc glGenPathsNV(range: GLsizei): GLuint
+  proc glDeleteBuffersARB(n: GLsizei, buffers: ptr GLuint)
+  proc glProgramUniform4fvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetSharpenTexFuncSGIS(target: GLenum, points: ptr GLfloat)
+  proc glDrawMeshArraysSUN(mode: GLenum, first: GLint, count: GLsizei, width: GLsizei)
+  proc glVertexAttribs4hvNV(index: GLuint, n: GLsizei, v: ptr GLhalfNv)
+  proc glGetClipPlane(plane: GLenum, equation: ptr GLdouble)
+  proc glEvalCoord2fv(u: ptr GLfloat)
+  proc glAsyncMarkerSGIX(marker: GLuint)
+  proc glGetSynciv(sync: GLsync, pname: GLenum, bufSize: GLsizei, length: ptr GLsizei, values: ptr GLint)
+  proc glGetPathTexGenfvNV(texCoordSet: GLenum, pname: GLenum, value: ptr GLfloat)
+  proc glTexParameterf(target: GLenum, pname: GLenum, param: GLfloat)
+  proc glMultiTexCoord1fvARB(target: GLenum, v: ptr GLfloat)
+  proc glNormalPointerListIBM(`type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glFragmentLightfvSGIX(light: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glViewportArrayv(first: GLuint, count: GLsizei, v: ptr GLfloat)
+  proc glNormal3fVertex3fSUN(nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glMultiTexCoord2dvARB(target: GLenum, v: ptr GLdouble)
+  proc glCopyColorSubTable(target: GLenum, start: GLsizei, x: GLint, y: GLint, width: GLsizei)
+  proc glTexCoord2hvNV(v: ptr GLhalfNv)
+  proc glGetQueryObjectiv(id: GLuint, pname: GLenum, params: ptr GLint)
+  proc glColor4hNV(red: GLhalfNv, green: GLhalfNv, blue: GLhalfNv, alpha: GLhalfNv)
+  proc glProgramUniform2fv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glMultiTexCoord4hNV(target: GLenum, s: GLhalfNv, t: GLhalfNv, r: GLhalfNv, q: GLhalfNv)
+  proc glWindowPos2fvMESA(v: ptr GLfloat)
+  proc glVertexAttrib3s(index: GLuint, x: GLshort, y: GLshort, z: GLshort)
+  proc glGetIntegerIndexedvEXT(target: GLenum, index: GLuint, data: ptr GLint)
+  proc glVertexAttrib4Niv(index: GLuint, v: ptr GLint)
+  proc glProgramLocalParameter4dvARB(target: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glFramebufferTextureLayerEXT(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, layer: GLint)
+  proc glVertexAttribI1ui(index: GLuint, x: GLuint)
+  proc glFogCoorddv(coord: ptr GLdouble)
+  proc glLightModelxv(pname: GLenum, param: ptr GLfixed)
+  proc glGetCombinerOutputParameterfvNV(stage: GLenum, portion: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glFramebufferReadBufferEXT(framebuffer: GLuint, mode: GLenum)
+  proc glGetActiveUniformsiv(program: GLuint, uniformCount: GLsizei, uniformIndices: ptr GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetProgramStringNV(id: GLuint, pname: GLenum, program: ptr GLubyte)
+  proc glCopyConvolutionFilter2D(target: GLenum, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glMultiTexCoord3iARB(target: GLenum, s: GLint, t: GLint, r: GLint)
+  proc glPushName(name: GLuint)
+  proc glProgramParameter4dNV(target: GLenum, index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glVertexAttrib4svARB(index: GLuint, v: ptr GLshort)
+  proc glSecondaryColor3iv(v: ptr GLint)
+  proc glCopyColorSubTableEXT(target: GLenum, start: GLsizei, x: GLint, y: GLint, width: GLsizei)
+  proc glCallList(list: GLuint)
+  proc glGetMultiTexLevelParameterivEXT(texunit: GLenum, target: GLenum, level: GLint, pname: GLenum, params: ptr GLint)
+  proc glProgramUniformMatrix2x4fv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glTexBumpParameterivATI(pname: GLenum, param: ptr GLint)
+  proc glTexGeni(coord: GLenum, pname: GLenum, param: GLint)
+  proc glSecondaryColor3dv(v: ptr GLdouble)
+  proc glGetnUniformdvARB(program: GLuint, location: GLint, bufSize: GLsizei, params: ptr GLdouble)
+  proc glGetNamedProgramLocalParameterdvEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glGetVertexAttribPointervARB(index: GLuint, pname: GLenum, `pointer`: ptr pointer)
+  proc glCopyColorTable(target: GLenum, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei)
+  proc glNamedFramebufferTextureLayerEXT(framebuffer: GLuint, attachment: GLenum, texture: GLuint, level: GLint, layer: GLint)
+  proc glLoadProgramNV(target: GLenum, id: GLuint, len: GLsizei, program: ptr GLubyte)
+  proc glAlphaFragmentOp2ATI(op: GLenum, dst: GLuint, dstMod: GLuint, arg1: GLuint, arg1Rep: GLuint, arg1Mod: GLuint, arg2: GLuint, arg2Rep: GLuint, arg2Mod: GLuint)
+  proc glBindLightParameterEXT(light: GLenum, value: GLenum): GLuint
+  proc glVertexAttrib1fv(index: GLuint, v: ptr GLfloat)
+  proc glLoadIdentity()
+  proc glFramebufferTexture2DMultisampleEXT(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, samples: GLsizei)
+  proc glVertexAttrib1dvARB(index: GLuint, v: ptr GLdouble)
+  proc glDrawRangeElementsBaseVertex(mode: GLenum, start: GLuint, `end`: GLuint, count: GLsizei, `type`: GLenum, indices: pointer, basevertex: GLint)
+  proc glPixelMapfv(map: GLenum, mapsize: GLsizei, values: ptr GLfloat)
+  proc glPointParameterxOES(pname: GLenum, param: GLfixed)
+  proc glBindBufferRangeNV(target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr)
+  proc glDepthBoundsEXT(zmin: GLclampd, zmax: GLclampd)
+  proc glProgramUniformMatrix2dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glSecondaryColor3s(red: GLshort, green: GLshort, blue: GLshort)
+  proc glEdgeFlagPointerEXT(stride: GLsizei, count: GLsizei, `pointer`: ptr GLboolean)
+  proc glVertexStream1fATI(stream: GLenum, x: GLfloat)
+  proc glUniformui64NV(location: GLint, value: GLuint64Ext)
+  proc glTexCoordP4uiv(`type`: GLenum, coords: ptr GLuint)
+  proc glTexCoord3d(s: GLdouble, t: GLdouble, r: GLdouble)
+  proc glDeleteProgramPipelines(n: GLsizei, pipelines: ptr GLuint)
+  proc glVertex2iv(v: ptr GLint)
+  proc glGetMultisamplefv(pname: GLenum, index: GLuint, val: ptr GLfloat)
+  proc glStartInstrumentsSGIX()
+  proc glGetOcclusionQueryivNV(id: GLuint, pname: GLenum, params: ptr GLint)
+  proc glDebugMessageCallback(callback: GLdebugProc, userParam: ptr pointer)
+  proc glPixelZoomxOES(xfactor: GLfixed, yfactor: GLfixed)
+  proc glTexCoord3i(s: GLint, t: GLint, r: GLint)
+  proc glEdgeFlagFormatNV(stride: GLsizei)
+  proc glProgramUniform2i(program: GLuint, location: GLint, v0: GLint, v1: GLint)
+  proc glColor3b(red: GLbyte, green: GLbyte, blue: GLbyte)
+  proc glDepthRangefOES(n: GLclampf, f: GLclampf)
+  proc glEndVertexShaderEXT()
+  proc glBindVertexArrayAPPLE(`array`: GLuint)
+  proc glColor4bv(v: ptr GLbyte)
+  proc glNamedFramebufferTexture2DEXT(framebuffer: GLuint, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glTexCoord1f(s: GLfloat)
+  proc glUniform3fvARB(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetQueryObjectuivARB(id: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glVertexAttrib4bv(index: GLuint, v: ptr GLbyte)
+  proc glGetPixelTransformParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertexAttrib3svNV(index: GLuint, v: ptr GLshort)
+  proc glDeleteQueriesEXT(n: GLsizei, ids: ptr GLuint)
+  proc glUniform3ivARB(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glNormal3xvOES(coords: ptr GLfixed)
+  proc glMatrixLoadfEXT(mode: GLenum, m: ptr GLfloat)
+  proc glGetNamedFramebufferAttachmentParameterivEXT(framebuffer: GLuint, attachment: GLenum, pname: GLenum, params: ptr GLint)
+  proc glSeparableFilter2D(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, row: pointer, column: pointer)
+  proc glVertexAttribI3uiv(index: GLuint, v: ptr GLuint)
+  proc glTextureStorageSparseAMD(texture: GLuint, target: GLenum, internalFormat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, layers: GLsizei, flags: GLbitfield)
+  proc glMultiDrawArraysIndirectCountARB(mode: GLenum, indirect: GLintptr, drawcount: GLintptr, maxdrawcount: GLsizei, stride: GLsizei)
+  proc glTranslated(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glColorPointer(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glDrawElementsInstancedBaseVertex(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer, instancecount: GLsizei, basevertex: GLint)
+  proc glBindAttribLocationARB(programObj: GLhandleArb, index: GLuint, name: cstring)
+  proc glTexGendv(coord: GLenum, pname: GLenum, params: ptr GLdouble)
+  proc glGetPathCoordsNV(path: GLuint, coords: ptr GLfloat)
+  proc glGetMapParameterivNV(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glClientAttribDefaultEXT(mask: GLbitfield)
+  proc glProgramUniformMatrix4x3fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glEnable(cap: GLenum)
+  proc glGetVertexAttribPointervNV(index: GLuint, pname: GLenum, `pointer`: ptr pointer)
+  proc glBindMultiTextureEXT(texunit: GLenum, target: GLenum, texture: GLuint)
+  proc glGetConvolutionParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glLightModelxvOES(pname: GLenum, param: ptr GLfixed)
+  proc glMultiTexCoord4sv(target: GLenum, v: ptr GLshort)
+  proc glGetColorTableParameterivSGI(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glFramebufferTexture2DOES(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint)
+  proc glClearDepthxOES(depth: GLfixed)
+  proc glDisableClientStateiEXT(`array`: GLenum, index: GLuint)
+  proc glWindowPos2dARB(x: GLdouble, y: GLdouble)
+  proc glVertexAttrib1fvNV(index: GLuint, v: ptr GLfloat)
+  proc glDepthRangedNV(zNear: GLdouble, zFar: GLdouble)
+  proc glClear(mask: GLbitfield)
+  proc glUnmapTexture2DINTEL(texture: GLuint, level: GLint)
+  proc glSecondaryColor3ub(red: GLubyte, green: GLubyte, blue: GLubyte)
+  proc glVertexAttribI4bv(index: GLuint, v: ptr GLbyte)
+  proc glTexRenderbufferNV(target: GLenum, renderbuffer: GLuint)
+  proc glColor4ubVertex3fvSUN(c: ptr GLubyte, v: ptr GLfloat)
+  proc glVertexAttrib2svNV(index: GLuint, v: ptr GLshort)
+  proc glMultiTexCoord1ivARB(target: GLenum, v: ptr GLint)
+  proc glUniformMatrix3x2dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glVertexAttribL3dvEXT(index: GLuint, v: ptr GLdouble)
+  proc glMultiTexSubImage1DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetBufferPointervARB(target: GLenum, pname: GLenum, params: ptr pointer)
+  proc glGetMultiTexLevelParameterfvEXT(texunit: GLenum, target: GLenum, level: GLint, pname: GLenum, params: ptr GLfloat)
+  proc glMultiTexParameterIuivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLuint)
+  proc glGetShaderSource(shader: GLuint, bufSize: GLsizei, length: ptr GLsizei, source: cstring)
+  proc glStencilFunc(fun: GLenum, `ref`: GLint, mask: GLuint)
+  proc glVertexAttribI4bvEXT(index: GLuint, v: ptr GLbyte)
+  proc glVertexAttrib4NuivARB(index: GLuint, v: ptr GLuint)
+  proc glIsObjectBufferATI(buffer: GLuint): GLboolean
+  proc glRasterPos2xOES(x: GLfixed, y: GLfixed)
+  proc glIsFenceNV(fence: GLuint): GLboolean
+  proc glGetFramebufferParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glClearBufferfv(buffer: GLenum, drawbuffer: GLint, value: ptr GLfloat)
+  proc glClearColorxOES(red: GLfixed, green: GLfixed, blue: GLfixed, alpha: GLfixed)
+  proc glVertexWeightfEXT(weight: GLfloat)
+  proc glExtIsProgramBinaryQCOM(program: GLuint): GLboolean
+  proc glTextureStorage2DMultisampleEXT(texture: GLuint, target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, fixedsamplelocations: GLboolean)
+  proc glGetHistogramParameterxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glVertexAttrib4dNV(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glGetPerfMonitorCounterStringAMD(group: GLuint, counter: GLuint, bufSize: GLsizei, length: ptr GLsizei, counterString: cstring)
+  proc glMultiTexCoord2sARB(target: GLenum, s: GLshort, t: GLshort)
+  proc glSpriteParameterivSGIX(pname: GLenum, params: ptr GLint)
+  proc glCompressedTextureImage3DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, bits: pointer)
+  proc glBufferSubData(target: GLenum, offset: GLintptr, size: GLsizeiptr, data: pointer)
+  proc glBlendParameteriNV(pname: GLenum, value: GLint)
+  proc glVertexAttrib2fvNV(index: GLuint, v: ptr GLfloat)
+  proc glGetVariantBooleanvEXT(id: GLuint, value: GLenum, data: ptr GLboolean)
+  proc glProgramParameteri(program: GLuint, pname: GLenum, value: GLint)
+  proc glGetLocalConstantIntegervEXT(id: GLuint, value: GLenum, data: ptr GLint)
+  proc glFragmentMaterialiSGIX(face: GLenum, pname: GLenum, param: GLint)
+  proc glGetNamedStringivARB(namelen: GLint, name: cstring, pname: GLenum, params: ptr GLint)
+  proc glBinormal3ivEXT(v: ptr GLint)
+  proc glCheckFramebufferStatusEXT(target: GLenum): GLenum
+  proc glVertexAttrib1fNV(index: GLuint, x: GLfloat)
+  proc glNamedRenderbufferStorageEXT(renderbuffer: GLuint, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glPresentFrameKeyedNV(video_slot: GLuint, minPresentTime: GLuint64Ext, beginPresentTimeId: GLuint, presentDurationId: GLuint, `type`: GLenum, target0: GLenum, fill0: GLuint, key0: GLuint, target1: GLenum, fill1: GLuint, key1: GLuint)
+  proc glGetObjectParameterfvARB(obj: GLhandleArb, pname: GLenum, params: ptr GLfloat)
+  proc glVertex3sv(v: ptr GLshort)
+  proc glColor4s(red: GLshort, green: GLshort, blue: GLshort, alpha: GLshort)
+  proc glGetQueryObjecti64vEXT(id: GLuint, pname: GLenum, params: ptr GLint64)
+  proc glEvalMesh2(mode: GLenum, i1: GLint, i2: GLint, j1: GLint, j2: GLint)
+  proc glBeginTransformFeedbackEXT(primitiveMode: GLenum)
+  proc glBufferAddressRangeNV(pname: GLenum, index: GLuint, address: GLuint64Ext, length: GLsizeiptr)
+  proc glPointParameterfvARB(pname: GLenum, params: ptr GLfloat)
+  proc glGetActiveVaryingNV(program: GLuint, index: GLuint, bufSize: GLsizei, length: ptr GLsizei, size: ptr GLsizei, `type`: ptr GLenum, name: cstring)
+  proc glIndexMask(mask: GLuint)
+  proc glVertexAttribBinding(attribindex: GLuint, bindingindex: GLuint)
+  proc glDeleteFencesNV(n: GLsizei, fences: ptr GLuint)
+  proc glVertexAttribI4ubv(index: GLuint, v: ptr GLubyte)
+  proc glPathParameterfvNV(path: GLuint, pname: GLenum, value: ptr GLfloat)
+  proc glVertexStream3fATI(stream: GLenum, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glVertexAttribs4svNV(index: GLuint, count: GLsizei, v: ptr GLshort)
+  proc glVertexAttrib4sNV(index: GLuint, x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glAlphaFragmentOp3ATI(op: GLenum, dst: GLuint, dstMod: GLuint, arg1: GLuint, arg1Rep: GLuint, arg1Mod: GLuint, arg2: GLuint, arg2Rep: GLuint, arg2Mod: GLuint, arg3: GLuint, arg3Rep: GLuint, arg3Mod: GLuint)
+  proc glGetHistogramParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttribL1ui64NV(index: GLuint, x: GLuint64Ext)
+  proc glVertexAttribs3fvNV(index: GLuint, count: GLsizei, v: ptr GLfloat)
+  proc glMultiTexCoord3ivARB(target: GLenum, v: ptr GLint)
+  proc glClipPlanefOES(plane: GLenum, equation: ptr GLfloat)
+  proc glVertex3s(x: GLshort, y: GLshort, z: GLshort)
+  proc glVertex3dv(v: ptr GLdouble)
+  proc glWeightPointerOES(size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glBindBufferBase(target: GLenum, index: GLuint, buffer: GLuint)
+  proc glIndexs(c: GLshort)
+  proc glTessellationFactorAMD(factor: GLfloat)
+  proc glColor4ubVertex3fSUN(r: GLubyte, g: GLubyte, b: GLubyte, a: GLubyte, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glPauseTransformFeedback()
+  proc glImageTransformParameterivHP(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glColor3dv(v: ptr GLdouble)
+  proc glRasterPos4sv(v: ptr GLshort)
+  proc glInvalidateTexSubImage(texture: GLuint, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei)
+  proc glNormalStream3bvATI(stream: GLenum, coords: ptr GLbyte)
+  proc glUniformMatrix2x4fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glMinmax(target: GLenum, internalformat: GLenum, sink: GLboolean)
+  proc glGetProgramStageiv(program: GLuint, shadertype: GLenum, pname: GLenum, values: ptr GLint)
+  proc glScalex(x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glTexBufferARB(target: GLenum, internalformat: GLenum, buffer: GLuint)
+  proc glDrawArraysIndirect(mode: GLenum, indirect: pointer)
+  proc glMatrixLoadTransposefEXT(mode: GLenum, m: ptr GLfloat)
+  proc glMultiTexCoord2f(target: GLenum, s: GLfloat, t: GLfloat)
+  proc glDrawRangeElements(mode: GLenum, start: GLuint, `end`: GLuint, count: GLsizei, `type`: GLenum, indices: pointer)
+  proc glVertexAttrib4NubARB(index: GLuint, x: GLubyte, y: GLubyte, z: GLubyte, w: GLubyte)
+  proc glMultiTexCoord4xvOES(texture: GLenum, coords: ptr GLfixed)
+  proc glVertexArrayVertexAttribOffsetEXT(vaobj: GLuint, buffer: GLuint, index: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr)
+  proc glVertexAttribL1i64vNV(index: GLuint, v: ptr GLint64Ext)
+  proc glMapBuffer(target: GLenum, access: GLenum): pointer
+  proc glUniform1ui(location: GLint, v0: GLuint)
+  proc glGetPixelMapfv(map: GLenum, values: ptr GLfloat)
+  proc glTexImage2DMultisampleCoverageNV(target: GLenum, coverageSamples: GLsizei, colorSamples: GLsizei, internalFormat: GLint, width: GLsizei, height: GLsizei, fixedSampleLocations: GLboolean)
+  proc glUniform2ivARB(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glVertexAttribI3ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint)
+  proc glGetProgramResourceiv(program: GLuint, programInterface: GLenum, index: GLuint, propCount: GLsizei, props: ptr GLenum, bufSize: GLsizei, length: ptr GLsizei, params: ptr GLint)
+  proc glUniform4iv(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glVertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glClientActiveVertexStreamATI(stream: GLenum)
+  proc glTexCoord4fColor4fNormal3fVertex4fvSUN(tc: ptr GLfloat, c: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glColor3xvOES(components: ptr GLfixed)
+  proc glVertexPointerListIBM(size: GLint, `type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glProgramEnvParameter4dARB(target: GLenum, index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glGetLocalConstantFloatvEXT(id: GLuint, value: GLenum, data: ptr GLfloat)
+  proc glTexCoordPointerEXT(size: GLint, `type`: GLenum, stride: GLsizei, count: GLsizei, `pointer`: pointer)
+  proc glTexCoordPointervINTEL(size: GLint, `type`: GLenum, `pointer`: ptr pointer)
+  proc glSelectPerfMonitorCountersAMD(monitor: GLuint, enable: GLboolean, group: GLuint, numCounters: GLint, counterList: ptr GLuint)
+  proc glVertexStream4svATI(stream: GLenum, coords: ptr GLshort)
+  proc glColor3ui(red: GLuint, green: GLuint, blue: GLuint)
+  proc glBindTransformFeedbackNV(target: GLenum, id: GLuint)
+  proc glDeformSGIX(mask: GLbitfield)
+  proc glDeformationMap3fSGIX(target: GLenum, u1: GLfloat, u2: GLfloat, ustride: GLint, uorder: GLint, v1: GLfloat, v2: GLfloat, vstride: GLint, vorder: GLint, w1: GLfloat, w2: GLfloat, wstride: GLint, worder: GLint, points: ptr GLfloat)
+  proc glNamedBufferSubDataEXT(buffer: GLuint, offset: GLintptr, size: GLsizeiptr, data: pointer)
+  proc glGetNamedProgramStringEXT(program: GLuint, target: GLenum, pname: GLenum, string: pointer)
+  proc glCopyPathNV(resultPath: GLuint, srcPath: GLuint)
+  proc glMapControlPointsNV(target: GLenum, index: GLuint, `type`: GLenum, ustride: GLsizei, vstride: GLsizei, uorder: GLint, vorder: GLint, packed: GLboolean, points: pointer)
+  proc glGetBufferParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glUnmapObjectBufferATI(buffer: GLuint)
+  proc glGetProgramResourceLocation(program: GLuint, programInterface: GLenum, name: cstring): GLint
+  proc glUniform4i64vNV(location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glImageTransformParameterfHP(target: GLenum, pname: GLenum, param: GLfloat)
+  proc glArrayObjectATI(`array`: GLenum, size: GLint, `type`: GLenum, stride: GLsizei, buffer: GLuint, offset: GLuint)
+  proc glBindBufferRangeEXT(target: GLenum, index: GLuint, buffer: GLuint, offset: GLintptr, size: GLsizeiptr)
+  proc glVertexArrayVertexAttribFormatEXT(vaobj: GLuint, attribindex: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, relativeoffset: GLuint)
+  proc glBindRenderbufferEXT(target: GLenum, renderbuffer: GLuint)
+  proc glListParameteriSGIX(list: GLuint, pname: GLenum, param: GLint)
+  proc glProgramUniformMatrix2dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glProgramUniform2i64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glObjectPtrLabelKHR(`ptr`: ptr pointer, length: GLsizei, label: cstring)
+  proc glVertexAttribL1i64NV(index: GLuint, x: GLint64Ext)
+  proc glMultiTexBufferEXT(texunit: GLenum, target: GLenum, internalformat: GLenum, buffer: GLuint)
+  proc glCoverFillPathInstancedNV(numPaths: GLsizei, pathNameType: GLenum, paths: pointer, pathBase: GLuint, coverMode: GLenum, transformType: GLenum, transformValues: ptr GLfloat)
+  proc glGetVertexAttribIivEXT(index: GLuint, pname: GLenum, params: ptr GLint)
+  proc glLightf(light: GLenum, pname: GLenum, param: GLfloat)
+  proc glGetMinmaxParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glUniform1d(location: GLint, x: GLdouble)
+  proc glLightiv(light: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertexAttrib2dvNV(index: GLuint, v: ptr GLdouble)
+  proc glNormalP3ui(`type`: GLenum, coords: GLuint)
+  proc glFinalCombinerInputNV(variable: GLenum, input: GLenum, mapping: GLenum, componentUsage: GLenum)
+  proc glUniform1uiv(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glValidateProgramARB(programObj: GLhandleArb)
+  proc glNormalPointer(`type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glProgramNamedParameter4fvNV(id: GLuint, len: GLsizei, name: ptr GLubyte, v: ptr GLfloat)
+  proc glGetBooleanv(pname: GLenum, params: ptr GLboolean)
+  proc glTangent3ivEXT(v: ptr GLint)
+  proc glTexImage3DMultisample(target: GLenum, samples: GLsizei, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, fixedsamplelocations: GLboolean)
+  proc glGetUniformIndices(program: GLuint, uniformCount: GLsizei, uniformNames: cstringArray, uniformIndices: ptr GLuint)
+  proc glVDPAUInitNV(vdpDevice: pointer, getProcAddress: pointer)
+  proc glGetMinmaxParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMultiTexCoord2fvARB(target: GLenum, v: ptr GLfloat)
+  proc glProgramEnvParametersI4ivNV(target: GLenum, index: GLuint, count: GLsizei, params: ptr GLint)
+  proc glClearTexSubImage(texture: GLuint, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, data: ptr pointer)
+  proc glRectxOES(x1: GLfixed, y1: GLfixed, x2: GLfixed, y2: GLfixed)
+  proc glBlendEquationOES(mode: GLenum)
+  proc glFramebufferTexture(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint)
+  proc glGetInstrumentsSGIX(): GLint
+  proc glFramebufferParameteri(target: GLenum, pname: GLenum, param: GLint)
+  proc glPathCoverDepthFuncNV(fun: GLenum)
+  proc glGetTranslatedShaderSourceANGLE(shader: GLuint, bufsize: GLsizei, length: ptr GLsizei, source: cstring)
+  proc glIndexfv(c: ptr GLfloat)
+  proc glGetActiveUniformBlockName(program: GLuint, uniformBlockIndex: GLuint, bufSize: GLsizei, length: ptr GLsizei, uniformBlockName: cstring)
+  proc glNormal3s(nx: GLshort, ny: GLshort, nz: GLshort)
+  proc glColorFragmentOp3ATI(op: GLenum, dst: GLuint, dstMask: GLuint, dstMod: GLuint, arg1: GLuint, arg1Rep: GLuint, arg1Mod: GLuint, arg2: GLuint, arg2Rep: GLuint, arg2Mod: GLuint, arg3: GLuint, arg3Rep: GLuint, arg3Mod: GLuint)
+  proc glGetProgramResourceLocationIndex(program: GLuint, programInterface: GLenum, name: cstring): GLint
+  proc glGetBooleanIndexedvEXT(target: GLenum, index: GLuint, data: ptr GLboolean)
+  proc glGenPerfMonitorsAMD(n: GLsizei, monitors: ptr GLuint)
+  proc glDrawRangeElementsEXT(mode: GLenum, start: GLuint, `end`: GLuint, count: GLsizei, `type`: GLenum, indices: pointer)
+  proc glFramebufferTexture3D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, zoffset: GLint)
+  proc glGetTexParameterxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glCompileShaderIncludeARB(shader: GLuint, count: GLsizei, path: cstringArray, length: ptr GLint)
+  proc glGetMultiTexParameterfvEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glEvalPoint2(i: GLint, j: GLint)
+  proc glGetProgramivNV(id: GLuint, pname: GLenum, params: ptr GLint)
+  proc glProgramParameter4fNV(target: GLenum, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glMultiTexParameterfvEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttrib3svARB(index: GLuint, v: ptr GLshort)
+  proc glDrawElementArrayAPPLE(mode: GLenum, first: GLint, count: GLsizei)
+  proc glMultiTexCoord4x(texture: GLenum, s: GLfixed, t: GLfixed, r: GLfixed, q: GLfixed)
+  proc glUniformMatrix3dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glVertexAttribPointerARB(index: GLuint, size: GLint, `type`: GLenum, normalized: GLboolean, stride: GLsizei, `pointer`: pointer)
+  proc glProgramUniformMatrix3x4dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glGetFloati_vEXT(pname: GLenum, index: GLuint, params: ptr GLfloat)
+  proc glGetObjectParameterivAPPLE(objectType: GLenum, name: GLuint, pname: GLenum, params: ptr GLint)
+  proc glPushGroupMarkerEXT(length: GLsizei, marker: cstring)
+  proc glProgramUniform4uivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glReplacementCodeuiVertex3fSUN(rc: GLuint, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glTexSubImage1DEXT(target: GLenum, level: GLint, xoffset: GLint, width: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glProgramUniform1uivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glGetFenceivNV(fence: GLuint, pname: GLenum, params: ptr GLint)
+  proc glGetnCompressedTexImageARB(target: GLenum, lod: GLint, bufSize: GLsizei, img: pointer)
+  proc glTexGenfOES(coord: GLenum, pname: GLenum, param: GLfloat)
+  proc glVertexAttrib4dv(index: GLuint, v: ptr GLdouble)
+  proc glVertexAttribL1ui64vNV(index: GLuint, v: ptr GLuint64Ext)
+  proc glVertexAttrib4fvARB(index: GLuint, v: ptr GLfloat)
+  proc glDeleteVertexArraysOES(n: GLsizei, arrays: ptr GLuint)
+  proc glSamplerParameterIiv(sampler: GLuint, pname: GLenum, param: ptr GLint)
+  proc glMapGrid1d(un: GLint, u1: GLdouble, u2: GLdouble)
+  proc glTranslatexOES(x: GLfixed, y: GLfixed, z: GLfixed)
+  proc glCullFace(mode: GLenum)
+  proc glPrioritizeTextures(n: GLsizei, textures: ptr GLuint, priorities: ptr GLfloat)
+  proc glGetSeparableFilterEXT(target: GLenum, format: GLenum, `type`: GLenum, row: pointer, column: pointer, span: pointer)
+  proc glVertexAttrib4NubvARB(index: GLuint, v: ptr GLubyte)
+  proc glGetTransformFeedbackVaryingNV(program: GLuint, index: GLuint, location: ptr GLint)
+  proc glTexCoord4xOES(s: GLfixed, t: GLfixed, r: GLfixed, q: GLfixed)
+  proc glGetProgramEnvParameterdvARB(target: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glWindowPos2ivMESA(v: ptr GLint)
+  proc glGlobalAlphaFactorfSUN(factor: GLfloat)
+  proc glNormalStream3fvATI(stream: GLenum, coords: ptr GLfloat)
+  proc glRasterPos4i(x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glReleaseShaderCompiler()
+  proc glProgramUniformMatrix4fvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glCopyMultiTexImage1DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, border: GLint)
+  proc glColorTableParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glSecondaryColor3bvEXT(v: ptr GLbyte)
+  proc glMap1xOES(target: GLenum, u1: GLfixed, u2: GLfixed, stride: GLint, order: GLint, points: GLfixed)
+  proc glVertexStream1svATI(stream: GLenum, coords: ptr GLshort)
+  proc glIsRenderbuffer(renderbuffer: GLuint): GLboolean
+  proc glPatchParameterfv(pname: GLenum, values: ptr GLfloat)
+  proc glProgramUniformMatrix4dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glVertexAttrib4ubNV(index: GLuint, x: GLubyte, y: GLubyte, z: GLubyte, w: GLubyte)
+  proc glVertex2i(x: GLint, y: GLint)
+  proc glPushClientAttrib(mask: GLbitfield)
+  proc glDrawArraysEXT(mode: GLenum, first: GLint, count: GLsizei)
+  proc glCreateProgram(): GLuint
+  proc glPolygonStipple(mask: ptr GLubyte)
+  proc glGetColorTableEXT(target: GLenum, format: GLenum, `type`: GLenum, data: pointer)
+  proc glSharpenTexFuncSGIS(target: GLenum, n: GLsizei, points: ptr GLfloat)
+  proc glNamedFramebufferTextureEXT(framebuffer: GLuint, attachment: GLenum, texture: GLuint, level: GLint)
+  proc glWindowPos3fvMESA(v: ptr GLfloat)
+  proc glBinormal3iEXT(bx: GLint, by: GLint, bz: GLint)
+  proc glEnableClientStateiEXT(`array`: GLenum, index: GLuint)
+  proc glProgramUniform3iv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glProgramUniform1dEXT(program: GLuint, location: GLint, x: GLdouble)
+  proc glPollInstrumentsSGIX(marker_p: ptr GLint): GLint
+  proc glSecondaryColor3f(red: GLfloat, green: GLfloat, blue: GLfloat)
+  proc glDeleteTransformFeedbacks(n: GLsizei, ids: ptr GLuint)
+  proc glCoverStrokePathInstancedNV(numPaths: GLsizei, pathNameType: GLenum, paths: pointer, pathBase: GLuint, coverMode: GLenum, transformType: GLenum, transformValues: ptr GLfloat)
+  proc glIsTextureHandleResidentARB(handle: GLuint64): GLboolean
+  proc glVariantsvEXT(id: GLuint, `addr`: ptr GLshort)
+  proc glTexCoordFormatNV(size: GLint, `type`: GLenum, stride: GLsizei)
+  proc glTexStorage3DEXT(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei)
+  proc glUniform2ui(location: GLint, v0: GLuint, v1: GLuint)
+  proc glReplacementCodePointerSUN(`type`: GLenum, stride: GLsizei, `pointer`: ptr pointer)
+  proc glFramebufferTextureLayerARB(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, layer: GLint)
+  proc glBinormal3dvEXT(v: ptr GLdouble)
+  proc glProgramUniform2ui64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glGetnConvolutionFilterARB(target: GLenum, format: GLenum, `type`: GLenum, bufSize: GLsizei, image: pointer)
+  proc glStopInstrumentsSGIX(marker: GLint)
+  proc glVertexAttrib1svNV(index: GLuint, v: ptr GLshort)
+  proc glVertexAttribs2fvNV(index: GLuint, count: GLsizei, v: ptr GLfloat)
+  proc glGetInternalformativ(target: GLenum, internalformat: GLenum, pname: GLenum, bufSize: GLsizei, params: ptr GLint)
+  proc glIsProgramPipelineEXT(pipeline: GLuint): GLboolean
+  proc glMatrixIndexubvARB(size: GLint, indices: ptr GLubyte)
+  proc glTexCoord4bOES(s: GLbyte, t: GLbyte, r: GLbyte, q: GLbyte)
+  proc glSecondaryColor3us(red: GLushort, green: GLushort, blue: GLushort)
+  proc glGlobalAlphaFactorubSUN(factor: GLubyte)
+  proc glNamedStringARB(`type`: GLenum, namelen: GLint, name: cstring, stringlen: GLint, string: cstring)
+  proc glGetAttachedShaders(program: GLuint, maxCount: GLsizei, count: ptr GLsizei, shaders: ptr GLuint)
+  proc glMatrixRotatefEXT(mode: GLenum, angle: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glVertexStream3ivATI(stream: GLenum, coords: ptr GLint)
+  proc glMatrixIndexuivARB(size: GLint, indices: ptr GLuint)
+  proc glMatrixRotatedEXT(mode: GLenum, angle: GLdouble, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glPathFogGenNV(genMode: GLenum)
+  proc glMultiTexCoord4hvNV(target: GLenum, v: ptr GLhalfNv)
+  proc glVertexAttribIPointer(index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glMultiTexCoord3bOES(texture: GLenum, s: GLbyte, t: GLbyte, r: GLbyte)
+  proc glResizeBuffersMESA()
+  proc glPrimitiveRestartIndexNV(index: GLuint)
+  proc glProgramUniform4f(program: GLuint, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat, v3: GLfloat)
+  proc glColor4ubVertex2fSUN(r: GLubyte, g: GLubyte, b: GLubyte, a: GLubyte, x: GLfloat, y: GLfloat)
+  proc glGetColorTableParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glDepthRangef(n: GLfloat, f: GLfloat)
+  proc glVertexArrayVertexOffsetEXT(vaobj: GLuint, buffer: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glMatrixLoaddEXT(mode: GLenum, m: ptr GLdouble)
+  proc glVariantfvEXT(id: GLuint, `addr`: ptr GLfloat)
+  proc glReplacementCodeuiTexCoord2fVertex3fvSUN(rc: ptr GLuint, tc: ptr GLfloat, v: ptr GLfloat)
+  proc glSamplePatternSGIS(pattern: GLenum)
+  proc glProgramUniform3i64NV(program: GLuint, location: GLint, x: GLint64Ext, y: GLint64Ext, z: GLint64Ext)
+  proc glUniform3uivEXT(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glGetImageTransformParameterivHP(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glPopMatrix()
+  proc glVertexAttrib3sARB(index: GLuint, x: GLshort, y: GLshort, z: GLshort)
+  proc glGenQueriesEXT(n: GLsizei, ids: ptr GLuint)
+  proc glGetQueryObjectui64v(id: GLuint, pname: GLenum, params: ptr GLuint64)
+  proc glWeightusvARB(size: GLint, weights: ptr GLushort)
+  proc glWindowPos2sARB(x: GLshort, y: GLshort)
+  proc glGetTextureLevelParameterivEXT(texture: GLuint, target: GLenum, level: GLint, pname: GLenum, params: ptr GLint)
+  proc glBufferParameteriAPPLE(target: GLenum, pname: GLenum, param: GLint)
+  proc glMultiModeDrawArraysIBM(mode: ptr GLenum, first: ptr GLint, count: ptr GLsizei, primcount: GLsizei, modestride: GLint)
+  proc glUniformMatrix2x3fv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLfloat)
+  proc glTangentPointerEXT(`type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glResetMinmax(target: GLenum)
+  proc glVertexAttribP1uiv(index: GLuint, `type`: GLenum, normalized: GLboolean, value: ptr GLuint)
+  proc glPixelMapx(map: GLenum, size: GLint, values: ptr GLfixed)
+  proc glPixelStoref(pname: GLenum, param: GLfloat)
+  proc glBinormal3dEXT(bx: GLdouble, by: GLdouble, bz: GLdouble)
+  proc glVertexAttribs1hvNV(index: GLuint, n: GLsizei, v: ptr GLhalfNv)
+  proc glVertexAttrib4usvARB(index: GLuint, v: ptr GLushort)
+  proc glUnmapBuffer(target: GLenum): GLboolean
+  proc glFlushRasterSGIX()
+  proc glColor3uiv(v: ptr GLuint)
+  proc glInvalidateBufferSubData(buffer: GLuint, offset: GLintptr, length: GLsizeiptr)
+  proc glPassThroughxOES(token: GLfixed)
+  proc glLockArraysEXT(first: GLint, count: GLsizei)
+  proc glStencilFuncSeparateATI(frontfunc: GLenum, backfunc: GLenum, `ref`: GLint, mask: GLuint)
+  proc glProgramUniform3dvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glGenTransformFeedbacks(n: GLsizei, ids: ptr GLuint)
+  proc glCopyTexSubImage3DOES(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glIsNamedBufferResidentNV(buffer: GLuint): GLboolean
+  proc glSampleMaskIndexedNV(index: GLuint, mask: GLbitfield)
+  proc glVDPAUSurfaceAccessNV(surface: GLvdpauSurfaceNv, access: GLenum)
+  proc glProgramUniform3dv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLdouble)
+  proc glDeleteProgram(program: GLuint)
+  proc glConvolutionFilter1D(target: GLenum, internalformat: GLenum, width: GLsizei, format: GLenum, `type`: GLenum, image: pointer)
+  proc glVertex2f(x: GLfloat, y: GLfloat)
+  proc glWindowPos4dvMESA(v: ptr GLdouble)
+  proc glColor4us(red: GLushort, green: GLushort, blue: GLushort, alpha: GLushort)
+  proc glColorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean)
+  proc glGetTexEnviv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glProgramUniform3ivEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glSecondaryColor3i(red: GLint, green: GLint, blue: GLint)
+  proc glGetSamplerParameteriv(sampler: GLuint, pname: GLenum, params: ptr GLint)
+  proc glDeleteFramebuffersEXT(n: GLsizei, framebuffers: ptr GLuint)
+  proc glCompressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glVertex2s(x: GLshort, y: GLshort)
+  proc glIsQuery(id: GLuint): GLboolean
+  proc glFogxv(pname: GLenum, param: ptr GLfixed)
+  proc glAreProgramsResidentNV(n: GLsizei, programs: ptr GLuint, residences: ptr GLboolean): GLboolean
+  proc glShaderSourceARB(shaderObj: GLhandleArb, count: GLsizei, string: cstringArray, length: ptr GLint)
+  proc glPointSizexOES(size: GLfixed)
+  proc glPixelTransferf(pname: GLenum, param: GLfloat)
+  proc glExtractComponentEXT(res: GLuint, src: GLuint, num: GLuint)
+  proc glUniform1fv(location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetNamedStringARB(namelen: GLint, name: cstring, bufSize: GLsizei, stringlen: ptr GLint, string: cstring)
+  proc glGetProgramBinaryOES(program: GLuint, bufSize: GLsizei, length: ptr GLsizei, binaryFormat: ptr GLenum, binary: pointer)
+  proc glDeleteOcclusionQueriesNV(n: GLsizei, ids: ptr GLuint)
+  proc glEnableClientState(`array`: GLenum)
+  proc glProgramBufferParametersIuivNV(target: GLenum, bindingIndex: GLuint, wordIndex: GLuint, count: GLsizei, params: ptr GLuint)
+  proc glProgramUniform2ui(program: GLuint, location: GLint, v0: GLuint, v1: GLuint)
+  proc glReplacementCodeuiSUN(code: GLuint)
+  proc glMultMatrixd(m: ptr GLdouble)
+  proc glInvalidateSubFramebuffer(target: GLenum, numAttachments: GLsizei, attachments: ptr GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glGenerateMultiTexMipmapEXT(texunit: GLenum, target: GLenum)
+  proc glDepthRangex(n: GLfixed, f: GLfixed)
+  proc glGetInteger64i_v(target: GLenum, index: GLuint, data: ptr GLint64)
+  proc glDrawBuffers(n: GLsizei, bufs: ptr GLenum)
+  proc glGetPointervEXT(pname: GLenum, params: ptr pointer)
+  proc glFogxvOES(pname: GLenum, param: ptr GLfixed)
+  proc glTexCoordP2uiv(`type`: GLenum, coords: ptr GLuint)
+  proc glVertexFormatNV(size: GLint, `type`: GLenum, stride: GLsizei)
+  proc glColorPointervINTEL(size: GLint, `type`: GLenum, `pointer`: ptr pointer)
+  proc glGetMultiTexParameterivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMultiTexCoordP4uiv(texture: GLenum, `type`: GLenum, coords: ptr GLuint)
+  proc glResetMinmaxEXT(target: GLenum)
+  proc glCopyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr)
+  proc glSecondaryColor3sv(v: ptr GLshort)
+  proc glPixelStorex(pname: GLenum, param: GLfixed)
+  proc glWaitSync(sync: GLsync, flags: GLbitfield, timeout: GLuint64)
+  proc glVertexAttribI1iv(index: GLuint, v: ptr GLint)
+  proc glColorSubTableEXT(target: GLenum, start: GLsizei, count: GLsizei, format: GLenum, `type`: GLenum, data: pointer)
+  proc glGetDoublev(pname: GLenum, params: ptr GLdouble)
+  proc glMultiTexParameterivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMultiTexCoord4svARB(target: GLenum, v: ptr GLshort)
+  proc glColorPointerListIBM(size: GLint, `type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glScissorIndexed(index: GLuint, left: GLint, bottom: GLint, width: GLsizei, height: GLsizei)
+  proc glStencilOpSeparateATI(face: GLenum, sfail: GLenum, dpfail: GLenum, dppass: GLenum)
+  proc glLoadName(name: GLuint)
+  proc glIsTransformFeedbackNV(id: GLuint): GLboolean
+  proc glPopDebugGroup()
+  proc glClipPlanef(p: GLenum, eqn: ptr GLfloat)
+  proc glDeleteFencesAPPLE(n: GLsizei, fences: ptr GLuint)
+  proc glGetQueryObjecti64v(id: GLuint, pname: GLenum, params: ptr GLint64)
+  proc glAlphaFunc(fun: GLenum, `ref`: GLfloat)
+  proc glIndexPointerEXT(`type`: GLenum, stride: GLsizei, count: GLsizei, `pointer`: pointer)
+  proc glVertexAttribI3ivEXT(index: GLuint, v: ptr GLint)
+  proc glIndexub(c: GLubyte)
+  proc glVertexP2uiv(`type`: GLenum, value: ptr GLuint)
+  proc glProgramUniform1uiv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glDebugMessageInsertKHR(source: GLenum, `type`: GLenum, id: GLuint, severity: GLenum, length: GLsizei, buf: cstring)
+  proc glColor4b(red: GLbyte, green: GLbyte, blue: GLbyte, alpha: GLbyte)
+  proc glRenderbufferStorageMultisampleAPPLE(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glMinSampleShading(value: GLfloat)
+  proc glBindProgramNV(target: GLenum, id: GLuint)
+  proc glWindowPos3dMESA(x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glEdgeFlagPointer(stride: GLsizei, `pointer`: pointer)
+  proc glGetFragDataIndex(program: GLuint, name: cstring): GLint
+  proc glTexCoord3hNV(s: GLhalfNv, t: GLhalfNv, r: GLhalfNv)
+  proc glMultiDrawArraysIndirectAMD(mode: GLenum, indirect: pointer, primcount: GLsizei, stride: GLsizei)
+  proc glFragmentColorMaterialSGIX(face: GLenum, mode: GLenum)
+  proc glTexGenf(coord: GLenum, pname: GLenum, param: GLfloat)
+  proc glVertexAttrib4ubvARB(index: GLuint, v: ptr GLubyte)
+  proc glClearBufferiv(buffer: GLenum, drawbuffer: GLint, value: ptr GLint)
+  proc glGenQueriesARB(n: GLsizei, ids: ptr GLuint)
+  proc glRectdv(v1: ptr GLdouble, v2: ptr GLdouble)
+  proc glBlendEquationSeparateEXT(modeRgb: GLenum, modeAlpha: GLenum)
+  proc glTestFenceAPPLE(fence: GLuint): GLboolean
+  proc glTexGeniv(coord: GLenum, pname: GLenum, params: ptr GLint)
+  proc glPolygonMode(face: GLenum, mode: GLenum)
+  proc glFrameZoomSGIX(factor: GLint)
+  proc glReplacementCodeuiTexCoord2fVertex3fSUN(rc: GLuint, s: GLfloat, t: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glUniformSubroutinesuiv(shadertype: GLenum, count: GLsizei, indices: ptr GLuint)
+  proc glBeginQueryIndexed(target: GLenum, index: GLuint, id: GLuint)
+  proc glMultiTexGeniEXT(texunit: GLenum, coord: GLenum, pname: GLenum, param: GLint)
+  proc glRasterPos3fv(v: ptr GLfloat)
+  proc glMapObjectBufferATI(buffer: GLuint): pointer
+  proc glIndexiv(c: ptr GLint)
+  proc glVertexAttribLPointer(index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glMultiTexCoord4s(target: GLenum, s: GLshort, t: GLshort, r: GLshort, q: GLshort)
+  proc glSecondaryColorP3uiv(`type`: GLenum, color: ptr GLuint)
+  proc glNormalFormatNV(`type`: GLenum, stride: GLsizei)
+  proc glVertex4i(x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glUniform1ui64NV(location: GLint, x: GLuint64Ext)
+  proc glScissorIndexedv(index: GLuint, v: ptr GLint)
+  proc glProgramUniform1i(program: GLuint, location: GLint, v0: GLint)
+  proc glCompressedMultiTexSubImage3DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, bits: pointer)
+  proc glFinishTextureSUNX()
+  proc glFramebufferTexture3DEXT(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, zoffset: GLint)
+  proc glSetInvariantEXT(id: GLuint, `type`: GLenum, `addr`: pointer)
+  proc glGetTexParameterIivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMultiTexCoordP3ui(texture: GLenum, `type`: GLenum, coords: GLuint)
+  proc glMultiTexCoord3f(target: GLenum, s: GLfloat, t: GLfloat, r: GLfloat)
+  proc glNormalStream3fATI(stream: GLenum, nx: GLfloat, ny: GLfloat, nz: GLfloat)
+  proc glActiveShaderProgram(pipeline: GLuint, program: GLuint)
+  proc glDisableVertexArrayEXT(vaobj: GLuint, `array`: GLenum)
+  proc glVertexAttribI3iv(index: GLuint, v: ptr GLint)
+  proc glProvokingVertex(mode: GLenum)
+  proc glTexCoord1fv(v: ptr GLfloat)
+  proc glVertexAttrib3fv(index: GLuint, v: ptr GLfloat)
+  proc glWindowPos3iv(v: ptr GLint)
+  proc glProgramUniform4ui64NV(program: GLuint, location: GLint, x: GLuint64Ext, y: GLuint64Ext, z: GLuint64Ext, w: GLuint64Ext)
+  proc glProgramUniform2d(program: GLuint, location: GLint, v0: GLdouble, v1: GLdouble)
+  proc glDebugMessageInsertARB(source: GLenum, `type`: GLenum, id: GLuint, severity: GLenum, length: GLsizei, buf: cstring)
+  proc glMultiTexSubImage3DEXT(texunit: GLenum, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glMap1d(target: GLenum, u1: GLdouble, u2: GLdouble, stride: GLint, order: GLint, points: ptr GLdouble)
+  proc glDeleteShader(shader: GLuint)
+  proc glTexturePageCommitmentEXT(texture: GLuint, target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, resident: GLboolean)
+  proc glFramebufferDrawBufferEXT(framebuffer: GLuint, mode: GLenum)
+  proc glTexCoord2fNormal3fVertex3fSUN(s: GLfloat, t: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glDeleteProgramsNV(n: GLsizei, programs: ptr GLuint)
+  proc glPointAlongPathNV(path: GLuint, startSegment: GLsizei, numSegments: GLsizei, distance: GLfloat, x: ptr GLfloat, y: ptr GLfloat, tangentX: ptr GLfloat, tangentY: ptr GLfloat): GLboolean
+  proc glTexCoord1d(s: GLdouble)
+  proc glStencilStrokePathNV(path: GLuint, reference: GLint, mask: GLuint)
+  proc glQueryMatrixxOES(mantissa: ptr GLfixed, exponent: ptr GLint): GLbitfield
+  proc glGetNamedProgramLocalParameterIuivEXT(program: GLuint, target: GLenum, index: GLuint, params: ptr GLuint)
+  proc glGenerateMipmapOES(target: GLenum)
+  proc glRenderbufferStorageMultisampleIMG(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glVertexBlendEnviATI(pname: GLenum, param: GLint)
+  proc glPushAttrib(mask: GLbitfield)
+  proc glShaderOp3EXT(op: GLenum, res: GLuint, arg1: GLuint, arg2: GLuint, arg3: GLuint)
+  proc glEnableVertexAttribArray(index: GLuint)
+  proc glVertexAttrib4Nbv(index: GLuint, v: ptr GLbyte)
+  proc glExtGetBuffersQCOM(buffers: ptr GLuint, maxBuffers: GLint, numBuffers: ptr GLint)
+  proc glCopyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glDeletePerfMonitorsAMD(n: GLsizei, monitors: ptr GLuint)
+  proc glGetTrackMatrixivNV(target: GLenum, address: GLuint, pname: GLenum, params: ptr GLint)
+  proc glEndConditionalRender()
+  proc glVertexAttribL3i64NV(index: GLuint, x: GLint64Ext, y: GLint64Ext, z: GLint64Ext)
+  proc glProgramLocalParametersI4ivNV(target: GLenum, index: GLuint, count: GLsizei, params: ptr GLint)
+  proc glFlush()
+  proc glGetNamedBufferParameterui64vNV(buffer: GLuint, pname: GLenum, params: ptr GLuint64Ext)
+  proc glGetVertexArrayIntegeri_vEXT(vaobj: GLuint, index: GLuint, pname: GLenum, param: ptr GLint)
+  proc glReadnPixelsEXT(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, bufSize: GLsizei, data: pointer)
+  proc glMultiTexImage1DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetVaryingLocationNV(program: GLuint, name: cstring): GLint
+  proc glMultiTexCoord4fvARB(target: GLenum, v: ptr GLfloat)
+  proc glMultiTexCoord3iv(target: GLenum, v: ptr GLint)
+  proc glVertexAttribL2dvEXT(index: GLuint, v: ptr GLdouble)
+  proc glTexParameterxOES(target: GLenum, pname: GLenum, param: GLfixed)
+  proc glSecondaryColor3uivEXT(v: ptr GLuint)
+  proc glReadnPixelsARB(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, bufSize: GLsizei, data: pointer)
+  proc glCopyTexSubImage1DEXT(target: GLenum, level: GLint, xoffset: GLint, x: GLint, y: GLint, width: GLsizei)
+  proc glGetDoublei_vEXT(pname: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glVariantPointerEXT(id: GLuint, `type`: GLenum, stride: GLuint, `addr`: pointer)
+  proc glProgramUniform3ui64vNV(program: GLuint, location: GLint, count: GLsizei, value: ptr GLuint64Ext)
+  proc glTexCoord2fColor3fVertex3fvSUN(tc: ptr GLfloat, c: ptr GLfloat, v: ptr GLfloat)
+  proc glProgramUniform3fv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glBindFragDataLocationIndexed(program: GLuint, colorNumber: GLuint, index: GLuint, name: cstring)
+  proc glGetnSeparableFilterARB(target: GLenum, format: GLenum, `type`: GLenum, rowBufSize: GLsizei, row: pointer, columnBufSize: GLsizei, column: pointer, span: pointer)
+  proc glTextureParameteriEXT(texture: GLuint, target: GLenum, pname: GLenum, param: GLint)
+  proc glGetUniformuivEXT(program: GLuint, location: GLint, params: ptr GLuint)
+  proc glFragmentMaterialivSGIX(face: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMultiTexCoord1svARB(target: GLenum, v: ptr GLshort)
+  proc glClientActiveTextureARB(texture: GLenum)
+  proc glVertexAttrib1fARB(index: GLuint, x: GLfloat)
+  proc glVertexAttrib4NbvARB(index: GLuint, v: ptr GLbyte)
+  proc glRasterPos2d(x: GLdouble, y: GLdouble)
+  proc glMultiTexCoord4iARB(target: GLenum, s: GLint, t: GLint, r: GLint, q: GLint)
+  proc glGetPixelTexGenParameterfvSGIS(pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttribL2dv(index: GLuint, v: ptr GLdouble)
+  proc glGetProgramStringARB(target: GLenum, pname: GLenum, string: pointer)
+  proc glRasterPos2i(x: GLint, y: GLint)
+  proc glTexCoord2fColor4fNormal3fVertex3fvSUN(tc: ptr GLfloat, c: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glMultiTexCoord3s(target: GLenum, s: GLshort, t: GLshort, r: GLshort)
+  proc glMultTransposeMatrixd(m: ptr GLdouble)
+  proc glActiveVaryingNV(program: GLuint, name: cstring)
+  proc glProgramUniform1f(program: GLuint, location: GLint, v0: GLfloat)
+  proc glGetActiveSubroutineName(program: GLuint, shadertype: GLenum, index: GLuint, bufsize: GLsizei, length: ptr GLsizei, name: cstring)
+  proc glClipPlanex(plane: GLenum, equation: ptr GLfixed)
+  proc glMultiTexCoord4iv(target: GLenum, v: ptr GLint)
+  proc glTransformFeedbackVaryingsEXT(program: GLuint, count: GLsizei, varyings: cstringArray, bufferMode: GLenum)
+  proc glBlendEquationSeparateiARB(buf: GLuint, modeRgb: GLenum, modeAlpha: GLenum)
+  proc glVertex2sv(v: ptr GLshort)
+  proc glAccumxOES(op: GLenum, value: GLfixed)
+  proc glProgramLocalParameter4dARB(target: GLenum, index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glIsRenderbufferEXT(renderbuffer: GLuint): GLboolean
+  proc glMultiDrawElementsIndirectAMD(mode: GLenum, `type`: GLenum, indirect: pointer, primcount: GLsizei, stride: GLsizei)
+  proc glVertexAttribI4uiEXT(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint)
+  proc glVertex4fv(v: ptr GLfloat)
+  proc glGenerateMipmapEXT(target: GLenum)
+  proc glVertexP3ui(`type`: GLenum, value: GLuint)
+  proc glTexCoord2dv(v: ptr GLdouble)
+  proc glFlushMappedBufferRange(target: GLenum, offset: GLintptr, length: GLsizeiptr)
+  proc glTrackMatrixNV(target: GLenum, address: GLuint, matrix: GLenum, transform: GLenum)
+  proc glFragmentLightModeliSGIX(pname: GLenum, param: GLint)
+  proc glVertexAttrib4Nusv(index: GLuint, v: ptr GLushort)
+  proc glScalef(x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glLightxvOES(light: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glTextureParameterivEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glCompressedMultiTexImage3DEXT(texunit: GLenum, target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, bits: pointer)
+  proc glVertexAttribL1d(index: GLuint, x: GLdouble)
+  proc glVertexAttrib3fARB(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glVertexAttrib3hvNV(index: GLuint, v: ptr GLhalfNv)
+  proc glSpriteParameteriSGIX(pname: GLenum, param: GLint)
+  proc glFrustumxOES(l: GLfixed, r: GLfixed, b: GLfixed, t: GLfixed, n: GLfixed, f: GLfixed)
+  proc glGetnMapdvARB(target: GLenum, query: GLenum, bufSize: GLsizei, v: ptr GLdouble)
+  proc glGetMinmaxEXT(target: GLenum, reset: GLboolean, format: GLenum, `type`: GLenum, values: pointer)
+  proc glProgramUniformHandleui64NV(program: GLuint, location: GLint, value: GLuint64)
+  proc glWindowPos4fvMESA(v: ptr GLfloat)
+  proc glExtGetTexturesQCOM(textures: ptr GLuint, maxTextures: GLint, numTextures: ptr GLint)
+  proc glProgramSubroutineParametersuivNV(target: GLenum, count: GLsizei, params: ptr GLuint)
+  proc glSampleCoveragexOES(value: GLclampx, invert: GLboolean)
+  proc glMultiTexEnvivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetFinalCombinerInputParameterfvNV(variable: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glLightModeliv(pname: GLenum, params: ptr GLint)
+  proc glUniform4f(location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat, v3: GLfloat)
+  proc glDepthRange(near: GLdouble, far: GLdouble)
+  proc glProgramUniformMatrix4x3dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glProgramUniform4fv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glGetTexParameterIiv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertexAttribs4dvNV(index: GLuint, count: GLsizei, v: ptr GLdouble)
+  proc glConvolutionParameteri(target: GLenum, pname: GLenum, params: GLint)
+  proc glVertexAttribI4uiv(index: GLuint, v: ptr GLuint)
+  proc glEvalCoord1dv(u: ptr GLdouble)
+  proc glIsFramebuffer(framebuffer: GLuint): GLboolean
+  proc glEvalCoord2d(u: GLdouble, v: GLdouble)
+  proc glClearDepthf(d: GLfloat)
+  proc glCompressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, data: pointer)
+  proc glProgramUniformMatrix3x2dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glGetTexParameterxv(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glBinormal3fEXT(bx: GLfloat, by: GLfloat, bz: GLfloat)
+  proc glProgramParameteriARB(program: GLuint, pname: GLenum, value: GLint)
+  proc glWindowPos3ivMESA(v: ptr GLint)
+  proc glReplacementCodeuiColor4fNormal3fVertex3fvSUN(rc: ptr GLuint, c: ptr GLfloat, n: ptr GLfloat, v: ptr GLfloat)
+  proc glPresentFrameDualFillNV(video_slot: GLuint, minPresentTime: GLuint64Ext, beginPresentTimeId: GLuint, presentDurationId: GLuint, `type`: GLenum, target0: GLenum, fill0: GLuint, target1: GLenum, fill1: GLuint, target2: GLenum, fill2: GLuint, target3: GLenum, fill3: GLuint)
+  proc glIndexPointerListIBM(`type`: GLenum, stride: GLint, `pointer`: ptr pointer, ptrstride: GLint)
+  proc glVertexStream2dATI(stream: GLenum, x: GLdouble, y: GLdouble)
+  proc glUniformMatrix3x4dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glMapNamedBufferRangeEXT(buffer: GLuint, offset: GLintptr, length: GLsizeiptr, access: GLbitfield): pointer
+  proc glColor4sv(v: ptr GLshort)
+  proc glStencilFillPathNV(path: GLuint, fillMode: GLenum, mask: GLuint)
+  proc glGetVertexAttribfvARB(index: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glWindowPos3dv(v: ptr GLdouble)
+  proc glHintPGI(target: GLenum, mode: GLint)
+  proc glVertexAttribs3hvNV(index: GLuint, n: GLsizei, v: ptr GLhalfNv)
+  proc glProgramUniform1i64NV(program: GLuint, location: GLint, x: GLint64Ext)
+  proc glReplacementCodeuiColor3fVertex3fSUN(rc: GLuint, r: GLfloat, g: GLfloat, b: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glUniform2iARB(location: GLint, v0: GLint, v1: GLint)
+  proc glViewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glBlendFuncSeparateIndexedAMD(buf: GLuint, srcRgb: GLenum, dstRgb: GLenum, srcAlpha: GLenum, dstAlpha: GLenum)
+  proc glColor3us(red: GLushort, green: GLushort, blue: GLushort)
+  proc glVertexAttrib2hvNV(index: GLuint, v: ptr GLhalfNv)
+  proc glGenerateMipmap(target: GLenum)
+  proc glGetProgramEnvParameterIuivNV(target: GLenum, index: GLuint, params: ptr GLuint)
+  proc glBlendEquationiARB(buf: GLuint, mode: GLenum)
+  proc glReadBufferNV(mode: GLenum)
+  proc glProvokingVertexEXT(mode: GLenum)
+  proc glPointParameterivNV(pname: GLenum, params: ptr GLint)
+  proc glBlitFramebufferANGLE(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum)
+  proc glGetObjectParameterivARB(obj: GLhandleArb, pname: GLenum, params: ptr GLint)
+  proc glGetSubroutineIndex(program: GLuint, shadertype: GLenum, name: cstring): GLuint
+  proc glMap2d(target: GLenum, u1: GLdouble, u2: GLdouble, ustride: GLint, uorder: GLint, v1: GLdouble, v2: GLdouble, vstride: GLint, vorder: GLint, points: ptr GLdouble)
+  proc glRectfv(v1: ptr GLfloat, v2: ptr GLfloat)
+  proc glDepthRangeArrayv(first: GLuint, count: GLsizei, v: ptr GLdouble)
+  proc glMultiTexParameteriEXT(texunit: GLenum, target: GLenum, pname: GLenum, param: GLint)
+  proc glTexStorageSparseAMD(target: GLenum, internalFormat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, layers: GLsizei, flags: GLbitfield)
+  proc glGenerateTextureMipmapEXT(texture: GLuint, target: GLenum)
+  proc glCopyConvolutionFilter1D(target: GLenum, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei)
+  proc glVertex4d(x: GLdouble, y: GLdouble, z: GLdouble, w: GLdouble)
+  proc glGetPathParameterfvNV(path: GLuint, pname: GLenum, value: ptr GLfloat)
+  proc glDetachShader(program: GLuint, shader: GLuint)
+  proc glGetColorTableSGI(target: GLenum, format: GLenum, `type`: GLenum, table: pointer)
+  proc glPixelTransformParameterfvEXT(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glBufferSubDataARB(target: GLenum, offset: GLintPtrArb, size: GLsizeiptrArb, data: pointer)
+  proc glVertexAttrib4ubvNV(index: GLuint, v: ptr GLubyte)
+  proc glCopyTextureImage1DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, border: GLint)
+  proc glGetQueryivARB(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glVertexAttribIPointerEXT(index: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glVertexAttribL3dEXT(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glGetQueryObjectui64vEXT(id: GLuint, pname: GLenum, params: ptr GLuint64)
+  proc glColor4x(red: GLfixed, green: GLfixed, blue: GLfixed, alpha: GLfixed)
+  proc glProgramUniformMatrix3x2dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glVertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glVertexAttrib1f(index: GLuint, x: GLfloat)
+  proc glUnmapBufferOES(target: GLenum): GLboolean
+  proc glVertexStream2ivATI(stream: GLenum, coords: ptr GLint)
+  proc glBeginOcclusionQueryNV(id: GLuint)
+  proc glVertex4sv(v: ptr GLshort)
+  proc glEnablei(target: GLenum, index: GLuint)
+  proc glUseProgramObjectARB(programObj: GLhandleArb)
+  proc glGetVertexAttribLdvEXT(index: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glUniform2d(location: GLint, x: GLdouble, y: GLdouble)
+  proc glMinmaxEXT(target: GLenum, internalformat: GLenum, sink: GLboolean)
+  proc glTexImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGenSymbolsEXT(datatype: GLenum, storagetype: GLenum, range: GLenum, components: GLuint): GLuint
+  proc glVertexAttribI4svEXT(index: GLuint, v: ptr GLshort)
+  proc glProgramEnvParameter4dvARB(target: GLenum, index: GLuint, params: ptr GLdouble)
+  proc glProgramUniformMatrix4dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glGetSamplerParameterfv(sampler: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glPopClientAttrib()
+  proc glHistogram(target: GLenum, width: GLsizei, internalformat: GLenum, sink: GLboolean)
+  proc glTexEnvfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glMultiTexCoord1dvARB(target: GLenum, v: ptr GLdouble)
+  proc glGetTexGenivOES(coord: GLenum, pname: GLenum, params: ptr GLint)
+  proc glUniform1ivARB(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glTexCoord3fv(v: ptr GLfloat)
+  proc glVertex2xvOES(coords: ptr GLfixed)
+  proc glTexCoord4fVertex4fvSUN(tc: ptr GLfloat, v: ptr GLfloat)
+  proc glUniform2uiv(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glMultiTexEnvfvEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glGetTextureParameterIivEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMemoryBarrierEXT(barriers: GLbitfield)
+  proc glGetTexParameterPointervAPPLE(target: GLenum, pname: GLenum, params: ptr pointer)
+  proc glWindowPos2svARB(v: ptr GLshort)
+  proc glEndQuery(target: GLenum)
+  proc glBlitFramebufferEXT(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum)
+  proc glProgramEnvParametersI4uivNV(target: GLenum, index: GLuint, count: GLsizei, params: ptr GLuint)
+  proc glGetActiveUniform(program: GLuint, index: GLuint, bufSize: GLsizei, length: ptr GLsizei, size: ptr GLint, `type`: ptr GLenum, name: cstring)
+  proc glGenAsyncMarkersSGIX(range: GLsizei): GLuint
+  proc glClipControlARB(origin: GLenum, depth: GLenum)
+  proc glDrawElementsInstancedEXT(mode: GLenum, count: GLsizei, `type`: GLenum, indices: pointer, primcount: GLsizei)
+  proc glGetFragmentMaterialivSGIX(face: GLenum, pname: GLenum, params: ptr GLint)
+  proc glSwizzleEXT(res: GLuint, `in`: GLuint, outX: GLenum, outY: GLenum, outZ: GLenum, outW: GLenum)
+  proc glMultiTexCoord1bOES(texture: GLenum, s: GLbyte)
+  proc glProgramParameters4dvNV(target: GLenum, index: GLuint, count: GLsizei, v: ptr GLdouble)
+  proc glWindowPos2s(x: GLshort, y: GLshort)
+  proc glBlendFuncSeparatei(buf: GLuint, srcRgb: GLenum, dstRgb: GLenum, srcAlpha: GLenum, dstAlpha: GLenum)
+  proc glMultiModeDrawElementsIBM(mode: ptr GLenum, count: ptr GLsizei, `type`: GLenum, indices: ptr pointer, primcount: GLsizei, modestride: GLint)
+  proc glNormal3x(nx: GLfixed, ny: GLfixed, nz: GLfixed)
+  proc glProgramUniform1fvEXT(program: GLuint, location: GLint, count: GLsizei, value: ptr GLfloat)
+  proc glTexCoord2hNV(s: GLhalfNv, t: GLhalfNv)
+  proc glViewportIndexedfv(index: GLuint, v: ptr GLfloat)
+  proc glDrawTexxOES(x: GLfixed, y: GLfixed, z: GLfixed, width: GLfixed, height: GLfixed)
+  proc glProgramParameter4dvNV(target: GLenum, index: GLuint, v: ptr GLdouble)
+  proc glDeleteBuffers(n: GLsizei, buffers: ptr GLuint)
+  proc glGetVertexArrayIntegervEXT(vaobj: GLuint, pname: GLenum, param: ptr GLint)
+  proc glBindFragDataLocationEXT(program: GLuint, color: GLuint, name: cstring)
+  proc glGenProgramsNV(n: GLsizei, programs: ptr GLuint)
+  proc glMultiTexCoord1i(target: GLenum, s: GLint)
+  proc glCompressedTexImage3DOES(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glGetQueryivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glExtGetBufferPointervQCOM(target: GLenum, params: ptr pointer)
+  proc glVertex3iv(v: ptr GLint)
+  proc glVertexAttribL1dvEXT(index: GLuint, v: ptr GLdouble)
+  proc glValidateProgramPipeline(pipeline: GLuint)
+  proc glBindVertexArray(`array`: GLuint)
+  proc glUniform2uiEXT(location: GLint, v0: GLuint, v1: GLuint)
+  proc glUniform3i(location: GLint, v0: GLint, v1: GLint, v2: GLint)
+  proc glGetVertexAttribIuiv(index: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glVertexArrayParameteriAPPLE(pname: GLenum, param: GLint)
+  proc glVertexAttribL2i64NV(index: GLuint, x: GLint64Ext, y: GLint64Ext)
+  proc glTexGenivOES(coord: GLenum, pname: GLenum, params: ptr GLint)
+  proc glIsFramebufferOES(framebuffer: GLuint): GLboolean
+  proc glColor4ubv(v: ptr GLubyte)
+  proc glDeleteNamedStringARB(namelen: GLint, name: cstring)
+  proc glCopyConvolutionFilter1DEXT(target: GLenum, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei)
+  proc glBufferStorage(target: GLenum, size: GLsizeiptr, data: ptr pointer, flags: GLbitfield)
+  proc glDrawTexiOES(x: GLint, y: GLint, z: GLint, width: GLint, height: GLint)
+  proc glRasterPos3dv(v: ptr GLdouble)
+  proc glIndexMaterialEXT(face: GLenum, mode: GLenum)
+  proc glGetClipPlanex(plane: GLenum, equation: ptr GLfixed)
+  proc glIsVertexArrayOES(`array`: GLuint): GLboolean
+  proc glColorTableEXT(target: GLenum, internalFormat: GLenum, width: GLsizei, format: GLenum, `type`: GLenum, table: pointer)
+  proc glCompressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, data: pointer)
+  proc glLightx(light: GLenum, pname: GLenum, param: GLfixed)
+  proc glGetTexParameterfv(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttrib4NsvARB(index: GLuint, v: ptr GLshort)
+  proc glInterleavedArrays(format: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glProgramLocalParameter4fARB(target: GLenum, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat)
+  proc glPopDebugGroupKHR()
+  proc glVDPAUUnregisterSurfaceNV(surface: GLvdpauSurfaceNv)
+  proc glTexCoord1s(s: GLshort)
+  proc glFramebufferTexture2DMultisampleIMG(target: GLenum, attachment: GLenum, textarget: GLenum, texture: GLuint, level: GLint, samples: GLsizei)
+  proc glShaderBinary(count: GLsizei, shaders: ptr GLuint, binaryformat: GLenum, binary: pointer, length: GLsizei)
+  proc glVertexAttrib2dv(index: GLuint, v: ptr GLdouble)
+  proc glUniformMatrix4dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glWeightivARB(size: GLint, weights: ptr GLint)
+  proc glGetMultiTexParameterIivEXT(texunit: GLenum, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glCopyConvolutionFilter2DEXT(target: GLenum, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei)
+  proc glSecondaryColor3hNV(red: GLhalfNv, green: GLhalfNv, blue: GLhalfNv)
+  proc glVertexAttrib1sv(index: GLuint, v: ptr GLshort)
+  proc glFrustumfOES(l: GLfloat, r: GLfloat, b: GLfloat, t: GLfloat, n: GLfloat, f: GLfloat)
+  proc glVertexStream2iATI(stream: GLenum, x: GLint, y: GLint)
+  proc glNormalStream3bATI(stream: GLenum, nx: GLbyte, ny: GLbyte, nz: GLbyte)
+  proc glVertexArrayTexCoordOffsetEXT(vaobj: GLuint, buffer: GLuint, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glGetQueryiv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glTransformFeedbackStreamAttribsNV(count: GLsizei, attribs: ptr GLint, nbuffers: GLsizei, bufstreams: ptr GLint, bufferMode: GLenum)
+  proc glTextureStorage3DEXT(texture: GLuint, target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei)
+  proc glWindowPos3dvMESA(v: ptr GLdouble)
+  proc glUniform2uivEXT(location: GLint, count: GLsizei, value: ptr GLuint)
+  proc glTextureStorage2DEXT(texture: GLuint, target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glVertexArrayMultiTexCoordOffsetEXT(vaobj: GLuint, buffer: GLuint, texunit: GLenum, size: GLint, `type`: GLenum, stride: GLsizei, offset: GLintptr)
+  proc glVertexStream1dvATI(stream: GLenum, coords: ptr GLdouble)
+  proc glCopyImageSubData(srcName: GLuint, srcTarget: GLenum, srcLevel: GLint, srcX: GLint, srcY: GLint, srcZ: GLint, dstName: GLuint, dstTarget: GLenum, dstLevel: GLint, dstX: GLint, dstY: GLint, dstZ: GLint, srcWidth: GLsizei, srcHeight: GLsizei, srcDepth: GLsizei)
+  proc glClearNamedBufferSubDataEXT(buffer: GLuint, internalformat: GLenum, format: GLenum, `type`: GLenum, offset: GLsizeiptr, size: GLsizeiptr, data: ptr pointer)
+  proc glBindBuffersRange(target: GLenum, first: GLuint, count: GLsizei, buffers: ptr GLuint, offsets: ptr GLintptr, sizes: ptr GLsizeiptr)
+  proc glGetVertexAttribIuivEXT(index: GLuint, pname: GLenum, params: ptr GLuint)
+  proc glLoadMatrixx(m: ptr GLfixed)
+  proc glTransformFeedbackVaryingsNV(program: GLuint, count: GLsizei, locations: ptr GLint, bufferMode: GLenum)
+  proc glUniform1i64vNV(location: GLint, count: GLsizei, value: ptr GLint64Ext)
+  proc glVertexArrayVertexAttribLFormatEXT(vaobj: GLuint, attribindex: GLuint, size: GLint, `type`: GLenum, relativeoffset: GLuint)
+  proc glClearBufferuiv(buffer: GLenum, drawbuffer: GLint, value: ptr GLuint)
+  proc glCombinerOutputNV(stage: GLenum, portion: GLenum, abOutput: GLenum, cdOutput: GLenum, sumOutput: GLenum, scale: GLenum, bias: GLenum, abDotProduct: GLboolean, cdDotProduct: GLboolean, muxSum: GLboolean)
+  proc glTexImage3DEXT(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glPixelTransformParameterivEXT(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glActiveStencilFaceEXT(face: GLenum)
+  proc glCreateShaderObjectARB(shaderType: GLenum): GLhandleArb
+  proc glGetTextureParameterivEXT(texture: GLuint, target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glCopyTextureLevelsAPPLE(destinationTexture: GLuint, sourceTexture: GLuint, sourceBaseLevel: GLint, sourceLevelCount: GLsizei)
+  proc glVertexAttrib4Nuiv(index: GLuint, v: ptr GLuint)
+  proc glDrawPixels(width: GLsizei, height: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glWindowPos3dvARB(v: ptr GLdouble)
+  proc glProgramLocalParameterI4ivNV(target: GLenum, index: GLuint, params: ptr GLint)
+  proc glRasterPos4s(x: GLshort, y: GLshort, z: GLshort, w: GLshort)
+  proc glTexCoord2fVertex3fvSUN(tc: ptr GLfloat, v: ptr GLfloat)
+  proc glGetPathMetricsNV(metricQueryMask: GLbitfield, numPaths: GLsizei, pathNameType: GLenum, paths: pointer, pathBase: GLuint, stride: GLsizei, metrics: ptr GLfloat)
+  proc glMultiTexCoord4bOES(texture: GLenum, s: GLbyte, t: GLbyte, r: GLbyte, q: GLbyte)
+  proc glTextureBufferEXT(texture: GLuint, target: GLenum, internalformat: GLenum, buffer: GLuint)
+  proc glSecondaryColor3fv(v: ptr GLfloat)
+  proc glMultiTexCoord3fv(target: GLenum, v: ptr GLfloat)
+  proc glGetTexParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glMap2xOES(target: GLenum, u1: GLfixed, u2: GLfixed, ustride: GLint, uorder: GLint, v1: GLfixed, v2: GLfixed, vstride: GLint, vorder: GLint, points: GLfixed)
+  proc glFlushVertexArrayRangeAPPLE(length: GLsizei, `pointer`: pointer)
+  proc glActiveTextureARB(texture: GLenum)
+  proc glGetVertexAttribLi64vNV(index: GLuint, pname: GLenum, params: ptr GLint64Ext)
+  proc glNormal3bv(v: ptr GLbyte)
+  proc glCreateSyncFromCLeventARB(context: ptr ClContext, event: ptr ClContext, flags: GLbitfield): GLsync
+  proc glRenderbufferStorageEXT(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei)
+  proc glGetCompressedTextureImageEXT(texture: GLuint, target: GLenum, lod: GLint, img: pointer)
+  proc glColorFragmentOp2ATI(op: GLenum, dst: GLuint, dstMask: GLuint, dstMod: GLuint, arg1: GLuint, arg1Rep: GLuint, arg1Mod: GLuint, arg2: GLuint, arg2Rep: GLuint, arg2Mod: GLuint)
+  proc glPixelMapusv(map: GLenum, mapsize: GLsizei, values: ptr GLushort)
+  proc glGlobalAlphaFactorsSUN(factor: GLshort)
+  proc glTexParameterxv(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glEvalCoord2xOES(u: GLfixed, v: GLfixed)
+  proc glIsList(list: GLuint): GLboolean
+  proc glVertexAttrib3d(index: GLuint, x: GLdouble, y: GLdouble, z: GLdouble)
+  proc glSpriteParameterfSGIX(pname: GLenum, param: GLfloat)
+  proc glPathGlyphRangeNV(firstPathName: GLuint, fontTarget: GLenum, fontName: pointer, fontStyle: GLbitfield, firstGlyph: GLuint, numGlyphs: GLsizei, handleMissingGlyphs: GLenum, pathParameterTemplate: GLuint, emScale: GLfloat)
+  proc glUniform3iv(location: GLint, count: GLsizei, value: ptr GLint)
+  proc glClearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint)
+  proc glWindowPos3sMESA(x: GLshort, y: GLshort, z: GLshort)
+  proc glGetMapParameterfvNV(target: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glBindFragmentShaderATI(id: GLuint)
+  proc glTexCoord4s(s: GLshort, t: GLshort, r: GLshort, q: GLshort)
+  proc glGetMultiTexGenfvEXT(texunit: GLenum, coord: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glColorMaterial(face: GLenum, mode: GLenum)
+  proc glVertexAttribs1svNV(index: GLuint, count: GLsizei, v: ptr GLshort)
+  proc glEnableVertexAttribAPPLE(index: GLuint, pname: GLenum)
+  proc glGetDoubleIndexedvEXT(target: GLenum, index: GLuint, data: ptr GLdouble)
+  proc glOrthof(l: GLfloat, r: GLfloat, b: GLfloat, t: GLfloat, n: GLfloat, f: GLfloat)
+  proc glVertexBlendEnvfATI(pname: GLenum, param: GLfloat)
+  proc glUniformMatrix2x4dv(location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glPrioritizeTexturesxOES(n: GLsizei, textures: ptr GLuint, priorities: ptr GLfixed)
+  proc glGetTextureSamplerHandleNV(texture: GLuint, sampler: GLuint): GLuint64
+  proc glDeleteVertexArrays(n: GLsizei, arrays: ptr GLuint)
+  proc glMultiTexCoord1xOES(texture: GLenum, s: GLfixed)
+  proc glGlobalAlphaFactorusSUN(factor: GLushort)
+  proc glGetConvolutionParameterxvOES(target: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glProgramUniform4fEXT(program: GLuint, location: GLint, v0: GLfloat, v1: GLfloat, v2: GLfloat, v3: GLfloat)
+  proc glProgramUniformMatrix3x4dvEXT(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+  proc glBindVertexBuffer(bindingindex: GLuint, buffer: GLuint, offset: GLintptr, stride: GLsizei)
+  proc glGetHistogramParameteriv(target: GLenum, pname: GLenum, params: ptr GLint)
+  proc glGetShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum, range: ptr GLint, precision: ptr GLint)
+  proc glTextureMaterialEXT(face: GLenum, mode: GLenum)
+  proc glEvalCoord2xvOES(coords: ptr GLfixed)
+  proc glWeightuivARB(size: GLint, weights: ptr GLuint)
+  proc glGetTextureLevelParameterfvEXT(texture: GLuint, target: GLenum, level: GLint, pname: GLenum, params: ptr GLfloat)
+  proc glVertexAttribP3uiv(index: GLuint, `type`: GLenum, normalized: GLboolean, value: ptr GLuint)
+  proc glProgramEnvParameterI4ivNV(target: GLenum, index: GLuint, params: ptr GLint)
+  proc glFogi(pname: GLenum, param: GLint)
+  proc glTexCoord1iv(v: ptr GLint)
+  proc glReplacementCodeuiColor4ubVertex3fvSUN(rc: ptr GLuint, c: ptr GLubyte, v: ptr GLfloat)
+  proc glProgramUniform1ui(program: GLuint, location: GLint, v0: GLuint)
+  proc glMultiTexCoord3d(target: GLenum, s: GLdouble, t: GLdouble, r: GLdouble)
+  proc glBeginVideoCaptureNV(video_capture_slot: GLuint)
+  proc glEvalCoord1f(u: GLfloat)
+  proc glMultiTexCoord1hvNV(target: GLenum, v: ptr GLhalfNv)
+  proc glSecondaryColor3sEXT(red: GLshort, green: GLshort, blue: GLshort)
+  proc glTextureImage3DEXT(texture: GLuint, target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glCopyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint)
+  proc glFinishFenceAPPLE(fence: GLuint)
+  proc glVertexArrayRangeNV(length: GLsizei, `pointer`: pointer)
+  proc glLightModelf(pname: GLenum, param: GLfloat)
+  proc glVertexAttribL1ui64ARB(index: GLuint, x: GLuint64Ext)
+  proc glPolygonOffset(factor: GLfloat, units: GLfloat)
+  proc glRasterPos4xOES(x: GLfixed, y: GLfixed, z: GLfixed, w: GLfixed)
+  proc glVertexAttrib3dvNV(index: GLuint, v: ptr GLdouble)
+  proc glBeginQuery(target: GLenum, id: GLuint)
+  proc glWeightfvARB(size: GLint, weights: ptr GLfloat)
+  proc glGetUniformuiv(program: GLuint, location: GLint, params: ptr GLuint)
+  proc glIsTextureEXT(texture: GLuint): GLboolean
+  proc glGetClipPlanef(plane: GLenum, equation: ptr GLfloat)
+  proc glTexGenxOES(coord: GLenum, pname: GLenum, param: GLfixed)
+  proc glFramebufferTextureFaceEXT(target: GLenum, attachment: GLenum, texture: GLuint, level: GLint, face: GLenum)
+  proc glDisableClientState(`array`: GLenum)
+  proc glTexPageCommitmentARB(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, resident: GLboolean)
+  proc glRasterPos4dv(v: ptr GLdouble)
+  proc glGetLightx(light: GLenum, pname: GLenum, params: ptr GLfixed)
+  proc glVertexAttrib1hvNV(index: GLuint, v: ptr GLhalfNv)
+  proc glMultiTexCoord2s(target: GLenum, s: GLshort, t: GLshort)
+  proc glProgramUniform2iv(program: GLuint, location: GLint, count: GLsizei, value: ptr GLint)
+  proc glGetListParameterivSGIX(list: GLuint, pname: GLenum, params: ptr GLint)
+  proc glColorFragmentOp1ATI(op: GLenum, dst: GLuint, dstMask: GLuint, dstMod: GLuint, arg1: GLuint, arg1Rep: GLuint, arg1Mod: GLuint)
+  proc glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN(rc: GLuint, s: GLfloat, t: GLfloat, r: GLfloat, g: GLfloat, b: GLfloat, a: GLfloat, nx: GLfloat, ny: GLfloat, nz: GLfloat, x: GLfloat, y: GLfloat, z: GLfloat)
+  proc glSampleMapATI(dst: GLuint, interp: GLuint, swizzle: GLenum)
+  proc glProgramUniform1d(program: GLuint, location: GLint, v0: GLdouble)
+  proc glBindAttribLocation(program: GLuint, index: GLuint, name: cstring)
+  proc glGetCombinerStageParameterfvNV(stage: GLenum, pname: GLenum, params: ptr GLfloat)
+  proc glTexSubImage4DSGIS(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, woffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, size4d: GLsizei, format: GLenum, `type`: GLenum, pixels: pointer)
+  proc glGetMapAttribParameterfvNV(target: GLenum, index: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glNewObjectBufferATI(size: GLsizei, `pointer`: pointer, usage: GLenum): GLuint
+  proc glWindowPos4iMESA(x: GLint, y: GLint, z: GLint, w: GLint)
+  proc glNewList(list: GLuint, mode: GLenum)
+  proc glUniform1i64NV(location: GLint, x: GLint64Ext)
+  proc glTexCoordP3ui(`type`: GLenum, coords: GLuint)
+  proc glEndQueryEXT(target: GLenum)
+  proc glGetVertexAttribLdv(index: GLuint, pname: GLenum, params: ptr GLdouble)
+  proc glStencilMask(mask: GLuint)
+  proc glVertexAttrib4sv(index: GLuint, v: ptr GLshort)
+  proc glRectsv(v1: ptr GLshort, v2: ptr GLshort)
+  proc glGetVariantArrayObjectfvATI(id: GLuint, pname: GLenum, params: ptr GLfloat)
+  proc glTexCoord3hvNV(v: ptr GLhalfNv)
+  proc glGetUniformdv(program: GLuint, location: GLint, params: ptr GLdouble)
+  proc glSecondaryColor3fvEXT(v: ptr GLfloat)
+  proc glAlphaFuncx(fun: GLenum, `ref`: GLfixed)
+  proc glVertexAttribPointerNV(index: GLuint, fsize: GLint, `type`: GLenum, stride: GLsizei, `pointer`: pointer)
+  proc glColorTable(target: GLenum, internalformat: GLenum, width: GLsizei, format: GLenum, `type`: GLenum, table: pointer)
+  proc glProgramUniformMatrix2x3dv(program: GLuint, location: GLint, count: GLsizei, transpose: GLboolean, value: ptr GLdouble)
+
+  ## # GL_ARB_direct_state_access
+  proc glCreateTransformFeedbacks(n: GLsizei; ids: ptr GLuint)
+  proc glTransformFeedbackBufferBase(xfb: GLuint; index: GLuint; buffer: GLuint)
+  proc glTransformFeedbackBufferRange(xfb: GLuint; index: GLuint; buffer: GLuint; offset: GLintptr; size: GLsizeiptr)
+  proc glGetTransformFeedbackiv(xfb: GLuint; pname: GLenum; param: ptr GLint)
+  proc glGetTransformFeedbacki_v(xfb: GLuint; pname: GLenum; index: GLuint; param: ptr GLint)
+  proc glGetTransformFeedbacki64_v(xfb: GLuint; pname: GLenum; index: GLuint; param: ptr GLint64)
+  ## # Buffer object functions 
+
+  proc glCreateBuffers(n: GLsizei; buffers: ptr GLuint)
+  proc glNamedBufferStorage(buffer: GLuint; size: GLsizeiptr; data: pointer; flags: GLbitfield)
+  proc glNamedBufferData(buffer: GLuint; size: GLsizeiptr; data: pointer; usage: GLenum)
+  proc glNamedBufferSubData(buffer: GLuint; offset: GLintptr; size: GLsizeiptr; data: pointer)
+  proc glCopyNamedBufferSubData(readBuffer: GLuint; writeBuffer: GLuint; readOffset: GLintptr; writeOffset: GLintptr; size: GLsizeiptr)
+  proc glClearNamedBufferData(buffer: GLuint; internalformat: GLenum; format: GLenum; `type`: GLenum; data: pointer)
+  proc glClearNamedBufferSubData(buffer: GLuint; internalformat: GLenum; offset: GLintptr; size: GLsizeiptr; format: GLenum; `type`: GLenum; data: pointer)
+  proc glMapNamedBuffer(buffer: GLuint; access: GLenum): pointer
+  proc glMapNamedBufferRange(buffer: GLuint; offset: GLintptr; length: GLsizeiptr; access: GLbitfield): pointer
+  proc glUnmapNamedBuffer(buffer: GLuint): GLboolean
+  proc glFlushMappedNamedBufferRange(buffer: GLuint; offset: GLintptr; length: GLsizeiptr)
+  proc glGetNamedBufferParameteriv(buffer: GLuint; pname: GLenum; params: ptr GLint)
+  proc glGetNamedBufferParameteri64v(buffer: GLuint; pname: GLenum; params: ptr GLint64)
+  proc glGetNamedBufferPointerv(buffer: GLuint; pname: GLenum; params: ptr pointer)
+  proc glGetNamedBufferSubData(buffer: GLuint; offset: GLintptr; size: GLsizeiptr; data: pointer)
+  ## # Framebuffer object functions 
+
+  proc glCreateFramebuffers(n: GLsizei; framebuffers: ptr GLuint)
+  proc glNamedFramebufferRenderbuffer(framebuffer: GLuint; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint)
+  proc glNamedFramebufferParameteri(framebuffer: GLuint; pname: GLenum; param: GLint)
+  proc glNamedFramebufferTexture(framebuffer: GLuint; attachment: GLenum; texture: GLuint; level: GLint)
+  proc glNamedFramebufferTextureLayer(framebuffer: GLuint; attachment: GLenum; texture: GLuint; level: GLint; layer: GLint)
+  proc glNamedFramebufferDrawBuffer(framebuffer: GLuint; mode: GLenum)
+  proc glNamedFramebufferDrawBuffers(framebuffer: GLuint; n: GLsizei; bufs: ptr GLenum)
+  proc glNamedFramebufferReadBuffer(framebuffer: GLuint; mode: GLenum)
+  proc glInvalidateNamedFramebufferData(framebuffer: GLuint; numAttachments: GLsizei; attachments: ptr GLenum)
+  proc glInvalidateNamedFramebufferSubData(framebuffer: GLuint; numAttachments: GLsizei; attachments: ptr GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei)
+  proc glClearNamedFramebufferiv(framebuffer: GLuint; buffer: GLenum; drawbuffer: GLint; value: ptr GLint)
+  proc glClearNamedFramebufferuiv(framebuffer: GLuint; buffer: GLenum; drawbuffer: GLint; value: ptr GLuint)
+  proc glClearNamedFramebufferfv(framebuffer: GLuint; buffer: GLenum; drawbuffer: GLint; value: ptr cfloat)
+  proc glClearNamedFramebufferfi(framebuffer: GLuint; buffer: GLenum; drawbuffer: GLint; depth: cfloat; stencil: GLint)
+  proc glBlitNamedFramebuffer(readFramebuffer: GLuint; drawFramebuffer: GLuint; srcX0: GLint; srcY0: GLint; srcX1: GLint; srcY1: GLint; dstX0: GLint; dstY0: GLint; dstX1: GLint; dstY1: GLint; mask: GLbitfield; filter: GLenum)
+  proc glCheckNamedFramebufferStatus(framebuffer: GLuint; target: GLenum): GLenum
+  proc glGetNamedFramebufferParameteriv(framebuffer: GLuint; pname: GLenum; param: ptr GLint)
+  proc glGetNamedFramebufferAttachmentParameteriv(framebuffer: GLuint; attachment: GLenum; pname: GLenum; params: ptr GLint)
+  ## # Renderbuffer object functions 
+
+  proc glCreateRenderbuffers(n: GLsizei; renderbuffers: ptr GLuint)
+  proc glNamedRenderbufferStorage(renderbuffer: GLuint; internalformat: GLenum; width: GLsizei; height: GLsizei)
+  proc glNamedRenderbufferStorageMultisample(renderbuffer: GLuint; samples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei)
+  proc glGetNamedRenderbufferParameteriv(renderbuffer: GLuint; pname: GLenum; params: ptr GLint)
+  ## # Texture object functions 
+
+  proc glCreateTextures(target: GLenum; n: GLsizei; textures: ptr GLuint)
+  proc glTextureBuffer(texture: GLuint; internalformat: GLenum; buffer: GLuint)
+  proc glTextureBufferRange(texture: GLuint; internalformat: GLenum; buffer: GLuint; offset: GLintptr; size: GLsizeiptr)
+  proc glTextureStorage1D(texture: GLuint; levels: GLsizei; internalformat: GLenum; width: GLsizei)
+  proc glTextureStorage2D(texture: GLuint; levels: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei)
+  proc glTextureStorage3D(texture: GLuint; levels: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei)
+  proc glTextureStorage2DMultisample(texture: GLuint; samples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei; fixedsamplelocations: GLboolean)
+  proc glTextureStorage3DMultisample(texture: GLuint; samples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; fixedsamplelocations: GLboolean)
+  proc glTextureSubImage1D(texture: GLuint; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; `type`: GLenum; pixels: pointer)
+  proc glTextureSubImage2D(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; `type`: GLenum; pixels: pointer)
+  proc glTextureSubImage3D(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; `type`: GLenum; pixels: pointer)
+  proc glCompressedTextureSubImage1D(texture: GLuint; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; data: pointer)
+  proc glCompressedTextureSubImage2D(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; data: pointer)
+  proc glCompressedTextureSubImage3D(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; data: pointer)
+  proc glCopyTextureSubImage1D(texture: GLuint; level: GLint; xoffset: GLint; x: GLint; y: GLint; width: GLsizei)
+  proc glCopyTextureSubImage2D(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei)
+  proc glCopyTextureSubImage3D(texture: GLuint; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei)
+  proc glTextureParameterf(texture: GLuint; pname: GLenum; param: cfloat)
+  proc glTextureParameterfv(texture: GLuint; pname: GLenum; param: ptr cfloat)
+  proc glTextureParameteri(texture: GLuint; pname: GLenum; param: GLint)
+  proc glTextureParameterIiv(texture: GLuint; pname: GLenum; params: ptr GLint)
+  proc glTextureParameterIuiv(texture: GLuint; pname: GLenum; params: ptr GLuint)
+  proc glTextureParameteriv(texture: GLuint; pname: GLenum; param: ptr GLint)
+  proc glGenerateTextureMipmap(texture: GLuint)
+  proc glBindTextureUnit(unit: GLuint; texture: GLuint)
+  proc glGetTextureImage(texture: GLuint; level: GLint; format: GLenum; `type`: GLenum; bufSize: GLsizei; pixels: pointer)
+                         
+  proc glGetCompressedTextureImage(texture: GLuint; level: GLint; bufSize: GLsizei; pixels: pointer)
+  proc glGetTextureLevelParameterfv(texture: GLuint; level: GLint; pname: GLenum; params: ptr cfloat)
+  proc glGetTextureLevelParameteriv(texture: GLuint; level: GLint; pname: GLenum; params: ptr GLint)
+  proc glGetTextureParameterfv(texture: GLuint; pname: GLenum; params: ptr cfloat)
+  proc glGetTextureParameterIiv(texture: GLuint; pname: GLenum; params: ptr GLint)
+  proc glGetTextureParameterIuiv(texture: GLuint; pname: GLenum; params: ptr GLuint)
+  proc glGetTextureParameteriv(texture: GLuint; pname: GLenum; params: ptr GLint)
+  ## # Vertex Array object functions 
+
+  proc glCreateVertexArrays(n: GLsizei; arrays: ptr GLuint)
+  proc glDisableVertexArrayAttrib(vaobj: GLuint; index: GLuint)
+  proc glEnableVertexArrayAttrib(vaobj: GLuint; index: GLuint)
+  proc glVertexArrayElementBuffer(vaobj: GLuint; buffer: GLuint)
+  proc glVertexArrayVertexBuffer(vaobj: GLuint; bindingindex: GLuint; buffer: GLuint; offset: GLintptr; stride: GLsizei)
+  proc glVertexArrayVertexBuffers(vaobj: GLuint; first: GLuint; count: GLsizei; buffers: ptr GLuint; offsets: ptr GLintptr; strides: ptr GLsizei)
+  proc glVertexArrayAttribFormat(vaobj: GLuint; attribindex: GLuint; size: GLint; `type`: GLenum; normalized: GLboolean; relativeoffset: GLuint)
+  proc glVertexArrayAttribIFormat(vaobj: GLuint; attribindex: GLuint; size: GLint; `type`: GLenum; relativeoffset: GLuint)
+  proc glVertexArrayAttribLFormat(vaobj: GLuint; attribindex: GLuint; size: GLint; `type`: GLenum; relativeoffset: GLuint)
+  proc glVertexArrayAttribBinding(vaobj: GLuint; attribindex: GLuint; bindingindex: GLuint)
+  proc glVertexArrayBindingDivisor(vaobj: GLuint; bindingindex: GLuint; divisor: GLuint)
+  proc glGetVertexArrayiv(vaobj: GLuint; pname: GLenum; param: ptr GLint)
+  proc glGetVertexArrayIndexediv(vaobj: GLuint; index: GLuint; pname: GLenum; param: ptr GLint)
+  proc glGetVertexArrayIndexed64iv(vaobj: GLuint; index: GLuint; pname: GLenum; param: ptr GLint64)
+  ## # Sampler object functions 
+
+  proc glCreateSamplers(n: GLsizei; samplers: ptr GLuint)
+  ## # Program Pipeline object functions 
+
+  proc glCreateProgramPipelines(n: GLsizei; pipelines: ptr GLuint)
+  ## # Query object functions 
+
+  proc glCreateQueries(target: GLenum; n: GLsizei; ids: ptr GLuint)
+  proc glGetQueryBufferObjectiv(id: GLuint; buffer: GLuint; pname: GLenum; offset: GLintptr)
+  proc glGetQueryBufferObjectuiv(id: GLuint; buffer: GLuint; pname: GLenum; offset: GLintptr)
+  proc glGetQueryBufferObjecti64v(id: GLuint; buffer: GLuint; pname: GLenum; offset: GLintptr)
+  proc glGetQueryBufferObjectui64v(id: GLuint; buffer: GLuint; pname: GLenum; offset: GLintptr)
+
+{.pop.} # stdcall, hint[XDeclaredButNotUsed]: off, warning[SmallLshouldNotBeUsed]: off.

+ 113 - 0
src/nodesnim/core/opengl/private/types.nim

@@ -0,0 +1,113 @@
+type
+  GLenum* = distinct uint32
+  GLboolean* = bool
+  GLbitfield* = distinct uint32
+  GLvoid* = pointer
+  GLbyte* = int8
+  GLshort* = int16
+  GLint* = int32
+  GLclampx* = int32
+  GLubyte* = uint8
+  GLushort* = uint16
+  GLuint* = uint32
+  GLhandle* = GLuint
+  GLsizei* = int32
+  GLfloat* = float32
+  GLclampf* = float32
+  GLdouble* = float64
+  GLclampd* = float64
+  GLeglImageOES* = distinct pointer
+  GLchar* = char
+  GLcharArb* = char
+  GLfixed* = int32
+  GLhalfNv* = uint16
+  GLvdpauSurfaceNv* = uint
+  GLintptr* = int
+  GLintptrArb* = int
+  GLint64EXT* = int64
+  GLuint64EXT* = uint64
+  GLint64* = int64
+  GLsizeiptrArb* = int
+  GLsizeiptr* = int
+  GLsync* = distinct pointer
+  GLuint64* = uint64
+  GLvectorub2* = array[0..1, GLubyte]
+  GLvectori2* = array[0..1, GLint]
+  GLvectorf2* = array[0..1, GLfloat]
+  GLvectord2* = array[0..1, GLdouble]
+  GLvectorp2* = array[0..1, pointer]
+  GLvectorb3* = array[0..2, GLbyte]
+  GLvectorub3* = array[0..2, GLubyte]
+  GLvectori3* = array[0..2, GLint]
+  GLvectorui3* = array[0..2, GLuint]
+  GLvectorf3* = array[0..2, GLfloat]
+  GLvectord3* = array[0..2, GLdouble]
+  GLvectorp3* = array[0..2, pointer]
+  GLvectors3* = array[0..2, GLshort]
+  GLvectorus3* = array[0..2, GLushort]
+  GLvectorb4* = array[0..3, GLbyte]
+  GLvectorub4* = array[0..3, GLubyte]
+  GLvectori4* = array[0..3, GLint]
+  GLvectorui4* = array[0..3, GLuint]
+  GLvectorf4* = array[0..3, GLfloat]
+  GLvectord4* = array[0..3, GLdouble]
+  GLvectorp4* = array[0..3, pointer]
+  GLvectors4* = array[0..3, GLshort]
+  GLvectorus4* = array[0..3, GLshort]
+  GLarray4f* = GLvectorf4
+  GLarrayf3* = GLvectorf3
+  GLarrayd3* = GLvectord3
+  GLarrayi4* = GLvectori4
+  GLarrayp4* = GLvectorp4
+  GLmatrixub3* = array[0..2, array[0..2, GLubyte]]
+  GLmatrixi3* = array[0..2, array[0..2, GLint]]
+  GLmatrixf3* = array[0..2, array[0..2, GLfloat]]
+  GLmatrixd3* = array[0..2, array[0..2, GLdouble]]
+  GLmatrixub4* = array[0..3, array[0..3, GLubyte]]
+  GLmatrixi4* = array[0..3, array[0..3, GLint]]
+  GLmatrixf4* = array[0..3, array[0..3, GLfloat]]
+  GLmatrixd4* = array[0..3, array[0..3, GLdouble]]
+  ClContext* = distinct pointer
+  ClEvent* = distinct pointer
+  GLdebugProc* = proc (
+    source: GLenum,
+    typ: GLenum,
+    id: GLuint,
+    severity: GLenum,
+    length: GLsizei,
+    message: ptr GLchar,
+    userParam: pointer) {.stdcall.}
+  GLdebugProcArb* = proc (
+    source: GLenum,
+    typ: GLenum,
+    id: GLuint,
+    severity: GLenum,
+    len: GLsizei,
+    message: ptr GLchar,
+    userParam: pointer) {.stdcall.}
+  GLdebugProcAmd* = proc (
+    id: GLuint,
+    category: GLenum,
+    severity: GLenum,
+    len: GLsizei,
+    message: ptr GLchar,
+    userParam: pointer) {.stdcall.}
+  GLdebugProcKhr* = proc (
+    source, typ: GLenum,
+    id: GLuint,
+    severity: GLenum,
+    length: GLsizei,
+    message: ptr GLchar,
+    userParam: pointer) {.stdcall.}
+
+when defined(macosx):
+  type
+    GLhandleArb = pointer
+else:
+  type
+    GLhandleArb = uint32
+
+proc `==`*(a, b: GLenum): bool {.borrow.}
+proc `==`*(a, b: GLbitfield): bool {.borrow.}
+proc `or`*(a, b: GLbitfield): GLbitfield {.borrow.}
+proc hash*(x: GLenum): int = x.int

+ 369 - 0
src/nodesnim/core/opengl/wingl.nim

@@ -0,0 +1,369 @@
+import opengl, windows
+
+{.deadCodeElim: on.}
+
+proc wglGetExtensionsStringARB*(hdc: HDC): cstring{.dynlib: dllname,
+    importc: "wglGetExtensionsStringARB".}
+const
+  WGL_FRONT_COLOR_BUFFER_BIT_ARB* = 0x00000001
+  WGL_BACK_COLOR_BUFFER_BIT_ARB* = 0x00000002
+  WGL_DEPTH_BUFFER_BIT_ARB* = 0x00000004
+  WGL_STENCIL_BUFFER_BIT_ARB* = 0x00000008
+
+proc WinChoosePixelFormat*(DC: HDC, p2: PPixelFormatDescriptor): int{.
+    dynlib: "gdi32", importc: "ChoosePixelFormat".}
+proc wglCreateBufferRegionARB*(hDC: HDC, iLayerPlane: TGLint, uType: TGLuint): THandle{.
+    dynlib: dllname, importc: "wglCreateBufferRegionARB".}
+proc wglDeleteBufferRegionARB*(hRegion: THandle){.dynlib: dllname,
+    importc: "wglDeleteBufferRegionARB".}
+proc wglSaveBufferRegionARB*(hRegion: THandle, x: TGLint, y: TGLint,
+                             width: TGLint, height: TGLint): BOOL{.
+    dynlib: dllname, importc: "wglSaveBufferRegionARB".}
+proc wglRestoreBufferRegionARB*(hRegion: THandle, x: TGLint, y: TGLint,
+                                width: TGLint, height: TGLint, xSrc: TGLint,
+                                ySrc: TGLint): BOOL{.dynlib: dllname,
+    importc: "wglRestoreBufferRegionARB".}
+proc wglAllocateMemoryNV*(size: TGLsizei, readFrequency: TGLfloat,
+                          writeFrequency: TGLfloat, priority: TGLfloat): PGLvoid{.
+    dynlib: dllname, importc: "wglAllocateMemoryNV".}
+proc wglFreeMemoryNV*(pointer: PGLvoid){.dynlib: dllname,
+    importc: "wglFreeMemoryNV".}
+const
+  WGL_IMAGE_BUFFER_MIN_ACCESS_I3D* = 0x00000001
+  WGL_IMAGE_BUFFER_LOCK_I3D* = 0x00000002
+
+proc wglCreateImageBufferI3D*(hDC: HDC, dwSize: DWORD, uFlags: UINT): PGLvoid{.
+    dynlib: dllname, importc: "wglCreateImageBufferI3D".}
+proc wglDestroyImageBufferI3D*(hDC: HDC, pAddress: PGLvoid): BOOL{.
+    dynlib: dllname, importc: "wglDestroyImageBufferI3D".}
+proc wglAssociateImageBufferEventsI3D*(hdc: HDC, pEvent: PHandle,
+                                       pAddress: PGLvoid, pSize: PDWORD,
+                                       count: UINT): BOOL{.dynlib: dllname,
+    importc: "wglAssociateImageBufferEventsI3D".}
+proc wglReleaseImageBufferEventsI3D*(hdc: HDC, pAddress: PGLvoid, count: UINT): BOOL{.
+    dynlib: dllname, importc: "wglReleaseImageBufferEventsI3D".}
+proc wglEnableFrameLockI3D*(): BOOL{.dynlib: dllname,
+                                     importc: "wglEnableFrameLockI3D".}
+proc wglDisableFrameLockI3D*(): BOOL{.dynlib: dllname,
+                                      importc: "wglDisableFrameLockI3D".}
+proc wglIsEnabledFrameLockI3D*(pFlag: PBOOL): BOOL{.dynlib: dllname,
+    importc: "wglIsEnabledFrameLockI3D".}
+proc wglQueryFrameLockMasterI3D*(pFlag: PBOOL): BOOL{.dynlib: dllname,
+    importc: "wglQueryFrameLockMasterI3D".}
+proc wglGetFrameUsageI3D*(pUsage: PGLfloat): BOOL{.dynlib: dllname,
+    importc: "wglGetFrameUsageI3D".}
+proc wglBeginFrameTrackingI3D*(): BOOL{.dynlib: dllname,
+                                        importc: "wglBeginFrameTrackingI3D".}
+proc wglEndFrameTrackingI3D*(): BOOL{.dynlib: dllname,
+                                      importc: "wglEndFrameTrackingI3D".}
+proc wglQueryFrameTrackingI3D*(pFrameCount: PDWORD, pMissedFrames: PDWORD,
+                               pLastMissedUsage: PGLfloat): BOOL{.
+    dynlib: dllname, importc: "wglQueryFrameTrackingI3D".}
+const
+  WGL_NUMBER_PIXEL_FORMATS_ARB* = 0x00002000
+  WGL_DRAW_TO_WINDOW_ARB* = 0x00002001
+  WGL_DRAW_TO_BITMAP_ARB* = 0x00002002
+  WGL_ACCELERATION_ARB* = 0x00002003
+  WGL_NEED_PALETTE_ARB* = 0x00002004
+  WGL_NEED_SYSTEM_PALETTE_ARB* = 0x00002005
+  WGL_SWAP_LAYER_BUFFERS_ARB* = 0x00002006
+  WGL_SWAP_METHOD_ARB* = 0x00002007
+  WGL_NUMBER_OVERLAYS_ARB* = 0x00002008
+  WGL_NUMBER_UNDERLAYS_ARB* = 0x00002009
+  WGL_TRANSPARENT_ARB* = 0x0000200A
+  WGL_TRANSPARENT_RED_VALUE_ARB* = 0x00002037
+  WGL_TRANSPARENT_GREEN_VALUE_ARB* = 0x00002038
+  WGL_TRANSPARENT_BLUE_VALUE_ARB* = 0x00002039
+  WGL_TRANSPARENT_ALPHA_VALUE_ARB* = 0x0000203A
+  WGL_TRANSPARENT_INDEX_VALUE_ARB* = 0x0000203B
+  WGL_SHARE_DEPTH_ARB* = 0x0000200C
+  WGL_SHARE_STENCIL_ARB* = 0x0000200D
+  WGL_SHARE_ACCUM_ARB* = 0x0000200E
+  WGL_SUPPORT_GDI_ARB* = 0x0000200F
+  WGL_SUPPORT_OPENGL_ARB* = 0x00002010
+  WGL_DOUBLE_BUFFER_ARB* = 0x00002011
+  WGL_STEREO_ARB* = 0x00002012
+  WGL_PIXEL_TYPE_ARB* = 0x00002013
+  WGL_COLOR_BITS_ARB* = 0x00002014
+  WGL_RED_BITS_ARB* = 0x00002015
+  WGL_RED_SHIFT_ARB* = 0x00002016
+  WGL_GREEN_BITS_ARB* = 0x00002017
+  WGL_GREEN_SHIFT_ARB* = 0x00002018
+  WGL_BLUE_BITS_ARB* = 0x00002019
+  WGL_BLUE_SHIFT_ARB* = 0x0000201A
+  WGL_ALPHA_BITS_ARB* = 0x0000201B
+  WGL_ALPHA_SHIFT_ARB* = 0x0000201C
+  WGL_ACCUM_BITS_ARB* = 0x0000201D
+  WGL_ACCUM_RED_BITS_ARB* = 0x0000201E
+  WGL_ACCUM_GREEN_BITS_ARB* = 0x0000201F
+  WGL_ACCUM_BLUE_BITS_ARB* = 0x00002020
+  WGL_ACCUM_ALPHA_BITS_ARB* = 0x00002021
+  WGL_DEPTH_BITS_ARB* = 0x00002022
+  WGL_STENCIL_BITS_ARB* = 0x00002023
+  WGL_AUX_BUFFERS_ARB* = 0x00002024
+  WGL_NO_ACCELERATION_ARB* = 0x00002025
+  WGL_GENERIC_ACCELERATION_ARB* = 0x00002026
+  WGL_FULL_ACCELERATION_ARB* = 0x00002027
+  WGL_SWAP_EXCHANGE_ARB* = 0x00002028
+  WGL_SWAP_COPY_ARB* = 0x00002029
+  WGL_SWAP_UNDEFINED_ARB* = 0x0000202A
+  WGL_TYPE_RGBA_ARB* = 0x0000202B
+  WGL_TYPE_COLORINDEX_ARB* = 0x0000202C
+
+proc wglGetPixelFormatAttribivARB*(hdc: HDC, iPixelFormat: TGLint,
+                                   iLayerPlane: TGLint, nAttributes: TGLuint,
+                                   piAttributes: PGLint, piValues: PGLint): BOOL{.
+    dynlib: dllname, importc: "wglGetPixelFormatAttribivARB".}
+proc wglGetPixelFormatAttribfvARB*(hdc: HDC, iPixelFormat: TGLint,
+                                   iLayerPlane: TGLint, nAttributes: TGLuint,
+                                   piAttributes: PGLint, pfValues: PGLfloat): BOOL{.
+    dynlib: dllname, importc: "wglGetPixelFormatAttribfvARB".}
+proc wglChoosePixelFormatARB*(hdc: HDC, piAttribIList: PGLint,
+                              pfAttribFList: PGLfloat, nMaxFormats: TGLuint,
+                              piFormats: PGLint, nNumFormats: PGLuint): BOOL{.
+    dynlib: dllname, importc: "wglChoosePixelFormatARB".}
+const
+  WGL_ERROR_INVALID_PIXEL_TYPE_ARB* = 0x00002043
+  WGL_ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB* = 0x00002054
+
+proc wglMakeContextCurrentARB*(hDrawDC: HDC, hReadDC: HDC, hglrc: HGLRC): BOOL{.
+    dynlib: dllname, importc: "wglMakeContextCurrentARB".}
+proc wglGetCurrentReadDCARB*(): HDC{.dynlib: dllname,
+                                     importc: "wglGetCurrentReadDCARB".}
+const
+  WGL_DRAW_TO_PBUFFER_ARB* = 0x0000202D # WGL_DRAW_TO_PBUFFER_ARB  { already defined }
+  WGL_MAX_PBUFFER_PIXELS_ARB* = 0x0000202E
+  WGL_MAX_PBUFFER_WIDTH_ARB* = 0x0000202F
+  WGL_MAX_PBUFFER_HEIGHT_ARB* = 0x00002030
+  WGL_PBUFFER_LARGEST_ARB* = 0x00002033
+  WGL_PBUFFER_WIDTH_ARB* = 0x00002034
+  WGL_PBUFFER_HEIGHT_ARB* = 0x00002035
+  WGL_PBUFFER_LOST_ARB* = 0x00002036
+
+proc wglCreatePbufferARB*(hDC: HDC, iPixelFormat: TGLint, iWidth: TGLint,
+                          iHeight: TGLint, piAttribList: PGLint): THandle{.
+    dynlib: dllname, importc: "wglCreatePbufferARB".}
+proc wglGetPbufferDCARB*(hPbuffer: THandle): HDC{.dynlib: dllname,
+    importc: "wglGetPbufferDCARB".}
+proc wglReleasePbufferDCARB*(hPbuffer: THandle, hDC: HDC): TGLint{.
+    dynlib: dllname, importc: "wglReleasePbufferDCARB".}
+proc wglDestroyPbufferARB*(hPbuffer: THandle): BOOL{.dynlib: dllname,
+    importc: "wglDestroyPbufferARB".}
+proc wglQueryPbufferARB*(hPbuffer: THandle, iAttribute: TGLint, piValue: PGLint): BOOL{.
+    dynlib: dllname, importc: "wglQueryPbufferARB".}
+proc wglSwapIntervalEXT*(interval: TGLint): BOOL{.dynlib: dllname,
+    importc: "wglSwapIntervalEXT".}
+proc wglGetSwapIntervalEXT*(): TGLint{.dynlib: dllname,
+                                       importc: "wglGetSwapIntervalEXT".}
+const
+  WGL_BIND_TO_TEXTURE_RGB_ARB* = 0x00002070
+  WGL_BIND_TO_TEXTURE_RGBA_ARB* = 0x00002071
+  WGL_TEXTURE_FORMAT_ARB* = 0x00002072
+  WGL_TEXTURE_TARGET_ARB* = 0x00002073
+  WGL_MIPMAP_TEXTURE_ARB* = 0x00002074
+  WGL_TEXTURE_RGB_ARB* = 0x00002075
+  WGL_TEXTURE_RGBA_ARB* = 0x00002076
+  WGL_NO_TEXTURE_ARB* = 0x00002077
+  WGL_TEXTURE_CUBE_MAP_ARB* = 0x00002078
+  WGL_TEXTURE_1D_ARB* = 0x00002079
+  WGL_TEXTURE_2D_ARB* = 0x0000207A # WGL_NO_TEXTURE_ARB  { already defined }
+  WGL_MIPMAP_LEVEL_ARB* = 0x0000207B
+  WGL_CUBE_MAP_FACE_ARB* = 0x0000207C
+  WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB* = 0x0000207D
+  WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB* = 0x0000207E
+  WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB* = 0x0000207F
+  WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB* = 0x00002080
+  WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB* = 0x00002081
+  WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB* = 0x00002082
+  WGL_FRONT_LEFT_ARB* = 0x00002083
+  WGL_FRONT_RIGHT_ARB* = 0x00002084
+  WGL_BACK_LEFT_ARB* = 0x00002085
+  WGL_BACK_RIGHT_ARB* = 0x00002086
+  WGL_AUX0_ARB* = 0x00002087
+  WGL_AUX1_ARB* = 0x00002088
+  WGL_AUX2_ARB* = 0x00002089
+  WGL_AUX3_ARB* = 0x0000208A
+  WGL_AUX4_ARB* = 0x0000208B
+  WGL_AUX5_ARB* = 0x0000208C
+  WGL_AUX6_ARB* = 0x0000208D
+  WGL_AUX7_ARB* = 0x0000208E
+  WGL_AUX8_ARB* = 0x0000208F
+  WGL_AUX9_ARB* = 0x00002090
+
+proc wglBindTexImageARB*(hPbuffer: THandle, iBuffer: TGLint): BOOL{.
+    dynlib: dllname, importc: "wglBindTexImageARB".}
+proc wglReleaseTexImageARB*(hPbuffer: THandle, iBuffer: TGLint): BOOL{.
+    dynlib: dllname, importc: "wglReleaseTexImageARB".}
+proc wglSetPbufferAttribARB*(hPbuffer: THandle, piAttribList: PGLint): BOOL{.
+    dynlib: dllname, importc: "wglSetPbufferAttribARB".}
+proc wglGetExtensionsStringEXT*(): cstring{.dynlib: dllname,
+    importc: "wglGetExtensionsStringEXT".}
+proc wglMakeContextCurrentEXT*(hDrawDC: HDC, hReadDC: HDC, hglrc: HGLRC): BOOL{.
+    dynlib: dllname, importc: "wglMakeContextCurrentEXT".}
+proc wglGetCurrentReadDCEXT*(): HDC{.dynlib: dllname,
+                                     importc: "wglGetCurrentReadDCEXT".}
+const
+  WGL_DRAW_TO_PBUFFER_EXT* = 0x0000202D
+  WGL_MAX_PBUFFER_PIXELS_EXT* = 0x0000202E
+  WGL_MAX_PBUFFER_WIDTH_EXT* = 0x0000202F
+  WGL_MAX_PBUFFER_HEIGHT_EXT* = 0x00002030
+  WGL_OPTIMAL_PBUFFER_WIDTH_EXT* = 0x00002031
+  WGL_OPTIMAL_PBUFFER_HEIGHT_EXT* = 0x00002032
+  WGL_PBUFFER_LARGEST_EXT* = 0x00002033
+  WGL_PBUFFER_WIDTH_EXT* = 0x00002034
+  WGL_PBUFFER_HEIGHT_EXT* = 0x00002035
+
+proc wglCreatePbufferEXT*(hDC: HDC, iPixelFormat: TGLint, iWidth: TGLint,
+                          iHeight: TGLint, piAttribList: PGLint): THandle{.
+    dynlib: dllname, importc: "wglCreatePbufferEXT".}
+proc wglGetPbufferDCEXT*(hPbuffer: THandle): HDC{.dynlib: dllname,
+    importc: "wglGetPbufferDCEXT".}
+proc wglReleasePbufferDCEXT*(hPbuffer: THandle, hDC: HDC): TGLint{.
+    dynlib: dllname, importc: "wglReleasePbufferDCEXT".}
+proc wglDestroyPbufferEXT*(hPbuffer: THandle): BOOL{.dynlib: dllname,
+    importc: "wglDestroyPbufferEXT".}
+proc wglQueryPbufferEXT*(hPbuffer: THandle, iAttribute: TGLint, piValue: PGLint): BOOL{.
+    dynlib: dllname, importc: "wglQueryPbufferEXT".}
+const
+  WGL_NUMBER_PIXEL_FORMATS_EXT* = 0x00002000
+  WGL_DRAW_TO_WINDOW_EXT* = 0x00002001
+  WGL_DRAW_TO_BITMAP_EXT* = 0x00002002
+  WGL_ACCELERATION_EXT* = 0x00002003
+  WGL_NEED_PALETTE_EXT* = 0x00002004
+  WGL_NEED_SYSTEM_PALETTE_EXT* = 0x00002005
+  WGL_SWAP_LAYER_BUFFERS_EXT* = 0x00002006
+  WGL_SWAP_METHOD_EXT* = 0x00002007
+  WGL_NUMBER_OVERLAYS_EXT* = 0x00002008
+  WGL_NUMBER_UNDERLAYS_EXT* = 0x00002009
+  WGL_TRANSPARENT_EXT* = 0x0000200A
+  WGL_TRANSPARENT_VALUE_EXT* = 0x0000200B
+  WGL_SHARE_DEPTH_EXT* = 0x0000200C
+  WGL_SHARE_STENCIL_EXT* = 0x0000200D
+  WGL_SHARE_ACCUM_EXT* = 0x0000200E
+  WGL_SUPPORT_GDI_EXT* = 0x0000200F
+  WGL_SUPPORT_OPENGL_EXT* = 0x00002010
+  WGL_DOUBLE_BUFFER_EXT* = 0x00002011
+  WGL_STEREO_EXT* = 0x00002012
+  WGL_PIXEL_TYPE_EXT* = 0x00002013
+  WGL_COLOR_BITS_EXT* = 0x00002014
+  WGL_RED_BITS_EXT* = 0x00002015
+  WGL_RED_SHIFT_EXT* = 0x00002016
+  WGL_GREEN_BITS_EXT* = 0x00002017
+  WGL_GREEN_SHIFT_EXT* = 0x00002018
+  WGL_BLUE_BITS_EXT* = 0x00002019
+  WGL_BLUE_SHIFT_EXT* = 0x0000201A
+  WGL_ALPHA_BITS_EXT* = 0x0000201B
+  WGL_ALPHA_SHIFT_EXT* = 0x0000201C
+  WGL_ACCUM_BITS_EXT* = 0x0000201D
+  WGL_ACCUM_RED_BITS_EXT* = 0x0000201E
+  WGL_ACCUM_GREEN_BITS_EXT* = 0x0000201F
+  WGL_ACCUM_BLUE_BITS_EXT* = 0x00002020
+  WGL_ACCUM_ALPHA_BITS_EXT* = 0x00002021
+  WGL_DEPTH_BITS_EXT* = 0x00002022
+  WGL_STENCIL_BITS_EXT* = 0x00002023
+  WGL_AUX_BUFFERS_EXT* = 0x00002024
+  WGL_NO_ACCELERATION_EXT* = 0x00002025
+  WGL_GENERIC_ACCELERATION_EXT* = 0x00002026
+  WGL_FULL_ACCELERATION_EXT* = 0x00002027
+  WGL_SWAP_EXCHANGE_EXT* = 0x00002028
+  WGL_SWAP_COPY_EXT* = 0x00002029
+  WGL_SWAP_UNDEFINED_EXT* = 0x0000202A
+  WGL_TYPE_RGBA_EXT* = 0x0000202B
+  WGL_TYPE_COLORINDEX_EXT* = 0x0000202C
+
+proc wglGetPixelFormatAttribivEXT*(hdc: HDC, iPixelFormat: TGLint,
+                                   iLayerPlane: TGLint, nAttributes: TGLuint,
+                                   piAttributes: PGLint, piValues: PGLint): BOOL{.
+    dynlib: dllname, importc: "wglGetPixelFormatAttribivEXT".}
+proc wglGetPixelFormatAttribfvEXT*(hdc: HDC, iPixelFormat: TGLint,
+                                   iLayerPlane: TGLint, nAttributes: TGLuint,
+                                   piAttributes: PGLint, pfValues: PGLfloat): BOOL{.
+    dynlib: dllname, importc: "wglGetPixelFormatAttribfvEXT".}
+proc wglChoosePixelFormatEXT*(hdc: HDC, piAttribIList: PGLint,
+                              pfAttribFList: PGLfloat, nMaxFormats: TGLuint,
+                              piFormats: PGLint, nNumFormats: PGLuint): BOOL{.
+    dynlib: dllname, importc: "wglChoosePixelFormatEXT".}
+const
+  WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D* = 0x00002050
+  WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D* = 0x00002051
+  WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D* = 0x00002052
+  WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D* = 0x00002053
+
+proc wglGetDigitalVideoParametersI3D*(hDC: HDC, iAttribute: TGLint,
+                                      piValue: PGLint): BOOL{.dynlib: dllname,
+    importc: "wglGetDigitalVideoParametersI3D".}
+proc wglSetDigitalVideoParametersI3D*(hDC: HDC, iAttribute: TGLint,
+                                      piValue: PGLint): BOOL{.dynlib: dllname,
+    importc: "wglSetDigitalVideoParametersI3D".}
+const
+  WGL_GAMMA_TABLE_SIZE_I3D* = 0x0000204E
+  WGL_GAMMA_EXCLUDE_DESKTOP_I3D* = 0x0000204F
+
+proc wglGetGammaTableParametersI3D*(hDC: HDC, iAttribute: TGLint,
+                                    piValue: PGLint): BOOL{.dynlib: dllname,
+    importc: "wglGetGammaTableParametersI3D".}
+proc wglSetGammaTableParametersI3D*(hDC: HDC, iAttribute: TGLint,
+                                    piValue: PGLint): BOOL{.dynlib: dllname,
+    importc: "wglSetGammaTableParametersI3D".}
+proc wglGetGammaTableI3D*(hDC: HDC, iEntries: TGLint, puRed: PGLUSHORT,
+                          puGreen: PGLUSHORT, puBlue: PGLUSHORT): BOOL{.
+    dynlib: dllname, importc: "wglGetGammaTableI3D".}
+proc wglSetGammaTableI3D*(hDC: HDC, iEntries: TGLint, puRed: PGLUSHORT,
+                          puGreen: PGLUSHORT, puBlue: PGLUSHORT): BOOL{.
+    dynlib: dllname, importc: "wglSetGammaTableI3D".}
+const
+  WGL_GENLOCK_SOURCE_MULTIVIEW_I3D* = 0x00002044
+  WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D* = 0x00002045
+  WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D* = 0x00002046
+  WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D* = 0x00002047
+  WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D* = 0x00002048
+  WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D* = 0x00002049
+  WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D* = 0x0000204A
+  WGL_GENLOCK_SOURCE_EDGE_RISING_I3D* = 0x0000204B
+  WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D* = 0x0000204C
+  WGL_FLOAT_COMPONENTS_NV* = 0x000020B0
+  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV* = 0x000020B1
+  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV* = 0x000020B2
+  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV* = 0x000020B3
+  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV* = 0x000020B4
+  WGL_TEXTURE_FLOAT_R_NV* = 0x000020B5
+  WGL_TEXTURE_FLOAT_RG_NV* = 0x000020B6
+  WGL_TEXTURE_FLOAT_RGB_NV* = 0x000020B7
+  WGL_TEXTURE_FLOAT_RGBA_NV* = 0x000020B8
+
+proc wglEnableGenlockI3D*(hDC: HDC): BOOL{.dynlib: dllname,
+    importc: "wglEnableGenlockI3D".}
+proc wglDisableGenlockI3D*(hDC: HDC): BOOL{.dynlib: dllname,
+    importc: "wglDisableGenlockI3D".}
+proc wglIsEnabledGenlockI3D*(hDC: HDC, pFlag: PBOOL): BOOL{.dynlib: dllname,
+    importc: "wglIsEnabledGenlockI3D".}
+proc wglGenlockSourceI3D*(hDC: HDC, uSource: TGLuint): BOOL{.dynlib: dllname,
+    importc: "wglGenlockSourceI3D".}
+proc wglGetGenlockSourceI3D*(hDC: HDC, uSource: PGLUINT): BOOL{.dynlib: dllname,
+    importc: "wglGetGenlockSourceI3D".}
+proc wglGenlockSourceEdgeI3D*(hDC: HDC, uEdge: TGLuint): BOOL{.dynlib: dllname,
+    importc: "wglGenlockSourceEdgeI3D".}
+proc wglGetGenlockSourceEdgeI3D*(hDC: HDC, uEdge: PGLUINT): BOOL{.
+    dynlib: dllname, importc: "wglGetGenlockSourceEdgeI3D".}
+proc wglGenlockSampleRateI3D*(hDC: HDC, uRate: TGLuint): BOOL{.dynlib: dllname,
+    importc: "wglGenlockSampleRateI3D".}
+proc wglGetGenlockSampleRateI3D*(hDC: HDC, uRate: PGLUINT): BOOL{.
+    dynlib: dllname, importc: "wglGetGenlockSampleRateI3D".}
+proc wglGenlockSourceDelayI3D*(hDC: HDC, uDelay: TGLuint): BOOL{.
+    dynlib: dllname, importc: "wglGenlockSourceDelayI3D".}
+proc wglGetGenlockSourceDelayI3D*(hDC: HDC, uDelay: PGLUINT): BOOL{.
+    dynlib: dllname, importc: "wglGetGenlockSourceDelayI3D".}
+proc wglQueryGenlockMaxSourceDelayI3D*(hDC: HDC, uMaxLineDelay: PGLUINT,
+                                       uMaxPixelDelay: PGLUINT): BOOL{.
+    dynlib: dllname, importc: "wglQueryGenlockMaxSourceDelayI3D".}
+const
+  WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV* = 0x000020A0
+  WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV* = 0x000020A1
+  WGL_TEXTURE_RECTANGLE_NV* = 0x000020A2
+
+const
+  WGL_RGBA_FLOAT_MODE_ATI* = 0x00008820
+  WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI* = 0x00008835
+  WGL_TYPE_RGBA_FLOAT_ATI* = 0x000021A0
+
+# implementation

+ 1853 - 0
src/nodesnim/core/sdl2.nim

@@ -0,0 +1,1853 @@
+import macros
+
+import strutils
+export strutils.`%`
+
+
+# Add for people running sdl 2.0.0
+{. deadCodeElim: on .}
+
+{.push warning[user]: off}
+when defined(SDL_Static):
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+
+else:
+  when defined(windows):
+    const LibName* = "SDL2.dll"
+  elif defined(macosx):
+    const LibName* = "libSDL2.dylib"
+  elif defined(openbsd):
+    const LibName* = "libSDL2.so.0.6"
+  else:
+    const LibName* = "libSDL2.so"
+
+{.pop.}
+
+include sdl2/private/keycodes
+
+const
+  SDL_TEXTEDITINGEVENT_TEXT_SIZE* = 32
+  SDL_TEXTINPUTEVENT_TEXT_SIZE* = 32
+type
+
+  WindowEventID* {.size: sizeof(byte).} = enum
+    WindowEvent_None = 0, WindowEvent_Shown, WindowEvent_Hidden, WindowEvent_Exposed,
+    WindowEvent_Moved, WindowEvent_Resized, WindowEvent_SizeChanged, WindowEvent_Minimized,
+    WindowEvent_Maximized, WindowEvent_Restored, WindowEvent_Enter, WindowEvent_Leave,
+    WindowEvent_FocusGained, WindowEvent_FocusLost, WindowEvent_Close,
+    WindowEvent_TakeFocus, WindowEvent_HitTest
+
+  EventType* {.size: sizeof(uint32).} = enum
+    QuitEvent = 0x100, AppTerminating, AppLowMemory, AppWillEnterBackground,
+    AppDidEnterBackground, AppWillEnterForeground, AppDidEnterForeground,
+    DisplayEvent = 0x150,
+    WindowEvent = 0x200, SysWMEvent,
+    KeyDown = 0x300, KeyUp, TextEditing, TextInput, KeymapChanged,
+    MouseMotion = 0x400, MouseButtonDown, MouseButtonUp, MouseWheel,
+    JoyAxisMotion = 0x600, JoyBallMotion, JoyHatMotion, JoyButtonDown,
+    JoyButtonUp, JoyDeviceAdded, JoyDeviceRemoved,
+    ControllerAxisMotion = 0x650, ControllerButtonDown, ControllerButtonUp,
+    ControllerDeviceAdded, ControllerDeviceRemoved, ControllerDeviceRemapped,
+    FingerDown = 0x700, FingerUp, FingerMotion,
+    DollarGesture = 0x800, DollarRecord, MultiGesture,
+    ClipboardUpdate = 0x900,
+    DropFile = 0x1000,  DropText, DropBegin, DropComplete,
+    AudioDeviceAdded = 0x1100, AudioDeviceRemoved = 0x1101,
+    SensorUpdate = 0x1200,
+    RenderTargetsReset = 0x2000, RenderDeviceReset,
+    UserEvent = 0x8000, UserEvent1, UserEvent2, UserEvent3, UserEvent4, UserEvent5,
+    LastEvent = 0xFFFF,
+
+
+  Event* = object
+    kind*: EventType
+    padding: array[56-sizeof(EventType), byte]
+
+  QuitEventPtr* = ptr QuitEventObj
+  QuitEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+  WindowEventPtr* = ptr WindowEventObj
+  WindowEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    windowID*: uint32
+    event*: WindowEventID
+    pad*: array[56-13, byte]
+  KeyboardEventPtr* = ptr KeyboardEventObj
+  KeyboardEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    windowID*: uint32
+    state*: uint8
+    repeat*: bool
+    keysym*: KeySym
+    pad*: array[24, byte]
+  TextEditingEventPtr* = ptr TextEditingEventObj
+  TextEditingEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    windowID*: uint32
+    text*: array[SDL_TEXTEDITINGEVENT_TEXT_SIZE, char]
+    start*,length*: int32
+    pad*: array[8, byte]
+  TextInputEventPtr* = ptr TextInputEventObj
+  TextInputEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    windowID*: uint32
+    text*: array[SDL_TEXTINPUTEVENT_TEXT_SIZE,char]
+    pad*: array[24, byte]
+  MouseMotionEventPtr* = ptr MouseMotionEventObj
+  MouseMotionEventObj* =  object
+    kind*: EventType
+    timestamp*,windowID*: uint32
+    which*: uint32
+    state*: uint32
+    x*,y*, xrel*,yrel*: int32
+    pad*: array[20, byte]
+  MouseButtonEventPtr* = ptr MouseButtonEventObj
+  MouseButtonEventObj* = object
+    kind*: EventType
+    timestamp*,windowID*: uint32
+    which*: uint32
+    button*: uint8
+    state*: uint8
+    clicks*: uint8
+    x*,y*: cint
+    pad*: array[28, byte]
+  MouseWheelEventPtr* = ptr MouseWheelEventObj
+  MouseWheelEventObj* = object
+    kind*: EventType
+    timestamp*,windowID*: uint32
+    which*: uint32
+    x*,y*: cint
+    direction*: MouseWheelDirection
+  JoyAxisEventPtr* = ptr JoyAxisEventObj
+  JoyAxisEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+    axis*: uint8
+    pad1,pad2,pad3: uint8
+    value*: int16
+  JoyBallEventPtr* = ptr JoyBallEventObj
+  JoyBallEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+    ball*, pad1,pad2,pad3: uint8
+    xrel*,yrel*: int16
+  JoyHatEventPtr* = ptr JoyHatEventObj
+  JoyHatEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+    hat*,value*: uint8
+  JoyButtonEventPtr* = ptr JoyButtonEventObj
+  JoyButtonEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+    button*,state*: uint8
+  JoyDeviceEventPtr* = ptr JoyDeviceEventObj
+  JoyDeviceEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+  ControllerAxisEventPtr* = ptr ControllerAxisEventObj
+  ControllerAxisEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+    axis*, pad1,pad2,pad3: uint8
+    value*: int16
+  ControllerButtonEventPtr* = ptr ControllerButtonEventObj
+  ControllerButtonEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+    button*,state*: uint8
+  ControllerDeviceEventPtr* = ptr ControllerDeviceEventObj
+  ControllerDeviceEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    which*: int32
+
+  TouchID* = int64
+  FingerID* = int64
+
+  TouchFingerEventPtr* = ptr TouchFingerEventObj
+  TouchFingerEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    touchID*: TouchID
+    fingerID*: FingerID
+    x*,y*,dx*,dy*,pressure*: cfloat
+    pad*: array[24, byte]
+  MultiGestureEventPtr* = ptr MultiGestureEventObj
+  MultiGestureEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    touchID*: TouchID
+    dTheta*,dDist*,x*,y*: cfloat
+    numFingers*: uint16
+
+  Finger* = object
+    id*: FingerID
+    x*,y*: cfloat
+    pressure*: cfloat
+
+  GestureID = int64
+  DollarGestureEventPtr* = ptr DollarGestureEventObj
+  DollarGestureEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    touchID*: TouchID
+    gestureID*: GestureID
+    numFingers*: uint32
+    error*, x*, y*: float
+  DropEventPtr* = ptr DropEventObj
+  DropEventObj* = object
+    kind*: EventType
+    timestamp*: uint32
+    file*: cstring
+  UserEventPtr* = ptr UserEventObj
+  UserEventObj* = object
+    kind*: EventType
+    timestamp*,windowID*: uint32
+    code*: int32
+    data1*,data2*: pointer
+
+  Eventaction* {.size: sizeof(cint).} = enum
+    SDL_ADDEVENT, SDL_PEEKEVENT, SDL_GETEVENT
+  EventFilter* = proc (userdata: pointer; event: ptr Event): Bool32 {.cdecl.}
+
+
+  SDL_Return* {.size: sizeof(cint).} = enum SdlError = -1, SdlSuccess = 0 ##\
+    ## Return value for many SDL functions. Any function that returns like this \
+    ## should also be discardable
+  Bool32* {.size: sizeof(cint).} = enum False32 = 0, True32 = 1 ##\
+    ## SDL_bool
+  KeyState* {.size: sizeof(byte).} = enum KeyReleased = 0, KeyPressed
+
+  KeySym* {.pure.} = object
+    scancode*: ScanCode
+    sym*: cint ##Keycode
+    modstate*: int16
+    unicode*: cint
+
+  Point* = tuple[x, y: cint]
+  Rect* = tuple[x, y: cint, w, h: cint]
+
+  GLattr*{.size: sizeof(cint).} = enum
+    SDL_GL_RED_SIZE,
+    SDL_GL_GREEN_SIZE,
+    SDL_GL_BLUE_SIZE,
+    SDL_GL_ALPHA_SIZE,
+    SDL_GL_BUFFER_SIZE,
+    SDL_GL_DOUBLEBUFFER,
+    SDL_GL_DEPTH_SIZE,
+    SDL_GL_STENCIL_SIZE,
+    SDL_GL_ACCUM_RED_SIZE,
+    SDL_GL_ACCUM_GREEN_SIZE,
+    SDL_GL_ACCUM_BLUE_SIZE,
+    SDL_GL_ACCUM_ALPHA_SIZE,
+    SDL_GL_STEREO,
+    SDL_GL_MULTISAMPLEBUFFERS,
+    SDL_GL_MULTISAMPLESAMPLES,
+    SDL_GL_ACCELERATED_VISUAL,
+    SDL_GL_RETAINED_BACKING,
+    SDL_GL_CONTEXT_MAJOR_VERSION,
+    SDL_GL_CONTEXT_MINOR_VERSION,
+    SDL_GL_CONTEXT_EGL,
+    SDL_GL_CONTEXT_FLAGS,
+    SDL_GL_CONTEXT_PROFILE_MASK,
+    SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
+    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
+    SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
+    SDL_GL_CONTEXT_RESET_NOTIFICATION,
+    SDL_GL_CONTEXT_NO_ERROR
+
+  MouseWheelDirection* {.size: sizeof(uint32).} = enum
+    SDL_MOUSEWHEEL_NORMAL,
+    SDL_MOUSEWHEEL_FLIPPED
+
+const
+  # GLprofile enum.
+  SDL_GL_CONTEXT_PROFILE_CORE*:          cint = 0x0001
+  SDL_GL_CONTEXT_PROFILE_COMPATIBILITY*: cint = 0x0002
+  SDL_GL_CONTEXT_PROFILE_ES*:            cint = 0x0004
+
+  # GLcontextFlag enum.
+  SDL_GL_CONTEXT_DEBUG_FLAG*:              cint = 0x0001
+  SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG*: cint = 0x0002
+  SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG*:      cint = 0x0004
+  SDL_GL_CONTEXT_RESET_ISOLATION_FLAG*:    cint = 0x0008
+
+  # GLcontextRelease enum.
+  SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE*:  cint  = 0x0000
+  SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH*: cint  = 0x0001
+
+type
+  DisplayMode* = object
+    format*: cuint
+    w*,h*,refresh_rate*: cint
+    driverData*: pointer
+
+  WindowPtr* = ptr object
+  RendererPtr* = ptr object
+  TexturePtr* = ptr object
+  CursorPtr* = ptr object
+
+  GlContextPtr* = ptr object
+
+  SDL_Version* = object
+    major*, minor*, patch*: uint8
+
+  RendererInfoPtr* = ptr RendererInfo
+  RendererInfo* {.pure, final.} = object
+    name*: cstring          #*< The name of the renderer
+    flags*: uint32          #*< Supported ::SDL_RendererFlags
+    num_texture_formats*: uint32 #*< The number of available texture formats
+    texture_formats*: array[0..16 - 1, uint32] #*< The available texture formats
+    max_texture_width*: cint #*< The maximimum texture width
+    max_texture_height*: cint #*< The maximimum texture height
+
+  TextureAccess* {.size: sizeof(cint).} = enum
+    SDL_TEXTUREACCESS_STATIC, SDL_TEXTUREACCESS_STREAMING, SDL_TEXTUREACCESS_TARGET
+  TextureModulate*{.size:sizeof(cint).} = enum
+    SDL_TEXTUREMODULATE_NONE, SDL_TEXTUREMODULATE_COLOR, SDL_TEXTUREMODULATE_ALPHA
+  RendererFlip* = cint
+  SysWMType* {.size: sizeof(cint).}=enum
+    SysWM_Unknown, SysWM_Windows, SysWM_X11, SysWM_DirectFB,
+    SysWM_Cocoa, SysWM_UIkit, SysWM_Wayland, SysWM_Mir, SysWM_WinRT, SysWM_Android, SysWM_Vivante
+  WMinfo* = object
+    version*: SDL_Version
+    subsystem*: SysWMType
+    padding*: array[64, byte] ## if the low-level stuff is important to you check \
+      ## SDL_syswm.h and cast padding to the right type
+
+const ## WindowFlags
+    SDL_WINDOW_FULLSCREEN*:cuint = 0x00000001#         /**< fullscreen window */
+    SDL_WINDOW_OPENGL*:cuint = 0x00000002#             /**< window usable with OpenGL context */
+    SDL_WINDOW_SHOWN*:cuint = 0x00000004#              /**< window is visible */
+    SDL_WINDOW_HIDDEN*:cuint = 0x00000008#             /**< window is not visible */
+    SDL_WINDOW_BORDERLESS*:cuint = 0x00000010#         /**< no window decoration */
+    SDL_WINDOW_RESIZABLE*:cuint = 0x00000020#          /**< window can be resized */
+    SDL_WINDOW_MINIMIZED*:cuint = 0x00000040#          /**< window is minimized */
+    SDL_WINDOW_MAXIMIZED*:cuint = 0x00000080#          /**< window is maximized */
+    SDL_WINDOW_INPUT_GRABBED*:cuint = 0x00000100#      /**< window has grabbed input focus */
+    SDL_WINDOW_INPUT_FOCUS*:cuint = 0x00000200#        /**< window has input focus */
+    SDL_WINDOW_MOUSE_FOCUS*:cuint = 0x00000400#        /**< window has mouse focus */
+    SDL_WINDOW_FULLSCREEN_DESKTOP*:cuint = ( SDL_WINDOW_FULLSCREEN or 0x00001000 )
+    SDL_WINDOW_FOREIGN*:cuint = 0x00000800#             /**< window not created by SDL */
+    SDL_WINDOW_ALLOW_HIGHDPI*:cuint = 0x00002000#       /**< window should be created in high-DPI mode if supported */
+    SDL_WINDOW_MOUSE_CAPTURE*:cuint = 0x00004000#       /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+    SDL_WINDOW_VULKAN*:cuint = 0x10000000#              /**< window usable for Vulkan surface */
+    SDL_FLIP_NONE*: cint = 0x00000000 # Do not flip
+    SDL_FLIP_HORIZONTAL*: cint = 0x00000001 # flip horizontally
+    SDL_FLIP_VERTICAL*: cint = 0x00000002 # flip vertically
+
+
+converter toBool*(some: Bool32): bool = bool(some)
+converter toBool*(some: SDL_Return): bool = some == SdlSuccess
+converter toCint*(some: TextureAccess): cint = some.cint
+
+## pixel format flags
+const
+  SDL_ALPHA_OPAQUE* = 255
+  SDL_ALPHA_TRANSPARENT* = 0
+# @}
+#* Pixel type.
+const
+  SDL_PIXELTYPE_UNKNOWN* = 0
+  SDL_PIXELTYPE_INDEX1* = 1
+  SDL_PIXELTYPE_INDEX4* = 2
+  SDL_PIXELTYPE_INDEX8* = 3
+  SDL_PIXELTYPE_PACKED8* = 4
+  SDL_PIXELTYPE_PACKED16* = 5
+  SDL_PIXELTYPE_PACKED32* = 6
+  SDL_PIXELTYPE_ARRAYU8* = 7
+  SDL_PIXELTYPE_ARRAYU16* = 8
+  SDL_PIXELTYPE_ARRAYU32* = 9
+  SDL_PIXELTYPE_ARRAYF16* = 10
+  SDL_PIXELTYPE_ARRAYF32* = 11
+#* Bitmap pixel order, high bit -> low bit.
+const
+  SDL_BITMAPORDER_NONE* = 0
+  SDL_BITMAPORDER_4321* = 1
+  SDL_BITMAPORDER_1234* = 2
+#* Packed component order, high bit -> low bit.
+const
+  SDL_PACKEDORDER_NONE* = 0
+  SDL_PACKEDORDER_XRGB* = 1
+  SDL_PACKEDORDER_RGBX* = 2
+  SDL_PACKEDORDER_ARGB* = 3
+  SDL_PACKEDORDER_RGBA* = 4
+  SDL_PACKEDORDER_XBGR* = 5
+  SDL_PACKEDORDER_BGRX* = 6
+  SDL_PACKEDORDER_ABGR* = 7
+  SDL_PACKEDORDER_BGRA* = 8
+#* Array component order, low byte -> high byte.
+const
+  SDL_ARRAYORDER_NONE* = 0
+  SDL_ARRAYORDER_RGB* = 1
+  SDL_ARRAYORDER_RGBA* = 2
+  SDL_ARRAYORDER_ARGB* = 3
+  SDL_ARRAYORDER_BGR* = 4
+  SDL_ARRAYORDER_BGRA* = 5
+  SDL_ARRAYORDER_ABGR* = 6
+#* Packed component layout.
+const
+  SDL_PACKEDLAYOUT_NONE* = 0
+  SDL_PACKEDLAYOUT_332* = 1
+  SDL_PACKEDLAYOUT_4444* = 2
+  SDL_PACKEDLAYOUT_1555* = 3
+  SDL_PACKEDLAYOUT_5551* = 4
+  SDL_PACKEDLAYOUT_565* = 5
+  SDL_PACKEDLAYOUT_8888* = 6
+  SDL_PACKEDLAYOUT_2101010* = 7
+  SDL_PACKEDLAYOUT_1010102* = 8
+
+# /* Define a four character code as a Uint32 */
+# #define SDL_FOURCC(A, B, C, D) \
+#     ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \
+#      (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \
+#      (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \
+#      (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))
+template SDL_FOURCC (a,b,c,d: uint8): uint32 =
+  uint32(a) or (uint32(b) shl 8) or (uint32(c) shl 16) or (uint32(d) shl 24)
+
+template SDL_DEFINE_PIXELFOURCC*(A, B, C, D: char): uint32 =
+  SDL_FOURCC(A.uint8, B.uint8, C.uint8, D.uint8)
+
+template SDL_DEFINE_PIXELFORMAT*(`type`, order, layout, bits, bytes: int): uint32 =
+  uint32((1 shl 28) or ((`type`) shl 24) or ((order) shl 20) or ((layout) shl 16) or
+      ((bits) shl 8) or ((bytes) shl 0))
+
+template SDL_PIXELFLAG*(X: uint32): int =
+  int(((X) shr 28) and 0x0000000F)
+
+template SDL_PIXELTYPE*(X: uint32): int =
+  int(((X) shr 24) and 0x0000000F)
+
+template SDL_PIXELORDER*(X: uint32): int =
+  int(((X) shr 20) and 0x0000000F)
+
+template SDL_PIXELLAYOUT*(X: uint32): int =
+  int(((X) shr 16) and 0x0000000F)
+
+template SDL_BITSPERPIXEL*(X: uint32): int =
+  int(((X) shr 8) and 0x000000FF)
+
+template SDL_BYTESPERPIXEL*(X: uint32): int =
+  int(if SDL_ISPIXELFORMAT_FOURCC(X): (if (((X) == SDL_PIXELFORMAT_YUY2) or
+      ((X) == SDL_PIXELFORMAT_UYVY) or ((X) == SDL_PIXELFORMAT_YVYU)): 2 else: 1) else: (
+      ((X) shr 0) and 0x000000FF))
+
+template SDL_ISPIXELFORMAT_INDEXED*(format: uint32): bool =
+  (not SDL_ISPIXELFORMAT_FOURCC(format) and
+      ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) or
+      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) or
+      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
+
+template SDL_ISPIXELFORMAT_ALPHA*(format: uint32): bool =
+  (not SDL_ISPIXELFORMAT_FOURCC(format) and
+      ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) or
+      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) or
+      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) or
+      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))
+
+# The flag is set to 1 because 0x1? is not in the printable ASCII range
+template SDL_ISPIXELFORMAT_FOURCC*(format: uint32): bool =
+  ((format != 0) and (SDL_PIXELFLAG(format) != 1))
+
+# Note: If you modify this list, update SDL_GetPixelFormatName()
+const
+  SDL_PIXELFORMAT_UNKNOWN* = 0
+  SDL_PIXELFORMAT_INDEX1LSB* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1,
+      SDL_BITMAPORDER_4321, 0, 1, 0)
+  SDL_PIXELFORMAT_INDEX1MSB* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1,
+      SDL_BITMAPORDER_1234, 0, 1, 0)
+  SDL_PIXELFORMAT_INDEX4LSB* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4,
+      SDL_BITMAPORDER_4321, 0, 4, 0)
+  SDL_PIXELFORMAT_INDEX4MSB* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4,
+      SDL_BITMAPORDER_1234, 0, 4, 0)
+  SDL_PIXELFORMAT_INDEX8* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0,
+      8, 1)
+  SDL_PIXELFORMAT_RGB332* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8,
+      SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_332, 8, 1)
+  SDL_PIXELFORMAT_RGB444* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_4444, 12, 2)
+  SDL_PIXELFORMAT_RGB555* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_1555, 15, 2)
+  SDL_PIXELFORMAT_BGR555* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_1555, 15, 2)
+  SDL_PIXELFORMAT_ARGB4444* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_4444, 16, 2)
+  SDL_PIXELFORMAT_RGBA4444* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_4444, 16, 2)
+  SDL_PIXELFORMAT_ABGR4444* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_4444, 16, 2)
+  SDL_PIXELFORMAT_BGRA4444* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_4444, 16, 2)
+  SDL_PIXELFORMAT_ARGB1555* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_1555, 16, 2)
+  SDL_PIXELFORMAT_RGBA5551* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_5551, 16, 2)
+  SDL_PIXELFORMAT_ABGR1555* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_1555, 16, 2)
+  SDL_PIXELFORMAT_BGRA5551* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_5551, 16, 2)
+  SDL_PIXELFORMAT_RGB565* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_565, 16, 2)
+  SDL_PIXELFORMAT_BGR565* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16,
+      SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_565, 16, 2)
+  SDL_PIXELFORMAT_RGB24* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8,
+      SDL_ARRAYORDER_RGB, 0, 24, 3)
+  SDL_PIXELFORMAT_BGR24* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8,
+      SDL_ARRAYORDER_BGR, 0, 24, 3)
+  SDL_PIXELFORMAT_RGB888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_8888, 24, 4)
+  SDL_PIXELFORMAT_RGBX8888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_RGBX, SDL_PACKEDLAYOUT_8888, 24, 4)
+  SDL_PIXELFORMAT_BGR888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_8888, 24, 4)
+  SDL_PIXELFORMAT_BGRX8888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_BGRX, SDL_PACKEDLAYOUT_8888, 24, 4)
+  SDL_PIXELFORMAT_ARGB8888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_8888, 32, 4)
+  SDL_PIXELFORMAT_RGBA8888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_8888, 32, 4)
+  SDL_PIXELFORMAT_ABGR8888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_8888, 32, 4)
+  SDL_PIXELFORMAT_BGRA8888* = SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32,
+      SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_8888, 32, 4)
+  SDL_PIXELFORMAT_ARGB2101010* = SDL_DEFINE_PIXELFORMAT(
+      SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_2101010,
+      32, 4)
+  SDL_PIXELFORMAT_YV12* = SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2') #*< Planar mode: Y + V + U  (3 planes)
+  SDL_PIXELFORMAT_IYUV* = SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V') #*< Planar mode: Y + U + V  (3 planes)
+  SDL_PIXELFORMAT_YUY2* = SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2') #*< Packed mode: Y0+U0+Y1+V0 (1 plane)
+  SDL_PIXELFORMAT_UYVY* = SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y') #*< Packed mode: U0+Y0+V0+Y1 (1 plane)
+  SDL_PIXELFORMAT_YVYU* = SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U') #*< Packed mode: Y0+V0+Y1+U0 (1 plane)
+
+
+type
+  Color* {.pure, final.} = tuple[
+    r: uint8,
+    g: uint8,
+    b: uint8,
+    a: uint8]
+
+  Palette* {.pure, final.} = object
+    ncolors*: cint
+    colors*: ptr Color
+    version*: uint32
+    refcount*: cint
+
+  PixelFormat* {.pure, final.} = object
+    format*: uint32
+    palette*: ptr Palette
+    BitsPerPixel*: uint8
+    BytesPerPixel*: uint8
+    padding*: array[0..2 - 1, uint8]
+    Rmask*: uint32
+    Gmask*: uint32
+    Bmask*: uint32
+    Amask*: uint32
+    Rloss*: uint8
+    Gloss*: uint8
+    Bloss*: uint8
+    Aloss*: uint8
+    Rshift*: uint8
+    Gshift*: uint8
+    Bshift*: uint8
+    Ashift*: uint8
+    refcount*: cint
+    next*: ptr PixelFormat
+
+  BlitMapPtr* {.pure.} = ptr object ##couldnt find SDL_BlitMap ?
+
+  SurfacePtr* = ptr Surface
+  Surface* {.pure, final.} = object
+    flags*: uint32          #*< Read-only
+    format*: ptr PixelFormat #*< Read-only
+    w*, h*, pitch*: int32   #*< Read-only
+    pixels*: pointer        #*< Read-write
+    userdata*: pointer      #*< Read-write
+    locked*: int32          #*< Read-only   ## see if this should be Bool32
+    lock_data*: pointer     #*< Read-only
+    clip_rect*: Rect       #*< Read-only
+    map: BlitMapPtr           #*< Private
+    refcount*: cint         #*< Read-mostly
+
+  BlendMode* {.size: sizeof(cint).} = enum
+      BlendMode_None = 0x00000000, #*< No blending
+      BlendMode_Blend = 0x00000001, #*< dst = (src * A) + (dst * (1-A))
+      BlendMode_Add  = 0x00000002, #*< dst = (src * A) + dst
+      BlendMode_Mod  = 0x00000004 #*< dst = src * dst
+  BlitFunction* = proc(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+    dstrect: ptr Rect): cint{.cdecl.}
+
+  TimerCallback* = proc (interval: uint32; param: pointer): uint32{.cdecl.}
+  TimerID* = cint
+
+const ##RendererFlags
+  Renderer_Software*: cint = 0x00000001
+  Renderer_Accelerated*: cint = 0x00000002
+  Renderer_PresentVsync*: cint = 0x00000004
+  Renderer_TargetTexture*: cint = 0x00000008
+
+const  ## These are the currently supported flags for the ::SDL_surface.
+  SDL_SWSURFACE* = 0        #*< Just here for compatibility
+  SDL_PREALLOC* = 0x00000001 #*< Surface uses preallocated memory
+  SDL_RLEACCEL* = 0x00000002 #*< Surface is RLE encoded
+  SDL_DONTFREE* = 0x00000004 #*< Surface is referenced internally
+
+template SDL_MUSTLOCK*(some: SurfacePtr): bool = (some.flags and SDL_RLEACCEL) != 0
+
+
+
+const
+  INIT_TIMER*       = 0x00000001
+  INIT_AUDIO*       = 0x00000010
+  INIT_VIDEO*       = 0x00000020
+  INIT_JOYSTICK*    = 0x00000200
+  INIT_HAPTIC*      = 0x00001000
+  INIT_GAMECONTROLLER* = 0x00002000
+  INIT_EVENTS*      = 0x00004000
+  INIT_NOPARACHUTE* = 0x00100000
+  INIT_EVERYTHING*  = 0x0000FFFF
+
+const SDL_WINDOWPOS_UNDEFINED_MASK* = 0x1FFF0000
+template SDL_WINDOWPOS_UNDEFINED_DISPLAY*(X: cint): untyped = cint(SDL_WINDOWPOS_UNDEFINED_MASK or X)
+const SDL_WINDOWPOS_UNDEFINED*: cint = SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
+template SDL_WINDOWPOS_ISUNDEFINED*(X: cint): bool = (((X) and 0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
+
+const SDL_WINDOWPOS_CENTERED_MASK* = 0x2FFF0000
+template SDL_WINDOWPOS_CENTERED_DISPLAY*(X: cint): cint = cint(SDL_WINDOWPOS_CENTERED_MASK or X)
+const SDL_WINDOWPOS_CENTERED*: cint = SDL_WINDOWPOS_CENTERED_DISPLAY(0)
+template SDL_WINDOWPOS_ISCENTERED*(X: cint): bool = (((X) and 0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
+
+template evConv(name, name2, ptype: untyped; valid: openarray[EventType]): untyped =
+  proc `name`* (event: Event): ptype =
+    assert event.kind in valid
+    return cast[ptype](unsafeAddr event)
+  proc `name2`* (event: Event): ptype =
+    assert event.kind in valid
+    return cast[ptype](unsafeAddr event)
+
+evConv(evWindow, window, WindowEventPtr, [WindowEvent])
+evConv(evKeyboard, key, KeyboardEventPtr, [KeyDown, KeyUP])
+evConv(evTextEditing, edit, TextEditingEventPtr, [TextEditing])
+evConv(evTextInput, text, TextInputEventPtr, [TextInput])
+
+evConv(evMouseMotion, motion, MouseMotionEventPtr, [MouseMotion])
+evConv(evMouseButton, button, MouseButtonEventPtr, [MouseButtonDown, MouseButtonUp])
+evConv(evMouseWheel, wheel, MouseWheelEventPtr, [MouseWheel])
+
+evConv(EvJoyAxis, jaxis, JoyAxisEventPtr, [JoyAxisMotion])
+evConv(EvJoyBall, jball, JoyBallEventPtr, [JoyBallMotion])
+evConv(EvJoyHat, jhat, JoyHatEventPtr, [JoyHatMotion])
+evConv(EvJoyButton, jbutton, JoyButtonEventPtr, [JoyButtonDown, JoyButtonUp])
+evConv(EvJoyDevice, jdevice, JoyDeviceEventPtr, [JoyDeviceAdded, JoyDeviceRemoved])
+
+evConv(EvControllerAxis, caxis, ControllerAxisEventPtr, [ControllerAxisMotion])
+evConv(EvControllerButton, cbutton, ControllerButtonEventPtr, [ControllerButtonDown, ControllerButtonUp])
+evConv(EvControllerDevice, cdevice, ControllerDeviceEventPtr, [ControllerDeviceAdded, ControllerDeviceRemoved])
+
+evConv(EvTouchFinger, tfinger, TouchFingerEventPtr, [FingerMotion, FingerDown, FingerUp])
+evConv(EvMultiGesture, mgesture, MultiGestureEventPtr, [MultiGesture])
+evConv(EvDollarGesture, dgesture, DollarGestureEventPtr, [DollarGesture])
+
+evConv(evDropFile, drop, DropEventPtr, [DropFile])
+evConv(evQuit, quit, QuitEventPtr, [QuitEvent])
+
+evConv(evUser, user, UserEventPtr, [UserEvent, UserEvent1, UserEvent2, UserEvent3, UserEvent4, UserEvent5])
+#evConv(EvSysWM, syswm, SysWMEventPtr, {SysWMEvent})
+
+const ## SDL_MessageBox flags. If supported will display warning icon, etc.
+  SDL_MESSAGEBOX_ERROR* = 0x00000010 #*< error dialog
+  SDL_MESSAGEBOX_WARNING* = 0x00000020 #*< warning dialog
+  SDL_MESSAGEBOX_INFORMATION* = 0x00000040 #*< informational dialog
+
+  ## Flags for SDL_MessageBoxButtonData.
+  SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT* = 0x00000001 #*< Marks the default button when return is hit
+  SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT* = 0x00000002 #*< Marks the default button when escape is hit
+
+type
+  MessageBoxColor* {.pure, final.} = object
+    r*: uint8
+    g*: uint8
+    b*: uint8
+
+  MessageBoxColorType* = enum
+    SDL_MESSAGEBOX_COLOR_BACKGROUND, SDL_MESSAGEBOX_COLOR_TEXT,
+    SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
+    SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
+    SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, SDL_MESSAGEBOX_COLOR_MAX
+  MessageBoxColorScheme* {.pure, final.} = object
+    colors*: array[MessageBoxColorType, MessageBoxColor]
+
+
+  MessageBoxButtonData* {.pure, final.} = object
+    flags*: cint         #*< ::SDL_MessageBoxButtonFlags
+    buttonid*: cint         #*< User defined button id (value returned via SDL_MessageBox)
+    text*: cstring          #*< The UTF-8 button text
+
+  MessageBoxData* {.pure, final.} = object
+    flags*: cint          #*< ::SDL_MessageBoxFlags
+    window*: WindowPtr #*< Parent window, can be NULL
+    title*, message*: cstring         #*< UTF-8 title and message text
+    numbuttons*: cint
+    buttons*: ptr MessageBoxButtonData
+    colorScheme*: ptr MessageBoxColorScheme #*< ::SDL_MessageBoxColorScheme, can be NULL to use system settings
+
+  RWopsPtr* = ptr RWops
+  RWops* {.pure, final.} = object
+    size*: proc (context: RWopsPtr): int64 {.cdecl, tags: [], raises: [].}
+    seek*: proc (context: RWopsPtr; offset: int64; whence: cint): int64 {.cdecl, tags: [], raises: [].}
+    read*: proc (context: RWopsPtr; destination: pointer; size, maxnum: csize_t): csize_t {.cdecl, tags: [ReadIOEffect], raises: [].}
+    write*: proc (context: RWopsPtr; source: pointer; size: csize_t;
+                  num: csize_t): csize_t {.cdecl, tags: [WriteIOEffect], raises: [].}
+    close*: proc (context: RWopsPtr): cint {.cdecl, tags: [WriteIOEffect].}
+    kind*: cint
+    mem*: Mem
+  Mem*{.final.} = object
+    base*: ptr byte
+    here*: ptr byte
+    stop*: ptr byte
+
+# SDL_system.h
+type VoidCallback* = proc(arg:pointer):void{.cdecl.}
+const SDL_ANDROID_EXTERNAL_STORAGE_READ*  = cint(0x01)
+const SDL_ANDROID_EXTERNAL_STORAGE_WRITE* = cint(0x02)
+
+when not defined(SDL_Static):
+  {.push callConv: cdecl, dynlib: LibName.}
+
+
+## functions whose names have been shortened by elision of a type name
+proc getWMInfo*(window: WindowPtr; info: var WMInfo): Bool32 {.
+  importc: "SDL_GetWindowWMInfo".}
+
+proc setLogicalSize*(renderer: RendererPtr; w, h: cint): cint {.
+  importc: "SDL_RenderSetLogicalSize".}
+
+proc getLogicalSize*(renderer: RendererPtr; w, h: var cint) {.
+  importc: "SDL_RenderGetLogicalSize".}
+
+
+proc setDrawColor*(renderer: RendererPtr; r, g, b: uint8, a = 255'u8): SDL_Return {.
+  importc: "SDL_SetRenderDrawColor", discardable.}
+
+proc setDrawColor*(renderer: RendererPtr; c: Color) =
+  setDrawColor(renderer, c.r, c.g, c.b, c.a)
+
+proc getDrawColor*(renderer: RendererPtr; r, g, b, a: var uint8): SDL_Return {.
+  importc: "SDL_GetRenderDrawColor", discardable.}
+proc setDrawBlendMode*(renderer: RendererPtr; blendMode: BlendMode): SDL_Return {.
+  importc: "SDL_SetRenderDrawBlendMode", discardable.}
+proc getDrawBlendMode*(renderer: RendererPtr;
+  blendMode: var BlendMode): SDL_Return {.
+  importc: "SDL_GetRenderDrawBlendMode", discardable.}
+
+
+proc destroy*(texture: TexturePtr) {.importc: "SDL_DestroyTexture".}
+proc destroy*(renderer: RendererPtr) {.importc: "SDL_DestroyRenderer".}
+#proc destroy* (texture: TexturePtr) {.inline.} = texture.destroyTexture
+#proc destroy* (renderer: RendererPtr) {.inline.} = renderer.destroyRenderer
+
+proc getDisplayIndex*(window: WindowPtr): cint {.importc: "SDL_GetWindowDisplayIndex".}
+#*
+proc setDisplayMode*(window: WindowPtr;
+  mode: ptr DisplayMode): SDL_Return {.importc: "SDL_SetWindowDisplayMode".}
+#*
+proc getDisplayMode*(window: WindowPtr; mode: var DisplayMode): cint  {.
+  importc: "SDL_GetWindowDisplayMode".}
+#*
+proc getPixelFormat*(window: WindowPtr): uint32 {.importc: "SDL_GetWindowPixelFormat".}
+
+#*
+#   \brief Get the numeric ID of a window, for logging purposes.
+#
+proc getID*(window: WindowPtr): uint32 {.importc: "SDL_GetWindowID".}
+
+#*
+#   \brief Get the window flags.
+#
+proc getFlags*(window: WindowPtr): uint32 {.importc: "SDL_GetWindowFlags".}
+#*
+#   \brief Set the title of a window, in UTF-8 format.
+#
+#   \sa SDL_GetWindowTitle()
+#
+proc setTitle*(window: WindowPtr; title: cstring) {.importc: "SDL_SetWindowTitle".}
+#*
+#   \brief Get the title of a window, in UTF-8 format.
+#
+#   \sa SDL_SetWindowTitle()
+#
+proc getTitle*(window: WindowPtr): cstring {.importc: "SDL_GetWindowTitle".}
+#*
+#   \brief Set the icon for a window.
+#
+#   \param icon The icon for the window.
+#
+proc setIcon*(window: WindowPtr; icon: SurfacePtr) {.importc: "SDL_SetWindowIcon".}
+#*
+proc setData*(window: WindowPtr; name: cstring;
+  userdata: pointer): pointer {.importc: "SDL_SetWindowData".}
+#*
+proc getData*(window: WindowPtr; name: cstring): pointer {.importc: "SDL_GetWindowData".}
+#*
+proc setPosition*(window: WindowPtr; x, y: cint) {.importc: "SDL_SetWindowPosition".}
+proc getPosition*(window: WindowPtr; x, y: var cint)  {.importc: "SDL_GetWindowPosition".}
+#*
+proc setSize*(window: WindowPtr; w, h: cint)  {.importc: "SDL_SetWindowSize".}
+proc getSize*(window: WindowPtr; w, h: var cint) {.importc: "SDL_GetWindowSize".}
+
+proc setBordered*(window: WindowPtr; bordered: Bool32) {.importc: "SDL_SetWindowBordered".}
+
+
+proc setFullscreen*(window: WindowPtr; fullscreen: uint32): SDL_Return {.importc: "SDL_SetWindowFullscreen".}
+proc getSurface*(window: WindowPtr): SurfacePtr {.importc: "SDL_GetWindowSurface".}
+
+proc updateSurface*(window: WindowPtr): SDL_Return  {.importc: "SDL_UpdateWindowSurface".}
+proc updateSurfaceRects*(window: WindowPtr; rects: ptr Rect;
+  numrects: cint): SDL_Return  {.importc: "SDL_UpdateWindowSurfaceRects".}
+#*
+proc setGrab*(window: WindowPtr; grabbed: Bool32) {.importc: "SDL_SetWindowGrab".}
+proc getGrab*(window: WindowPtr): Bool32 {.importc: "SDL_GetWindowGrab".}
+proc setBrightness*(window: WindowPtr; brightness: cfloat): SDL_Return {.importc: "SDL_SetWindowBrightness".}
+
+proc getBrightness*(window: WindowPtr): cfloat {.importc: "SDL_GetWindowBrightness".}
+
+proc setGammaRamp*(window: WindowPtr;
+  red, green, blue: ptr uint16): SDL_Return {.importc: "SDL_SetWindowGammaRamp".}
+#*
+#   \brief Get the gamma ramp for a window.
+#
+#   \param red   A pointer to a 256 element array of 16-bit quantities to hold
+#                the translation table for the red channel, or NULL.
+#   \param green A pointer to a 256 element array of 16-bit quantities to hold
+#                the translation table for the green channel, or NULL.
+#   \param blue  A pointer to a 256 element array of 16-bit quantities to hold
+#                the translation table for the blue channel, or NULL.
+#
+#   \return 0 on success, or -1 if gamma ramps are unsupported.
+#
+#   \sa SDL_SetWindowGammaRamp()
+#
+proc getGammaRamp*(window: WindowPtr; red: ptr uint16;
+                  green: ptr uint16; blue: ptr uint16): cint {.importc: "SDL_GetWindowGammaRamp".}
+
+
+proc init*(flags: cint): SDL_Return {.discardable,
+  importc: "SDL_Init".}
+#
+#   This function initializes specific SDL subsystems
+#
+proc initSubSystem*(flags: uint32):cint {.
+  importc: "SDL_InitSubSystem".}
+
+#
+#   This function cleans up specific SDL subsystems
+#
+proc quitSubSystem*(flags: uint32) {.
+  importc: "SDL_QuitSubSystem".}
+
+#
+#   This function returns a mask of the specified subsystems which have
+#   previously been initialized.
+#
+#   If \c flags is 0, it returns a mask of all initialized subsystems.
+#
+proc wasInit*(flags: uint32): uint32 {.
+  importc: "SDL_WasInit".}
+
+proc quit*() {.
+  importc: "SDL_Quit".}
+
+proc getPlatform*(): cstring {.
+  importc: "SDL_GetPlatform".}
+
+proc getVersion*(ver: var SDL_Version) {.
+  importc: "SDL_GetVersion".}
+proc getRevision*(): cstring {.
+  importc: "SDL_GetRevision".}
+proc getRevisionNumber*(): cint {.
+  importc: "SDL_GetRevisionNumber".}
+proc getBasePath*(): cstring {.
+  importc: "SDL_GetBasePath".}
+proc getPrefPath*(org, app: cstring): cstring {.
+  importc: "SDL_GetPrefPath".}
+
+
+proc getNumRenderDrivers*(): cint {.
+  importc: "SDL_GetNumRenderDriver".}
+proc getRenderDriverInfo*(index: cint; info: var RendererInfo): SDL_Return {.
+  importc: "SDL_GetRenderDriverInfo".}
+proc createWindowAndRenderer*(width, height: cint; window_flags: uint32;
+  window: var WindowPtr; renderer: var RendererPtr): SDL_Return {.
+  importc: "SDL_CreateWindowAndRenderer".}
+
+proc createRenderer*(window: WindowPtr; index: cint; flags: cint): RendererPtr {.
+  importc: "SDL_CreateRenderer".}
+proc createSoftwareRenderer*(surface: SurfacePtr): RendererPtr {.
+  importc: "SDL_CreateSoftwareRenderer".}
+proc getRenderer*(window: WindowPtr): RendererPtr {.
+  importc: "SDL_GetRenderer".}
+proc getRendererInfo*(renderer: RendererPtr; info: RendererInfoPtr): cint {.
+  importc: "SDL_GetRendererInfo".}
+proc getRendererOutputSize*(renderer: RendererPtr, w: ptr cint, h: ptr cint): cint {.
+  importc: "SDL_GetRendererOutputSize".}
+
+proc createTexture*(renderer: RendererPtr; format: uint32;
+  access, w, h: cint): TexturePtr {.
+  importc: "SDL_CreateTexture".}
+
+proc createTextureFromSurface*(renderer: RendererPtr; surface: SurfacePtr): TexturePtr {.
+  importc: "SDL_CreateTextureFromSurface".}
+proc createTexture*(renderer: RendererPtr; surface: SurfacePtr): TexturePtr {.
+  inline.} = renderer.createTextureFromSurface(surface)
+
+proc queryTexture*(texture: TexturePtr; format: ptr uint32;
+  access, w, h: ptr cint): SDL_Return {.discardable,
+  importc: "SDL_QueryTexture".}
+
+proc setTextureColorMod*(texture: TexturePtr; r, g, b: uint8): SDL_Return {.
+  importc: "SDL_SetTextureColorMod".}
+
+proc getTextureColorMod*(texture: TexturePtr; r, g, b: var uint8): SDL_Return {.
+  importc: "SDL_GetTextureColorMod".}
+
+proc setTextureAlphaMod*(texture: TexturePtr; alpha: uint8): SDL_Return {.
+  importc: "SDL_SetTextureAlphaMod", discardable.}
+
+proc getTextureAlphaMod*(texture: TexturePtr; alpha: var uint8): SDL_Return {.
+  importc: "SDL_GetTextureAlphaMod", discardable.}
+
+proc setTextureBlendMode*(texture: TexturePtr; blendMode: BlendMode): SDL_Return {.
+  importc: "SDL_SetTextureBlendMode", discardable.}
+
+proc getTextureBlendMode*(texture: TexturePtr;
+  blendMode: var BlendMode): SDL_Return {.importc: "SDL_GetTextureBlendMode", discardable.}
+
+proc updateTexture*(texture: TexturePtr; rect: ptr Rect; pixels: pointer;
+  pitch: cint): SDL_Return {.importc: "SDL_UpdateTexture", discardable.}
+
+proc lockTexture*(texture: TexturePtr; rect: ptr Rect; pixels: ptr pointer;
+  pitch: ptr cint): SDL_Return {.importc: "SDL_LockTexture", discardable.}
+
+proc unlockTexture*(texture: TexturePtr) {.importc: "SDL_UnlockTexture".}
+
+proc renderTargetSupported*(renderer: RendererPtr): Bool32 {.
+  importc: "SDL_RenderTargetSupported".}
+
+proc setRenderTarget*(renderer: RendererPtr; texture: TexturePtr): SDL_Return {.discardable,
+  importc: "SDL_SetRenderTarget".}
+#*
+#
+proc getRenderTarget*(renderer: RendererPtr): TexturePtr {.
+  importc: "SDL_GetRenderTarget".}
+
+
+
+
+#*
+#   \brief Set the drawing area for rendering on the current target.
+#
+#   \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.
+#
+#   The x,y of the viewport rect represents the origin for rendering.
+#
+#   \note When the window is resized, the current viewport is automatically
+#         centered within the new window size.
+#
+#   \sa SDL_RenderGetViewport()
+#   \sa SDL_RenderSetLogicalSize()
+#
+proc setViewport*(renderer: RendererPtr; rect: ptr Rect): SDL_Return {.
+  importc: "SDL_RenderSetViewport", discardable.}
+proc getViewport*(renderer: RendererPtr; rect: var Rect) {.
+  importc: "SDL_RenderGetViewport".}
+
+proc setScale*(renderer: RendererPtr; scaleX, scaleY: cfloat): SDL_Return {.
+  importc: "SDL_RenderSetScale", discardable.}
+proc getScale*(renderer: RendererPtr; scaleX, scaleY: var cfloat) {.
+  importc: "SDL_RenderGetScale".}
+proc drawPoint*(renderer: RendererPtr; x, y: cint): SDL_Return {.
+  importc: "SDL_RenderDrawPoint", discardable.}
+#*
+proc drawPoints*(renderer: RendererPtr; points: ptr Point;
+  count: cint): SDL_Return {.importc: "SDL_RenderDrawPoints", discardable.}
+
+proc drawLine*(renderer: RendererPtr;
+  x1, y1, x2, y2: cint): SDL_Return {.
+  importc: "SDL_RenderDrawLine", discardable.}
+#*
+proc drawLines*(renderer: RendererPtr; points: ptr Point;
+  count: cint): SDL_Return {.importc: "SDL_RenderDrawLines", discardable.}
+
+proc drawRect*(renderer: RendererPtr; rect: var Rect): SDL_Return{.
+  importc: "SDL_RenderDrawRect", discardable.}
+proc drawRect*(renderer: RendererPtr; rect: ptr Rect = nil): SDL_Return{.
+  importc: "SDL_RenderDrawRect", discardable.}
+
+proc drawRects*(renderer: RendererPtr; rects: ptr Rect;
+  count: cint): SDL_Return {.importc: "SDL_RenderDrawRects".}
+proc fillRect*(renderer: RendererPtr; rect: var Rect): SDL_Return {.
+  importc: "SDL_RenderFillRect", discardable.}
+proc fillRect*(renderer: RendererPtr; rect: ptr Rect = nil): SDL_Return {.
+  importc: "SDL_RenderFillRect", discardable.}
+#*
+proc fillRects*(renderer: RendererPtr; rects: ptr Rect;
+  count: cint): SDL_Return {.importc: "SDL_RenderFillRects", discardable.}
+
+proc copy*(renderer: RendererPtr; texture: TexturePtr;
+                     srcrect, dstrect: ptr Rect): SDL_Return {.
+  importc: "SDL_RenderCopy", discardable.}
+
+proc copyEx*(renderer: RendererPtr; texture: TexturePtr;
+             srcrect, dstrect: var Rect; angle: cdouble; center: ptr Point;
+             flip: RendererFlip = SDL_FLIP_NONE): SDL_Return {.
+             importc: "SDL_RenderCopyEx", discardable.}
+proc copyEx*(renderer: RendererPtr; texture: TexturePtr;
+             srcrect, dstrect: ptr Rect; angle: cdouble; center: ptr Point;
+             flip: RendererFlip = SDL_FLIP_NONE): SDL_Return {.
+             importc: "SDL_RenderCopyEx", discardable.}
+
+proc clear*(renderer: RendererPtr): cint {.
+  importc: "SDL_RenderClear", discardable.}
+
+proc readPixels*(renderer: RendererPtr; rect: var Rect; format: cint;
+  pixels: pointer; pitch: cint): cint {.importc: "SDL_RenderReadPixels".}
+proc readPixels*(renderer: RendererPtr; rect: ptr Rect; format: cint;
+  pixels: pointer; pitch: cint): cint {.importc: "SDL_RenderReadPixels".}
+proc present*(renderer: RendererPtr) {.importc: "SDL_RenderPresent".}
+
+
+
+proc glBindTexture*(texture: TexturePtr; texw, texh: var cfloat): cint {.
+  importc: "SDL_GL_BindTexture".}
+proc glUnbindTexture*(texture: TexturePtr) {.
+  importc: "SDL_GL_UnbindTexture".}
+
+proc createRGBSurface*(flags: cint; width, height, depth: cint;
+  Rmask, Gmask, BMask, Amask: uint32): SurfacePtr {.
+  importc: "SDL_CreateRGBSurface".}
+proc createRGBSurfaceFrom*(pixels: pointer; width, height, depth, pitch: cint;
+  Rmask, Gmask, Bmask, Amask: uint32): SurfacePtr {.
+  importc: "SDL_CreateRGBSurfaceFrom".}
+
+proc freeSurface*(surface: SurfacePtr) {.
+  importc: "SDL_FreeSurface".}
+
+proc setSurfacePalette*(surface: SurfacePtr; palette: ptr Palette): cint {.
+  importc:"SDL_SetSurfacePalette".}
+#*
+#   \brief Sets up a surface for directly accessing the pixels.
+#
+#   Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write
+#   to and read from \c surface->pixels, using the pixel format stored in
+#   \c surface->format.  Once you are done accessing the surface, you should
+#   use SDL_UnlockSurface() to release it.
+#
+#   Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
+#   to 0, then you can read and write to the surface at any time, and the
+#   pixel format of the surface will not change.
+#
+#   No operating system or library calls should be made between lock/unlock
+#   pairs, as critical system locks may be held during this time.
+#
+#   SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
+#
+#   \sa SDL_UnlockSurface()
+#
+proc lockSurface*(surface: SurfacePtr): cint {.importc: "SDL_LockSurface".}
+#* \sa SDL_LockSurface()
+proc unlockSurface*(surface: SurfacePtr) {.importc: "SDL_UnlockSurface".}
+#*
+#   Load a surface from a seekable SDL data stream (memory or file).
+#
+#   If \c freesrc is non-zero, the stream will be closed after being read.
+#
+#   The new surface should be freed with SDL_FreeSurface().
+#
+#   \return the new surface, or NULL if there was an error.
+#
+proc loadBMP_RW*(src: RWopsPtr; freesrc: cint): SurfacePtr {.
+  importc: "SDL_LoadBMP_RW".}
+
+
+
+proc rwFromFile*(file: cstring; mode: cstring): RWopsPtr {.importc: "SDL_RWFromFile".}
+proc rwFromFP*(fp: File; autoclose: Bool32): RWopsPtr {.importc: "SDL_RWFromFP".}
+proc rwFromMem*(mem: pointer; size: cint): RWopsPtr {.importc: "SDL_RWFromMem".}
+proc rwFromConstMem*(mem: pointer; size: cint): RWopsPtr {.importc: "SDL_RWFromConstMem".}
+
+proc allocRW* : RWopsPtr {.importc: "SDL_AllocRW".}
+proc freeRW* (area: RWopsPtr) {.importc: "SDL_FreeRW".}
+
+
+#*
+#   Load a surface from a file.
+#
+#   Convenience macro.
+#
+#*
+proc saveBMP_RW*(surface: SurfacePtr; dst: RWopsPtr;
+                 freedst: cint): SDL_Return {.importc: "SDL_SaveBMP_RW".}
+
+proc setSurfaceRLE*(surface: SurfacePtr; flag: cint): cint {.
+  importc:"SDL_SetSurfaceRLE".}
+proc setColorKey*(surface: SurfacePtr; flag: cint; key: uint32): cint {.
+  importc: "SDL_SetColorKey".}
+
+proc getColorKey*(surface: SurfacePtr; key: var uint32): cint {.
+  importc: "SDL_GetColorKey".}
+proc setSurfaceColorMod*(surface: SurfacePtr; r, g, b: uint8): cint {.
+  importc: "SDL_SetSurfaceColorMod".}
+
+proc getSurfaceColorMod*(surface: SurfacePtr; r, g, b: var uint8): cint {.
+  importc: "SDL_GetSurfaceColorMod".}
+
+proc setSurfaceAlphaMod*(surface: SurfacePtr; alpha: uint8): cint {.
+  importc: "SDL_SetSurfaceAlphaMod".}
+proc getSurfaceAlphaMod*(surface: SurfacePtr; alpha: var uint8): cint {.
+  importc: "SDL_GetSurfaceAlphaMod".}
+
+proc setSurfaceBlendMode*(surface: SurfacePtr; blendMode: BlendMode): cint {.
+  importc: "SDL_SetSurfaceBlendMode".}
+proc getSurfaceBlendMode*(surface: SurfacePtr; blendMode: ptr BlendMode): cint {.
+  importc: "SDL_GetSurfaceBlendMode".}
+
+proc setClipRect*(surface: SurfacePtr; rect: ptr Rect): Bool32 {.
+  importc: "SDL_SetClipRect".}
+proc getClipRect*(surface: SurfacePtr; rect: ptr Rect) {.
+  importc: "SDL_GetClipRect".}
+
+proc setClipRect*(renderer: RendererPtr; rect: ptr Rect): cint {.
+  importc: "SDL_RenderSetClipRect".}
+proc getClipRect*(renderer: RendererPtr; rect: ptr Rect): cint {.
+  importc: "SDL_RenderGetClipRect".}
+proc isClipEnabled*(renderer: RendererPtr): cint {.
+  importc: "SDL_RenderIsClipEnabled".}
+
+proc convertSurface*(src: SurfacePtr; fmt: ptr PixelFormat;
+  flags: cint): SurfacePtr {.importc: "SDL_ConvertSurface".}
+proc convertSurfaceFormat*(src: SurfacePtr; pixel_format,
+  flags: uint32): SurfacePtr {.importc: "SDL_ConvertSurfaceFormat".}
+
+proc convertPixels*(width, height: cint; src_format: uint32; src: pointer;
+  src_pitch: cint; dst_format: uint32; dst: pointer; dst_pitch: cint): cint {.
+  importc: "SDL_ConvertPixels".}
+#*
+#   Performs a fast fill of the given rectangle with \c color.
+#
+#   If \c rect is NULL, the whole surface will be filled with \c color.
+#
+#   The color should be a pixel of the format used by the surface, and
+#   can be generated by the SDL_MapRGB() function.
+#
+#   \return 0 on success, or -1 on error.
+#
+proc fillRect*(dst: SurfacePtr; rect: ptr Rect; color: uint32): SDL_Return {.
+  importc: "SDL_FillRect", discardable.}
+proc fillRects*(dst: SurfacePtr; rects: ptr Rect; count: cint;
+                    color: uint32): cint {.importc: "SDL_FillRects".}
+
+proc upperBlit*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.importc: "SDL_UpperBlit".}
+
+proc lowerBlit*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.importc: "SDL_LowerBlit".}
+
+proc softStretch*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.importc: "SDL_SoftStretch".}
+
+
+proc upperBlitScaled*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.importc: "SDL_UpperBlitScaled".}
+proc lowerBlitScaled*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.importc: "SDL_LowerBlitScaled".}
+
+
+
+proc readU8*(src: RWopsPtr): uint8 {.importc: "SDL_ReadU8".}
+proc readLE16*(src: RWopsPtr): uint16 {.importc: "SDL_ReadLE16".}
+proc readBE16*(src: RWopsPtr): uint16 {.importc: "SDL_ReadBE16".}
+proc readLE32*(src: RWopsPtr): uint32 {.importc: "SDL_ReadLE32".}
+proc readBE32*(src: RWopsPtr): uint32 {.importc: "SDL_ReadBE32".}
+proc readLE64*(src: RWopsPtr): uint64 {.importc: "SDL_ReadLE64".}
+proc readBE64*(src: RWopsPtr): uint64 {.importc: "SDL_ReadBE64".}
+proc writeU8*(dst: RWopsPtr; value: uint8): csize_t {.importc: "SDL_WriteU8".}
+proc writeLE16*(dst: RWopsPtr; value: uint16): csize_t {.importc: "SDL_WriteLE16".}
+proc writeBE16*(dst: RWopsPtr; value: uint16): csize_t {.importc: "SDL_WriteBE16".}
+proc writeLE32*(dst: RWopsPtr; value: uint32): csize_t {.importc: "SDL_WriteLE32".}
+proc writeBE32*(dst: RWopsPtr; value: uint32): csize_t {.importc: "SDL_WriteBE32".}
+proc writeLE64*(dst: RWopsPtr; value: uint64): csize_t {.importc: "SDL_WriteLE64".}
+proc writeBE64*(dst: RWopsPtr; value: uint64): csize_t {.importc: "SDL_WriteBE64".}
+
+proc showMessageBox*(messageboxdata: ptr MessageBoxData;
+  buttonid: var cint): cint {.importc: "SDL_ShowMessageBox".}
+
+proc showSimpleMessageBox*(flags: uint32; title, message: cstring;
+  window: WindowPtr): cint {.importc: "SDL_ShowSimpleMessageBox".}
+  #   \return 0 on success, -1 on error
+
+
+
+
+
+proc getNumVideoDrivers*(): cint {.importc: "SDL_GetNumVideoDrivers".}
+proc getVideoDriver*(index: cint): cstring {.importc: "SDL_GetVideoDriver".}
+proc videoInit*(driver_name: cstring): SDL_Return {.importc: "SDL_VideoInit".}
+proc videoQuit*() {.importc: "SDL_VideoQuit".}
+proc getCurrentVideoDriver*(): cstring {.importc: "SDL_GetCurrentVideoDriver".}
+proc getNumVideoDisplays*(): cint {.importc: "SDL_GetNumVideoDisplays".}
+
+proc getDisplayBounds*(displayIndex: cint; rect: var Rect): SDL_Return {.
+  importc: "SDL_GetDisplayBounds".}
+proc getNumDisplayModes*(displayIndex: cint): cint {.importc: "SDL_GetNumDisplayModes".}
+#*
+proc getDisplayMode*(displayIndex: cint; modeIndex: cint;
+  mode: var DisplayMode): SDL_Return {.importc: "SDL_GetDisplayMode".}
+
+proc getDesktopDisplayMode*(displayIndex: cint;
+  mode: var DisplayMode): SDL_Return {.importc: "SDL_GetDesktopDisplayMode".}
+proc getCurrentDisplayMode*(displayIndex: cint;
+  mode: var DisplayMode): SDL_Return {.importc: "SDL_GetCurrentDisplayMode".}
+
+proc getClosestDisplayMode*(displayIndex: cint; mode: ptr DisplayMode;
+                                closest: ptr DisplayMode): ptr DisplayMode {.importc: "SDL_GetClosestDisplayMode".}
+proc getDisplayDPI*(displayIndex: cint;
+  ddpi, hdpi, vdpi: ptr cfloat): SDL_Return {.importc: "SDL_GetDisplayDPI".}
+#*
+#*
+proc createWindow*(title: cstring; x, y, w, h: cint;
+                   flags: uint32): WindowPtr  {.importc: "SDL_CreateWindow".}
+#*
+proc createWindowFrom*(data: pointer): WindowPtr {.importc: "SDL_CreateWindowFrom".}
+
+#*
+#   \brief Get a window from a stored ID, or NULL if it doesn't exist.
+#
+proc getWindowFromID*(id: uint32): WindowPtr {.importc: "SDL_GetWindowFromID".}
+
+
+
+
+#
+proc showWindow*(window: WindowPtr) {.importc: "SDL_ShowWindow".}
+proc hideWindow*(window: WindowPtr) {.importc: "SDL_HideWindow".}
+#*
+proc raiseWindow*(window: WindowPtr) {.importc: "SDL_RaiseWindow".}
+proc maximizeWindow*(window: WindowPtr) {.importc: "SDL_MaximizeWindow".}
+proc minimizeWindow*(window: WindowPtr) {.importc: "SDL_MinimizeWindow".}
+#*
+#
+proc restoreWindow*(window: WindowPtr) {.importc: "SDL_RestoreWindow".}
+
+proc destroyWindow*(window: WindowPtr) {.importc: "SDL_DestroyWindow".}
+
+proc isScreenSaverEnabled*(): Bool32 {.importc: "SDL_IsScreenSaverEnabled".}
+proc enableScreenSaver*() {.importc: "SDL_EnableScreenSaver".}
+proc disableScreenSaver*() {.importc: "SDL_DisableScreenSaver".}
+
+
+proc getTicks*(): uint32 {.importc: "SDL_GetTicks".}
+proc getPerformanceCounter*(): uint64 {.importc: "SDL_GetPerformanceCounter".}
+proc getPerformanceFrequency*(): uint64 {.importc: "SDL_GetPerformanceFrequency".}
+proc delay*(ms: uint32) {.importc: "SDL_Delay".}
+#*
+#  \brief Add a new timer to the pool of timers already running.
+#
+#  \return A timer ID, or NULL when an error occurs.
+#
+proc addTimer*(interval: uint32; callback: TimerCallback;
+      param: pointer): TimerID {.importc: "SDL_AddTimer".}
+#*
+#  \brief Remove a timer knowing its ID.
+#
+#  \return A boolean value indicating success or failure.
+#
+#  \warning It is not safe to remove a timer multiple times.
+#
+proc removeTimer*(id: TimerID): Bool32 {.importc: "SDL_RemoveTimer".}
+
+
+#*
+#   \name OpenGL support functions
+#
+#@{
+#*
+#   \brief Dynamically load an OpenGL library.
+#
+#   \param path The platform dependent OpenGL library name, or NULL to open the
+#               default OpenGL library.
+#
+#   \return 0 on success, or -1 if the library couldn't be loaded.
+#
+#   This should be done after initializing the video driver, but before
+#   creating any OpenGL windows.  If no OpenGL library is loaded, the default
+#   library will be loaded upon creation of the first OpenGL window.
+#
+#   \note If you do this, you need to retrieve all of the GL functions used in
+#         your program from the dynamic library using SDL_GL_GetProcAddress().
+#
+#   \sa SDL_GL_GetProcAddress()
+#   \sa SDL_GL_UnloadLibrary()
+#
+#extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
+proc glLoadLibrary* (path: cstring): SDL_Return {.discardable,
+  importc: "SDL_GL_LoadLibrary".}
+#extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
+proc glGetProcAddress* (procedure: cstring): pointer {.
+  importc: "SDL_GL_GetProcAddress".}
+#extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
+proc glUnloadLibrary* {.
+  importc: "SDL_GL_UnloadLibrary".}
+#extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
+#                                                          *extension);
+proc glExtensionSupported* (extension: cstring): bool {.
+  importc: "SDL_GL_ExtensionSupported".}
+
+#extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
+proc glSetAttribute* (attr: GLattr; value: cint): cint {.
+  importc: "SDL_GL_SetAttribute".}
+#extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
+proc glGetAttribute* (attr: GLattr; value: var cint): cint {.
+  importc: "SDL_GL_GetAttribute".}
+
+
+proc glCreateContext*(window: WindowPtr): GlContextPtr {.
+  importc: "SDL_GL_CreateContext".}
+  ## Create an OpenGL context for use with an OpenGL window, and make it current.
+proc glMakeCurrent* (window: WindowPtr; context: GlContextPtr): cint {.
+  importc: "SDL_GL_MakeCurrent".}
+
+proc glGetCurrentWindow* : WindowPtr {.
+  importc: "SDL_GL_GetCurrentWindow".}
+proc glGetCurrentContext*: GlContextPtr {.
+  importc: "SDL_GL_GetCurrentContext".}
+
+proc glGetDrawableSize* (window: WindowPtr; w,h: var cint) {.
+  importc: "SDL_GL_GetDrawableSize".}
+
+proc glSetSwapInterval* (interval: cint): cint {.
+  importc: "SDL_GL_SetSwapInterval".}
+proc glGetSwapInterval* : cint {.
+  importc: "SDL_GL_GetSwapInterval".}
+
+proc glSwapWindow*(window: WindowPtr) {.
+  importc: "SDL_GL_SwapWindow".}
+  ## Swap the OpenGL buffers for a window, if double-buffering is supported.
+
+proc glDeleteContext* (context: GlContextPtr) {.
+  importc: "SDL_GL_DeleteContext".}
+
+
+##SDL_vulkan.h
+type VkHandle = int64
+type VkNonDispatchableHandle = int64
+
+# Skipped using Vk prefix to stop any potential name clashes with the Vulkan library
+type VulkanInstance* = VkHandle
+type VulkanSurface* = VkNonDispatchableHandle
+
+#extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
+proc vulkanLoadLibrary*(path: cstring):cint {.
+  importc: "SDL_Vulkan_LoadLibrary".}
+
+#extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
+proc vulkanGetVkGetInstanceProcAddr*(): pointer {.
+  importc: "SDL_Vulkan_GetVkGetInstanceProcAddr".}
+
+#extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
+proc vulkanUnloadLibrary*() {.
+  importc: "SDL_Vulkan_UnloadLibrary".}
+
+#extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(
+#                           SDL_Window *window,
+#                           unsigned int *pCount,
+#                           const char **pNames);
+proc vulkanGetInstanceExtensions*(window: WindowPtr, pCount: ptr cuint, pNames: cstringArray): Bool32 {.
+  importc: "SDL_Vulkan_GetInstanceExtensions".}
+
+#extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(
+#                       SDL_Window *window,
+#                       VkInstance instance,
+#                       VkSurfaceKHR* surface);
+proc vulkanCreateSurface*(window: WindowPtr, instance: VulkanInstance, surface: ptr VulkanSurface): Bool32 {.
+  importc: "SDL_Vulkan_CreateSurface".}
+
+#extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
+#                                                       int *w, int *h);
+proc vulkanGetDrawableSize*(window: WindowPtr, w, h: ptr cint) {.
+  importc: "SDL_Vulkan_GetDrawableSize".}
+
+##SDL_keyboard.h:
+proc getKeyboardFocus*: WindowPtr {.importc: "SDL_GetKeyboardFocus".}
+  #Get the window which currently has keyboard focus.
+proc getKeyboardState*(numkeys: ptr int = nil): ptr array[0 .. SDL_NUM_SCANCODES.int, uint8] {.importc: "SDL_GetKeyboardState".}
+  #Get the snapshot of the current state of the keyboard
+proc getModState*: Keymod {.importc: "SDL_GetModState".}
+  #Get the current key modifier state for the keyboard
+proc setModState*(state: Keymod) {.importc: "SDL_SetModState".}
+  #Set the current key modifier state for the keyboard
+proc getKeyFromScancode*(scancode: ScanCode): cint {.importc: "SDL_GetKeyFromScancode".}
+  #Get the key code corresponding to the given scancode according to the current keyboard layout
+proc getScancodeFromKey*(key: cint): ScanCode {.importc: "SDL_GetScancodeFromKey".}
+  #Get the scancode corresponding to the given key code according to the current keyboard layout
+proc getScancodeName*(scancode: ScanCode): cstring {.importc: "SDL_GetScancodeName".}
+  #Get a human-readable name for a scancode
+proc getScancodeFromName*(name: cstring): ScanCode {.importc: "SDL_GetScancodeFromName".}
+  #Get a scancode from a human-readable name
+proc getKeyName*(key: cint): cstring {.
+  importc: "SDL_GetKeyName".}
+  #Get a human-readable name for a key
+proc getKeyFromName*(name: cstring): cint {.
+  importc: "SDL_GetKeyFromName".}
+  #Get a key code from a human-readable name
+proc startTextInput* {.
+  importc: "SDL_StartTextInput".}
+  #Start accepting Unicode text input events
+proc isTextInputActive*: bool {.
+  importc: "SDL_IsTextInputActive".}
+proc stopTextInput* {.
+  importc: "SDL_StopTextInput".}
+proc setTextInputRect*(rect: ptr Rect) {.
+  importc: "SDL_SetTextInputRect".}
+proc hasScreenKeyboardSupport*: bool {.importc: "SDL_HasScreenKeyboardSupport".}
+proc isScreenKeyboardShown*(window: WindowPtr): bool {.importc: "SDL_IsScreenKeyboardShown".}
+
+
+
+proc getMouseFocus*(): WindowPtr {.importc: "SDL_GetMouseFocus".}
+#*
+#   \brief Retrieve the current state of the mouse.
+#
+#   The current button state is returned as a button bitmask, which can
+#   be tested using the SDL_BUTTON(X) macros, and x and y are set to the
+#   mouse cursor position relative to the focus window for the currently
+#   selected mouse.  You can pass NULL for either x or y.
+#
+proc getMouseState*(x, y: var cint): uint8 {.importc: "SDL_GetMouseState", discardable.}
+proc getMouseState*(x, y: ptr cint): uint8 {.importc: "SDL_GetMouseState", discardable.}
+#*
+proc getRelativeMouseState*(x, y: var cint): uint8 {.
+  importc: "SDL_GetRelativeMouseState".}
+#*
+proc warpMouseInWindow*(window: WindowPtr; x, y: cint)  {.
+  importc: "SDL_WarpMouseInWindow".}
+#*
+proc setRelativeMouseMode*(enabled: Bool32): SDL_Return  {.
+  importc: "SDL_SetRelativeMouseMode".}
+#*
+proc captureMouse*(enabled: Bool32): SDL_Return {.
+  importc: "SDL_CaptureMouse" .}
+#*
+proc getRelativeMouseMode*(): Bool32 {.importc: "SDL_GetRelativeMouseMode".}
+#*
+proc createCursor*(data, mask: ptr uint8;
+  w, h, hot_x, hot_y: cint): CursorPtr {.importc: "SDL_CreateCursor".}
+#*
+proc createColorCursor*(surface: SurfacePtr; hot_x, hot_y: cint): CursorPtr {.
+  importc: "SDL_CreateColorCursor".}
+#*
+type
+  SystemCursor* = enum
+    SDL_SYSTEM_CURSOR_ARROW,     ## Arrow
+    SDL_SYSTEM_CURSOR_IBEAM,     ## I-beam
+    SDL_SYSTEM_CURSOR_WAIT,      ## Wait
+    SDL_SYSTEM_CURSOR_CROSSHAIR, ## Crosshair
+    SDL_SYSTEM_CURSOR_WAITARROW, ## Small wait cursor (or Wait if not available)
+    SDL_SYSTEM_CURSOR_SIZENWSE,  ## Double arrow pointing northwest and southeast
+    SDL_SYSTEM_CURSOR_SIZENESW,  ## Double arrow pointing northeast and southwest
+    SDL_SYSTEM_CURSOR_SIZEWE,    ## Double arrow pointing west and east
+    SDL_SYSTEM_CURSOR_SIZENS,    ## Double arrow pointing north and south
+    SDL_SYSTEM_CURSOR_SIZEALL,   ## Four pointed arrow pointing north, south, east, and west
+    SDL_SYSTEM_CURSOR_NO,        ## Slashed circle or crossbones
+    SDL_SYSTEM_CURSOR_HAND       ## Hand
+
+proc createSystemCursor*(c: SystemCursor): CursorPtr {.
+  importc: "SDL_CreateSystemCursor".}
+proc setCursor*(cursor: CursorPtr) {.importc: "SDL_SetCursor".}
+proc getCursor*(): CursorPtr {.importc: "SDL_GetCursor".}
+proc freeCursor* (cursor: CursorPtr) {.importc: "SDL_FreeCursor".}
+proc showCursor* (toggle: bool): Bool32 {.importc: "SDL_ShowCursor", discardable.}
+
+
+# Function prototypes
+#*
+#   Pumps the event loop, gathering events from the input devices.
+#
+#   This function updates the event queue and internal input device state.
+#
+#   This should only be run in the thread that sets the video mode.
+#
+proc pumpEvents*() {.importc: "SDL_PumpEvents".}
+
+#*
+#   Checks the event queue for messages and optionally returns them.
+#
+#   If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
+#   the back of the event queue.
+#
+#   If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
+#   of the event queue, within the specified minimum and maximum type,
+#   will be returned and will not be removed from the queue.
+#
+#   If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
+#   of the event queue, within the specified minimum and maximum type,
+#   will be returned and will be removed from the queue.
+#
+#   \return The number of events actually stored, or -1 if there was an error.
+#
+#   This function is thread-safe.
+#
+proc peepEvents*(events: ptr Event; numevents: cint; action: Eventaction;
+  minType: uint32; maxType: uint32): cint {.importc: "SDL_PeepEvents".}
+#@}
+#*
+#   Checks to see if certain event types are in the event queue.
+#
+proc hasEvent*(kind: uint32): Bool32 {.importc: "SDL_HasEvent".}
+proc hasEvents*(minType: uint32; maxType: uint32): Bool32 {.importc: "SDL_HasEvents".}
+proc flushEvent*(kind: uint32) {.importc: "SDL_FlushEvent".}
+proc flushEvents*(minType: uint32; maxType: uint32) {.importc: "SDL_FlushEvents".}
+
+proc pollEvent*(event: var Event): Bool32 {.importc: "SDL_PollEvent".}
+proc waitEvent*(event: var Event): Bool32 {.importc: "SDL_WaitEvent".}
+proc waitEventTimeout*(event: var Event; timeout: cint): Bool32 {.importc: "SDL_WaitEventTimeout".}
+#*
+#   \brief Add an event to the event queue.
+#
+#   \return 1 on success, 0 if the event was filtered, or -1 if the event queue
+#           was full or there was some other error.
+#
+proc pushEvent*(event: ptr Event): cint {.importc: "SDL_PushEvent".}
+
+#*
+proc setEventFilter*(filter: EventFilter; userdata: pointer) {.importc: "SDL_SetEventFilter".}
+#*
+#   Return the current event filter - can be used to "chain" filters.
+#   If there is no event filter set, this function returns SDL_FALSE.
+#
+proc getEventFilter*(filter: var EventFilter; userdata: var pointer): Bool32 {.importc: "SDL_GetEventFilter".}
+#*
+#   Add a function which is called when an event is added to the queue.
+#
+proc addEventWatch*(filter: EventFilter; userdata: pointer) {.importc: "SDL_AddEventWatch".}
+#*
+#   Remove an event watch function added with SDL_AddEventWatch()
+#
+proc delEventWatch*(filter: EventFilter; userdata: pointer) {.importc: "SDL_DelEventWatch".}
+#*
+#   Run the filter function on the current event queue, removing any
+#   events for which the filter returns 0.
+#
+proc filterEvents*(filter: EventFilter; userdata: pointer) {.importc: "SDL_FilterEvents".}
+#@{
+#
+#/**
+#   This function allows you to set the state of processing certain events.
+#    - If \c state is set to ::SDL_IGNORE, that event will be automatically
+#      dropped from the event queue and will not event be filtered.
+#    - If \c state is set to ::SDL_ENABLE, that event will be processed
+#      normally.
+#    - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
+#      current processing state of the specified event.
+#
+proc eventState*(kind: EventType; state: cint): uint8 {.importc: "SDL_EventState".}
+#@}
+#
+#/**
+#   This function allocates a set of user-defined events, and returns
+#   the beginning event number for that set of events.
+#
+#   If there aren't enough user-defined events left, this function
+#   returns (uint32)-1
+#
+proc registerEvents*(numevents: cint): uint32 {.importc: "SDL_RegisterEvents".}
+
+
+proc setError*(fmt: cstring) {.varargs, importc: "SDL_SetError".}
+proc getError*(): cstring {.importc: "SDL_GetError".}
+proc clearError*() {.importc: "SDL_ClearError".}
+
+#extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(uint32 format);
+proc getPixelFormatName* (format: uint32): cstring {.
+  importc: "SDL_GetPixelFormatName".}
+  ## Get the human readable name of a pixel format
+
+#extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(uint32 format,
+#                                                            int *bpp,
+#                                                            uint32 * Rmask,
+#                                                            uint32 * Gmask,
+#                                                            uint32 * Bmask,
+#                                                            uint32 * Amask);
+proc pixelFormatEnumToMasks* (format: uint32; bpp: var cint;
+  Rmask, Gmask, Bmask, Amask: var uint32): bool {.
+  importc: "SDL_PixelFormatEnumToMasks".}
+  ##Convert one of the enumerated pixel formats to a bpp and RGBA masks.
+  ##Returns TRUE or FALSE if the conversion wasn't possible.
+
+
+#extern DECLSPEC uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
+#                                                          uint32 Rmask,
+#                                                          uint32 Gmask,
+#                                                          uint32 Bmask,
+#                                                          uint32 Amask);
+proc masksToPixelFormatEnum* (bpp: cint; Rmask, Gmask, Bmask, Amask: uint32): uint32 {.
+  importc: "SDL_MasksToPixelFormatEnum".}
+  ##Convert a bpp and RGBA masks to an enumerated pixel format.
+  ##The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible.
+
+#extern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(uint32 pixel_format);
+proc allocFormat* (pixelFormat: uint32): ptr PixelFormat {.
+  importc: "SDL_AllocFormat".}
+##Create an SDL_PixelFormat structure from a pixel format enum.
+
+#extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
+proc freeFormat* (format: ptr PixelFormat) {.
+  importc: "SDL_FreeFormat".}
+  ##Free an SDL_PixelFormat structure.
+
+#extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
+proc allocPalette* (numColors: cint): ptr Palette {.
+  importc: "SDL_AllocPalette".}
+  ##Create a palette structure with the specified number of color entries.
+  ##Returns A new palette, or NULL if there wasn't enough memory.
+  ##Note: The palette entries are initialized to white.
+
+#extern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
+#                                                      SDL_Palette *palette);
+proc setPixelFormatPalette* (format: ptr PixelFormat; palette: ptr Palette): cint {.
+  importc: "SDL_SetPixelFormatPalette".}
+  ##Set the palette for a pixel format structure.
+
+#extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
+#                                                 const SDL_Color * colors,
+#                                                 int firstcolor, int ncolors);
+proc setPaletteColors* (palette: ptr Palette; colors: ptr Color; first, numColors: cint): SDL_Return {.discardable,
+  importc: "SDL_SetPaletteColors".}
+  ## Set a range of colors in a palette.
+#extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
+proc freePalette* (palette: ptr Palette) {.
+  importc: "SDL_FreePalette".}
+  ##Free a palette created with SDL_AllocPalette().
+
+#extern DECLSPEC uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
+#                                          uint8 r, uint8 g, uint8 b);
+proc mapRGB* (format: ptr PixelFormat; r,g,b: uint8): uint32 {.
+  importc: "SDL_MapRGB".}
+  ##Maps an RGB triple to an opaque pixel value for a given pixel format.
+
+#extern DECLSPEC uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
+#                                           uint8 r, uint8 g, uint8 b,
+#                                           uint8 a);
+proc mapRGBA* (format: ptr PixelFormat; r,g,b,a: uint8): uint32 {.
+  importc: "SDL_MapRGBA".}
+  ##Maps an RGBA quadruple to a pixel value for a given pixel format.
+
+#extern DECLSPEC void SDLCALL SDL_GetRGB(uint32 pixel,
+#                                        const SDL_PixelFormat * format,
+#                                        uint8 * r, uint8 * g, uint8 * b);
+proc getRGB* (pixel: uint32; format: ptr PixelFormat; r,g,b: var uint8) {.
+  importc: "SDL_GetRGB".}
+  ##Get the RGB components from a pixel of the specified format.
+
+#extern DECLSPEC void SDLCALL SDL_GetRGBA(uint32 pixel,
+#                                         const SDL_PixelFormat * format,
+#                                         uint8 * r, uint8 * g, uint8 * b,
+#                                         uint8 * a);
+proc getRGBA* (pixel: uint32; format: ptr PixelFormat; r,g,b,a: var uint8) {.
+  importc: "SDL_GetRGBA".}
+  ##Get the RGBA components from a pixel of the specified format.
+
+#extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, uint16 * ramp);
+proc calculateGammaRamp* (gamma: cfloat; ramp: ptr uint16) {.
+  importc: "SDL_CalculateGammaRamp".}
+  ##Calculate a 256 entry gamma ramp for a gamma value.
+
+# SDL_clipboard.h
+proc setClipboardText*(text: cstring): cint {.importc: "SDL_SetClipboardText".}
+proc getClipboardText*(): cstring {.importc: "SDL_GetClipboardText".}
+proc hasClipboardText*(): Bool32 {.importc: "SDL_HasClipboardText".}
+proc freeClipboardText*(text: cstring) {.importc: "SDL_free".}
+
+
+proc getNumTouchFingers*(id: TouchID): cint {.importc: "SDL_GetNumTouchFingers".}
+proc getTouchFinger*(id: TouchID, index: cint): ptr Finger {.importc: "SDL_GetTouchFinger".}
+
+# SDL_system.h
+when defined(windows):
+
+  proc direct3D9GetAdapterIndex* (displayIndex: cint): cint {.
+    importc: "SDL_Direct3D9GetAdapterIndex".}
+    ## Returns the D3D9 adapter index that matches the specified display index.
+    ## This adapter index can be passed to IDirect3D9::CreateDevice and controls
+    ## on which monitor a full screen application will appear.
+
+  #extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
+  proc getD3D9Device* (renderer: RendererPtr): pointer {.
+    importc:"SDL_RenderGetD3D9Device".}
+    ## Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
+    ## Once you are done using the device, you should release it to avoid a resource leak.
+
+  #extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
+  proc dXGIGetOutputInfo* (displayIndex: cint, adapterIndex,outputIndex: ptr cint) {.importc: "SDL_DXGIGetOutputInfo".}
+    ## Returns the DXGI Adapter and Output indices for the specified display index.
+    ## These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
+    ## required to create a DX10 or DX11 device and swap chain.
+
+elif defined(iPhone) or defined(ios):
+
+
+  #extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(
+  #    SDL_Window * window, int interval,
+  #    void (*callback)(void*), void *callbackParam);
+  proc iPhoneSetAnimationCallback*(window: WindowPtr, interval:cint, callback: VoidCallback, callbackParam: pointer): cint {.
+    importc: "SDL_iPhoneSetAnimationCallback".}
+
+  #extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
+  proc iPhoneSetEventPump*(enabled: bool) {.
+    importc: "SDL_iPhoneSetEventPump".}
+
+  #extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardShow(SDL_Window * window);
+  proc iPhoneKeyboardShow*(window:WindowPtr): cint {.
+    importc: "SDL_iPhoneKeyboardShow".}
+  #extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardHide(SDL_Window * window);
+  proc iPhoneKeyboardHide*(window:WindowPtr): cint {.
+    importc: "SDL_iPhoneKeyboardHide".}
+  #extern DECLSPEC SDL_bool SDLCALL SDL_iPhoneKeyboardIsShown(SDL_Window * window);
+  proc iPhoneKeyboardIsShown*(window:WindowPtr): bool {.
+    importc: "SDL_iPhoneKeyboardIsShown".}
+  #extern DECLSPEC int SDLCALL SDL_iPhoneKeyboardToggle(SDL_Window * window);
+  proc iPhoneKeyboardToggle*(window:WindowPtr): cint {.
+    importc: "SDL_iPhoneKeyboardToggle".}
+
+elif defined(android):
+
+  #extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
+  proc androidGetJNIEnv*(): pointer {.importc: "SDL_AndroidGetJNIEnv".}
+
+  #extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
+  proc androidGetActivity*(): pointer {.importc: "SDL_AndroidGetActivity".}
+
+  #extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
+  proc androidGetExternalStorageState*(): cint {.
+    importc: "SDL_AndroidGetExternalStorageState".}
+
+  #extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
+  proc androidGetInternalStoragePath* (): cstring {.
+    importc: "SDL_AndroidGetInternalStoragePath".}
+
+  #extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath();
+  proc androidGetExternalStoragePath* (): cstring {.
+    importc: "SDL_AndroidGetExternalStoragePath".}
+
+const
+  SDL_QUERY* = -1
+  SDL_IGNORE* = 0
+  SDL_DISABLE* = 0
+  SDL_ENABLE* = 1
+
+##define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
+proc getEventState*(kind: EventType): uint8 {.inline.} = eventState(kind, SDL_QUERY)
+
+##define SDL_BUTTON(X)          (1 << ((X)-1))
+template SDL_BUTTON*(x: uint8): uint8 = (1'u8 shl (x - 1'u8))
+const
+  BUTTON_LEFT* = 1'u8
+  BUTTON_MIDDLE* = 2'u8
+  BUTTON_RIGHT* = 3'u8
+  BUTTON_X1* = 4'u8
+  BUTTON_X2* = 5'u8
+  BUTTON_LMASK* = SDL_BUTTON(BUTTON_LEFT)
+  BUTTON_MMASK* = SDL_BUTTON(BUTTON_MIDDLE)
+  BUTTON_RMASK* = SDL_BUTTON(BUTTON_RIGHT)
+  BUTTON_X1MASK* = SDL_BUTTON(BUTTON_X1)
+  BUTTON_X2MASK* = SDL_BUTTON(BUTTON_X2)
+
+const SDL_TOUCH_MOUSEID* = high(uint32)
+
+## compatibility functions
+
+proc createRGBSurface* (width, height, depth: int32): SurfacePtr {.inline.} = sdl2.createRGBSurface(
+  0, width, height, depth, 0,0,0,0)
+proc getSize*(window: WindowPtr): Point {.inline.} = getSize(window, result.x, result.y)
+
+proc destroyTexture*(texture: TexturePtr) {.inline.} = destroy(texture)
+#proc destroy* (texture: TexturePtr) {.inline.} = texture.destroyTexture
+proc destroyRenderer*(renderer: RendererPtr) {.inline.} = destroy(renderer)
+#proc destroy* (renderer: RendererPtr) {.inline.} = renderer.destroyRenderer
+
+proc destroy* (window: WindowPtr) {.inline.} = window.destroyWindow
+proc destroy* (cursor: CursorPtr) {.inline.} = cursor.freeCursor
+proc destroy* (surface: SurfacePtr) {.inline.} = surface.freeSurface
+proc destroy* (format: ptr PixelFormat) {.inline.} = format.freeFormat
+proc destroy* (palette: ptr Palette) {.inline.} = palette.freePalette
+
+proc blitSurface*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.inline, discardable.} = upperBlit(src, srcrect, dst, dstrect)
+proc blitScaled*(src: SurfacePtr; srcrect: ptr Rect; dst: SurfacePtr;
+  dstrect: ptr Rect): SDL_Return {.inline, discardable.} = upperBlitScaled(src, srcrect, dst, dstrect)
+
+#proc init*(flags: cint): SDL_Return {.inline, deprecated.} = sdl2.init(flags)
+#proc quit*() {.inline,deprecated.} = sdl2.quit()
+
+#/#define SDL_LoadBMP(file)     SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
+proc loadBMP*(file: string): SurfacePtr {.inline.} = loadBMP_RW(rwFromFile(cstring(file), "rb"), 1)
+##define SDL_SaveBMP(surface, file) \
+#  SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
+proc saveBMP*(surface: SurfacePtr; file: string): SDL_Return {.
+  inline, discardable.} = saveBMP_RW(surface, rwFromFile(file, "wb"), 1)
+
+proc color*(r, g, b, a: range[0..255]): Color = (r.uint8, g.uint8, b.uint8, a.uint8)
+
+proc rect*(x, y: cint; w = cint(0), h = cint(0)): Rect =
+  result.x = x
+  result.y = y
+  result.w = w
+  result.h = h
+
+proc point*[T: SomeNumber](x, y: T): Point = (x.cint, y.cint)
+
+proc contains*(some: Rect; point: Point): bool =
+  return point.x >= some.x and point.x <= (some.x + some.w) and
+          point.y >= some.y and point.y <= (some.y + some.h)
+
+const
+  HINT_RENDER_SCALE_QUALITY* = "SDL_RENDER_SCALE_QUALITY"
+
+proc setHint*(name: cstring, value: cstring): bool {.
+  importc: "SDL_SetHint".}
+
+proc setHintWithPriority*(name: cstring, value: cstring, priority: cint): bool {.
+  importc: "SDL_SetHintWithPriority".}
+
+proc getHint*(name: cstring): cstring {.
+  importc: "SDL_GetHint".}
+
+proc size* (ctx:RWopsPtr): int64 {.inline.} =
+  ctx.size(ctx)
+proc seek* (ctx:RWopsPtr; offset:int64; whence:cint): int64 {.inline.} =
+  ctx.seek(ctx,offset,whence)
+proc read* (ctx:RWopsPtr; `ptr`: pointer; size,maxnum:csize_t): csize_t{.inline.} =
+  ctx.read(ctx, `ptr`, size, maxnum)
+proc write* (ctx:RWopsPtr; `ptr`:pointer; size,num:csize_t): csize_t{.inline.} =
+  ctx.write(ctx, `ptr`, size, num)
+proc close* (ctx:RWopsPtr): cint {.inline.} =
+  ctx.close(ctx)
+
+when not defined(SDL_Static):
+  {.pop.}
+
+let defaultEvent* = Event(kind: QuitEvent)
+  ## a default "initialized" Event

+ 677 - 0
src/nodesnim/core/sdl2/audio.nim

@@ -0,0 +1,677 @@
+import ../sdl2
+#
+#  Simple DirectMedia Layer
+#  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
+#
+#  This software is provided 'as-is', without any express or implied
+#  warranty.  In no event will the authors be held liable for any damages
+#  arising from the use of this software.
+#
+#  Permission is granted to anyone to use this software for any purpose,
+#  including commercial applications, and to alter it and redistribute it
+#  freely, subject to the following restrictions:
+#
+#  1. The origin of this software must not be misrepresented; you must not
+#     claim that you wrote the original software. If you use this software
+#     in a product, an acknowledgment in the product documentation would be
+#     appreciated but is not required.
+#  2. Altered source versions must be plainly marked as such, and must not be
+#     misrepresented as being the original software.
+#  3. This notice may not be removed or altered from any source distribution.
+#
+#*
+#   \file SDL_audio.h
+#
+#   Access to the raw audio mixing buffer for the SDL library.
+#
+
+# Set up for C function definitions, even when using C++
+#*
+#   \brief Audio format flags.
+#
+#   These are what the 16 bits in AudioFormat currently mean...
+#   (Unspecified bits are always zero).
+#
+#   \verbatim
+#    ++-----------------------sample is signed if set
+#    ||
+#    ||       ++-----------sample is bigendian if set
+#    ||       ||
+#    ||       ||          ++---sample is float if set
+#    ||       ||          ||
+#    ||       ||          || +---sample bit size---+
+#    ||       ||          || |                     |
+#    15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
+#    \endverbatim
+#
+#   There are macros in SDL 2.0 and later to query these bits.
+#
+type
+  AudioFormat* = uint16
+#*
+#   \name Audio flags
+#
+# @{
+const
+  SDL_AUDIO_MASK_BITSIZE*  = uint32(0x000000FF)
+  SDL_AUDIO_MASK_DATATYPE* = uint32(1 shl 8)
+  SDL_AUDIO_MASK_ENDIAN*   = uint32(1 shl 12)
+  SDL_AUDIO_MASK_SIGNED*   = uint32(1 shl 15)
+
+template SDL_AUDIO_BITSIZE*(x: uint32): uint32 =
+  (x and SDL_AUDIO_MASK_BITSIZE)
+
+template SDL_AUDIO_ISFLOAT*(x: uint32): bool =
+  (x and SDL_AUDIO_MASK_DATATYPE) != 0
+
+template SDL_AUDIO_ISBIGENDIAN*(x: uint32): bool =
+  (x and SDL_AUDIO_MASK_ENDIAN) != 0
+
+template SDL_AUDIO_ISSIGNED*(x: uint32): bool =
+  (x and SDL_AUDIO_MASK_SIGNED) != 0
+
+template SDL_AUDIO_ISINT*(x: uint32): bool =
+  not SDL_AUDIO_ISFLOAT(x)
+
+template SDL_AUDIO_ISLITTLEENDIAN*(x: uint32): bool =
+  not SDL_AUDIO_ISBIGENDIAN(x)
+
+template SDL_AUDIO_ISUNSIGNED*(x: uint32): bool =
+  not SDL_AUDIO_ISSIGNED(x)
+
+#*
+#   \name Audio format flags
+#
+#   Defaults to LSB byte order.
+#
+# @{
+const
+  AUDIO_U8* = 0x00000008    #*< Unsigned 8-bit samples
+  AUDIO_S8* = 0x00008008    #*< Signed 8-bit samples
+  AUDIO_U16LSB* = 0x00000010 #*< Unsigned 16-bit samples
+  AUDIO_S16LSB* = 0x00008010 #*< Signed 16-bit samples
+  AUDIO_U16MSB* = 0x00001010 #*< As above, but big-endian byte order
+  AUDIO_S16MSB* = 0x00009010 #*< As above, but big-endian byte order
+  AUDIO_U16* = AUDIO_U16LSB
+  AUDIO_S16* = AUDIO_S16LSB
+
+# @}
+#*
+#   \name int32 support
+#
+# @{
+const
+  AUDIO_S32LSB* = 0x00008020 #*< 32-bit integer samples
+  AUDIO_S32MSB* = 0x00009020 #*< As above, but big-endian byte order
+  AUDIO_S32* = AUDIO_S32LSB
+# @}
+#*
+#   \name float32 support
+#
+# @{
+const
+  AUDIO_F32LSB* = 0x00008120 #*< 32-bit floating point samples
+  AUDIO_F32MSB* = 0x00009120 #*< As above, but big-endian byte order
+  AUDIO_F32* = AUDIO_F32LSB
+# @}
+#*
+#   \name Native audio byte ordering
+#
+# @{
+when false:
+  ## TODO system.cpuEndian
+  when SDL_BYTEORDER == SDL_LIL_ENDIAN:
+    const
+      AUDIO_U16SYS* = AUDIO_U16LSB
+      AUDIO_S16SYS* = AUDIO_S16LSB
+      AUDIO_S32SYS* = AUDIO_S32LSB
+      AUDIO_F32SYS* = AUDIO_F32LSB
+  else:
+    const
+      AUDIO_U16SYS* = AUDIO_U16MSB
+      AUDIO_S16SYS* = AUDIO_S16MSB
+      AUDIO_S32SYS* = AUDIO_S32MSB
+      AUDIO_F32SYS* = AUDIO_F32MSB
+# @}
+#*
+#   \name Allow change flags
+#
+#   Which audio format changes are allowed when opening a device.
+#
+# @{
+const
+  SDL_AUDIO_ALLOW_FREQUENCY_CHANGE* = 0x00000001
+  SDL_AUDIO_ALLOW_FORMAT_CHANGE* = 0x00000002
+  SDL_AUDIO_ALLOW_CHANNELS_CHANGE* = 0x00000004
+  SDL_AUDIO_ALLOW_ANY_CHANGE* = (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE or
+      SDL_AUDIO_ALLOW_FORMAT_CHANGE or SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
+# @}
+# @}
+# Audio flags
+#*
+#   This function is called when the audio device needs more data.
+#
+#   \param userdata An application-specific parameter saved in
+#                   the AudioSpec structure
+#   \param stream A pointer to the audio data buffer.
+#   \param len    The length of that buffer in bytes.
+#
+#   Once the callback returns, the buffer will no longer be valid.
+#   Stereo samples are stored in a LRLRLR ordering.
+#
+type
+  AudioCallback* = proc (userdata: pointer; stream: ptr uint8; len: cint) {.cdecl.}
+#*
+#   The calculated values in this structure are calculated by SDL_OpenAudio().
+#
+type
+  AudioSpec* = object
+    freq*: cint             #*< DSP frequency -- samples per second
+    format*: AudioFormat #*< Audio data format
+    channels*: uint8        #*< Number of channels: 1 mono, 2 stereo
+    silence*: uint8         #*< Audio buffer silence value (calculated)
+    samples*: uint16        #*< Audio buffer size in samples (power of 2)
+    padding*: uint16        #*< Necessary for some compile environments
+    size*: uint32           #*< Audio buffer size in bytes (calculated)
+    callback*: AudioCallback
+    userdata*: pointer
+
+  AudioCVT* {.packed.} = object
+    needed*: cint           #*< Set to 1 if conversion possible
+    src_format*: AudioFormat #*< Source audio format
+    dst_format*: AudioFormat #*< Target audio format
+    rate_incr*: cdouble     #*< Rate conversion increment
+    buf*: ptr uint8         #*< Buffer to hold entire audio data
+    len*: cint              #*< Length of original audio buffer
+    len_cvt*: cint          #*< Length of converted audio buffer
+    len_mult*: cint         #*< buffer must be len*len_mult big
+    len_ratio*: cdouble     #*< Given len, final size is len*len_ratio
+    filters*: array[10, AudioFilter] #*< Filter list
+    filter_index*: cint     #*< Current audio conversion function
+
+  AudioFilter* = proc (cvt: ptr AudioCVT; format: AudioFormat){.cdecl.}
+
+type
+  AudioStream = object
+    # The AudioStream object. SDL2 doesn't make the contents of this object
+    # visible to users of the C API, so we don't make it visible either.
+    cvt_before_resampling*: AudioCVT
+    cvt_after_resampling*: AudioCVT
+    queue*: pointer
+    first_run*: Bool32
+    staging_buffer*: ptr uint8
+    staging_buffer_size*: cint
+    staging_buffer_filled*: cint
+    work_buffer_base*: ptr uint8  # maybe unaligned pointer from SDL_realloc().
+    work_buffer_len*: cint
+    src_sample_frame_size*: cint
+    src_format*: AudioFormat
+    src_channels*: uint8
+    src_rate*: cint
+    dst_sample_frame_size*: cint
+    dst_format*: AudioFormat
+    dst_channels*: uint8
+    dst_rate*: cint
+    rate_incr*: cdouble
+    pre_resample_channels*: uint8
+    packetlen*: cint
+    resampler_padding_samples*: cint
+    resampler_padding*: ptr cfloat
+    resampler_state*: pointer
+    resampler_func*: proc(stream: AudioStreamPtr, inbuf: pointer, inbuflen: cint, outbuf: pointer, outbuflen: cint): cint
+    reset_resampler_func*: proc(stream: AudioStreamPtr)
+    cleanup_resampler_func*: proc(stream: AudioStreamPtr)
+  
+  AudioStreamPtr* = ptr AudioStream
+    ## (Available since SDL 2.0.7)
+    ## A pointer to an `SDL_AudioStream`_. Audio streams were added to SDL2
+    ## in version 2.0.7, to provide an easier-to-use alternative to 
+    ## `SDL_AudioCVT`_.
+    ##
+    ## .. _SDL_AudioStream: https://wiki.libsdl.org/Tutorials/AudioStream
+    ## .. _SDL_AudioCVT: https://wiki.libsdl.org/SDL_AudioCVT
+    ##
+    ## See Also:
+    ## * `newAudioStream proc<#newAudioStream,AudioFormat,uint8,cint,AudioFormat,uint8,cint>`_
+    ## * `newAudioStream proc<#newAudioStream,AudioSpec,AudioSpec>`_
+    ## * `put proc<#put,AudioStreamPtr,pointer,cint>`_
+    ## * `get proc<#get,AudioStreamPtr,pointer,cint>`_
+    ## * `available proc<#available,AudioStreamPtr>`_
+    ## * `flush proc<#flush,AudioStreamPtr>`_
+    ## * `clear proc<#clear,AudioStreamPtr>`_
+    ## * `destroy proc<#destroy,AudioStreamPtr>`_
+
+when false:
+  #*
+  #   A structure to hold a set of audio conversion filters and buffers.
+  #
+  when defined(GNUC):#__GNUC__):
+    # This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
+    #   pad it out to 88 bytes to guarantee ABI compatibility between compilers.
+    #   vvv
+    #   The next time we rev the ABI, make sure to size the ints and add padding.
+    #
+    const
+      AudioCVT_PACKED* = x#__attribute__((packed))
+  else:
+    const
+      AudioCVT_PACKED* = true
+
+#*
+#   SDL Audio Device IDs.
+#
+#   A successful call to SDL_OpenAudio() is always device id 1, and legacy
+#   SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls
+#   always returns devices >= 2 on success. The legacy calls are good both
+#   for backwards compatibility and when you don't care about multiple,
+#   specific, or capture devices.
+#
+type
+  AudioDeviceID* = uint32
+
+#*
+#   \name Audio state
+#
+#   Get the current audio state.
+#
+# @{
+type
+  AudioStatus* {.size: sizeof(cint).} = enum
+    SDL_AUDIO_STOPPED = 0, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED
+const
+  SDL_MIX_MAXVOLUME* = 128
+
+when defined(SDL_Static):
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+else:
+  {.push callConv: cdecl, dynlib: LibName.}
+
+# Function prototypes
+#*
+#   \name Driver discovery functions
+#
+#   These functions return the list of built in audio drivers, in the
+#   order that they are normally initialized by default.
+#
+# @{
+proc getNumAudioDrivers*(): cint {.
+  importc: "SDL_GetNumAudioDrivers".}
+proc getAudioDriver*(index: cint): cstring {.
+  importc: "SDL_GetAudioDriver".}
+# @}
+#*
+#   \name Initialization and cleanup
+#
+#   \internal These functions are used internally, and should not be used unless
+#             you have a specific need to specify the audio driver you want to
+#             use.  You should normally use SDL_Init() or SDL_InitSubSystem().
+#
+# @{
+proc audioInit*(driver_name: cstring): cint {.
+  importc: "SDL_AudioInit".}
+proc audioQuit*() {.
+  importc: "SDL_AudioQuit".}
+# @}
+#*
+#   This function returns the name of the current audio driver, or NULL
+#   if no driver has been initialized.
+#
+proc getCurrentAudioDriver*(): cstring {.
+  importc: "SDL_GetCurrentAudioDriver".}
+#*
+#   This function opens the audio device with the desired parameters, and
+#   returns 0 if successful, placing the actual hardware parameters in the
+#   structure pointed to by \c obtained.  If \c obtained is NULL, the audio
+#   data passed to the callback function will be guaranteed to be in the
+#   requested format, and will be automatically converted to the hardware
+#   audio format if necessary.  This function returns -1 if it failed
+#   to open the audio device, or couldn't set up the audio thread.
+#
+#   When filling in the desired audio spec structure,
+#     - \c desired->freq should be the desired audio frequency in samples-per-
+#       second.
+#     - \c desired->format should be the desired audio format.
+#     - \c desired->samples is the desired size of the audio buffer, in
+#       samples.  This number should be a power of two, and may be adjusted by
+#       the audio driver to a value more suitable for the hardware.  Good values
+#       seem to range between 512 and 8096 inclusive, depending on the
+#       application and CPU speed.  Smaller values yield faster response time,
+#       but can lead to underflow if the application is doing heavy processing
+#       and cannot fill the audio buffer in time.  A stereo sample consists of
+#       both right and left channels in LR ordering.
+#       Note that the number of samples is directly related to time by the
+#       following formula:  \code ms = (samples*1000)/freq \endcode
+#     - \c desired->size is the size in bytes of the audio buffer, and is
+#       calculated by SDL_OpenAudio().
+#     - \c desired->silence is the value used to set the buffer to silence,
+#       and is calculated by SDL_OpenAudio().
+#     - \c desired->callback should be set to a function that will be called
+#       when the audio device is ready for more data.  It is passed a pointer
+#       to the audio buffer, and the length in bytes of the audio buffer.
+#       This function usually runs in a separate thread, and so you should
+#       protect data structures that it accesses by calling SDL_LockAudio()
+#       and SDL_UnlockAudio() in your code.
+#     - \c desired->userdata is passed as the first parameter to your callback
+#       function.
+#
+#   The audio device starts out playing silence when it's opened, and should
+#   be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready
+#   for your audio callback function to be called.  Since the audio driver
+#   may modify the requested size of the audio buffer, you should allocate
+#   any local mixing buffers after you open the audio device.
+#
+proc openAudio*(desired: ptr AudioSpec; obtained: ptr AudioSpec): cint {.
+  importc: "SDL_OpenAudio".}
+
+#*
+#   Get the number of available devices exposed by the current driver.
+#   Only valid after a successfully initializing the audio subsystem.
+#   Returns -1 if an explicit list of devices can't be determined; this is
+#   not an error. For example, if SDL is set up to talk to a remote audio
+#   server, it can't list every one available on the Internet, but it will
+#   still allow a specific host to be specified to SDL_OpenAudioDevice().
+#
+#   In many common cases, when this function returns a value <= 0, it can still
+#   successfully open the default device (NULL for first argument of
+#   SDL_OpenAudioDevice()).
+#
+proc getNumAudioDevices*(iscapture: cint): cint {.
+  importc: "SDL_GetNumAudioDevices".}
+#*
+#   Get the human-readable name of a specific audio device.
+#   Must be a value between 0 and (number of audio devices-1).
+#   Only valid after a successfully initializing the audio subsystem.
+#   The values returned by this function reflect the latest call to
+#   SDL_GetNumAudioDevices(); recall that function to redetect available
+#   hardware.
+#
+#   The string returned by this function is UTF-8 encoded, read-only, and
+#   managed internally. You are not to free it. If you need to keep the
+#   string for any length of time, you should make your own copy of it, as it
+#   will be invalid next time any of several other SDL functions is called.
+#
+proc getAudioDeviceName*(index: cint; iscapture: cint): cstring {.
+  importc: "SDL_GetAudioDeviceName".}
+#*
+#   Open a specific audio device. Passing in a device name of NULL requests
+#   the most reasonable default (and is equivalent to calling SDL_OpenAudio()).
+#
+#   The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but
+#   some drivers allow arbitrary and driver-specific strings, such as a
+#   hostname/IP address for a remote audio server, or a filename in the
+#   diskaudio driver.
+#
+#   \return 0 on error, a valid device ID that is >= 2 on success.
+#
+#   SDL_OpenAudio(), unlike this function, always acts on device ID 1.
+#
+proc openAudioDevice*(device: cstring; iscapture: cint;
+                      desired: ptr AudioSpec;
+                      obtained: ptr AudioSpec; allowed_changes: cint): AudioDeviceID {.
+  importc: "SDL_OpenAudioDevice".}
+
+proc getAudioStatus*(): AudioStatus {.
+  importc: "SDL_GetAudioStatus".}
+proc getAudioDeviceStatus*(dev: AudioDeviceID): AudioStatus {.
+  importc: "SDL_GetAudioDeviceStatus".}
+
+#*
+#   \brief Use this function to get the number of bytes of still-queued audio.
+#
+#   \param dev the device ID of which we will query queued audio size
+#
+#   \return the number of bytes (not samples!) of queued audio.
+#
+#   \sa SDL_GetQueuedAudioSize()
+#
+proc getQueuedAudioSize*(dev: AudioDeviceID): uint32 {.
+  importc: "SDL_GetQueuedAudioSize".}
+
+#*
+#   \brief Use this function to queue more audio on non-callback devices.
+#
+#   \param dev  the device ID to which we will queue audio
+#   \param data the data to queue to the device for later playback
+#   \param len  the number of bytes (not samples!) to which (data) points
+#
+#   \return 0 on success or a negative error code on failure; call SDL_GetError() for more information.
+#
+#   \sa SDL_QueueAudio()
+#
+proc queueAudio*(dev: AudioDeviceID, data: pointer, len: uint32): cint {.
+  importc: "SDL_QueueAudio".}
+
+# @}
+# Audio State
+#*
+#   \name Pause audio functions
+#
+#   These functions pause and unpause the audio callback processing.
+#   They should be called with a parameter of 0 after opening the audio
+#   device to start playing sound.  This is so you can safely initialize
+#   data for your callback function after opening the audio device.
+#   Silence will be written to the audio device during the pause.
+#
+# @{
+proc pauseAudio*(pause_on: cint) {.
+  importc: "SDL_PauseAudio".}
+proc pauseAudioDevice*(dev: AudioDeviceID; pause_on: cint) {.
+  importc: "SDL_PauseAudioDevice".}
+# @}
+# Pause audio functions
+#*
+#   This function loads a WAVE from the data source, automatically freeing
+#   that source if \c freesrc is non-zero.  For example, to load a WAVE file,
+#   you could do:
+#   \code
+#       SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
+#   \endcode
+#
+#   If this function succeeds, it returns the given AudioSpec,
+#   filled with the audio data format of the wave data, and sets
+#   \c *audio_buf to a malloc()'d buffer containing the audio data,
+#   and sets \c *audio_len to the length of that audio buffer, in bytes.
+#   You need to free the audio buffer with SDL_FreeWAV() when you are
+#   done with it.
+#
+#   This function returns NULL and sets the SDL error message if the
+#   wave file cannot be opened, uses an unknown data format, or is
+#   corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
+#
+
+proc loadWAV_RW*(src: ptr RWops; freesrc: cint;
+                 spec: ptr AudioSpec; audio_buf: ptr ptr uint8;
+                 audio_len: ptr uint32): ptr AudioSpec {.
+  importc: "SDL_LoadWAV_RW".}
+
+#*
+#   Loads a WAV from a file.
+#   Compatibility convenience function.
+#
+template loadWAV*(file: string, spec: ptr AudioSpec, audio_buf: ptr ptr uint8, audio_len: ptr uint32): ptr AudioSpec =
+  loadWAV_RW(rwFromFile(file, "rb"), 1, spec, audio_buf, audio_len)
+
+#*
+#   This function frees data previously allocated with SDL_LoadWAV_RW()
+#
+proc freeWAV*(audio_buf: ptr uint8) {.
+  importc: "SDL_FreeWAV".}
+#*
+#   This function takes a source format and rate and a destination format
+#   and rate, and initializes the \c cvt structure with information needed
+#   by SDL_ConvertAudio() to convert a buffer of audio data from one format
+#   to the other.
+#
+#   \return -1 if the format conversion is not supported, 0 if there's
+#   no conversion needed, or 1 if the audio filter is set up.
+#
+proc buildAudioCVT*(cvt: ptr AudioCVT; src_format: AudioFormat;
+                        src_channels: uint8; src_rate: cint;
+                        dst_format: AudioFormat; dst_channels: uint8;
+                        dst_rate: cint): cint {.
+  importc: "SDL_BuildAudioCVT".}
+#*
+#   Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(),
+#   created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of
+#   audio data in the source format, this function will convert it in-place
+#   to the desired format.
+#
+#   The data conversion may expand the size of the audio data, so the buffer
+#   \c cvt->buf should be allocated after the \c cvt structure is initialized by
+#   SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long.
+#
+proc convertAudio*(cvt: ptr AudioCVT): cint {.
+  importc: "SDL_ConvertAudio".}
+
+#*
+#   This takes two audio buffers of the playing audio format and mixes
+#   them, performing addition, volume adjustment, and overflow clipping.
+#   The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME
+#   for full audio volume.  Note this does not change hardware volume.
+#   This is provided for convenience -- you can mix your own audio data.
+#
+proc mixAudio*(dst: ptr uint8; src: ptr uint8; len: uint32; volume: cint) {.
+  importc: "SDL_MixAudio".}
+#*
+#   This works like SDL_MixAudio(), but you specify the audio format instead of
+#   using the format of audio device 1. Thus it can be used when no audio
+#   device is open at all.
+#
+proc mixAudioFormat*(dst: ptr uint8; src: ptr uint8;
+                         format: AudioFormat; len: uint32; volume: cint) {.
+  importc: "SDL_MixAudioFormat".}
+#*
+#   \name Audio lock functions
+#
+#   The lock manipulated by these functions protects the callback function.
+#   During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that
+#   the callback function is not running.  Do not call these from the callback
+#   function or you will cause deadlock.
+#
+# @{
+proc lockAudio*() {.
+  importc: "SDL_LockAudio".}
+proc lockAudioDevice*(dev: AudioDeviceID) {.
+  importc: "SDL_LockAudioDevice".}
+proc unlockAudio*() {.
+  importc: "SDL_UnlockAudio".}
+proc unlockAudioDevice*(dev: AudioDeviceID) {.
+  importc: "SDL_UnlockAudioDevice".}
+# @}
+# Audio lock functions
+#*
+#   This function shuts down audio processing and closes the audio device.
+#
+proc closeAudio*() {.
+  importc: "SDL_CloseAudio".}
+proc closeAudioDevice*(dev: AudioDeviceID) {.
+  importc: "SDL_CloseAudioDevice".}
+# Ends C function definitions when using C++
+
+
+proc newAudioStream*(
+  src_format: AudioFormat;
+  src_channels: uint8;
+  src_rate: cint;
+  dst_format: AudioFormat;
+  dst_channels: uint8;
+  dst_rate: cint): AudioStreamPtr {.importc: "SDL_NewAudioStream".}
+  ## (Available since SDL 2.0.7)
+  ## Create a new audio stream. return 0 on success, or -1
+  ## on error.
+  ## 
+  ## Parameters:
+  ## * `src_format` The format of the source audio
+  ## * `src_channels` The number of channels of the source audio
+  ## * `src_rate` The sampling rate of the source audio
+  ## * `dst_format` The format of the desired audio output
+  ## * `dst_channels` The number of channels of the desired audio output
+  ## * `dst_rate The` sampling rate of the desired audio output
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+  ## * `newAudioStream proc<#newAudioStream,AudioSpec,AudioSpec>`_
+
+proc newAudioStream*(srcSpec, destSpec: AudioSpec): AudioStreamPtr =
+  ## (Available since SDL 2.0.7)
+  ## Create a new audio stream that converts from `srcSpec` to `destSpec`.
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+  ## * `newAudioStream proc<#newAudioStream,AudioFormat,uint8,cint,AudioFormat,uint8,cint>`_
+  newAudioStream(
+    srcSpec.format, srcSpec.channels, srcSpec.freq,
+    destSpec.format, destSpec.channels, destSpec.freq)
+
+proc put*(
+  stream: AudioStreamPtr,
+  buf: pointer,
+  len: cint): cint {.importc: "SDL_AudioStreamPut".}
+  ## (Available since SDL 2.0.7)
+  ## Add data to be converted/resampled to the stream. Returns 0 on success, or -1 on error.
+  ## 
+  ## Parameters:
+  ## * `stream` The stream the audio data is being added to
+  ## * `buf` A pointer to the audio data to add
+  ## * `len` The number of bytes to write to the stream
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+
+proc get*(
+  stream: AudioStreamPtr,
+  buf: pointer,
+  len: cint): cint {.importc: "SDL_AudioStreamGet".}
+  ## (Available since SDL 2.0.7)
+  ## Get converted/resampled data from the stream.
+  ## Returns the number of bytes read from the stream, or -1 on error.
+  ## 
+  ## Parameters:
+  ## * `stream` The stream the audio is being requested from
+  ## * `buf` A buffer to fill with audio data
+  ## * `len` The maximum number of bytes to fill
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+
+proc available*(stream: AudioStreamPtr): cint {.importc: "SDL_AudioStreamAvailable".}
+  ## (Available since SDL 2.0.7)
+  ## Get the number of converted/resampled bytes available (BYTES, not samples!).
+  ## The stream may be buffering data behind the scenes until it has enough to
+  ## resample correctly, so this number might be lower than what you expect, or even
+  ## be zero. Add more data or flush the stream if you need the data now.
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+
+proc flush*(stream: AudioStreamPtr): cint {.importc: "SDL_AudioStreamFlush".}
+  ## (Available since SDL 2.0.7)
+  ## Tell the stream that you're done sending data, and anything being buffered
+  ## should be converted/resampled and made available immediately. Returns 0
+  ## on success, -1 on error.
+  ##
+  ## It is legal to add more data to a stream after flushing, but there will
+  ## be audio gaps in the output. Generally this is intended to signal the
+  ## end of input, so the complete output becomes available.
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+
+proc clear*(stream: AudioStreamPtr) {.importc: "SDL_AudioStreamClear".}
+  ## (Available since SDL 2.0.7)
+  ## Clear any pending data in the stream without converting it.
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+
+proc destroy*(stream: AudioStreamPtr) {.importc: "SDL_FreeAudioStream".}
+  ## (Available since SDL 2.0.7)
+  ## Free an audio stream.
+  ##
+  ## See also:
+  ## * `AudioStreamPtr type<#AudioStreamPtr>`_
+
+
+# vi: set ts=4 sw=4 expandtab:
+when not defined(SDL_Static):
+  {.pop.}

+ 294 - 0
src/nodesnim/core/sdl2/gamecontroller.nim

@@ -0,0 +1,294 @@
+import "../sdl2"
+import "joystick"
+
+discard """
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+
+
+\file SDL_gamecontroller.h
+
+Include file for SDL game controller event handling
+
+"""
+
+##
+#   \file SDL_gamecontroller.h
+#
+#   In order to use these functions, SDL_Init() must have been called
+#   with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
+#   for game controllers, and load appropriate drivers.
+#
+#   If you would like to receive controller updates while the application
+#   is in the background, you should set the following hint before calling
+#   SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
+#
+
+# The gamecontroller structure used to identify an SDL game controller# /
+type
+  GameController* = object
+  GameControllerPtr* = ptr GameController
+
+  GameControllerBindType* {.size: sizeof(cint).} = enum
+    SDL_CONTROLLER_BINDTYPE_NONE,
+    SDL_CONTROLLER_BINDTYPE_BUTTON,
+    SDL_CONTROLLER_BINDTYPE_AXIS,
+    SDL_CONTROLLER_BINDTYPE_HAT
+
+# Get the SDL joystick layer binding for this controller button/axis mapping
+
+type
+  GameControllerButtonBind* = object
+    case bindType*: GameControllerBindType
+      of SDL_CONTROLLER_BINDTYPE_NONE:
+        nil
+      of SDL_CONTROLLER_BINDTYPE_BUTTON:
+        button*: cint
+      of SDL_CONTROLLER_BINDTYPE_AXIS:
+        axis*: cint
+      of SDL_CONTROLLER_BINDTYPE_HAT:
+        hat*, hatMask*: cint
+
+when defined(SDL_Static):
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+else:
+  {.push callConv: cdecl, dynlib: LibName.}
+
+##
+#  To count the number of game controllers in the system for the following:
+#  int nJoysticks = SDL_NumJoysticks();
+#  int nGameControllers = 0;
+#  for ( int i = 0; i < nJoysticks; i++ ) {
+#      if ( SDL_IsGameController(i) ) {
+#          nGameControllers++;
+#      }
+#  }
+#
+#  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+#  guid,name,mappings
+#
+#  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
+#  Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
+#  The mapping format for joystick is:
+#      bX - a joystick button, index X
+#      hX.Y - hat X with value Y
+#      aX - axis X of the joystick
+#  Buttons can be used as a controller axis and vice versa.
+#
+#  This string shows an example of a valid mapping for a controller
+#  "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
+#
+# /
+
+##
+#   Add or update an existing mapping configuration
+#
+#  \return 1 if mapping is added, 0 if updated, -1 on error
+# /
+proc gameControllerAddMapping* (mappingString: cstring): cint {.
+  importc: "SDL_GameControllerAddMapping".}
+
+##
+#   Get a mapping string for a GUID
+#
+#   \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+# /
+proc gameControllerMappingForGUID* (guid: JoystickGuid): cstring {.
+  importc: "SDL_GameControllerMappingForGUID".}
+
+##
+#   Get a mapping string for an open GameController
+#
+#   \return the mapping string.  Must be freed with SDL_free.  Returns NULL if no mapping is available
+# /
+proc mapping* (gameController: GameControllerPtr): cstring {.
+  importc: "SDL_GameControllerMapping".}
+
+##
+#   Is the joystick on this index supported by the game controller interface?
+# /
+proc isGameController* (joystickIndex: cint): Bool32 {.
+  importc: "SDL_IsGameController".}
+
+
+##
+#   Get the implementation dependent name of a game controller.
+#   This can be called before any controllers are opened.
+#   If no name can be found, this function returns NULL.
+# /
+proc gameControllerNameForIndex* (joystickIndex: cint): cstring {.
+  importc: "SDL_GameControllerNameForIndex".}
+
+##
+#   Open a game controller for use.
+#   The index passed as an argument refers to the N'th game controller on the system.
+#   This index is the value which will identify this controller in future controller
+#   events.
+#
+#   \return A controller identifier, or NULL if an error occurred.
+# /
+proc gameControllerOpen* (joystickIndex: cint): GameControllerPtr {.
+  importc: "SDL_GameControllerOpen".}
+
+##
+#   Return the name for this currently opened controller
+# /
+proc name* (gameController: GameControllerPtr): cstring {.
+  importc: "SDL_GameControllerName".}
+
+##
+#   Returns SDL_TRUE if the controller has been opened and currently connected,
+#   or SDL_FALSE if it has not.
+# /
+proc getAttached* (gameController: GameControllerPtr): Bool32 {.
+  importc: "SDL_GameControllerGetAttached".}
+
+##
+#   Get the underlying joystick object used by a controller
+# /
+proc getJoystick* (gameController: GameControllerPtr): JoystickPtr {.
+  importc: "SDL_GameControllerGetJoystick".}
+
+##
+#   Enable/disable controller event polling.
+#
+#   If controller events are disabled, you must call SDL_GameControllerUpdate()
+#   yourself and check the state of the controller when you want controller
+#   information.
+#
+#   The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
+# /
+proc gameControllerEventState* (state: cint): cint {.
+  importc: "SDL_GameControllerEventState".}
+
+##
+#   Update the current state of the open game controllers.
+#
+#   This is called automatically by the event loop if any game controller
+#   events are enabled.
+# /
+proc gameControllerUpdate* () {.
+  importc: "SDL_GameControllerUpdate".}
+
+
+##
+#   The list of axes available from a controller
+# /
+type
+  GameControllerAxis* {.size: sizeof(cint).} = enum
+    SDL_CONTROLLER_AXIS_INVALID = -1,
+    SDL_CONTROLLER_AXIS_LEFTX,
+    SDL_CONTROLLER_AXIS_LEFTY,
+    SDL_CONTROLLER_AXIS_RIGHTX,
+    SDL_CONTROLLER_AXIS_RIGHTY,
+    SDL_CONTROLLER_AXIS_TRIGGERLEFT,
+    SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
+    SDL_CONTROLLER_AXIS_MAX
+
+converter toInt* (some: GameControllerAxis): uint8 = uint8(some)
+
+##
+#   turn this string into a axis mapping
+# /
+proc gameControllerGetAxisFromString* (pchString: cstring): GameControllerAxis {.
+  importc: "SDL_GameControllerGetAxisFromString".}
+
+##
+#   turn this axis enum into a string mapping
+# /
+proc gameControllerGetStringForAxis* (axis: GameControllerAxis): cstring {.
+  importc: "SDL_GameControllerGetStringForAxis".}
+
+##
+#   Get the SDL joystick layer binding for this controller button mapping
+# /
+proc getBindForAxis* (gameController: GameControllerPtr, axis: GameControllerAxis): GameControllerButtonBind {.
+  importc: "SDL_GameControllerGetBindForAxis".}
+
+##
+#   Get the current state of an axis control on a game controller.
+#
+#   The state is a value ranging from -32768 to 32767.
+#
+#   The axis indices start at index 0.
+# /
+proc getAxis* (gameController: GameControllerPtr, axis: GameControllerAxis): int16 {.
+  importc: "SDL_GameControllerGetAxis".}
+
+##
+#   The list of buttons available from a controller
+# /
+type
+  GameControllerButton* {.size: sizeof(cint).} = enum
+    SDL_CONTROLLER_BUTTON_INVALID = -1,
+    SDL_CONTROLLER_BUTTON_A,
+    SDL_CONTROLLER_BUTTON_B,
+    SDL_CONTROLLER_BUTTON_X,
+    SDL_CONTROLLER_BUTTON_Y,
+    SDL_CONTROLLER_BUTTON_BACK,
+    SDL_CONTROLLER_BUTTON_GUIDE,
+    SDL_CONTROLLER_BUTTON_START,
+    SDL_CONTROLLER_BUTTON_LEFTSTICK,
+    SDL_CONTROLLER_BUTTON_RIGHTSTICK,
+    SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
+    SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
+    SDL_CONTROLLER_BUTTON_DPAD_UP,
+    SDL_CONTROLLER_BUTTON_DPAD_DOWN,
+    SDL_CONTROLLER_BUTTON_DPAD_LEFT,
+    SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
+    SDL_CONTROLLER_BUTTON_MAX
+
+converter toInt* (some: GameControllerButton): uint8 = uint8(some)
+
+##
+#   turn this string into a button mapping
+# /
+proc gameControllerGetButtonFromString* (pchString: cstring): GameControllerButton {.
+  importc: "SDL_GameControllerGetButtonFromString".}
+
+##
+#   turn this button enum into a string mapping
+# /
+proc gameControllerGetStringForButton* (button: GameControllerButton): cstring {.
+  importc: "SDL_GameControllerGetStringForButton".}
+
+##
+#   Get the SDL joystick layer binding for this controller button mapping
+# /
+proc getBindForButton* (gameController: GameControllerPtr, button: GameControllerButton): GameControllerButtonBind {.
+  importc: "SDL_GameControllerGetBindForButton".}
+
+
+##
+#   Get the current state of a button on a game controller.
+#
+#   The button indices start at index 0.
+# /
+proc getButton* (gameController: GameControllerPtr, button: GameControllerButton): uint8 {.
+  importc: "SDL_GameControllerGetButton".}
+
+##
+#   Close a controller previously opened with SDL_GameControllerOpen().
+# /
+proc close* (gameController: GameControllerPtr) {.
+  importc: "SDL_GameControllerClose".}
+
+when not defined(SDL_Static):
+  {.pop.}

+ 259 - 0
src/nodesnim/core/sdl2/gfx.nim

@@ -0,0 +1,259 @@
+#
+#
+#SDL2_gfxPrimitives.h: graphics primitives for SDL
+#
+#Copyright (C) 2012  Andreas Schiffler
+#
+#This software is provided 'as-is', without any express or implied
+#warranty. In no event will the authors be held liable for any damages
+#arising from the use of this software.
+#
+#Permission is granted to anyone to use this software for any purpose,
+#including commercial applications, and to alter it and redistribute it
+#freely, subject to the following restrictions:
+#
+#1. The origin of this software must not be misrepresented; you must not
+#claim that you wrote the original software. If you use this software
+#in a product, an acknowledgment in the product documentation would be
+#appreciated but is not required.
+#
+#2. Altered source versions must be plainly marked as such, and must not be
+#misrepresented as being the original software.
+#
+#3. This notice may not be removed or altered from any source
+#distribution.
+#
+#Andreas Schiffler -- aschiffler at ferzkopp dot net
+#
+#
+
+# Docs: http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html
+
+import ../sdl2
+
+when not defined(SDL_Static):
+  when defined(windows):
+    const LibName = "SDL2_gfx.dll"
+  elif defined(macosx):
+    const LibName = "libSDL2_gfx.dylib"
+  else:
+    const LibName = "libSDL2_gfx(|-2.0).so(|.0)"
+else:
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2_gfx."
+
+const
+  FPS_UPPER_LIMIT* = 200
+  FPS_LOWER_LIMIT* = 1
+  FPS_DEFAULT* = 30
+
+type
+  FpsManager* {.pure, final.} = object
+    framecount*: cint
+    rateticks*: cfloat
+    baseticks*: cint
+    lastticks*: cint
+    rate*: cint
+
+{.pragma: i, importc, discardable.}
+
+when not defined(SDL_Static):
+  {.push callConv:cdecl, dynlib: LibName.}
+
+# ---- Function Prototypes
+# Note: all ___Color routines expect the color to be in format 0xAABBGGRR
+# Pixel
+proc pixelColor*(renderer: RendererPtr; x, y: int16; color: uint32): SDL_Return {.importc, discardable.}
+proc pixelRGBA*(renderer: RendererPtr; x: int16; y: int16; r: uint8;
+                g: uint8; b: uint8; a: uint8): SDL_Return  {.importc, discardable.}
+# Horizontal line
+proc hlineColor*(renderer: RendererPtr; x1: int16; x2: int16;
+                 y: int16; color: uint32): SDL_Return {.importc, discardable.}
+proc hlineRGBA*(renderer: RendererPtr; x1: int16; x2: int16; y: int16;
+                r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# Vertical line
+proc vlineColor*(renderer: RendererPtr; x,y1,y2: int16;
+                  color: uint32): SDL_Return {.importc, discardable.}
+proc vlineRGBA*(renderer: RendererPtr; x,y1,y2: int16;
+                r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# Rectangle
+proc rectangleColor*(renderer: RendererPtr; x1,y1,x2,y2: int16;
+      color: uint32): SDL_Return {.importc, discardable.}
+proc rectangleRGBA*(renderer: RendererPtr; x1,y1,x2,y2: int16; r,g,b,a: uint8): SDL_Return {.
+      importc, discardable.}
+# Rounded-Corner Rectangle
+proc roundedRectangleColor*(renderer: RendererPtr; x1,y1,x2,y2,rad: int16;
+                            color: uint32): SDL_Return {.importc, discardable.}
+proc roundedRectangleRGBA*(renderer: RendererPtr; x1,y1,x2,y2,rad: int16;
+              r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# Filled rectangle (Box)
+proc boxColor*(renderer: RendererPtr; x1, y1, x2, y2: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc boxRGBA*(renderer: RendererPtr; x1, y1, x2, y2: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Rounded-Corner Filled rectangle (Box)
+proc roundedBoxColor*(renderer: RendererPtr; x1,y1,x2,y2,rad: int16;
+                       color: uint32): SDL_Return {.importc, discardable.}
+proc roundedBoxRGBA*(renderer: RendererPtr; x1,y1,x2,y2,rad: int16;
+                  r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# Line
+proc lineColor*(renderer: RendererPtr; x1,y1,x2,y2: int16;
+    color: uint32): SDL_Return {.importc, discardable.}
+proc lineRGBA*(renderer: RendererPtr; x1,y1,x2,y2: int16; r,g,b,a: uint8): SDL_Return {.
+  importc, discardable.}
+# AA Line
+proc aalineColor*(renderer: RendererPtr; x1: int16; y1: int16;
+                  x2: int16; y2: int16; color: uint32): SDL_Return {.importc, discardable.}
+proc aalineRGBA*(renderer: RendererPtr; x1: int16; y1: int16;
+                 x2: int16; y2: int16; r: uint8; g: uint8; b: uint8;
+                 a: uint8): SDL_Return {.importc, discardable.}
+# Thick Line
+proc thickLineColor*(renderer: RendererPtr; x1, y1, x2, y2: int16;
+  width: uint8; color: uint32): SDL_Return {.importc, discardable.}
+proc thickLineRGBA*(renderer: RendererPtr; x1, y1, x2, y2: int16;
+  width, r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Circle
+proc circleColor*(renderer: RendererPtr; x, y, rad: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc circleRGBA*(renderer: RendererPtr; x, y, rad: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Arc
+proc arcColor*(renderer: RendererPtr; x, y, rad, start, finish: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc arcRGBA*(renderer: RendererPtr; x, y, rad, start, finish: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# AA Circle
+proc aacircleColor*(renderer: RendererPtr; x, y, rad: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc aacircleRGBA*(renderer: RendererPtr; x, y, rad: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Filled Circle
+proc filledCircleColor*(renderer: RendererPtr; x, y, r: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc filledCircleRGBA*(renderer: RendererPtr; x, y, rad: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Ellipse
+proc ellipseColor*(renderer: RendererPtr; x: int16; y: int16;
+                   rx: int16; ry: int16; color: uint32): SDL_Return {.importc, discardable.}
+proc ellipseRGBA*(renderer: RendererPtr; x: int16; y: int16;
+                  rx: int16; ry: int16; r: uint8; g: uint8; b: uint8;
+                  a: uint8): SDL_Return {.importc, discardable.}
+# AA Ellipse
+proc aaellipseColor*(renderer: RendererPtr; x, y, rx, ry: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc aaellipseRGBA*(renderer: RendererPtr; x, y, rx, ry: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Filled Ellipse
+proc filledEllipseColor*(renderer: RendererPtr; x, y, rx, ry: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc filledEllipseRGBA*(renderer: RendererPtr; x, y, rx, ry: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Pie
+proc pieColor*(renderer: RendererPtr; x, y, rad, start, finish: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc pieRGBA*(renderer: RendererPtr; x, y, rad, start, finish: int16;
+  r, g, b, a: uint8): SDL_Return  {.importc, discardable.}
+# Filled Pie
+proc filledPieColor*(renderer: RendererPtr; x, y, rad, start, finish: int16;
+  color: uint32): SDL_Return {.importc, discardable.}
+proc filledPieRGBA*(renderer: RendererPtr; x, y, rad, start, finish: int16;
+  r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Trigon
+proc trigonColor*(renderer: RendererPtr; x1,y1,x2,y2,x3,y3: int16,
+                   color: uint32): SDL_Return {.importc, discardable.}
+proc trigonRGBA*(renderer: RendererPtr; x1, y1, x2, y2, x3, y3: int16;
+                  r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# AA-Trigon
+proc aaTrigonColor*(renderer: RendererPtr; x1, y1, x2, y2, x3, y3: int16;
+                    color: uint32): SDL_Return {.importc: "aatrigonColor",
+                    discardable.}
+proc aaTrigonRGBA*(renderer: RendererPtr; x1, y1, x2, y2, x3, y3: int16;
+                    r,g,b,a: uint8): SDL_Return {.importc: "aatrigonRGBA",
+                    discardable.}
+# Filled Trigon
+proc filledTrigonColor*(renderer: RendererPtr; x1: int16; y1: int16;
+                        x2: int16; y2: int16; x3: int16; y3: int16;
+                        color: uint32): SDL_Return {.importc, discardable.}
+proc filledTrigonRGBA*(renderer: RendererPtr; x1: int16; y1: int16;
+                       x2: int16; y2: int16; x3: int16; y3: int16;
+                       r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# Polygon
+proc polygonColor*(renderer: RendererPtr; vx: ptr int16; vy: ptr int16;
+                   n: cint; color: uint32): SDL_Return {.importc, discardable.}
+proc polygonRGBA*(renderer: RendererPtr; vx: ptr int16; vy: ptr int16;
+                  n: cint; r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# AA-Polygon
+proc aaPolygonColor*(renderer: RendererPtr; vx: ptr int16; vy: ptr int16;
+                     n: cint; color: uint32): SDL_Return {.importc: "aapolygonColor",
+                     discardable.}
+proc aaPolygonRGBA*(renderer: RendererPtr; vx: ptr int16; vy: ptr int16;
+                    n: cint; r,g,b,a: uint8): SDL_Return {.importc: "aapolygonRGBA",
+                    discardable.}
+# Filled Polygon
+proc filledPolygonColor*(renderer: RendererPtr; vx: ptr int16;
+                         vy: ptr int16; n: cint; color: uint32): SDL_Return {.importc, discardable.}
+proc filledPolygonRGBA*(renderer: RendererPtr; vx: ptr int16;
+                        vy: ptr int16; n: cint; r: uint8; g: uint8; b: uint8;
+                        a: uint8): SDL_Return {.importc, discardable.}
+# Textured Polygon
+proc texturedPolygon*(renderer: RendererPtr; vx: ptr int16;
+                      vy: ptr int16; n: cint; texture: SurfacePtr;
+                      texture_dx: cint; texture_dy: cint): SDL_Return {.importc, discardable.}
+# Bezier
+proc bezierColor*(renderer: RendererPtr; vx,vy: ptr int16;
+                  n: cint; s: cint; color: uint32): SDL_Return {.importc, discardable.}
+proc bezierRGBA*(renderer: RendererPtr; vx, vy: ptr int16;
+                 n: cint; s: cint; r, g, b, a: uint8): SDL_Return {.importc, discardable.}
+# Characters/Strings
+proc gfxPrimitivesSetFont*(fontdata: pointer; cw: uint32; ch: uint32) {.importc.}
+proc gfxPrimitivesSetFontRotation*(rotation: uint32) {.importc.}
+proc characterColor*(renderer: RendererPtr; x: int16; y: int16;
+                     c: char; color: uint32): SDL_Return {.importc.}
+proc characterRGBA*(renderer: RendererPtr; x: int16; y: int16; c: char;
+                    r,g,b,a: uint8): SDL_Return {.importc.}
+proc stringColor*(renderer: RendererPtr; x: int16; y: int16;
+                  s: cstring; color: uint32): SDL_Return {.importc.}
+proc stringRGBA*(renderer: RendererPtr; x: int16; y: int16; s: cstring;
+                 r,g,b,a: uint8): SDL_Return {.importc, discardable.}
+# Ends C function definitions when using C++
+
+proc rotozoomSurface*(src: SurfacePtr; angle, zoom: cdouble;
+  smooth: cint): SurfacePtr {.importc.}
+proc rotozoomSurfaceXY*(src: SurfacePtr; angle, zoomX, zoomY: cdouble;
+  smooth: cint): SurfacePtr {.importc.}
+proc rotozoomSurfaceSize*(width, height: cint; angle, zoom: cdouble;
+  dstwidth, dstheight: var cint) {.importc.}
+proc rotozoomSurfaceSizeXY*(width, height: cint; angle, zoomX, zoomY: cdouble;
+                            dstwidth, dstheight: var cint) {.importc.}
+proc zoomSurface*(src: SurfacePtr; zoomX, zoomY: cdouble;
+  smooth: cint): SurfacePtr {.importc.}
+proc zoomSurfaceSize*(width, height: cint; zoomX, zoomY: cdouble;
+  dstWidth, dstHeight: var cint) {.importc.}
+
+proc shrinkSurface*(src: SurfacePtr; factorx, factorY: cint): SurfacePtr {.importc.}
+proc rotateSurface90Degrees*(src: SurfacePtr;
+  numClockwiseTurns: cint): SurfacePtr {.importc.}
+
+proc init*(manager: var FpsManager) {.importc: "SDL_initFramerate".}
+proc setFramerate*(manager: var FpsManager; rate: cint): SDL_Return {.
+  importc: "SDL_setFramerate", discardable.}
+proc getFramerate*(manager: var FpsManager): cint {.importc: "SDL_getFramerate".}
+proc getFramecount*(manager: var FpsManager): cint {.importc: "SDL_getFramecount".}
+proc delay*(manager: var FpsManager): cint {.importc: "SDL_framerateDelay", discardable.}
+
+when not defined(SDL_Static):
+  {.pop.}
+
+from strutils import splitLines
+proc mlStringRGBA*(renderer: RendererPtr; x,y: int16, S: string, R,G,B,A: uint8, lineSpacing = 2'i16) =
+  ## Draw a multi-line string
+  var ln = 0
+  for L in splitLines(S):
+    renderer.stringRGBA(x,(y + int16(ln * 8) + int16(ln * lineSpacing)),L, R,G,B,A)
+    inc ln
+proc mlStringRGBA*(renderer: RendererPtr; x,y: int16; S: seq[string]; R,G,B,A: uint8; lineSpacing = 2'i16) =
+  var ln = 0
+  while ln < S.len:
+    renderer.stringRGBA(x, y + int16(ln * 8 + ln * lineSpacing), S[ln], R,G,B,A)
+    inc ln
+
+{.deprecated: [TFPSmanager: FpsManager].}

+ 1193 - 0
src/nodesnim/core/sdl2/haptic.nim

@@ -0,0 +1,1193 @@
+import "../sdl2"
+import "joystick"
+
+#
+#  Simple DirectMedia Layer
+#  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+#
+#  This software is provided 'as-is', without any express or implied
+#  warranty.  In no event will the authors be held liable for any damages
+#  arising from the use of this software.
+#
+#  Permission is granted to anyone to use this software for any purpose,
+#  including commercial applications, and to alter it and redistribute it
+#  freely, subject to the following restrictions:
+#
+#  1. The origin of this software must not be misrepresented; you must not
+#     claim that you wrote the original software. If you use this software
+#     in a product, an acknowledgment in the product documentation would be
+#     appreciated but is not required.
+#  2. Altered source versions must be plainly marked as such, and must not be
+#     misrepresented as being the original software.
+#  3. This notice may not be removed or altered from any source distribution.
+#
+
+#
+#  \file SDL_haptic.h
+#
+#  \brief The SDL Haptic subsystem allows you to control haptic (force feedback)
+#         devices.
+#
+#  The basic usage is as follows:
+#   - Initialize the Subsystem (::SDL_INIT_HAPTIC).
+#   - Open a Haptic Device.
+#    - SDL_HapticOpen() to open from index.
+#    - SDL_HapticOpenFromJoystick() to open from an existing joystick.
+#   - Create an effect (::SDL_HapticEffect).
+#   - Upload the effect with SDL_HapticNewEffect().
+#   - Run the effect with SDL_HapticRunEffect().
+#   - (optional) Free the effect with SDL_HapticDestroyEffect().
+#   - Close the haptic device with SDL_HapticClose().
+#
+#   \par Simple rumble example:
+#   \code
+#    haptic: HapticPtr;
+#
+#    // Open the device
+#    haptic = SDL_HapticOpen( 0 );
+#    if (haptic == NULL)
+#       return -1;
+#
+#    // Initialize simple rumble
+#    if (SDL_HapticRumbleInit( haptic ) != 0)
+#       return -1;
+#
+#    // Play effect at 50% strength for 2 seconds
+#    if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)
+#       return -1;
+#    SDL_Delay( 2000 );
+#
+#    // Clean up
+#    SDL_HapticClose( haptic );
+#  \endcode
+#
+#  \par Complete example:
+#  \code
+#  int test_haptic( joystick: Joystick ) {
+#    haptic: HapticPtr;
+#    SDL_HapticEffect effect;
+#    effect: cint_id;
+#
+#    // Open the device
+#    haptic = SDL_HapticOpenFromJoystick( joystick );
+#    if (haptic == NULL) return -1; // Most likely joystick isn't haptic
+#
+#    // See if it can do sine waves
+#    if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {
+#       SDL_HapticClose(haptic); // No sine effect
+#       return -1;
+#    }
+#
+#    // Create the effect
+#    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default
+#    effect.type = SDL_HAPTIC_SINE;
+#    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates
+#    effect.periodic.direction.dir[0] = 18000; // Force comes from south
+#    effect.periodic.period = 1000; // 1000 ms
+#    effect.periodic.magnitude = 20000; // 20000/32767 strength
+#    effect.periodic.length = 5000; // 5 seconds long
+#    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength
+#    effect.periodic.fade_length = 1000; // Takes 1 second to fade away
+#
+#    // Upload the effect
+#    effect_id = SDL_HapticNewEffect( haptic, &effect );
+#
+#    // Test the effect
+#    SDL_HapticRunEffect( haptic, effect_id, 1 );
+#    SDL_Delay( 5000); // Wait for the effect to finish
+#
+#    // We destroy the effect, although closing the device also does this
+#    SDL_HapticDestroyEffect( haptic, effect_id );
+#
+#    // Close the device
+#    SDL_HapticClose(haptic);
+#
+#    return 0; // Success
+#  }
+#  \endcode
+#
+#  You can also find out more information on my blog:
+#  http://bobbens.dyndns.org/journal/2010/sdl_haptic/
+#
+#  \author Edgar Simo Serra
+# /
+
+#
+#  \typedef SDL_Haptic
+#
+#  \brief The haptic structure used to identify an SDL haptic.
+#
+#  \sa SDL_HapticOpen
+#  \sa SDL_HapticOpenFromJoystick
+#  \sa SDL_HapticClose
+
+type
+  Haptic* = object
+  HapticPtr* = ptr Haptic
+
+
+#
+#  \name Haptic features
+#
+#  Different haptic features a device can have.
+
+#  @{
+
+#
+#  \name Haptic effects
+
+#  @{
+
+#
+#  \brief Constant effect supported.
+#
+#  Constant haptic effect.
+#
+#  \sa SDL_HapticCondition
+
+const SDL_HAPTIC_CONSTANT* = (1 shl 0)
+
+#
+#  \brief Sine wave effect supported.
+#
+#  Periodic haptic effect that simulates sine waves.
+#
+#  \sa SDL_HapticPeriodic
+
+const SDL_HAPTIC_SINE* = (1 shl 1)
+
+#
+#  \brief Left/Right effect supported.
+#
+#  Haptic effect for direct control over high/low frequency motors.
+#
+#  \sa SDL_HapticLeftRight
+#  \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
+#          we ran out of bits, and this is important for XInput devices.
+
+const SDL_HAPTIC_LEFTRIGHT* = (1 shl 2)
+
+#  !!! FIXME: put this back when we have more bits in 2.1
+#  const SDL_HAPTIC_SQUARE* = (1 shl 2)
+
+#
+#  \brief Triangle wave effect supported.
+#
+#  Periodic haptic effect that simulates triangular waves.
+#
+#  \sa SDL_HapticPeriodic
+
+const SDL_HAPTIC_TRIANGLE* = (1 shl 3)
+
+#
+#  \brief Sawtoothup wave effect supported.
+#
+#  Periodic haptic effect that simulates saw tooth up waves.
+#
+#  \sa SDL_HapticPeriodic
+
+const SDL_HAPTIC_SAWTOOTHUP* = (1 shl 4)
+
+#
+#  \brief Sawtoothdown wave effect supported.
+#
+#  Periodic haptic effect that simulates saw tooth down waves.
+#
+#  \sa SDL_HapticPeriodic
+
+const SDL_HAPTIC_SAWTOOTHDOWN* = (1 shl 5)
+
+#
+#  \brief Ramp effect supported.
+#
+#  Ramp haptic effect.
+#
+#  \sa SDL_HapticRamp
+
+const SDL_HAPTIC_RAMP* = (1 shl 6)
+
+#
+#  \brief Spring effect supported - uses axes position.
+#
+#  Condition haptic effect that simulates a spring.  Effect is based on the
+#  axes position.
+#
+#  \sa SDL_HapticCondition
+
+const SDL_HAPTIC_SPRING* = (1 shl 7)
+
+#
+#  \brief Damper effect supported - uses axes velocity.
+#
+#  Condition haptic effect that simulates dampening.  Effect is based on the
+#  axes velocity.
+#
+#  \sa SDL_HapticCondition
+
+const SDL_HAPTIC_DAMPER* = (1 shl 8)
+
+#
+#  \brief Inertia effect supported - uses axes acceleration.
+#
+#  Condition haptic effect that simulates inertia.  Effect is based on the axes
+#  acceleration.
+#
+#  \sa SDL_HapticCondition
+
+const SDL_HAPTIC_INERTIA* = (1 shl 9)
+
+#
+#  \brief Friction effect supported - uses axes movement.
+#
+#  Condition haptic effect that simulates friction.  Effect is based on the
+#  axes movement.
+#
+#  \sa SDL_HapticCondition
+
+const SDL_HAPTIC_FRICTION* = (1 shl 10)
+
+#
+#  \brief Custom effect is supported.
+#
+#  User defined custom haptic effect.
+
+const SDL_HAPTIC_CUSTOM* = (1 shl 11)
+
+#  @} #  Haptic effects
+
+#  These last few are features the device has, not effects
+
+#
+#  \brief Device can set global gain.
+#
+#  Device supports setting the global gain.
+#
+#  \sa SDL_HapticSetGain
+
+const SDL_HAPTIC_GAIN* = (1 shl 12)
+
+#
+#  \brief Device can set autocenter.
+#
+#  Device supports setting autocenter.
+#
+#  \sa SDL_HapticSetAutocenter
+
+const SDL_HAPTIC_AUTOCENTER* = (1 shl 13)
+
+#
+#  \brief Device can be queried for effect status.
+#
+#  Device can be queried for effect status.
+#
+#  \sa SDL_HapticGetEffectStatus
+
+const SDL_HAPTIC_STATUS* = (1 shl 14)
+
+#
+#  \brief Device can be paused.
+#
+#  \sa SDL_HapticPause
+#  \sa SDL_HapticUnpause
+
+const SDL_HAPTIC_PAUSE* = (1 shl 15)
+
+
+#
+#  \name Direction encodings
+
+#  @{
+
+#
+#  \brief Uses polar coordinates for the direction.
+#
+#  \sa HapticDirection
+
+const SDL_HAPTIC_POLAR* = 0
+
+#
+#  \brief Uses cartesian coordinates for the direction.
+#
+#  \sa HapticDirection
+
+const SDL_HAPTIC_CARTESIAN* = 1
+
+#
+#  \brief Uses spherical coordinates for the direction.
+#
+#  \sa HapticDirection
+
+const SDL_HAPTIC_SPHERICAL* = 2
+
+#  @} #  Direction encodings
+
+#  @} #  Haptic features
+
+#
+#  Misc defines.
+
+
+#
+#  \brief Used to play a device an infinite number of times.
+#
+#  \sa SDL_HapticRunEffect
+
+const SDL_HAPTIC_INFINITY* = 4294967295'u
+
+
+#
+#  \brief Structure that represents a haptic direction.
+#
+#  Directions can be specified by:
+#   - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
+#   - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
+#   - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.
+#
+#  Cardinal directions of the haptic device are relative to the positioning
+#  of the device.  North is considered to be away from the user.
+#
+#  The following diagram represents the cardinal directions:
+#  \verbatim
+#                 .--.
+#                 |__| .-------.
+#                 |=.| |.-----.|
+#                 |--| ||     ||
+#                 |  | |'-----'|
+#                 |__|~')_____('
+#                   [ COMPUTER ]
+#
+#
+#                     North (0,-1)
+#                         ^
+#                         |
+#                         | = (1,0)  West <----[ HAPTIC ]----> East (-1,0)
+#                         |
+#                         |
+#                         v
+#                      South (0,1)
+#
+#
+#                      [ USER ]
+#                        \|||/ = (o o)
+#                  ---ooO-(_)-Ooo---
+#    \endverbatim
+#
+#  If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a
+#  degree starting north and turning clockwise.  ::SDL_HAPTIC_POLAR only uses
+#  the first \c dir parameter.  The cardinal directions would be:
+#   - North: 0 (0 degrees)
+#   - East: 9000 (90 degrees)
+#   - South: 18000 (180 degrees)
+#   - West: 27000 (270 degrees)
+#
+#  If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions
+# = (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN uses
+#  the first three \c dir parameters.  The cardinal directions would be:
+#   - North:  0,-1, 0
+#   - East:  -1, 0, 0
+#   - South:  0, 1, 0
+#   - West:   1, 0, 0
+#
+#  The Z axis represents the height of the effect if supported, otherwise
+#  it's unused.  In cartesian encoding (1, 2) would be the same as (2, 4), you
+#  can use any multiple you want, only the direction matters.
+#
+#  If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.
+#  The first two \c dir parameters are used.  The \c dir parameters are as
+#  follows (all values are in hundredths of degrees):
+#   - Degrees from (1, 0) rotated towards (0, 1).
+#   - Degrees towards (0, 0, 1) (device needs at least 3 axes).
+#
+#
+#  Example of force coming from the south with all encodings (force coming
+#  from the south means the user will have to pull the stick to counteract):
+#  \code
+#  HapticDirection direction;
+#
+#  // Cartesian directions
+#  direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.
+#  direction.dir[0] = 0; // X position
+#  direction.dir[1] = 1; // Y position
+#  // Assuming the device has 2 axes, we don't need to specify third parameter.
+#
+#  // Polar directions
+#  direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.
+#  direction.dir[0] = 18000; // Polar only uses first parameter
+#
+#  // Spherical coordinates
+#  direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding
+#  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.
+#  \endcode
+#
+#  \sa SDL_HAPTIC_POLAR
+#  \sa SDL_HAPTIC_CARTESIAN
+#  \sa SDL_HAPTIC_SPHERICAL
+#  \sa SDL_HapticEffect
+#  \sa SDL_HapticNumAxes
+
+type
+  HapticDirection* = object
+    kind: uint8         #  < The type of encoding.
+    dir: array[3, int32]      #  < The encoded direction.
+
+
+#
+#  \brief A structure containing a template for a Constant effect.
+#
+#  The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect.
+#
+#  A constant effect applies a constant force in the specified direction
+#  to the joystick.
+#
+#  \sa SDL_HAPTIC_CONSTANT
+#  \sa SDL_HapticEffect
+
+type
+  HapticConstant* = object
+    #  Header
+    kind: uint16            #  < ::SDL_HAPTIC_CONSTANT
+    direction: HapticDirection  #  < Direction of the effect.
+
+    #  Replay
+    length: uint32          #  < Duration of the effect.
+    delay: uint16           #  < Delay before starting the effect.
+
+    #  Trigger
+    button: uint16          #  < Button that triggers the effect.
+    interval: uint16        #  < How soon it can be triggered again after button.
+
+    #  Constant
+    level: int16           #  < Strength of the constant effect.
+
+    #  Envelope
+    attack_length: uint16   #  < Duration of the attack.
+    attack_level: uint16    #  < Level at the start of the attack.
+    fade_length: uint16     #  < Duration of the fade.
+    fade_level: uint16      #  < Level at the end of the fade.
+
+#
+#  \brief A structure containing a template for a Periodic effect.
+#
+#  The struct handles the following effects:
+#   - ::SDL_HAPTIC_SINE
+#   - ::SDL_HAPTIC_LEFTRIGHT
+#   - ::SDL_HAPTIC_TRIANGLE
+#   - ::SDL_HAPTIC_SAWTOOTHUP
+#   - ::SDL_HAPTIC_SAWTOOTHDOWN
+#
+#  A periodic effect consists in a wave-shaped effect that repeats itself
+#  over time.  The type determines the shape of the wave and the parameters
+#  determine the dimensions of the wave.
+#
+#  Phase is given by hundredth of a cycle meaning that giving the phase a value
+#  of 9000 will displace it 25% of its period.  Here are sample values:
+#   -     0: No phase displacement.
+#   -  9000: Displaced 25% of its period.
+#   - 18000: Displaced 50% of its period.
+#   - 27000: Displaced 75% of its period.
+#   - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.
+#
+#  Examples:
+#  \verbatim
+#    SDL_HAPTIC_SINE
+#      __      __      __      __
+#     /  \    /  \    /  \    /
+#    /    \__/    \__/    \__/
+#
+#    SDL_HAPTIC_SQUARE
+#     __    __    __    __    __
+#    |  |  |  |  |  |  |  |  |  |
+#    |  |__|  |__|  |__|  |__|  |
+#
+#    SDL_HAPTIC_TRIANGLE
+#      /\    /\    /\    /\    /\
+#     /  \  /  \  /  \  /  \  /
+#    /    \/    \/    \/    \/
+#
+#    SDL_HAPTIC_SAWTOOTHUP
+#      /|  /|  /|  /|  /|  /|  /|
+#     / | / | / | / | / | / | / |
+#    /  |/  |/  |/  |/  |/  |/  |
+#
+#    SDL_HAPTIC_SAWTOOTHDOWN
+#    \  |\  |\  |\  |\  |\  |\  |
+#     \ | \ | \ | \ | \ | \ | \ |
+#      \|  \|  \|  \|  \|  \|  \|
+#    \endverbatim
+#
+#  \sa SDL_HAPTIC_SINE
+#  \sa SDL_HAPTIC_LEFTRIGHT
+#  \sa SDL_HAPTIC_TRIANGLE
+#  \sa SDL_HAPTIC_SAWTOOTHUP
+#  \sa SDL_HAPTIC_SAWTOOTHDOWN
+#  \sa SDL_HapticEffect
+
+type
+  HapticPeriodic* = object
+    #  Header
+    kind: uint16        #  < ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,
+                        #    ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or
+                        #    ::SDL_HAPTIC_SAWTOOTHDOWN
+    direction: HapticDirection  #  < Direction of the effect.
+
+    #  Replay
+    length: uint32      #  < Duration of the effect.
+    delay: uint16       #  < Delay before starting the effect.
+
+    #  Trigger
+    button: uint16      #  < Button that triggers the effect.
+    interval: uint16    #  < How soon it can be triggered again after button.
+
+    #  Periodic
+    period: uint16      #  < Period of the wave.
+    magnitude: int16   #  < Peak value.
+    offset: int16      #  < Mean value of the wave.
+    phase: uint16       #  < Horizontal shift given by hundredth of a cycle.
+
+    #  Envelope
+    attack_length: uint16   #  < Duration of the attack.
+    attack_level: uint16    #  < Level at the start of the attack.
+    fade_length: uint16 #  < Duration of the fade.
+    fade_level: uint16  #  < Level at the end of the fade.
+
+#
+#  \brief A structure containing a template for a Condition effect.
+#
+#  The struct handles the following effects:
+#   - ::SDL_HAPTIC_SPRING: Effect based on axes position.
+#   - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.
+#   - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.
+#   - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.
+#
+#  Direction is handled by condition internals instead of a direction member.
+#  The condition effect specific members have three parameters.  The first
+#  refers to the X axis, the second refers to the Y axis and the third
+#  refers to the Z axis.  The right terms refer to the positive side of the
+#  axis and the left terms refer to the negative side of the axis.  Please
+#  refer to the ::HapticDirection diagram for which side is positive and
+#  which is negative.
+#
+#  \sa HapticDirection
+#  \sa SDL_HAPTIC_SPRING
+#  \sa SDL_HAPTIC_DAMPER
+#  \sa SDL_HAPTIC_INERTIA
+#  \sa SDL_HAPTIC_FRICTION
+#  \sa SDL_HapticEffect
+
+type
+  HapticCondition* = object
+    #  Header
+    kind: uint16            #  < ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,
+                            #     ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION
+    direction: HapticDirection  #  < Direction of the effect - Not used ATM.
+
+    #  Replay
+    length: uint32          #  < Duration of the effect.
+    delay: uint16           #  < Delay before starting the effect.
+
+    #  Trigger
+    button: uint16          #  < Button that triggers the effect.
+    interval: uint16        #  < How soon it can be triggered again after button.
+
+    #  Condition
+    right_sat: array[3, uint16]    #  < Level when joystick is to the positive side.
+    left_sat: array[3, uint16]     #  < Level when joystick is to the negative side.
+    right_coeff: array[3, int16]  #  < How fast to increase the force towards the positive side.
+    left_coeff: array[3, int16]   #  < How fast to increase the force towards the negative side.
+    deadband: array[3, uint16]     #  < Size of the dead zone.
+    center: array[3, int16]       #  < Position of the dead zone.
+
+#
+#  \brief A structure containing a template for a Ramp effect.
+#
+#  This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.
+#
+#  The ramp effect starts at start strength and ends at end strength.
+#  It augments in linear fashion.  If you use attack and fade with a ramp
+#  the effects get added to the ramp effect making the effect become
+#  quadratic instead of linear.
+#
+#  \sa SDL_HAPTIC_RAMP
+#  \sa SDL_HapticEffect
+
+type
+  HapticRamp* = object
+    #  Header
+    kind: uint16            #  < ::SDL_HAPTIC_RAMP
+    direction: HapticDirection  #  < Direction of the effect.
+
+    #  Replay
+    length: uint32          #  < Duration of the effect.
+    delay: uint16           #  < Delay before starting the effect.
+
+    #  Trigger
+    button: uint16          #  < Button that triggers the effect.
+    interval: uint16        #  < How soon it can be triggered again after button.
+
+    #  Ramp
+    start: int16           #  < Beginning strength level.
+    fin: int16             #  < Ending strength level.
+
+    #  Envelope
+    attack_length: uint16   #  < Duration of the attack.
+    attack_level: uint16    #  < Level at the start of the attack.
+    fade_length: uint16     #  < Duration of the fade.
+    fade_level: uint16      #  < Level at the end of the fade.
+
+#
+#  \brief A structure containing a template for a Left/Right effect.
+#
+#  This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
+#
+#  The Left/Right effect is used to explicitly control the large and small
+#  motors, commonly found in modern game controllers. One motor is high
+#  frequency, the other is low frequency.
+#
+#  \sa SDL_HAPTIC_LEFTRIGHT
+#  \sa SDL_HapticEffect
+
+type
+  HapticLeftRight* = object
+    #  Header
+    kind: uint16            #  < ::SDL_HAPTIC_LEFTRIGHT
+
+    #  Replay
+    length: uint32          #  < Duration of the effect.
+
+    #  Rumble
+    large_magnitude: uint16 #  < Control of the large controller motor.
+    small_magnitude: uint16 #  < Control of the small controller motor.
+
+#
+#  \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
+#
+#  A custom force feedback effect is much like a periodic effect, where the
+#  application can define its exact shape.  You will have to allocate the
+#  data yourself.  Data should consist of channels#  samples uint16 samples.
+#
+#  If channels is one, the effect is rotated using the defined direction.
+#  Otherwise it uses the samples in data for the different axes.
+#
+#  \sa SDL_HAPTIC_CUSTOM
+#  \sa SDL_HapticEffect
+
+type
+  HapticCustom* = object
+    #  Header
+    kind: uint16            #  < ::SDL_HAPTIC_CUSTOM
+    direction: HapticDirection  #  < Direction of the effect.
+
+    #  Replay
+    length: uint32          #  < Duration of the effect.
+    delay: uint16           #  < Delay before starting the effect.
+
+    #  Trigger
+    button: uint16          #  < Button that triggers the effect.
+    interval: uint16        #  < How soon it can be triggered again after button.
+
+    #  Custom
+    channels: uint8         #  < Axes to use, minimum of one.
+    period: uint16          #  < Sample periods.
+    samples: uint16         #  < Amount of samples.
+    data: ptr uint16           #  < Should contain channels*samples items.
+
+    #  Envelope
+    attack_length: uint16   #  < Duration of the attack.
+    attack_level: uint16    #  < Level at the start of the attack.
+    fade_length: uint16     #  < Duration of the fade.
+    fade_level: uint16      #  < Level at the end of the fade.
+
+#
+#  \brief The generic template for any haptic effect.
+#
+#  All values max at 32767 (0x7FFF).  Signed values also can be negative.
+#  Time values unless specified otherwise are in milliseconds.
+#
+#  You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767
+#  value.  Neither delay, interval, attack_length nor fade_length support
+#  ::SDL_HAPTIC_INFINITY.  Fade will also not be used since effect never ends.
+#
+#  Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of
+#  ::SDL_HAPTIC_INFINITY.
+#
+#  Button triggers may not be supported on all devices, it is advised to not
+#  use them if possible.  Buttons start at index 1 instead of index 0 like
+#  the joystick.
+#
+#  If both attack_length and fade_level are 0, the envelope is not used,
+#  otherwise both values are used.
+#
+#  Common parts:
+#  \code
+#  // Replay - All effects have this
+#  uint32 length;        // Duration of effect (ms).
+#  uint16 delay;         // Delay before starting effect.
+#
+#  // Trigger - All effects have this
+#  uint16 button;        // Button that triggers effect.
+#  uint16 interval;      // How soon before effect can be triggered again.
+#
+#  // Envelope - All effects except condition effects have this
+#  uint16 attack_length; // Duration of the attack (ms).
+#  uint16 attack_level;  // Level at the start of the attack.
+#  uint16 fade_length;   // Duration of the fade out (ms).
+#  uint16 fade_level;    // Level at the end of the fade.
+#  \endcode
+#
+#
+#  Here we have an example of a constant effect evolution in time:
+#  \verbatim
+#    Strength
+#    ^
+#    |
+#    |    effect level -->  _________________
+#    |                     /                 \
+#    |                    /                   \
+#    |                   /                     \
+#    |                  /                       \
+#    | attack_level --> |                        \
+#    |                  |                        |  <---  fade_level
+#    |
+#    +--------------------------------------------------> Time
+#                       [--]                 [---]
+#                       attack_length        fade_length
+#
+#    [------------------][-----------------------]
+#    delay               length
+#    \endverbatim
+#
+#  Note either the attack_level or the fade_level may be above the actual
+#  effect level.
+#
+#  \sa SDL_HapticConstant
+#  \sa SDL_HapticPeriodic
+#  \sa SDL_HapticCondition
+#  \sa SDL_HapticRamp
+#  \sa SDL_HapticLeftRight
+#  \sa SDL_HapticCustom
+
+type
+  HapticEffect* = object {.union.}
+    #  Common for all force feedback effects
+    kind: uint16                    #  < Effect type.
+    constant: HapticConstant    #  < Constant effect.
+    periodic: HapticPeriodic    #  < Periodic effect.
+    condition: HapticCondition  #  < Condition effect.
+    ramp: HapticRamp            #  < Ramp effect.
+    leftright: HapticLeftRight  #  < Left/Right effect.
+    custom: HapticCustom        #  < Custom effect.
+
+
+
+when defined(SDL_Static):
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+else:
+  {.push callConv: cdecl, dynlib: LibName.}
+
+#  Function prototypes
+#
+#  \brief Count the number of haptic devices attached to the system.
+#
+#  \return Number of haptic devices detected on the system.
+
+proc numHaptics*():cint {.importc: "SDL_NumHaptics".}
+
+#
+#  \brief Get the implementation dependent name of a Haptic device.
+#
+#  This can be called before any joysticks are opened.
+#  If no name can be found, this function returns NULL.
+#
+#  \param device_index Index of the device to get its name.
+#  \return Name of the device or NULL on error.
+#
+#  \sa SDL_NumHaptics
+
+proc hapticName*(device_index: cint):cstring {.importc: "SDL_HapticName".}
+
+#
+#  \brief Opens a Haptic device for usage.
+#
+#  The index passed as an argument refers to the N'th Haptic device on this
+#  system.
+#
+#  When opening a haptic device, its gain will be set to maximum and
+#  autocenter will be disabled.  To modify these values use
+#  SDL_HapticSetGain() and SDL_HapticSetAutocenter().
+#
+#  \param device_index Index of the device to open.
+#  \return Device identifier or NULL on error.
+#
+#  \sa SDL_HapticIndex
+#  \sa SDL_HapticOpenFromMouse
+#  \sa SDL_HapticOpenFromJoystick
+#  \sa SDL_HapticClose
+#  \sa SDL_HapticSetGain
+#  \sa SDL_HapticSetAutocenter
+#  \sa SDL_HapticPause
+#  \sa SDL_HapticStopAll
+
+proc hapticOpen*(device_index: cint):HapticPtr {.importc: "SDL_HapticOpen".}
+
+#
+#  \brief Checks if the haptic device at index has been opened.
+#
+#  \param device_index Index to check to see if it has been opened.
+#  \return 1 if it has been opened or 0 if it hasn't.
+#
+#  \sa SDL_HapticOpen
+#  \sa SDL_HapticIndex
+
+proc hapticOpened*(device_index: cint):cint {.importc: "SDL_HapticOpened".}
+
+#
+#  \brief Gets the index of a haptic device.
+#
+#  \param haptic Haptic device to get the index of.
+#  \return The index of the haptic device or -1 on error.
+#
+#  \sa SDL_HapticOpen
+#  \sa SDL_HapticOpened
+
+proc index*(haptic: HapticPtr):cint {.importc: "SDL_HapticIndex".}
+
+#
+#  \brief Gets whether or not the current mouse has haptic capabilities.
+#
+#  \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
+#
+#  \sa SDL_HapticOpenFromMouse
+
+proc mouseIsHaptic*():cint {.importc: "SDL_MouseIsHaptic".}
+
+#
+#  \brief Tries to open a haptic device from the current mouse.
+#
+#  \return The haptic device identifier or NULL on error.
+#
+#  \sa SDL_MouseIsHaptic
+#  \sa SDL_HapticOpen
+
+proc hapticOpenFromMouse*():HapticPtr {.importc: "SDL_HapticOpenFromMouse".}
+
+#
+#  \brief Checks to see if a joystick has haptic features.
+#
+#  \param joystick Joystick to test for haptic capabilities.
+#  \return 1 if the joystick is haptic, 0 if it isn't
+#          or -1 if an error ocurred.
+#
+#  \sa SDL_HapticOpenFromJoystick
+
+proc joystickIsHaptic*(joystick: Joystick):cint {.importc: "SDL_JoystickIsHaptic".}
+
+#
+#  \brief Opens a Haptic device for usage from a Joystick device.
+#
+#  You must still close the haptic device seperately.  It will not be closed
+#  with the joystick.
+#
+#  When opening from a joystick you should first close the haptic device before
+#  closing the joystick device.  If not, on some implementations the haptic
+#  device will also get unallocated and you'll be unable to use force feedback
+#  on that device.
+#
+#  \param joystick Joystick to create a haptic device from.
+#  \return A valid haptic device identifier on success or NULL on error.
+#
+#  \sa SDL_HapticOpen
+#  \sa SDL_HapticClose
+
+proc hapticOpenFromJoystick*(joystick: JoystickPtr):HapticPtr {.importc: "SDL_HapticOpenFromJoystick".}
+
+#
+#  \brief Closes a Haptic device previously opened with SDL_HapticOpen().
+#
+#  \param haptic Haptic device to close.
+
+proc close*(haptic: HapticPtr) {.importc: "SDL_HapticClose".}
+
+#
+#  \brief Returns the number of effects a haptic device can store.
+#
+#  On some platforms this isn't fully supported, and therefore is an
+#  approximation.  Always check to see if your created effect was actually
+#  created and do not rely solely on SDL_HapticNumEffects().
+#
+#  \param haptic The haptic device to query effect max.
+#  \return The number of effects the haptic device can store or
+#          -1 on error.
+#
+#  \sa SDL_HapticNumEffectsPlaying
+#  \sa SDL_HapticQuery
+
+proc numEffects*(haptic: HapticPtr):cint {.importc: "SDL_HapticNumEffects".}
+
+#
+#  \brief Returns the number of effects a haptic device can play at the same
+#         time.
+#
+#  This is not supported on all platforms, but will always return a value.
+#  Added here for the sake of completeness.
+#
+#  \param haptic The haptic device to query maximum playing effects.
+#  \return The number of effects the haptic device can play at the same time
+#          or -1 on error.
+#
+#  \sa SDL_HapticNumEffects
+#  \sa SDL_HapticQuery
+
+proc numEffectsPlaying*(haptic: HapticPtr):cint {.importc: "SDL_HapticNumEffectsPlaying".}
+
+#
+#  \brief Gets the haptic devices supported features in bitwise matter.
+#
+#  Example:
+#  \code
+#  if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
+#      printf("We have constant haptic effect!");
+#  }
+#  \endcode
+#
+#  \param haptic The haptic device to query.
+#  \return Haptic features in bitwise manner (OR'd).
+#
+#  \sa SDL_HapticNumEffects
+#  \sa SDL_HapticEffectSupported
+
+proc query*(haptic: HapticPtr):uint {.importc: "SDL_HapticQuery".}
+
+
+#
+#  \brief Gets the number of haptic axes the device has.
+#
+#  \sa HapticDirection
+
+proc numAxes*(haptic: HapticPtr):cint {.importc: "SDL_HapticNumAxes".}
+
+#
+#  \brief Checks to see if effect is supported by haptic.
+#
+#  \param haptic Haptic device to check on.
+#  \param effect Effect to check to see if it is supported.
+#  \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
+#
+#  \sa SDL_HapticQuery
+#  \sa SDL_HapticNewEffect
+
+proc effectSupported*(haptic: HapticPtr, effect: ptr HapticEffect):cint {.importc: "SDL_HapticEffectSupported".}
+
+#
+#  \brief Creates a new haptic effect on the device.
+#
+#  \param haptic Haptic device to create the effect on.
+#  \param effect Properties of the effect to create.
+#  \return The id of the effect on success or -1 on error.
+#
+#  \sa SDL_HapticUpdateEffect
+#  \sa SDL_HapticRunEffect
+#  \sa SDL_HapticDestroyEffect
+
+proc newEffect*(haptic: HapticPtr, effect: ptr HapticEffect):cint {.importc: "SDL_HapticNewEffect".}
+
+#
+#  \brief Updates the properties of an effect.
+#
+#  Can be used dynamically, although behaviour when dynamically changing
+#  direction may be strange.  Specifically the effect may reupload itself
+#  and start playing from the start.  You cannot change the type either when
+#  running SDL_HapticUpdateEffect().
+#
+#  \param haptic Haptic device that has the effect.
+#  \param effect Effect to update.
+#  \param data New effect properties to use.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticNewEffect
+#  \sa SDL_HapticRunEffect
+#  \sa SDL_HapticDestroyEffect
+
+proc updateEffect*(haptic: HapticPtr, effect: cint, data: ptr HapticEffect):cint {.importc: "SDL_HapticUpdateEffect".}
+
+#
+#  \brief Runs the haptic effect on its associated haptic device.
+#
+#  If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over
+#  repeating the envelope (attack and fade) every time.  If you only want the
+#  effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length
+#  parameter.
+#
+#  \param haptic Haptic device to run the effect on.
+#  \param effect Identifier of the haptic effect to run.
+#  \param iterations Number of iterations to run the effect. Use
+#         ::SDL_HAPTIC_INFINITY for infinity.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticStopEffect
+#  \sa SDL_HapticDestroyEffect
+#  \sa SDL_HapticGetEffectStatus
+
+proc runEffect*(haptic: HapticPtr, effect: cint, iterations: uint32):cint {.importc: "SDL_HapticRunEffect".}
+
+#
+#  \brief Stops the haptic effect on its associated haptic device.
+#
+#  \param haptic Haptic device to stop the effect on.
+#  \param effect Identifier of the effect to stop.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticRunEffect
+#  \sa SDL_HapticDestroyEffect
+
+proc stopEffect*(haptic: HapticPtr, effect: cint):cint {.importc: "SDL_HapticStopEffect".}
+
+#
+#  \brief Destroys a haptic effect on the device.
+#
+#  This will stop the effect if it's running.  Effects are automatically
+#  destroyed when the device is closed.
+#
+#  \param haptic Device to destroy the effect on.
+#  \param effect Identifier of the effect to destroy.
+#
+#  \sa SDL_HapticNewEffect
+
+proc destroyEffect*(haptic: HapticPtr, effect: cint) {.importc: "SDL_HapticDestroyEffect".}
+
+#
+#  \brief Gets the status of the current effect on the haptic device.
+#
+#  Device must support the ::SDL_HAPTIC_STATUS feature.
+#
+#  \param haptic Haptic device to query the effect status on.
+#  \param effect Identifier of the effect to query its status.
+#  \return 0 if it isn't playing, 1 if it is playing or -1 on error.
+#
+#  \sa SDL_HapticRunEffect
+#  \sa SDL_HapticStopEffect
+
+proc getEffectStatus*(haptic: HapticPtr, effect: cint):cint {.importc: "SDL_HapticGetEffectStatus".}
+
+#
+#  \brief Sets the global gain of the device.
+#
+#  Device must support the ::SDL_HAPTIC_GAIN feature.
+#
+#  The user may specify the maximum gain by setting the environment variable
+#  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to
+#  SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the
+#  maximum.
+#
+#  \param haptic Haptic device to set the gain on.
+#  \param gain Value to set the gain to, should be between 0 and 100.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticQuery
+
+proc setGain*(haptic: HapticPtr, gain: int ):cint {.importc: "SDL_HapticSetGain".}
+
+#
+#  \brief Sets the global autocenter of the device.
+#
+#  Autocenter should be between 0 and 100.  Setting it to 0 will disable
+#  autocentering.
+#
+#  Device must support the ::SDL_HAPTIC_AUTOCENTER feature.
+#
+#  \param haptic Haptic device to set autocentering on.
+#  \param autocenter Value to set autocenter to, 0 disables autocentering.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticQuery
+
+proc setAutocenter*(haptic: HapticPtr, autocenter: int ):cint {.importc: "SDL_HapticSetAutocenter".}
+
+#
+#  \brief Pauses a haptic device.
+#
+#  Device must support the ::SDL_HAPTIC_PAUSE feature.  Call
+#  SDL_HapticUnpause() to resume playback.
+#
+#  Do not modify the effects nor add new ones while the device is paused.
+#  That can cause all sorts of weird errors.
+#
+#  \param haptic Haptic device to pause.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticUnpause
+
+proc pause*(haptic: HapticPtr):cint {.importc: "SDL_HapticPause".}
+
+#
+#  \brief Unpauses a haptic device.
+#
+#  Call to unpause after SDL_HapticPause().
+#
+#  \param haptic Haptic device to pause.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticPause
+
+proc unpause*(haptic: HapticPtr):cint {.importc: "SDL_HapticUnpause".}
+
+#
+#  \brief Stops all the currently playing effects on a haptic device.
+#
+#  \param haptic Haptic device to stop.
+#  \return 0 on success or -1 on error.
+
+proc stopAll*(haptic: HapticPtr):cint {.importc: "SDL_HapticStopAll".}
+
+#
+#  \brief Checks to see if rumble is supported on a haptic device.
+#
+#  \param haptic Haptic device to check to see if it supports rumble.
+#  \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.
+#
+#  \sa SDL_HapticRumbleInit
+#  \sa SDL_HapticRumblePlay
+#  \sa SDL_HapticRumbleStop
+
+proc rumbleSupported*(haptic: HapticPtr):cint {.importc: "SDL_HapticRumbleSupported".}
+
+#
+#  \brief Initializes the haptic device for simple rumble playback.
+#
+#  \param haptic Haptic device to initialize for simple rumble playback.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticOpen
+#  \sa SDL_HapticRumbleSupported
+#  \sa SDL_HapticRumblePlay
+#  \sa SDL_HapticRumbleStop
+
+proc rumbleInit*(haptic: HapticPtr):cint {.importc: "SDL_HapticRumbleInit".}
+
+#
+#  \brief Runs simple rumble on a haptic device
+#
+#  \param haptic Haptic device to play rumble effect on.
+#  \param strength Strength of the rumble to play as a 0-1 float value.
+#  \param length Length of the rumble to play in milliseconds.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticRumbleSupported
+#  \sa SDL_HapticRumbleInit
+#  \sa SDL_HapticRumbleStop
+
+proc rumblePlay*(haptic: HapticPtr, strength: float, length: uint32 ):cint {.importc: "SDL_HapticRumblePlay".}
+
+#
+#  \brief Stops the simple rumble on a haptic device.
+#
+#  \param haptic Haptic to stop the rumble on.
+#  \return 0 on success or -1 on error.
+#
+#  \sa SDL_HapticRumbleSupported
+#  \sa SDL_HapticRumbleInit
+#  \sa SDL_HapticRumblePlay
+
+proc rumbleStop*(haptic: HapticPtr):cint {.importc: "SDL_HapticRumbleStop".}
+
+when not defined(SDL_Static):
+  {.pop.}

+ 87 - 0
src/nodesnim/core/sdl2/image.nim

@@ -0,0 +1,87 @@
+import ../sdl2
+
+when not defined(SDL_Static):
+  when defined(windows):
+    const LibName = "SDL2_image.dll"
+  elif defined(macosx):
+    const LibName = "libSDL2_image.dylib"
+  else:
+    const LibName = "libSDL2_image(|-2.0).so(|.0)"
+else:
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+
+const
+  IMG_INIT_JPG* = 0x00000001
+  IMG_INIT_PNG* = 0x00000002
+  IMG_INIT_TIF* = 0x00000004
+  IMG_INIT_WEBP* = 0x00000008
+
+when not defined(SDL_Static):
+  {.push callConv:cdecl, dynlib: LibName.}
+
+proc linkedVersion*(): ptr SDL_version {.importc: "IMG_Linked_Version".}
+
+proc init*(flags: cint = IMG_INIT_JPG or IMG_INIT_PNG): cint {.importc: "IMG_Init".}
+  ## It returns the flags successfully initialized, or 0 on failure.
+  ## This is completely different than SDL_Init() -_-
+
+proc quit*() {.importc: "IMG_Quit".}
+# Load an image from an SDL data source.
+#   The 'type' may be one of: "BMP", "GIF", "PNG", etc.
+#
+#   If the image format supports a transparent pixel, SDL will set the
+#   colorkey for the surface.  You can enable RLE acceleration on the
+#   surface afterwards by calling:
+# SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
+#
+proc loadTyped_RW*(src: RWopsPtr; freesrc: cint; `type`: cstring): SurfacePtr {.importc: "IMG_LoadTyped_RW".}
+# Convenience functions
+proc load*(file: cstring): SurfacePtr {.importc: "IMG_Load".}
+proc load_RW*(src: RWopsPtr; freesrc: cint): SurfacePtr {.importc: "IMG_Load_RW".}
+  ##Load an image directly into a render texture.
+#
+proc loadTexture*(renderer: RendererPtr; file: cstring): TexturePtr {.importc: "IMG_LoadTexture".}
+proc loadTexture_RW*(renderer: RendererPtr; src: RWopsPtr;
+                     freesrc: cint): TexturePtr {.importc: "IMG_LoadTexture_RW".}
+proc loadTextureTyped_RW*(renderer: RendererPtr; src: RWopsPtr;
+                          freesrc: cint; `type`: cstring): TexturePtr {.importc: "IMG_LoadTextureTyped_RW".}
+
+#discard """
+# Functions to detect a file type, given a seekable source
+proc isICO*(src: RWopsPtr): cint {.importc: "IMG_isICO".}
+proc isCUR*(src: RWopsPtr): cint {.importc: "IMG_isCUR".}
+proc isBMP*(src: RWopsPtr): cint {.importc: "IMG_isBMP".}
+proc isGIF*(src: RWopsPtr): cint {.importc: "IMG_isGIF".}
+proc isJPG*(src: RWopsPtr): cint {.importc: "IMG_isJPG".}
+proc isLBM*(src: RWopsPtr): cint {.importc: "IMG_isLBM".}
+proc isPCX*(src: RWopsPtr): cint {.importc: "IMG_isPCX".}
+proc isPNG*(src: RWopsPtr): cint {.importc: "IMG_isPNG".}
+proc isPNM*(src: RWopsPtr): cint {.importc: "IMG_isPNM".}
+proc isTIF*(src: RWopsPtr): cint {.importc: "IMG_isTIF".}
+proc isXCF*(src: RWopsPtr): cint {.importc: "IMG_isXCF".}
+proc isXPM*(src: RWopsPtr): cint {.importc: "IMG_isXPM".}
+proc isXV*(src: RWopsPtr): cint {.importc: "IMG_isXV".}
+proc isWEBP*(src: RWopsPtr): cint {.importc: "IMG_isWEBP".}
+# Individual loading functions
+proc loadICO_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadICO_RW".}
+proc loadCUR_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadCUR_RW".}
+proc loadBMP_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadBMP_RW".}
+proc loadGIF_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadGIF_RW".}
+proc loadJPG_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadJPG_RW".}
+proc loadLBM_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadLBM_RW".}
+proc loadPCX_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadPCX_RW".}
+proc loadPNG_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadPNG_RW".}
+proc loadPNM_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadPNM_RW".}
+proc loadTGA_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadTGA_RW".}
+proc loadTIF_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadTIF_RW".}
+proc loadXCF_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadXCF_RW".}
+proc loadXPM_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadXPM_RW".}
+proc loadXV_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadXV_RW".}
+proc loadWEBP_RW*(src: RWopsPtr): SurfacePtr {.importc: "IMG_LoadWEBP_RW".}
+proc readXPMFromArray*(xpm: cstringArray): SurfacePtr {.importc: "IMG_ReadXPMFromArray".}
+# Saving functions
+proc savePNG*(surface: SurfacePtr, file: cstring): cint {.importc: "IMG_SavePNG".}
+#"""
+
+when not defined(SDL_Static):
+  {.pop.}

+ 271 - 0
src/nodesnim/core/sdl2/joystick.nim

@@ -0,0 +1,271 @@
+import "../sdl2"
+
+
+discard """ Simple DirectMedia Layer
+Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+
+
+\file SDL_joystick.h
+
+Include file for SDL joystick event handling
+
+The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ behind a device_index changing as joysticks are plugged and unplugged.
+
+The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
+ then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
+
+The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
+ the device (a X360 wired controller for example). This identifier is platform dependent.
+
+"""
+
+#*
+#   \file SDL_joystick.h
+#
+#   In order to use these functions, SDL_Init() must have been called
+#   with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system
+#   for joysticks, and load appropriate drivers.
+#
+#   If you would like to receive joystick updates while the application
+#   is in the background, you should set the following hint before calling
+#   SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
+#
+
+# The joystick structure used to identify an SDL joystick#
+type
+  Joystick* = object
+  JoystickPtr* = ptr Joystick
+
+# A structure that encodes the stable unique id for a joystick device#
+type
+  JoystickGuid* = object
+    data: array[16, uint8]
+  JoystickID* = int32
+
+when defined(SDL_Static):
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+else:
+  {.push callConv: cdecl, dynlib: LibName.}
+
+#  Function prototypes# /
+##
+#   Count the number of joysticks attached to the system right now
+# /
+proc numJoysticks*(): cint {.
+  importc: "SDL_NumJoysticks".}
+
+##
+#   Get the implementation dependent name of a joystick.
+#   This can be called before any joysticks are opened.
+#   If no name can be found, this function returns NULL.
+# /
+proc joystickNameForIndex*(device_index: cint): cstring {.
+  importc: "SDL_JoystickNameForIndex".}
+
+##
+#   Open a joystick for use.
+#   The index passed as an argument refers tothe N'th joystick on the system.
+#   This index is the value which will identify this joystick in future joystick
+#   events.
+#
+#   \return A joystick identifier, or NULL if an error occurred.
+# /
+proc joystickOpen*(device_index: cint): JoystickPtr {.
+  importc: "SDL_JoystickOpen".}
+
+##
+#   Return the name for this currently opened joystick.
+#   If no name can be found, this function returns NULL.
+# /
+proc joystickName*(joystick: ptr Joystick): cstring {.importc: "SDL_JoystickName".}
+proc name* (joystick: ptr Joystick): cstring {.inline.} = joystick.joystickName
+
+##
+#   Return the GUID for the joystick at this index
+# /
+proc joystickGetDeviceGUID*(device_index: cint): JoystickGUID {.
+  importc: "SDL_JoystickGetDeviceGUID".}
+
+# *
+#   Return the GUID for this opened joystick
+#
+proc joystickGetGUID*(joystick: JoystickPtr): JoystickGUID {.
+  importc: "SDL_JoystickGetGUID".}
+proc getGUID* (joystick: JoystickPtr): JoystickGUID {.inline.} = joystick.joystickGetGUID
+
+# *
+#   Return a string representation for this guid. pszGUID must point to at least 33 bytes
+#   (32 for the string plus a NULL terminator).
+#
+proc joystickGetGUIDString*(guid: JoystickGUID, pszGUID: cstring, cbGUID: cint) {.
+  importc: "SDL_JoystickGetGUIDString".}
+
+# *
+#   convert a string into a joystick formatted guid
+#
+proc joystickGetGUIDFromString*(pchGUID: cstring): JoystickGUID {.
+  importc: "SDL_JoystickGetGUIDFromString".}
+
+# *
+#   Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
+#
+proc joystickGetAttached*(joystick: JoystickPtr): Bool32 {.
+  importc: "SDL_JoystickGetAttached".}
+proc getAttached* (joystick: JoystickPtr): Bool32 {.inline.} = joystick.joystickGetAttached
+
+# *
+#   Get the instance ID of an opened joystick or -1 if the joystick is invalid.
+#
+proc joystickInstanceID*(joystick: JoystickPtr): JoystickID {.
+  importc: "SDL_JoystickInstanceID".}
+proc instanceID* (joystick: JoystickPtr): JoystickID {.inline.} = joystick.joystickInstanceID
+
+# *
+#   Get the number of general axis controls on a joystick.
+#
+proc joystickNumAxes*(joystick: JoystickPtr): cint {.
+  importc: "SDL_JoystickNumAxes".}
+proc numAxes* (joystick: JoystickPtr): cint {.inline.} = joystick.joystickNumAxes
+
+# *
+#   Get the number of trackballs on a joystick.
+#
+#   Joystick trackballs have only relative motion events associated
+#   with them and their state cannot be polled.
+#   events are enabled.
+#
+proc joystickNumBalls*(joystick: JoystickPtr): cint {.
+  importc: "SDL_JoystickNumBalls".}
+proc numBalls* (joystick: JoystickPtr): cint {.inline.} = joystick.joystickNumBalls
+
+#
+#   Get the number of POV hats on a joystick.
+#
+proc joystickNumHats*(joystick: JoystickPtr): cint {.
+  importc: "SDL_JoystickNumHats".}
+proc numHats* (joystick: JoystickPtr): cint {.inline.} = joystick.joystickNumHats
+
+#
+#   Get the number of buttons on a joystick.
+#
+proc joystickNumButtons*(joystick: JoystickPtr): cint {.
+  importc: "SDL_JoystickNumButtons".}
+proc numButtons* (joystick: JoystickPtr): cint {.inline.} = joystick.joystickNumButtons
+
+#
+#   Update the current state of the open joysticks.
+#
+#   This is called automatically by the event loop if any joystick
+#
+proc joystickUpdate*() {.
+  importc: "SDL_JoystickUpdate".}
+
+#
+#   Enable/disable joystick event polling.
+#
+#   If joystick events are disabled, you must call SDL_JoystickUpdate()
+#   yourself and check the state of the joystick when you want joystick
+#   information.
+#
+#   The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
+#
+proc joystickEventState*(state: cint): cint {.
+  importc: "SDL_JoystickEventState".}
+
+#
+#   Get the current state of an axis control on a joystick.
+#
+#   The state is a value ranging from -32768 to 32767.
+#
+#   The axis indices start at index 0.
+#
+proc joystickGetAxis*(joystick: JoystickPtr, axis: cint): int16 {.
+  importc: "SDL_JoystickGetAxis".}
+proc getAxis* (joystick: JoystickPtr, axis: cint): int16 {.inline.} = joystick.joystickGetAxis(axis)
+
+#
+#   \name Hat positions
+#
+#  @{#
+const
+  SDL_HAT_CENTERED*:cint = (0x00000000)
+  SDL_HAT_UP*:cint = (0x00000001)
+  SDL_HAT_RIGHT*:cint = (0x00000002)
+  SDL_HAT_DOWN*:cint = (0x00000004)
+  SDL_HAT_LEFT*:cint = (0x00000008)
+  SDL_HAT_RIGHTUP*:cint = (SDL_HAT_RIGHT or SDL_HAT_UP)
+  SDL_HAT_RIGHTDOWN*:cint = (SDL_HAT_RIGHT or SDL_HAT_DOWN)
+  SDL_HAT_LEFTUP*:cint = (SDL_HAT_LEFT or SDL_HAT_UP)
+  SDL_HAT_LEFTDOWN*:cint = (SDL_HAT_LEFT or SDL_HAT_DOWN)
+#  @}#
+
+#
+#   Get the current state of a POV hat on a joystick.
+#
+#   The hat indices start at index 0.
+#
+#   \return The return value is one of the following positions:
+#            - ::SDL_HAT_CENTERED
+#            - ::SDL_HAT_UP
+#            - ::SDL_HAT_RIGHT
+#            - ::SDL_HAT_DOWN
+#            - ::SDL_HAT_LEFT
+#            - ::SDL_HAT_RIGHTUP
+#            - ::SDL_HAT_RIGHTDOWN
+#            - ::SDL_HAT_LEFTUP
+#            - ::SDL_HAT_LEFTDOWN
+#
+proc joystickGetHat*(joystick: JoystickPtr, hat: cint): uint8 {.
+  importc: "SDL_JoystickGetHat".}
+proc getHat* (joystick: JoystickPtr, hat: cint): uint8 {.inline.} = joystick.joystickGetHat(hat)
+
+#
+#   Get the ball axis change since the last poll.
+#
+#   \return 0, or -1 if you passed it invalid parameters.
+#
+#   The ball indices start at index 0.
+#
+proc joystickGetBall*(joystick: JoystickPtr, ball: cint, dx: ptr cint, dy: ptr cint): cint {.
+  importc: "SDL_JoystickGetBall".}
+proc getBall* (joystick: JoystickPtr, ball: cint, dx: ptr cint, dy: ptr cint): cint {.inline.} = joystick.joystickGetBall(ball, dx, dy)
+
+#
+#   Get the current state of a button on a joystick.
+#
+#   The button indices start at index 0.
+#
+proc joystickGetButton*(joystick: JoystickPtr, button: cint): uint8 {.
+  importc: "SDL_JoystickGetButton".}
+proc getButton* (joystick: JoystickPtr, button: cint): uint8 {.inline.} = joystick.joystickGetButton(button)
+
+#
+#   Close a joystick previously opened with SDL_JoystickOpen().
+#
+proc joystickClose*(joystick: JoystickPtr) {.
+  importc: "SDL_JoystickClose".}
+proc close* (joystick: JoystickPtr) {.inline.} = joystick.joystickClose()
+
+# Ends C function definitions when using C++
+
+# vi: set ts=4 sw=4 expandtab:
+when not defined(SDL_Static):
+  {.pop.}

+ 633 - 0
src/nodesnim/core/sdl2/mixer.nim

@@ -0,0 +1,633 @@
+#
+#  SDL_mixer:  An audio mixer library based on the SDL library
+#  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
+#
+#  This software is provided 'as-is', without any express or implied
+#  warranty.  In no event will the authors be held liable for any damages
+#  arising from the use of this software.
+#
+#  Permission is granted to anyone to use this software for any purpose,
+#  including commercial applications, and to alter it and redistribute it
+#  freely, subject to the following restrictions:
+#
+#  1. The origin of this software must not be misrepresented; you must not
+#     claim that you wrote the original software. If you use this software
+#     in a product, an acknowledgment in the product documentation would be
+#     appreciated but is not required.
+#  2. Altered source versions must be plainly marked as such, and must not be
+#     misrepresented as being the original software.
+#  3. This notice may not be removed or altered from any source distribution.
+#
+
+{.deadCodeElim: on.}
+# Dynamically link to the correct library for our system:
+
+when not defined(SDL_Static):
+  when defined(windows):
+    const LibName* = "SDL2_mixer.dll"
+  elif defined(macosx):
+    const LibName* = "libSDL2_mixer.dylib"
+  else:
+    const LibName* = "libSDL2_mixer(|-2.0).so(|.0)"
+else:
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+
+when not defined(SDL_Static):
+  {.push callConv:cdecl, dynlib: LibName.}
+
+import ../sdl2, audio
+
+when system.cpuEndian == littleEndian: # SDL_BYTEORDER == SDL_LIL_ENDIAN
+  const
+    MIX_DEFAULT_FORMAT* = AUDIO_S16LSB
+else:
+  const
+    MIX_DEFAULT_FORMAT* = AUDIO_S16MSB
+
+# Remove prefixes in our wrapper, we have modules in Nim:
+
+# These are not recognized by c2nim, but that's easy to fix:
+
+# This function gets the version of the dynamically linked SDL_mixer library.
+#   it should NOT be used to fill a version structure, instead you should
+#   use the SDL_MIXER_VERSION() macro.
+#
+
+proc linkedVersion*(): ptr SDL_version {.importc: "Mix_Linked_Version".}
+
+const
+    MIX_INIT_FLAC*       : cint = 0x00000001
+    MIX_INIT_MOD*        : cint = 0x00000002
+    MIX_INIT_MODPLUG*    : cint = 0x00000004
+    MIX_INIT_MP3*        : cint = 0x00000008
+    MIX_INIT_OGG*        : cint = 0x00000010
+    MIX_INIT_FLUIDSYNTH* : cint = 0x00000020
+
+
+# Loads dynamic libraries and prepares them for use.  Flags should be
+#   one or more flags from MIX_InitFlags OR'd together.
+#   It returns the flags successfully initialized, or 0 on failure.
+#
+
+proc init*(flags: cint): cint {.importc: "Mix_Init".}
+# Unloads libraries loaded with Mix_Init
+
+proc quit*() {.importc: "Mix_Quit".}
+# The default mixer has 8 simultaneous mixing channels
+
+const
+  MIX_CHANNELS* = 8
+
+# Good default values for a PC soundcard
+
+const
+  MIX_DEFAULT_FREQUENCY* = 22050
+  MIX_DEFAULT_CHANNELS* = 2
+
+# Volume of a chunk
+
+const
+  MIX_MAX_VOLUME* = 128
+
+# The internal format for an audio chunk
+
+type
+  ChunkPtr* = ptr Chunk
+  Chunk* = object
+    allocated*: cint
+    abuf*: ptr uint8
+    alen*: uint32
+    volume*: uint8            # Per-sample volume, 0-128
+
+
+# The different fading types supported
+
+type
+  Fading* {.size: sizeof(cint).} = enum
+    MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN
+  MusicType* {.size: sizeof(cint).} = enum
+    MUS_NONE, MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG, MUS_MP3, MUS_MP3_MAD,
+    MUS_FLAC, MUS_MODPLUG
+
+
+
+# The internal format for a music chunk interpreted via mikmod
+
+type
+  MusicPtr* = ptr Music
+  Music* = object
+
+
+# Open the mixer with a certain audio format
+
+proc openAudio*(frequency: cint; format: uint16; channels: cint;
+                    chunksize: cint): cint {.importc: "Mix_OpenAudio".}
+# Dynamically change the number of channels managed by the mixer.
+#   If decreasing the number of channels, the upper channels are
+#   stopped.
+#   This function returns the new number of allocated channels.
+#
+
+proc allocateChannels*(numchans: cint): cint {.
+    importc: "Mix_AllocateChannels".}
+# Find out what the actual audio device parameters are.
+#   This function returns 1 if the audio has been opened, 0 otherwise.
+#
+
+proc querySpec*(frequency: ptr cint; format: ptr uint16; channels: ptr cint): cint {.
+    importc: "Mix_QuerySpec".}
+# Load a wave file or a music (.mod .s3m .it .xm) file
+
+proc loadWAV_RW*(src: RWopsPtr; freesrc: cint): ptr Chunk {.importc: "Mix_LoadWAV_RW".}
+
+template loadWAV*(file: untyped): untyped =
+  loadWAV_RW(rwFromFile(file, "rb"), 1)
+
+proc loadMUS*(file: cstring): ptr Music {.importc: "Mix_LoadMUS".}
+# Load a music file from an SDL_RWops object (Ogg and MikMod specific currently)
+#   Matt Campbell (matt@campbellhome.dhs.org) April 2000
+
+proc loadMUS_RW*(src: RWopsPtr; freesrc: cint): ptr Music {.
+    importc: "Mix_LoadMUS_RW".}
+# Load a music file from an SDL_RWops object assuming a specific format
+
+proc loadMUSType_RW*(src: RWopsPtr; `type`: MusicType; freesrc: cint): ptr Music {.
+    importc: "Mix_LoadMUSType_RW".}
+# Load a wave file of the mixer format from a memory buffer
+
+proc quickLoad_WAV*(mem: ptr uint8): ptr Chunk {.importc: "Mix_QuickLoad_WAV".}
+# Load raw audio data of the mixer format from a memory buffer
+
+proc quickLoad_RAW*(mem: ptr uint8; len: uint32): ptr Chunk {.importc: "Mix_QuickLoad_RAW".}
+# Free an audio chunk previously loaded
+
+proc freeChunk*(chunk: ptr Chunk) {.importc: "Mix_FreeChunk".}
+proc freeMusic*(music: ptr Music) {.importc: "Mix_FreeMusic".}
+# Get a list of chunk/music decoders that this build of SDL_mixer provides.
+#   This list can change between builds AND runs of the program, if external
+#   libraries that add functionality become available.
+#   You must successfully call Mix_OpenAudio() before calling these functions.
+#   This API is only available in SDL_mixer 1.2.9 and later.
+#
+#   // usage...
+#   int i;
+#   const int total = Mix_GetNumChunkDecoders();
+#   for (i = 0; i < total; i++)
+#       printf("Supported chunk decoder: [%s]\n", Mix_GetChunkDecoder(i));
+#
+#   Appearing in this list doesn't promise your specific audio file will
+#   decode...but it's handy to know if you have, say, a functioning Timidity
+#   install.
+#
+#   These return values are static, read-only data; do not modify or free it.
+#   The pointers remain valid until you call Mix_CloseAudio().
+#
+
+proc getNumChunkDecoders*(): cint {.importc: "Mix_GetNumChunkDecoders".}
+proc getChunkDecoder*(index: cint): cstring {.importc: "Mix_GetChunkDecoder".}
+proc getNumMusicDecoders*(): cint {.importc: "Mix_GetNumMusicDecoders".}
+proc getMusicDecoder*(index: cint): cstring {.importc: "Mix_GetMusicDecoder".}
+# Find out the music format of a mixer music, or the currently playing
+#   music, if 'music' is NULL.
+#
+
+proc getMusicType*(music: ptr Music): MusicType {.importc: "Mix_GetMusicType".}
+# Set a function that is called after all mixing is performed.
+#   This can be used to provide real-time visual display of the audio stream
+#   or add a custom mixer filter for the stream data.
+#
+
+proc setPostMix*(mix_func: proc (udata: pointer; stream: ptr uint8;
+                                     len: cint) {.cdecl.}; arg: pointer) {.importc: "Mix_SetPostMix".}
+# Add your own music player or additional mixer function.
+#   If 'mix_func' is NULL, the default music player is re-enabled.
+#
+
+proc hookMusic*(mix_func: proc (udata: pointer; stream: ptr uint8; len: cint) {.
+    cdecl.}; arg: pointer) {.importc: "Mix_HookMusic".}
+# Add your own callback when the music has finished playing.
+#   This callback is only called if the music finishes naturally.
+#
+
+proc hookMusicFinished*(music_finished: proc () {.cdecl.}) {.importc: "Mix_HookMusicFinished".}
+# Get a pointer to the user data for the current music hook
+
+proc getMusicHookData*(): pointer {.importc: "Mix_GetMusicHookData".}
+#
+#  Add your own callback when a channel has finished playing. NULL
+#   to disable callback. The callback may be called from the mixer's audio
+#   callback or it could be called as a result of Mix_HaltChannel(), etc.
+#   do not call SDL_LockAudio() from this callback; you will either be
+#   inside the audio callback, or SDL_mixer will explicitly lock the audio
+#   before calling your callback.
+#
+
+proc channelFinished*(channel_finished: proc (channel: cint) {.cdecl.}) {.importc: "Mix_ChannelFinished".}
+# Special Effects API by ryan c. gordon. (icculus@icculus.org)
+
+const
+  MIX_CHANNEL_POST* = - 2
+
+# This is the format of a special effect callback:
+#
+#    myeffect(int chan, void *stream, int len, void *udata);
+#
+#  (chan) is the channel number that your effect is affecting. (stream) is
+#   the buffer of data to work upon. (len) is the size of (stream), and
+#   (udata) is a user-defined bit of data, which you pass as the last arg of
+#   Mix_RegisterEffect(), and is passed back unmolested to your callback.
+#   Your effect changes the contents of (stream) based on whatever parameters
+#   are significant, or just leaves it be, if you prefer. You can do whatever
+#   you like to the buffer, though, and it will continue in its changed state
+#   down the mixing pipeline, through any other effect functions, then finally
+#   to be mixed with the rest of the channels and music for the final output
+#   stream.
+#
+#  DO NOT EVER call SDL_LockAudio() from your callback function!
+#
+
+type
+  Mix_EffectFunc_t* = proc (chan: cint; stream: pointer; len: cint;
+                            udata: pointer) {.cdecl.}
+
+#
+#  This is a callback that signifies that a channel has finished all its
+#   loops and has completed playback. This gets called if the buffer
+#   plays out normally, or if you call Mix_HaltChannel(), implicitly stop
+#   a channel via Mix_AllocateChannels(), or unregister a callback while
+#   it's still playing.
+#
+#  DO NOT EVER call SDL_LockAudio() from your callback function!
+#
+
+type
+  Mix_EffectDone_t* = proc (chan: cint; udata: pointer) {.cdecl.}
+
+# Register a special effect function. At mixing time, the channel data is
+#   copied into a buffer and passed through each registered effect function.
+#   After it passes through all the functions, it is mixed into the final
+#   output stream. The copy to buffer is performed once, then each effect
+#   function performs on the output of the previous effect. Understand that
+#   this extra copy to a buffer is not performed if there are no effects
+#   registered for a given chunk, which saves CPU cycles, and any given
+#   effect will be extra cycles, too, so it is crucial that your code run
+#   fast. Also note that the data that your function is given is in the
+#   format of the sound device, and not the format you gave to Mix_OpenAudio(),
+#   although they may in reality be the same. This is an unfortunate but
+#   necessary speed concern. Use Mix_QuerySpec() to determine if you can
+#   handle the data before you register your effect, and take appropriate
+#   actions.
+#  You may also specify a callback (Mix_EffectDone_t) that is called when
+#   the channel finishes playing. This gives you a more fine-grained control
+#   than Mix_ChannelFinished(), in case you need to free effect-specific
+#   resources, etc. If you don't need this, you can specify NULL.
+#  You may set the callbacks before or after calling Mix_PlayChannel().
+#  Things like Mix_SetPanning() are just internal special effect functions,
+#   so if you are using that, you've already incurred the overhead of a copy
+#   to a separate buffer, and that these effects will be in the queue with
+#   any functions you've registered. The list of registered effects for a
+#   channel is reset when a chunk finishes playing, so you need to explicitly
+#   set them with each call to Mix_PlayChannel*().
+#  You may also register a special effect function that is to be run after
+#   final mixing occurs. The rules for these callbacks are identical to those
+#   in Mix_RegisterEffect, but they are run after all the channels and the
+#   music have been mixed into a single stream, whereas channel-specific
+#   effects run on a given channel before any other mixing occurs. These
+#   global effect callbacks are call "posteffects". Posteffects only have
+#   their Mix_EffectDone_t function called when they are unregistered (since
+#   the main output stream is never "done" in the same sense as a channel).
+#   You must unregister them manually when you've had enough. Your callback
+#   will be told that the channel being mixed is (MIX_CHANNEL_POST) if the
+#   processing is considered a posteffect.
+#
+#  After all these effects have finished processing, the callback registered
+#   through Mix_SetPostMix() runs, and then the stream goes to the audio
+#   device.
+#
+#  DO NOT EVER call SDL_LockAudio() from your callback function!
+#
+#  returns zero if error (no such channel), nonzero if added.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc registerEffect*(chan: cint; f: Mix_EffectFunc_t; d: Mix_EffectDone_t;
+                         arg: pointer): cint {.importc: "Mix_RegisterEffect".}
+# You may not need to call this explicitly, unless you need to stop an
+#   effect from processing in the middle of a chunk's playback.
+#  Posteffects are never implicitly unregistered as they are for channels,
+#   but they may be explicitly unregistered through this function by
+#   specifying MIX_CHANNEL_POST for a channel.
+#  returns zero if error (no such channel or effect), nonzero if removed.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc unregisterEffect*(channel: cint; f: Mix_EffectFunc_t): cint {.importc: "Mix_UnregisterEffect".}
+# You may not need to call this explicitly, unless you need to stop all
+#   effects from processing in the middle of a chunk's playback. Note that
+#   this will also shut off some internal effect processing, since
+#   Mix_SetPanning() and others may use this API under the hood. This is
+#   called internally when a channel completes playback.
+#  Posteffects are never implicitly unregistered as they are for channels,
+#   but they may be explicitly unregistered through this function by
+#   specifying MIX_CHANNEL_POST for a channel.
+#  returns zero if error (no such channel), nonzero if all effects removed.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc unregisterAllEffects*(channel: cint): cint {.importc: "Mix_UnregisterAllEffects".}
+
+const
+  MIX_EFFECTSMAXSPEED* = "MIX_EFFECTSMAXSPEED"
+
+#
+#  These are the internally-defined mixing effects. They use the same API that
+#   effects defined in the application use, but are provided here as a
+#   convenience. Some effects can reduce their quality or use more memory in
+#   the name of speed; to enable this, make sure the environment variable
+#   MIX_EFFECTSMAXSPEED (see above) is defined before you call
+#   Mix_OpenAudio().
+#
+# Set the panning of a channel. The left and right channels are specified
+#   as integers between 0 and 255, quietest to loudest, respectively.
+#
+#  Technically, this is just individual volume control for a sample with
+#   two (stereo) channels, so it can be used for more than just panning.
+#   If you want real panning, call it like this:
+#
+#    Mix_SetPanning(channel, left, 255 - left);
+#
+#  ...which isn't so hard.
+#
+#  Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
+#   the panning will be done to the final mixed stream before passing it on
+#   to the audio device.
+#
+#  This uses the Mix_RegisterEffect() API internally, and returns without
+#   registering the effect function if the audio device is not configured
+#   for stereo output. Setting both (left) and (right) to 255 causes this
+#   effect to be unregistered, since that is the data's normal state.
+#
+#  returns zero if error (no such channel or Mix_RegisterEffect() fails),
+#   nonzero if panning effect enabled. Note that an audio device in mono
+#   mode is a no-op, but this call will return successful in that case.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc setPanning*(channel: cint; left: uint8; right: uint8): cint {.importc: "Mix_SetPanning".}
+# Set the position of a channel. (angle) is an integer from 0 to 360, that
+#   specifies the location of the sound in relation to the listener. (angle)
+#   will be reduced as neccesary (540 becomes 180 degrees, -100 becomes 260).
+#   Angle 0 is due north, and rotates clockwise as the value increases.
+#   For efficiency, the precision of this effect may be limited (angles 1
+#   through 7 might all produce the same effect, 8 through 15 are equal, etc).
+#   (distance) is an integer between 0 and 255 that specifies the space
+#   between the sound and the listener. The larger the number, the further
+#   away the sound is. Using 255 does not guarantee that the channel will be
+#   culled from the mixing process or be completely silent. For efficiency,
+#   the precision of this effect may be limited (distance 0 through 5 might
+#   all produce the same effect, 6 through 10 are equal, etc). Setting (angle)
+#   and (distance) to 0 unregisters this effect, since the data would be
+#   unchanged.
+#
+#  If you need more precise positional audio, consider using OpenAL for
+#   spatialized effects instead of SDL_mixer. This is only meant to be a
+#   basic effect for simple "3D" games.
+#
+#  If the audio device is configured for mono output, then you won't get
+#   any effectiveness from the angle; however, distance attenuation on the
+#   channel will still occur. While this effect will function with stereo
+#   voices, it makes more sense to use voices with only one channel of sound,
+#   so when they are mixed through this effect, the positioning will sound
+#   correct. You can convert them to mono through SDL before giving them to
+#   the mixer in the first place if you like.
+#
+#  Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
+#   the positioning will be done to the final mixed stream before passing it
+#   on to the audio device.
+#
+#  This is a convenience wrapper over Mix_SetDistance() and Mix_SetPanning().
+#
+#  returns zero if error (no such channel or Mix_RegisterEffect() fails),
+#   nonzero if position effect is enabled.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc setPosition*(channel: cint; angle: int16; distance: uint8): cint {.importc: "Mix_SetPosition".}
+# Set the "distance" of a channel. (distance) is an integer from 0 to 255
+#   that specifies the location of the sound in relation to the listener.
+#   Distance 0 is overlapping the listener, and 255 is as far away as possible
+#   A distance of 255 does not guarantee silence; in such a case, you might
+#   want to try changing the chunk's volume, or just cull the sample from the
+#   mixing process with Mix_HaltChannel().
+#  For efficiency, the precision of this effect may be limited (distances 1
+#   through 7 might all produce the same effect, 8 through 15 are equal, etc).
+#   (distance) is an integer between 0 and 255 that specifies the space
+#   between the sound and the listener. The larger the number, the further
+#   away the sound is.
+#  Setting (distance) to 0 unregisters this effect, since the data would be
+#   unchanged.
+#  If you need more precise positional audio, consider using OpenAL for
+#   spatialized effects instead of SDL_mixer. This is only meant to be a
+#   basic effect for simple "3D" games.
+#
+#  Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
+#   the distance attenuation will be done to the final mixed stream before
+#   passing it on to the audio device.
+#
+#  This uses the Mix_RegisterEffect() API internally.
+#
+#  returns zero if error (no such channel or Mix_RegisterEffect() fails),
+#   nonzero if position effect is enabled.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc setDistance*(channel: cint; distance: uint8): cint {.importc: "Mix_SetDistance".}
+#
+#  !!! FIXME : Haven't implemented, since the effect goes past the
+#               end of the sound buffer. Will have to think about this.
+#                --ryan.
+#
+
+when false:
+  # Causes an echo effect to be mixed into a sound. (echo) is the amount
+  #   of echo to mix. 0 is no echo, 255 is infinite (and probably not
+  #   what you want).
+  #
+  #  Setting (channel) to MIX_CHANNEL_POST registers this as a posteffect, and
+  #   the reverbing will be done to the final mixed stream before passing it on
+  #   to the audio device.
+  #
+  #  This uses the Mix_RegisterEffect() API internally. If you specify an echo
+  #   of zero, the effect is unregistered, as the data is already in that state.
+  #
+  #  returns zero if error (no such channel or Mix_RegisterEffect() fails),
+  #   nonzero if reversing effect is enabled.
+  #   Error messages can be retrieved from Mix_GetError().
+  #
+  proc setReverb*(channel: cint; echo: uint8): cint {.importc: "Mix_SetReverb".}
+# Causes a channel to reverse its stereo. This is handy if the user has his
+#   speakers hooked up backwards, or you would like to have a minor bit of
+#   psychedelia in your sound code.  :)  Calling this function with (flip)
+#   set to non-zero reverses the chunks's usual channels. If (flip) is zero,
+#   the effect is unregistered.
+#
+#  This uses the Mix_RegisterEffect() API internally, and thus is probably
+#   more CPU intensive than having the user just plug in his speakers
+#   correctly. Mix_SetReverseStereo() returns without registering the effect
+#   function if the audio device is not configured for stereo output.
+#
+#  If you specify MIX_CHANNEL_POST for (channel), then this the effect is used
+#   on the final mixed stream before sending it on to the audio device (a
+#   posteffect).
+#
+#  returns zero if error (no such channel or Mix_RegisterEffect() fails),
+#   nonzero if reversing effect is enabled. Note that an audio device in mono
+#   mode is a no-op, but this call will return successful in that case.
+#   Error messages can be retrieved from Mix_GetError().
+#
+
+proc setReverseStereo*(channel: cint; flip: cint): cint {.importc: "Mix_SetReverseStereo".}
+# end of effects API. --ryan.
+# Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate
+#   them dynamically to the next sample if requested with a -1 value below.
+#   Returns the number of reserved channels.
+#
+
+proc reserveChannels*(num: cint): cint {.importc: "Mix_ReserveChannels".}
+# Channel grouping functions
+# Attach a tag to a channel. A tag can be assigned to several mixer
+#   channels, to form groups of channels.
+#   If 'tag' is -1, the tag is removed (actually -1 is the tag used to
+#   represent the group of all the channels).
+#   Returns true if everything was OK.
+#
+
+proc groupChannel*(which: cint; tag: cint): cint {.importc: "Mix_GroupChannel".}
+# Assign several consecutive channels to a group
+
+proc groupChannels*(`from`: cint; to: cint; tag: cint): cint {.importc: "Mix_GroupChannels".}
+# Finds the first available channel in a group of channels,
+#   returning -1 if none are available.
+#
+
+proc groupAvailable*(tag: cint): cint {.importc: "Mix_GroupAvailable".}
+# Returns the number of channels in a group. This is also a subtle
+#   way to get the total number of channels when 'tag' is -1
+#
+
+proc groupCount*(tag: cint): cint {.importc: "Mix_GroupCount".}
+# Finds the "oldest" sample playing in a group of channels
+
+proc groupOldest*(tag: cint): cint {.importc: "Mix_GroupOldest".}
+# Finds the "most recent" (i.e. last) sample playing in a group of channels
+
+proc groupNewer*(tag: cint): cint {.importc: "Mix_GroupNewer".}
+# Play an audio chunk on a specific channel.
+#   If the specified channel is -1, play on the first free channel.
+#   If 'loops' is greater than zero, loop the sound that many times.
+#   If 'loops' is -1, loop inifinitely (~65000 times).
+#   The sound is played at most 'ticks' milliseconds. If -1, play forever.
+#   Returns which channel was used to play the sound.
+#
+
+proc playChannelTimed*(channel: cint; chunk: ptr Chunk; loops: cint;
+                           ticks: cint): cint {.importc: "Mix_PlayChannelTimed".}
+
+# The same as above, but the sound is played forever
+
+template playChannel*(channel, chunk, loops: untyped): untyped =
+  playChannelTimed(channel, chunk, loops, - 1)
+
+proc playMusic*(music: ptr Music; loops: cint): cint {.importc: "Mix_PlayMusic".}
+# Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions
+
+proc fadeInMusic*(music: ptr Music; loops: cint; ms: cint): cint {.importc: "Mix_FadeInMusic".}
+proc fadeInMusicPos*(music: ptr Music; loops: cint; ms: cint;
+                         position: cdouble): cint {.importc: "Mix_FadeInMusicPos".}
+template fadeInChannel*(channel, chunk, loops, ms: untyped): untyped =
+  fadeInChannelTimed(channel, chunk, loops, ms, - 1)
+
+proc fadeInChannelTimed*(channel: cint; chunk: ptr Chunk; loops: cint;
+                             ms: cint; ticks: cint): cint {.importc: "Mix_FadeInChannelTimed".}
+# Set the volume in the range of 0-128 of a specific channel or chunk.
+#   If the specified channel is -1, set volume for all channels.
+#   Returns the original volume.
+#   If the specified volume is -1, just return the current volume.
+#
+
+proc volume*(channel: cint; volume: cint): cint {.importc: "Mix_Volume".}
+proc volumeChunk*(chunk: ptr Chunk; volume: cint): cint {.importc: "Mix_VolumeChunk".}
+proc volumeMusic*(volume: cint): cint {.importc: "Mix_VolumeMusic".}
+# Halt playing of a particular channel
+
+proc haltChannel*(channel: cint): cint {.importc: "Mix_HaltChannel".}
+proc haltGroup*(tag: cint): cint {.importc: "Mix_HaltGroup".}
+proc haltMusic*(): cint {.importc: "Mix_HaltMusic".}
+# Change the expiration delay for a particular channel.
+#   The sample will stop playing after the 'ticks' milliseconds have elapsed,
+#   or remove the expiration if 'ticks' is -1
+#
+
+proc expireChannel*(channel: cint; ticks: cint): cint {.importc: "Mix_ExpireChannel".}
+# Halt a channel, fading it out progressively till it's silent
+#   The ms parameter indicates the number of milliseconds the fading
+#   will take.
+#
+
+proc fadeOutChannel*(which: cint; ms: cint): cint {.importc: "Mix_FadeOutChannel".}
+proc fadeOutGroup*(tag: cint; ms: cint): cint {.importc: "Mix_FadeOutGroup".}
+proc fadeOutMusic*(ms: cint): cint {.importc: "Mix_FadeOutMusic".}
+# Query the fading status of a channel
+
+proc fadingMusic*(): Fading {.importc: "Mix_FadingMusic".}
+proc fadingChannel*(which: cint): Fading {.importc: "Mix_FadingChannel".}
+# Pause/Resume a particular channel
+
+proc pause*(channel: cint) {.importc: "Mix_Pause".}
+proc resume*(channel: cint) {.importc: "Mix_Resume".}
+proc paused*(channel: cint): cint {.importc: "Mix_Paused".}
+# Pause/Resume the music stream
+
+proc pauseMusic*() {.importc: "Mix_PauseMusic".}
+proc resumeMusic*() {.importc: "Mix_ResumeMusic".}
+proc rewindMusic*() {.importc: "Mix_RewindMusic".}
+proc pausedMusic*(): cint {.importc: "Mix_PausedMusic".}
+# Set the current position in the music stream.
+#   This returns 0 if successful, or -1 if it failed or isn't implemented.
+#   This function is only implemented for MOD music formats (set pattern
+#   order number) and for OGG, FLAC, MP3_MAD, and MODPLUG music (set
+#   position in seconds), at the moment.
+#
+
+proc setMusicPosition*(position: cdouble): cint {.importc: "Mix_SetMusicPosition".}
+
+# Check the status of a specific channel.
+#   If the specified channel is -1, check all channels.
+#
+proc playing*(channel: cint): cint {.importc: "Mix_Playing".}
+proc playingMusic*(): cint {.importc: "Mix_PlayingMusic".}
+
+# Stop music and set external music playback command
+proc setMusicCMD*(command: cstring): cint {.importc: "Mix_SetMusicCMD".}
+# Synchro value is set by MikMod from modules while playing
+
+proc setSynchroValue*(value: cint): cint {.importc: "Mix_SetSynchroValue".}
+proc getSynchroValue*(): cint {.importc: "Mix_GetSynchroValue".}
+# Set/Get/Iterate SoundFonts paths to use by supported MIDI backends
+
+proc setSoundFonts*(paths: cstring): cint {.
+    importc: "Mix_SetSoundFonts".}
+proc getSoundFonts*(): cstring {.importc: "Mix_GetSoundFonts".}
+proc eachSoundFont*(function: proc (a2: cstring; a3: pointer): cint {.cdecl.};
+                        data: pointer): cint {.importc: "Mix_EachSoundFont".}
+# Get the Chunk currently associated with a mixer channel
+#    Returns NULL if it's an invalid channel, or there's no chunk associated.
+#
+
+proc getChunk*(channel: cint): ptr Chunk {.importc: "Mix_GetChunk".}
+# Close the mixer, halting all playing audio
+
+proc closeAudio*() {.importc: "Mix_CloseAudio".}
+
+when not defined(SDL_Static):
+  {.pop.}

+ 301 - 0
src/nodesnim/core/sdl2/net.nim

@@ -0,0 +1,301 @@
+#
+#  SDL_net:  An example cross-platform network library for use with SDL
+#  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
+#  Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
+#
+#  This software is provided 'as-is', without any express or implied
+#  warranty.  In no event will the authors be held liable for any damages
+#  arising from the use of this software.
+#
+#  Permission is granted to anyone to use this software for any purpose,
+#  including commercial applications, and to alter it and redistribute it
+#  freely, subject to the following restrictions:
+#
+#  1. The origin of this software must not be misrepresented; you must not
+#     claim that you wrote the original software. If you use this software
+#     in a product, an acknowledgment in the product documentation would be
+#     appreciated but is not required.
+#  2. Altered source versions must be plainly marked as such, and must not be
+#     misrepresented as being the original software.
+#  3. This notice may not be removed or altered from any source distribution.
+#
+# $Id$
+import ../sdl2
+
+when not defined(SDL_Static):
+  when defined(windows):
+    const LibName* = "SDL2_net.dll"
+  elif defined(macosx):
+    const LibName* = "libSDL2_net.dylib"
+  else:
+    const LibName* = "libSDL2_net(|-2.0).so(|.0)"
+else:
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+
+type
+  IpAddress* = object
+    host*: uint32           # 32-bit IPv4 host address
+    port*: uint16           # 16-bit protocol port
+
+  TcpSocket* = pointer
+
+const
+  INADDR_ANY* = 0x00000000
+  INADDR_NONE* = 0xFFFFFFFF
+  INADDR_LOOPBACK* = 0x7F000001
+  INADDR_BROADCAST* = 0xFFFFFFFF
+# The maximum channels on a a UDP socket
+const
+  SDLNET_MAX_UDPCHANNELS* = 32
+# The maximum addresses bound to a single UDP socket channel
+const
+  SDLNET_MAX_UDPADDRESSES* = 4
+type
+  UDPsocket* = ptr object
+  UDPpacket* = object
+    channel*: cint          # The src/dst channel of the packet
+    data*: ptr uint8        # The packet data
+    len*: cint              # The length of the packet data
+    maxlen*: cint           # The size of the data buffer
+    status*: cint           # packet status after sending
+    address*: IpAddress     # The source/dest address of an incoming/outgoing packet
+
+#*********************************************************************
+# Hooks for checking sockets for available data
+#*********************************************************************
+type
+  SocketSet* = pointer
+# Any network socket can be safely cast to this socket type
+type
+  GenericSocketObj* = object
+    ready*: cint
+  GenericSocket* = ptr GenericSocketObj
+
+when not defined(SDL_Static):
+  {.push dynlib: LibName, callconv: cdecl.}
+# This function gets the version of the dynamically linked SDL_net library.
+#   it should NOT be used to fill a version structure, instead you should
+#   use the SDL_NET_VERSION() macro.
+#
+
+proc linkedVersion*(): ptr SDL_Version {.importc: "SDLNet_Linked_Version".}
+# Initialize/Cleanup the network API
+#   SDL must be initialized before calls to functions in this library,
+#   because this library uses utility functions from the SDL library.
+#
+proc init*(): cint {.importc: "SDLNet_Init".}
+proc quit*() {.importc: "SDLNet_Quit".}
+#*********************************************************************
+# IPv4 hostname resolution API
+#*********************************************************************
+
+# Resolve a host name and port to an IP address in network form.
+#   If the function succeeds, it will return 0.
+#   If the host couldn't be resolved, the host portion of the returned
+#   address will be INADDR_NONE, and the function will return -1.
+#   If 'host' is NULL, the resolved host will be set to INADDR_ANY.
+#
+proc resolveHost*(address: ptr IpAddress; host: cstring; port: uint16): cint {.importc: "SDLNet_ResolveHost".}
+# Resolve an ip address to a host name in canonical form.
+#   If the ip couldn't be resolved, this function returns NULL,
+#   otherwise a pointer to a static buffer containing the hostname
+#   is returned.  Note that this function is not thread-safe.
+#
+proc resolveIP*(ip: ptr IpAddress): cstring {.importc: "SDLNet_ResolveIP".}
+# Get the addresses of network interfaces on this system.
+#   This returns the number of addresses saved in 'addresses'
+#
+proc getLocalAddresses*(addresses: ptr IpAddress; maxcount: cint): cint {.importc: "SDLNet_GetLocalAddresses".}
+#*********************************************************************
+# TCP network API
+#*********************************************************************
+
+# Open a TCP network socket
+#   If ip.host is INADDR_NONE or INADDR_ANY, this creates a local server
+#   socket on the given port, otherwise a TCP connection to the remote
+#   host and port is attempted. The address passed in should already be
+#   swapped to network byte order (addresses returned from
+#   SDLNet_ResolveHost() are already in the correct form).
+#   The newly created socket is returned, or NULL if there was an error.
+#
+proc tcpOpen*(ip: ptr IpAddress): TcpSocket {.importc: "SDLNet_TCP_Open".}
+# Accept an incoming connection on the given server socket.
+#   The newly created socket is returned, or NULL if there was an error.
+#
+proc tcpAccept*(server: TcpSocket): TcpSocket {.importc: "SDLNet_TCP_Accept".}
+# Get the IP address of the remote system associated with the socket.
+#   If the socket is a server socket, this function returns NULL.
+#
+proc tcpGetPeerAddress*(sock: TcpSocket): ptr IpAddress {.importc: "SDLNet_TCP_GetPeerAddress".}
+# Send 'len' bytes of 'data' over the non-server socket 'sock'
+#   This function returns the actual amount of data sent.  If the return value
+#   is less than the amount of data sent, then either the remote connection was
+#   closed, or an unknown socket error occurred.
+#
+proc tcpSend*(sock: TcpSocket; data: pointer; len: cint): cint {.importc: "SDLNet_TCP_Send".}
+# Receive up to 'maxlen' bytes of data over the non-server socket 'sock',
+#   and store them in the buffer pointed to by 'data'.
+#   This function returns the actual amount of data received.  If the return
+#   value is less than or equal to zero, then either the remote connection was
+#   closed, or an unknown socket error occurred.
+#
+proc tcpRecv*(sock: TcpSocket; data: pointer; maxlen: cint): cint {.importc: "SDLNet_TCP_Recv".}
+# Close a TCP network socket
+proc tcpClose*(sock: TcpSocket) {.importc: "SDLNet_TCP_Close".}
+#*********************************************************************
+# UDP network API
+#*********************************************************************
+
+# Allocate/resize/free a single UDP packet 'size' bytes long.
+#   The new packet is returned, or NULL if the function ran out of memory.
+#
+proc allocPacket*(size: cint): ptr UDPpacket {.importc: "SDLNet_AllocPacket".}
+proc resizePacket*(packet: ptr UDPpacket; newsize: cint): cint {.importc: "SDLNet_ResizePacket".}
+proc freePacket*(packet: ptr UDPpacket) {.importc: "SDLNet_FreePacket".}
+# Allocate/Free a UDP packet vector (array of packets) of 'howmany' packets,
+#   each 'size' bytes long.
+#   A pointer to the first packet in the array is returned, or NULL if the
+#   function ran out of memory.
+#
+proc allocPacketV*(howmany: cint; size: cint): ptr ptr UDPpacket {.importc: "SDLNet_AllocPacketV".}
+proc freePacketV*(packetV: ptr ptr UDPpacket) {.importc: "SDLNet_FreePacketV".}
+# Open a UDP network socket
+#   If 'port' is non-zero, the UDP socket is bound to a local port.
+#   The 'port' should be given in native byte order, but is used
+#   internally in network (big endian) byte order, in addresses, etc.
+#   This allows other systems to send to this socket via a known port.
+#
+proc udpOpen*(port: uint16): UDPsocket {.importc: "SDLNet_UDP_Open".}
+# Set the percentage of simulated packet loss for packets sent on the socket.
+#
+proc udpSetPacketLoss*(sock: UDPsocket; percent: cint) {.importc: "SDLNet_UDP_SetPacketLoss".}
+# Bind the address 'address' to the requested channel on the UDP socket.
+#   If the channel is -1, then the first unbound channel that has not yet
+#   been bound to the maximum number of addresses will be bound with
+#   the given address as it's primary address.
+#   If the channel is already bound, this new address will be added to the
+#   list of valid source addresses for packets arriving on the channel.
+#   If the channel is not already bound, then the address becomes the primary
+#   address, to which all outbound packets on the channel are sent.
+#   This function returns the channel which was bound, or -1 on error.
+#
+proc udpBind*(sock: UDPsocket; channel: cint; address: ptr IpAddress): cint {.importc: "SDLNet_UDP_Bind".}
+# Unbind all addresses from the given channel
+proc udpUnbind*(sock: UDPsocket; channel: cint) {.importc: "SDLNet_UDP_Unbind".}
+# Get the primary IP address of the remote system associated with the
+#   socket and channel.  If the channel is -1, then the primary IP port
+#   of the UDP socket is returned -- this is only meaningful for sockets
+#   opened with a specific port.
+#   If the channel is not bound and not -1, this function returns NULL.
+#
+proc udpGetPeerAddress*(sock: UDPsocket; channel: cint): ptr IpAddress {.importc: "SDLNet_UDP_GetPeerAddress".}
+# Send a vector of packets to the the channels specified within the packet.
+#   If the channel specified in the packet is -1, the packet will be sent to
+#   the address in the 'src' member of the packet.
+#   Each packet will be updated with the status of the packet after it has
+#   been sent, -1 if the packet send failed.
+#   This function returns the number of packets sent.
+#
+proc udpSendV*(sock: UDPsocket; packets: ptr ptr UDPpacket;
+               npackets: cint): cint {.importc: "SDLNet_UDP_SendV".}
+# Send a single packet to the specified channel.
+#   If the channel specified in the packet is -1, the packet will be sent to
+#   the address in the 'src' member of the packet.
+#   The packet will be updated with the status of the packet after it has
+#   been sent.
+#   This function returns 1 if the packet was sent, or 0 on error.
+#
+#   NOTE:
+#   The maximum size of the packet is limited by the MTU (Maximum Transfer Unit)
+#   of the transport medium.  It can be as low as 250 bytes for some PPP links,
+#   and as high as 1500 bytes for ethernet.
+#
+proc udpSend*(sock: UDPsocket; channel: cint; packet: ptr UDPpacket): cint {.importc: "SDLNet_UDP_Send".}
+# Receive a vector of pending packets from the UDP socket.
+#   The returned packets contain the source address and the channel they arrived
+#   on.  If they did not arrive on a bound channel, the the channel will be set
+#   to -1.
+#   The channels are checked in highest to lowest order, so if an address is
+#   bound to multiple channels, the highest channel with the source address
+#   bound will be returned.
+#   This function returns the number of packets read from the network, or -1
+#   on error.  This function does not block, so can return 0 packets pending.
+#
+proc udpRecvV*(sock: UDPsocket; packets: ptr ptr UDPpacket): cint {.importc: "SDLNet_UDP_RecvV".}
+# Receive a single packet from the UDP socket.
+#   The returned packet contains the source address and the channel it arrived
+#   on.  If it did not arrive on a bound channel, the the channel will be set
+#   to -1.
+#   The channels are checked in highest to lowest order, so if an address is
+#   bound to multiple channels, the highest channel with the source address
+#   bound will be returned.
+#   This function returns the number of packets read from the network, or -1
+#   on error.  This function does not block, so can return 0 packets pending.
+#
+proc udpRecv*(sock: UDPsocket; packet: ptr UDPpacket): cint {.importc: "SDLNet_UDP_Recv".}
+# Close a UDP network socket
+proc udpClose*(sock: UDPsocket) {.importc: "SDLNet_UDP_Close".}
+
+# Allocate a socket set for use with SDLNet_CheckSockets()
+#   This returns a socket set for up to 'maxsockets' sockets, or NULL if
+#   the function ran out of memory.
+#
+proc allocSocketSet*(maxsockets: cint): SocketSet {.importc: "SDLNet_AllocSocketSet".}
+# Add a socket to a set of sockets to be checked for available data
+proc addSocket*(set: SocketSet; sock: GenericSocket): cint {.importc: "SDLNet_AddSocket".}
+
+# Remove a socket from a set of sockets to be checked for available data
+proc delSocket*(set: SocketSet; sock: GenericSocket): cint {.importc: "SDLNet_DelSocket".}
+
+# This function checks to see if data is available for reading on the
+#   given set of sockets.  If 'timeout' is 0, it performs a quick poll,
+#   otherwise the function returns when either data is available for
+#   reading, or the timeout in milliseconds has elapsed, which ever occurs
+#   first.  This function returns the number of sockets ready for reading,
+#   or -1 if there was an error with the select() system call.
+#
+proc checkSockets*(set: SocketSet; timeout: uint32): cint {.importc: "SDLNet_CheckSockets".}
+# After calling CheckSockets(), you can use this function on a
+#   socket that was in the socket set, to find out if data is available
+#   for reading.
+#
+
+# Free a set of sockets allocated by SDL_NetAllocSocketSet()
+proc freeSocketSet*(set: SocketSet) {.importc: "SDLNet_FreeSocketSet".}
+#*********************************************************************
+# Error reporting functions
+#*********************************************************************
+proc setError*(fmt: cstring) {.varargs, importc: "SDLNet_SetError".}
+proc getError*(): cstring {.importc: "SDLNet_GetError".}
+#*********************************************************************
+# Inline functions to read/write network data
+#*********************************************************************
+# Warning, some systems have data access alignment restrictions
+
+proc write16* (value: uint16, dest: pointer) {.importc: "SDLNet_Write16".}
+proc write32* (value: uint32, dest: pointer) {.importc: "SDLNet_Write32".}
+proc read16* (src: pointer): uint16 {.importc: "SDLNet_Read16".}
+proc read32* (src: pointer): uint32 {.importc: "SDLNet_Read32".}
+
+when not defined(SDL_Static):
+  {.pop.}
+
+proc tcpAddSocket*(set: SocketSet; sock: TcpSocket): cint =
+  addSocket(set, cast[GenericSocket](sock))
+
+proc udpAddSocket*(set: SocketSet; sock: UDPsocket): cint =
+  addSocket(set, cast[GenericSocket](sock))
+
+
+proc tcpDelSocket*(set: SocketSet; sock: TcpSocket): cint {.inline.} =
+  delSocket(set, cast[GenericSocket](sock))
+
+proc udpDelSocket*(set: SocketSet; sock: UDPsocket): cint {.inline.} =
+  delSocket(set, cast[GenericSocket](sock))
+
+
+##define SDLNet_SocketReady(sock) _SDLNet_SocketReady((SDLNet_GenericSocket)(sock))
+#proc _SDLNet_SocketReady*(sock: SDLNet_GenericSocket): cint =
+#  #return (sock != NULL) && (sock->ready);
+proc socketReady* (sock: GenericSocket): bool =
+  not(sock.isNil) and sock.ready > 0

+ 401 - 0
src/nodesnim/core/sdl2/private/keycodes.nim

@@ -0,0 +1,401 @@
+## do not import this, it is included in sdl2.nim
+
+type
+  Scancode* {.size: sizeof(cint).} = enum
+    SDL_SCANCODE_UNKNOWN = 0,
+    SDL_SCANCODE_A = 4, SDL_SCANCODE_B = 5, SDL_SCANCODE_C = 6,
+    SDL_SCANCODE_D = 7, SDL_SCANCODE_E = 8, SDL_SCANCODE_F = 9,
+    SDL_SCANCODE_G = 10, SDL_SCANCODE_H = 11, SDL_SCANCODE_I = 12,
+    SDL_SCANCODE_J = 13, SDL_SCANCODE_K = 14, SDL_SCANCODE_L = 15,
+    SDL_SCANCODE_M = 16, SDL_SCANCODE_N = 17, SDL_SCANCODE_O = 18,
+    SDL_SCANCODE_P = 19, SDL_SCANCODE_Q = 20, SDL_SCANCODE_R = 21,
+    SDL_SCANCODE_S = 22, SDL_SCANCODE_T = 23, SDL_SCANCODE_U = 24,
+    SDL_SCANCODE_V = 25, SDL_SCANCODE_W = 26, SDL_SCANCODE_X = 27,
+    SDL_SCANCODE_Y = 28, SDL_SCANCODE_Z = 29, SDL_SCANCODE_1 = 30,
+    SDL_SCANCODE_2 = 31, SDL_SCANCODE_3 = 32, SDL_SCANCODE_4 = 33,
+    SDL_SCANCODE_5 = 34, SDL_SCANCODE_6 = 35, SDL_SCANCODE_7 = 36,
+    SDL_SCANCODE_8 = 37, SDL_SCANCODE_9 = 38, SDL_SCANCODE_0 = 39,
+    SDL_SCANCODE_RETURN = 40, SDL_SCANCODE_ESCAPE = 41,
+    SDL_SCANCODE_BACKSPACE = 42, SDL_SCANCODE_TAB = 43,
+    SDL_SCANCODE_SPACE = 44, SDL_SCANCODE_MINUS = 45,
+    SDL_SCANCODE_EQUALS = 46, SDL_SCANCODE_LEFTBRACKET = 47,
+    SDL_SCANCODE_RIGHTBRACKET = 48, SDL_SCANCODE_BACKSLASH = 49,
+    SDL_SCANCODE_NONUSHASH = 50, #
+    SDL_SCANCODE_SEMICOLON = 51, SDL_SCANCODE_APOSTROPHE = 52, SDL_SCANCODE_GRAVE = 53,
+    SDL_SCANCODE_COMMA = 54, SDL_SCANCODE_PERIOD = 55,
+    SDL_SCANCODE_SLASH = 56, SDL_SCANCODE_CAPSLOCK = 57, SDL_SCANCODE_F1 = 58,
+    SDL_SCANCODE_F2 = 59, SDL_SCANCODE_F3 = 60, SDL_SCANCODE_F4 = 61,
+    SDL_SCANCODE_F5 = 62, SDL_SCANCODE_F6 = 63, SDL_SCANCODE_F7 = 64,
+    SDL_SCANCODE_F8 = 65, SDL_SCANCODE_F9 = 66, SDL_SCANCODE_F10 = 67,
+    SDL_SCANCODE_F11 = 68, SDL_SCANCODE_F12 = 69,
+    SDL_SCANCODE_PRINTSCREEN = 70, SDL_SCANCODE_SCROLLLOCK = 71,
+    SDL_SCANCODE_PAUSE = 72, SDL_SCANCODE_INSERT = 73,
+    SDL_SCANCODE_HOME = 74, SDL_SCANCODE_PAGEUP = 75,
+    SDL_SCANCODE_DELETE = 76, SDL_SCANCODE_END = 77,
+    SDL_SCANCODE_PAGEDOWN = 78, SDL_SCANCODE_RIGHT = 79,
+    SDL_SCANCODE_LEFT = 80, SDL_SCANCODE_DOWN = 81, SDL_SCANCODE_UP = 82, SDL_SCANCODE_NUMLOCKCLEAR = 83,
+    SDL_SCANCODE_KP_DIVIDE = 84, SDL_SCANCODE_KP_MULTIPLY = 85,
+    SDL_SCANCODE_KP_MINUS = 86, SDL_SCANCODE_KP_PLUS = 87,
+    SDL_SCANCODE_KP_ENTER = 88, SDL_SCANCODE_KP_1 = 89,
+    SDL_SCANCODE_KP_2 = 90, SDL_SCANCODE_KP_3 = 91, SDL_SCANCODE_KP_4 = 92,
+    SDL_SCANCODE_KP_5 = 93, SDL_SCANCODE_KP_6 = 94, SDL_SCANCODE_KP_7 = 95,
+    SDL_SCANCODE_KP_8 = 96, SDL_SCANCODE_KP_9 = 97, SDL_SCANCODE_KP_0 = 98,
+    SDL_SCANCODE_KP_PERIOD = 99, SDL_SCANCODE_NONUSBACKSLASH = 100,
+    SDL_SCANCODE_APPLICATION = 101, #*< windows contextual menu, compose
+    SDL_SCANCODE_POWER = 102,
+    SDL_SCANCODE_KP_EQUALS = 103, SDL_SCANCODE_F13 = 104,
+    SDL_SCANCODE_F14 = 105, SDL_SCANCODE_F15 = 106, SDL_SCANCODE_F16 = 107,
+    SDL_SCANCODE_F17 = 108, SDL_SCANCODE_F18 = 109, SDL_SCANCODE_F19 = 110,
+    SDL_SCANCODE_F20 = 111, SDL_SCANCODE_F21 = 112, SDL_SCANCODE_F22 = 113,
+    SDL_SCANCODE_F23 = 114, SDL_SCANCODE_F24 = 115,
+    SDL_SCANCODE_EXECUTE = 116, SDL_SCANCODE_HELP = 117,
+    SDL_SCANCODE_MENU = 118, SDL_SCANCODE_SELECT = 119,
+    SDL_SCANCODE_STOP = 120, SDL_SCANCODE_AGAIN = 121, #*< redo
+    SDL_SCANCODE_UNDO = 122, SDL_SCANCODE_CUT = 123, SDL_SCANCODE_COPY = 124,
+    SDL_SCANCODE_PASTE = 125, SDL_SCANCODE_FIND = 126,
+    SDL_SCANCODE_MUTE = 127, SDL_SCANCODE_VOLUMEUP = 128, SDL_SCANCODE_VOLUMEDOWN = 129,
+    SDL_SCANCODE_KP_COMMA = 133, SDL_SCANCODE_KP_EQUALSAS400 = 134, SDL_SCANCODE_INTERNATIONAL1 = 135,
+    SDL_SCANCODE_INTERNATIONAL2 = 136, SDL_SCANCODE_INTERNATIONAL3 = 137, #*< Yen
+    SDL_SCANCODE_INTERNATIONAL4 = 138, SDL_SCANCODE_INTERNATIONAL5 = 139,
+    SDL_SCANCODE_INTERNATIONAL6 = 140, SDL_SCANCODE_INTERNATIONAL7 = 141,
+    SDL_SCANCODE_INTERNATIONAL8 = 142, SDL_SCANCODE_INTERNATIONAL9 = 143, SDL_SCANCODE_LANG1 = 144, #*< Hangul/English toggle
+    SDL_SCANCODE_LANG2 = 145, #*< Hanja conversion
+    SDL_SCANCODE_LANG3 = 146, #*< Katakana
+    SDL_SCANCODE_LANG4 = 147, #*< Hiragana
+    SDL_SCANCODE_LANG5 = 148, #*< Zenkaku/Hankaku
+    SDL_SCANCODE_LANG6 = 149, #*< reserved
+    SDL_SCANCODE_LANG7 = 150, #*< reserved
+    SDL_SCANCODE_LANG8 = 151, #*< reserved
+    SDL_SCANCODE_LANG9 = 152, #*< reserved
+    SDL_SCANCODE_ALTERASE = 153, #*< Erase-Eaze
+    SDL_SCANCODE_SYSREQ = 154, SDL_SCANCODE_CANCEL = 155,
+    SDL_SCANCODE_CLEAR = 156, SDL_SCANCODE_PRIOR = 157,
+    SDL_SCANCODE_RETURN2 = 158, SDL_SCANCODE_SEPARATOR = 159,
+    SDL_SCANCODE_OUT = 160, SDL_SCANCODE_OPER = 161,
+    SDL_SCANCODE_CLEARAGAIN = 162, SDL_SCANCODE_CRSEL = 163,
+    SDL_SCANCODE_EXSEL = 164, SDL_SCANCODE_KP_00 = 176,
+    SDL_SCANCODE_KP_000 = 177, SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
+    SDL_SCANCODE_DECIMALSEPARATOR = 179, SDL_SCANCODE_CURRENCYUNIT = 180,
+    SDL_SCANCODE_CURRENCYSUBUNIT = 181, SDL_SCANCODE_KP_LEFTPAREN = 182,
+    SDL_SCANCODE_KP_RIGHTPAREN = 183, SDL_SCANCODE_KP_LEFTBRACE = 184,
+    SDL_SCANCODE_KP_RIGHTBRACE = 185, SDL_SCANCODE_KP_TAB = 186,
+    SDL_SCANCODE_KP_BACKSPACE = 187, SDL_SCANCODE_KP_A = 188,
+    SDL_SCANCODE_KP_B = 189, SDL_SCANCODE_KP_C = 190, SDL_SCANCODE_KP_D = 191,
+    SDL_SCANCODE_KP_E = 192, SDL_SCANCODE_KP_F = 193,
+    SDL_SCANCODE_KP_XOR = 194, SDL_SCANCODE_KP_POWER = 195,
+    SDL_SCANCODE_KP_PERCENT = 196, SDL_SCANCODE_KP_LESS = 197,
+    SDL_SCANCODE_KP_GREATER = 198, SDL_SCANCODE_KP_AMPERSAND = 199,
+    SDL_SCANCODE_KP_DBLAMPERSAND = 200, SDL_SCANCODE_KP_VERTICALBAR = 201,
+    SDL_SCANCODE_KP_DBLVERTICALBAR = 202, SDL_SCANCODE_KP_COLON = 203,
+    SDL_SCANCODE_KP_HASH = 204, SDL_SCANCODE_KP_SPACE = 205,
+    SDL_SCANCODE_KP_AT = 206, SDL_SCANCODE_KP_EXCLAM = 207,
+    SDL_SCANCODE_KP_MEMSTORE = 208, SDL_SCANCODE_KP_MEMRECALL = 209,
+    SDL_SCANCODE_KP_MEMCLEAR = 210, SDL_SCANCODE_KP_MEMADD = 211,
+    SDL_SCANCODE_KP_MEMSUBTRACT = 212, SDL_SCANCODE_KP_MEMMULTIPLY = 213,
+    SDL_SCANCODE_KP_MEMDIVIDE = 214, SDL_SCANCODE_KP_PLUSMINUS = 215,
+    SDL_SCANCODE_KP_CLEAR = 216, SDL_SCANCODE_KP_CLEARENTRY = 217,
+    SDL_SCANCODE_KP_BINARY = 218, SDL_SCANCODE_KP_OCTAL = 219,
+    SDL_SCANCODE_KP_DECIMAL = 220, SDL_SCANCODE_KP_HEXADECIMAL = 221,
+    SDL_SCANCODE_LCTRL = 224, SDL_SCANCODE_LSHIFT = 225, SDL_SCANCODE_LALT = 226, #*< alt, option
+    SDL_SCANCODE_LGUI = 227, #*< windows, command (apple), meta
+    SDL_SCANCODE_RCTRL = 228, SDL_SCANCODE_RSHIFT = 229, SDL_SCANCODE_RALT = 230, #*< alt gr, option
+    SDL_SCANCODE_RGUI = 231, #*< windows, command (apple), meta
+    SDL_SCANCODE_MODE = 257,
+    SDL_SCANCODE_AUDIONEXT = 258, SDL_SCANCODE_AUDIOPREV = 259,
+    SDL_SCANCODE_AUDIOSTOP = 260, SDL_SCANCODE_AUDIOPLAY = 261,
+    SDL_SCANCODE_AUDIOMUTE = 262, SDL_SCANCODE_MEDIASELECT = 263,
+    SDL_SCANCODE_WWW = 264, SDL_SCANCODE_MAIL = 265,
+    SDL_SCANCODE_CALCULATOR = 266, SDL_SCANCODE_COMPUTER = 267,
+    SDL_SCANCODE_AC_SEARCH = 268, SDL_SCANCODE_AC_HOME = 269,
+    SDL_SCANCODE_AC_BACK = 270, SDL_SCANCODE_AC_FORWARD = 271,
+    SDL_SCANCODE_AC_STOP = 272, SDL_SCANCODE_AC_REFRESH = 273, SDL_SCANCODE_AC_BOOKMARKS = 274,
+    SDL_SCANCODE_BRIGHTNESSDOWN = 275, SDL_SCANCODE_BRIGHTNESSUP = 276, SDL_SCANCODE_DISPLAYSWITCH = 277,
+    SDL_SCANCODE_KBDILLUMTOGGLE = 278, SDL_SCANCODE_KBDILLUMDOWN = 279,
+    SDL_SCANCODE_KBDILLUMUP = 280, SDL_SCANCODE_EJECT = 281, SDL_SCANCODE_SLEEP = 282,
+    SDL_NUM_SCANCODES = 512 #*< not a key, just marks the number of scancodes
+                            #                                 for array bounds
+
+const SDLK_SCANCODE_MASK = 1 shl 30
+template SDL_SCANCODE_TO_KEYCODE(some: ScanCode): untyped = (some.cint or SDLK_SCANCODE_MASK)
+
+const
+  K_UNKNOWN*: cint = 0
+
+  K_BACKSPACE*: cint = '\b'.cint
+  K_TAB*: cint = '\t'.cint
+  K_RETURN*: cint = '\r'.cint
+  K_ESCAPE*: cint = '\27'.cint
+  K_SPACE*: cint = ' '.cint
+  K_EXCLAIM*: cint = '!'.cint
+  K_QUOTEDBL*: cint = '"'.cint
+  K_HASH*: cint = '#'.cint
+  K_DOLLAR*: cint = '$'.cint
+  K_PERCENT*: cint = '%'.cint
+  K_AMPERSAND*: cint = '&'.cint
+  K_QUOTE*: cint = '\''.cint
+  K_LEFTPAREN*: cint = '('.cint
+  K_RIGHTPAREN*: cint = ')'.cint
+  K_ASTERISK*: cint = '*'.cint
+  K_PLUS*: cint = '+'.cint
+  K_COMMA*: cint = ','.cint
+  K_MINUS*: cint = '-'.cint
+  K_PERIOD*: cint = '.'.cint
+  K_SLASH*: cint = '/'.cint
+  K_0*: cint = '0'.cint
+  K_1*: cint = '1'.cint
+  K_2*: cint = '2'.cint
+  K_3*: cint = '3'.cint
+  K_4*: cint = '4'.cint
+  K_5*: cint = '5'.cint
+  K_6*: cint = '6'.cint
+  K_7*: cint = '7'.cint
+  K_8*: cint = '8'.cint
+  K_9*: cint = '9'.cint
+  K_COLON*: cint = ':'.cint
+  K_SEMICOLON*: cint = ';'.cint
+  K_LESS*: cint = '<'.cint
+  K_EQUALS*: cint = '='.cint
+  K_GREATER*: cint = '>'.cint
+  K_QUESTION*: cint = '?'.cint
+  K_AT*: cint = '@'.cint # Skip uppercase letters
+  K_LEFTBRACKET*: cint = '['.cint
+  K_BACKSLASH*: cint = '\\'.cint
+  K_RIGHTBRACKET*: cint = ']'.cint
+  K_CARET*: cint = '^'.cint
+  K_UNDERSCORE*: cint = '_'.cint
+  K_BACKQUOTE*: cint = '`'.cint
+  K_a*: cint = 'a'.cint
+  K_b*: cint = 'b'.cint
+  K_c*: cint = 'c'.cint
+  K_d*: cint = 'd'.cint
+  K_e*: cint = 'e'.cint
+  K_f*: cint = 'f'.cint
+  K_g*: cint = 'g'.cint
+  K_h*: cint = 'h'.cint
+  K_i*: cint = 'i'.cint
+  K_j*: cint = 'j'.cint
+  K_k*: cint = 'k'.cint
+  K_l*: cint = 'l'.cint
+  K_m*: cint = 'm'.cint
+  K_n*: cint = 'n'.cint
+  K_o*: cint = 'o'.cint
+  K_p*: cint = 'p'.cint
+  K_q*: cint = 'q'.cint
+  K_r*: cint =  'r'.cint
+  K_s*: cint =  's'.cint
+  K_t*: cint =  't'.cint
+  K_u*: cint =  'u'.cint
+  K_v*: cint =  'v'.cint
+  K_w*: cint =  'w'.cint
+  K_x*: cint =  'x'.cint
+  K_y*: cint =  'y'.cint
+  K_z*: cint =  'z'.cint
+
+  K_DELETE*: cint =  '\127'.cint
+  K_CAPSLOCK*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK)
+
+  K_F1*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1)
+  K_F2*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2)
+  K_F3*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3)
+  K_F4*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4)
+  K_F5*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5)
+  K_F6*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6)
+  K_F7*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7)
+  K_F8*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8)
+  K_F9*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9)
+  K_F10*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10)
+  K_F11*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11)
+  K_F12*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12)
+
+  K_PRINTSCREEN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN)
+  K_SCROLLLOCK*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK)
+  K_PAUSE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE)
+  K_INSERT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT)
+  K_HOME*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME)
+  K_PAGEUP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP)
+  K_END*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END)
+  K_PAGEDOWN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN)
+  K_RIGHT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT)
+  K_LEFT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT)
+  K_DOWN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN)
+  K_UP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP)
+
+  K_NUMLOCKCLEAR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR)
+  K_KP_DIVIDE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE)
+  K_KP_MULTIPLY*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY)
+  K_KP_MINUS*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS)
+  K_KP_PLUS*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS)
+  K_KP_ENTER*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER)
+  K_KP_1*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1)
+  K_KP_2*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2)
+  K_KP_3*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3)
+  K_KP_4*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4)
+  K_KP_5*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5)
+  K_KP_6*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6)
+  K_KP_7*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7)
+  K_KP_8*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8)
+  K_KP_9*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9)
+  K_KP_0*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0)
+  K_KP_PERIOD*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD)
+
+  K_APPLICATION*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION)
+  K_POWER*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER)
+  K_KP_EQUALS*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS)
+  K_F13*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13)
+  K_F14*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14)
+  K_F15*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15)
+  K_F16*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16)
+  K_F17*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17)
+  K_F18*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18)
+  K_F19*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19)
+  K_F20*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20)
+  K_F21*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21)
+  K_F22*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22)
+  K_F23*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23)
+  K_F24*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24)
+  K_EXECUTE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE)
+  K_HELP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP)
+  K_MENU*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU)
+  K_SELECT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT)
+  K_STOP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP)
+  K_AGAIN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN)
+  K_UNDO*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO)
+  K_CUT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT)
+  K_COPY*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY)
+  K_PASTE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE)
+  K_FIND*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND)
+  K_MUTE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE)
+  K_VOLUMEUP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP)
+  K_VOLUMEDOWN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN)
+  K_KP_COMMA*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA)
+  K_KP_EQUALSAS400*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400)
+
+  K_ALTERASE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE)
+  K_SYSREQ*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ)
+  K_CANCEL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL)
+  K_CLEAR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR)
+  K_PRIOR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR)
+  K_RETURN2*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2)
+  K_SEPARATOR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR)
+  K_OUT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT)
+  K_OPER*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER)
+  K_CLEARAGAIN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN)
+  K_CRSEL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL)
+  K_EXSEL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL)
+
+  K_KP_00*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00)
+  K_KP_000*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000)
+  K_THOUSANDSSEPARATOR*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR)
+  K_DECIMALSEPARATOR*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR)
+  K_CURRENCYUNIT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT)
+  K_CURRENCYSUBUNIT*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT)
+  K_KP_LEFTPAREN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN)
+  K_KP_RIGHTPAREN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN)
+  K_KP_LEFTBRACE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE)
+  K_KP_RIGHTBRACE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE)
+  K_KP_TAB*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB)
+  K_KP_BACKSPACE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE)
+  K_KP_A*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A)
+  K_KP_B*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B)
+  K_KP_C*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C)
+  K_KP_D*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D)
+  K_KP_E*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E)
+  K_KP_F*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F)
+  K_KP_XOR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR)
+  K_KP_POWER*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER)
+  K_KP_PERCENT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT)
+  K_KP_LESS*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS)
+  K_KP_GREATER*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER)
+  K_KP_AMPERSAND*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND)
+  K_KP_DBLAMPERSAND*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND)
+  K_KP_VERTICALBAR*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR)
+  K_KP_DBLVERTICALBAR*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR)
+  K_KP_COLON*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON)
+  K_KP_HASH*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH)
+  K_KP_SPACE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE)
+  K_KP_AT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT)
+  K_KP_EXCLAM*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM)
+  K_KP_MEMSTORE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE)
+  K_KP_MEMRECALL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL)
+  K_KP_MEMCLEAR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR)
+  K_KP_MEMADD*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD)
+  K_KP_MEMSUBTRACT*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT)
+  K_KP_MEMMULTIPLY*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY)
+  K_KP_MEMDIVIDE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE)
+  K_KP_PLUSMINUS*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS)
+  K_KP_CLEAR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR)
+  K_KP_CLEARENTRY*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY)
+  K_KP_BINARY*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY)
+  K_KP_OCTAL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL)
+  K_KP_DECIMAL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL)
+  K_KP_HEXADECIMAL*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL)
+
+  K_LCTRL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL)
+  K_LSHIFT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT)
+  K_LALT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT)
+  K_LGUI*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI)
+  K_RCTRL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL)
+  K_RSHIFT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT)
+  K_RALT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT)
+  K_RGUI*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI)
+
+  K_MODE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE)
+
+  K_AUDIONEXT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT)
+  K_AUDIOPREV*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV)
+  K_AUDIOSTOP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP)
+  K_AUDIOPLAY*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY)
+  K_AUDIOMUTE*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE)
+  K_MEDIASELECT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT)
+  K_WWW*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW)
+  K_MAIL*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL)
+  K_CALCULATOR*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR)
+  K_COMPUTER*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER)
+  K_AC_SEARCH*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH)
+  K_AC_HOME*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME)
+  K_AC_BACK*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK)
+  K_AC_FORWARD*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD)
+  K_AC_STOP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP)
+  K_AC_REFRESH*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH)
+  K_AC_BOOKMARKS*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS)
+
+  K_BRIGHTNESSDOWN*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN)
+  K_BRIGHTNESSUP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP)
+  K_DISPLAYSWITCH*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH)
+  K_KBDILLUMTOGGLE*: cint =
+    SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE)
+  K_KBDILLUMDOWN*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN)
+  K_KBDILLUMUP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP)
+  K_EJECT*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT)
+  K_SLEEP*: cint =  SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
+
+type
+  Keymod* {.size: sizeof(cint).} = enum
+    KMOD_NONE = 0x0000, KMOD_LSHIFT = 0x0001, KMOD_RSHIFT = 0x0002,
+    KMOD_LCTRL= 0x0040, KMOD_RCTRL  = 0x0080, KMOD_LALT   = 0x0100,
+    KMOD_RALT = 0x0200, KMOD_LGUI   = 0x0400, KMOD_RGUI   = 0x0800,
+    KMOD_NUM  = 0x1000, KMOD_CAPS   = 0x2000, KMOD_MODE   = 0x4000,
+    KMOD_RESERVED=0x8000
+
+converter toInt*(some: Keymod): cint = cint(some)
+
+template KMOD_CTRL*: untyped = (KMOD_LCTRL or KMOD_RCTRL)
+template KMOD_SHIFT*:untyped = (KMOD_LSHIFT or KMOD_RSHIFT)
+template KMOD_ALT*: untyped = (KMOD_LALT or KMOD_RALT)
+template KMOD_GUI*: untyped = (KMOD_LGUI or KMOD_RGUI)
+
+{.deprecated: [TScancode: Scancode].}
+{.deprecated: [TKeymod: Keymod].}
+
+

+ 215 - 0
src/nodesnim/core/sdl2/ttf.nim

@@ -0,0 +1,215 @@
+{.deadCodeElim: on.}
+
+when not defined(SDL_Static):
+  when defined(windows):
+    const LibName* = "SDL2_ttf.dll"
+  elif defined(macosx):
+    const LibName = "libSDL2_ttf.dylib"
+  else:
+    const LibName = "libSDL2_ttf(|-2.0).so(|.0)"
+else:
+  static: echo "SDL_Static option is deprecated and will soon be removed. Instead please use --dynlibOverride:SDL2."
+
+import ../sdl2
+
+type
+  FontPtr*{.pure.} = ptr object
+
+# Set up for C function definitions, even when using C++
+# Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
+#/*
+##define SDL_TTF_MAJOR_VERSION  2
+##define SDL_TTF_MINOR_VERSION  0
+##define SDL_TTF_PATCHLEVEL     12
+#
+# This macro can be used to fill a version structure with the compile-time
+#  version of the SDL_ttf library.
+#
+##define SDL_TTF_VERSION(X)                                             \
+#{                                                                      \
+# (X)->major = SDL_TTF_MAJOR_VERSION;                           \
+# (X)->minor = SDL_TTF_MINOR_VERSION;                           \
+# (X)->patch = SDL_TTF_PATCHLEVEL;                              \
+#}
+# Backwards compatibility
+##define TTF_MAJOR_VERSION      SDL_TTF_MAJOR_VERSION
+##define TTF_MINOR_VERSION      SDL_TTF_MINOR_VERSION
+#//#define TTF_PATCHLEVEL               SDL_TTF_PATCHLEVEL
+##define TTF_VERSION(X)         SDL_TTF_VERSION(X)
+
+when not defined(SDL_Static):
+  {.push callConv:cdecl, dynlib:LibName.}
+
+proc ttfLinkedVersion*(): ptr SDL_version {.importc: "TTF_Linked_Version".}
+# ZERO WIDTH NO-BREAKSPACE (Unicode byte order mark)
+const
+  UNICODE_BOM_NATIVE* = 0x0000FEFF
+  UNICODE_BOM_SWAPPED* = 0x0000FFFE
+# This function tells the library whether UNICODE text is generally
+#   byteswapped.  A UNICODE BOM character in a string will override
+#   this setting for the remainder of that string.
+#
+proc ttfByteSwappedUnicode*(swapped: cint) {.importc: "TTF_ByteSwappedUNICODE".}
+
+# Initialize the TTF engine - returns 0 if successful, -1 on error
+proc ttfInit*(): SDL_Return  {.importc: "TTF_Init", discardable.}
+# Open a font file and create a font of the specified point size.
+#  Some .fon fonts will have several sizes embedded in the file, so the
+#  point size becomes the index of choosing which size.  If the value
+#  is too high, the last indexed size will be the default.
+proc openFont*(file: cstring; ptsize: cint): FontPtr {.importc: "TTF_OpenFont".}
+proc openFontIndex*(file: cstring; ptsize: cint; index: clong): FontPtr {.importc: "TTF_OpenFontIndex".}
+proc openFontRW*(src: ptr RWops; freesrc: cint; ptsize: cint): FontPtr {.importc: "TTF_OpenFontRW".}
+proc openFontIndexRW*(src: ptr RWops; freesrc: cint; ptsize: cint;
+                          index: clong): FontPtr {.importc: "TTF_OpenFontIndexRW".}
+# Set and retrieve the font style
+const
+  TTF_STYLE_NORMAL* = 0x00000000
+  TTF_STYLE_BOLD* = 0x00000001
+  TTF_STYLE_ITALIC* = 0x00000002
+  TTF_STYLE_UNDERLINE* = 0x00000004
+  TTF_STYLE_STRIKETHROUGH* = 0x00000008
+proc getFontStyle*(font: FontPtr): cint  {.importc: "TTF_GetFontStyle".}
+proc setFontStyle*(font: FontPtr; style: cint) {.importc: "TTF_SetFontStyle".}
+proc getFontOutline*(font: FontPtr): cint {.importc: "TTF_GetFontOutline".}
+proc setFontOutline*(font: FontPtr; outline: cint) {.importc: "TTF_SetFontOutline".}
+
+# Set and retrieve FreeType hinter settings
+const
+  TTF_HINTING_NORMAL* = 0
+  TTF_HINTING_LIGHT* = 1
+  TTF_HINTING_MONO* = 2
+  TTF_HINTING_NONE* = 3
+proc getFontHinting*(font: FontPtr): cint {.importc: "TTF_GetFontHinting".}
+proc setFontHinting*(font: FontPtr; hinting: cint) {.importc: "TTF_SetFontHinting".}
+# Get the total height of the font - usually equal to point size
+proc fontHeight*(font: FontPtr): cint {.importc: "TTF_FontHeight".}
+# Get the offset from the baseline to the top of the font
+#   This is a positive value, relative to the baseline.
+#
+proc fontAscent*(font: FontPtr): cint {.importc: "TTF_FontAscent".}
+# Get the offset from the baseline to the bottom of the font
+#   This is a negative value, relative to the baseline.
+#
+proc fontDescent*(font: FontPtr): cint {.importc: "TTF_FontDescent".}
+# Get the recommended spacing between lines of text for this font
+proc fontLineSkip*(font: FontPtr): cint {.importc: "TTF_FontLineSkip".}
+# Get/Set whether or not kerning is allowed for this font
+proc getFontKerning*(font: FontPtr): cint {.importc: "TTF_GetFontKerning".}
+proc setFontKerning*(font: FontPtr; allowed: cint) {.importc: "TTF_SetFontKerning".}
+# Get the number of faces of the font
+proc fontFaces*(font: FontPtr): clong {.importc: "TTF_FontFaces".}
+# Get the font face attributes, if any
+proc fontFaceIsFixedWidth*(font: FontPtr): cint {.importc: "TTF_FontFaceIsFixedWidth".}
+proc fontFaceFamilyName*(font: FontPtr): cstring {.importc: "TTF_FontFaceFamilyName".}
+proc fontFaceStyleName*(font: FontPtr): cstring {.importc: "TTF_FontFaceStyleName".}
+# Check wether a glyph is provided by the font or not
+proc glyphIsProvided*(font: FontPtr; ch: uint16): cint {.importc: "TTF_GlyphIsProvided".}
+# Get the metrics (dimensions) of a glyph
+#   To understand what these metrics mean, here is a useful link:
+#    http://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
+#
+proc glyphMetrics*(font: FontPtr; ch: uint16; minx: ptr cint;
+                       maxx: ptr cint; miny: ptr cint; maxy: ptr cint;
+                       advance: ptr cint): cint {.importc: "TTF_GlyphMetrics".}
+# Get the dimensions of a rendered string of text
+proc sizeText*(font: FontPtr; text: cstring; w: ptr cint; h: ptr cint): cint{.
+  importc: "TTF_SizeText".}
+proc sizeUtf8*(font: FontPtr; text: cstring; w: ptr cint; h: ptr cint): cint{.
+  importc: "TTF_SizeUTF8".}
+proc sizeUnicode*(font: FontPtr; text: ptr uint16; w, h: ptr cint): cint{.
+  importc: "TTF_SizeUNICODE".}
+# Create an 8-bit palettized surface and render the given text at
+#   fast quality with the given font and color.  The 0 pixel is the
+#   colorkey, giving a transparent background, and the 1 pixel is set
+#   to the text color.
+#   This function returns the new surface, or NULL if there was an error.
+#
+proc renderTextSolid*(font: FontPtr; text: cstring; fg: Color): SurfacePtr{.
+  importc: "TTF_RenderText_Solid".}
+proc renderUtf8Solid*(font: FontPtr; text: cstring; fg: Color): SurfacePtr{.
+  importc: "TTF_RenderUTF8_Solid".}
+proc renderUnicodeSolid*(font: FontPtr; text: ptr uint16;
+  fg: Color): SurfacePtr {.importc: "TTF_RenderUNICODE_Solid".}
+# Create an 8-bit palettized surface and render the given glyph at
+#   fast quality with the given font and color.  The 0 pixel is the
+#   colorkey, giving a transparent background, and the 1 pixel is set
+#   to the text color.  The glyph is rendered without any padding or
+#   centering in the X direction, and aligned normally in the Y direction.
+#   This function returns the new surface, or NULL if there was an error.
+#
+proc renderGlyphSolid*(font: FontPtr; ch: uint16; fg: Color): SurfacePtr {.
+  importc: "TTF_RenderGlyph_Solid".}
+
+proc renderTextShaded*(font: FontPtr; text: cstring; fg, bg: Color): SurfacePtr {.
+  importc: "TTF_RenderText_Shaded".}
+proc renderUtf8Shaded*(font: FontPtr; text: cstring; fg, bg: Color): SurfacePtr {.
+  importc: "TTF_RenderUTF8_Shaded".}
+proc renderUnicodeShaded*(font: FontPtr; text: ptr uint16;
+  fg, bg: Color): SurfacePtr {.importc: "TTF_RenderUNICODE_Shaded".}
+# Create an 8-bit palettized surface and render the given glyph at
+#   high quality with the given font and colors.  The 0 pixel is background,
+#   while other pixels have varying degrees of the foreground color.
+#   The glyph is rendered without any padding or centering in the X
+#   direction, and aligned normally in the Y direction.
+#   This function returns the new surface, or NULL if there was an error.
+#
+proc renderGlyphShaded*(font: FontPtr; ch: uint16; fg, bg: Color): SurfacePtr {.
+  importc: "TTF_RenderGlyph_Shaded".}
+# Create a 32-bit ARGB surface and render the given text at high quality,
+#   using alpha blending to dither the font with the given color.
+#   This function returns the new surface, or NULL if there was an error.
+#
+proc renderTextBlended*(font: FontPtr; text: cstring; fg: Color): SurfacePtr {.
+  importc: "TTF_RenderText_Blended".}
+proc renderUtf8Blended*(font: FontPtr; text: cstring; fg: Color): SurfacePtr {.
+  importc: "TTF_RenderUTF8_Blended".}
+proc renderUnicodeBlended*(font: FontPtr; text: ptr uint16;
+  fg: Color): SurfacePtr {.importc: "TTF_RenderUNICODE_Blended".}
+# Create a 32-bit ARGB surface and render the given text at high quality,
+#   using alpha blending to dither the font with the given color.
+#   Text is wrapped to multiple lines on line endings and on word boundaries
+#   if it extends beyond wrapLength in pixels.
+#   This function returns the new surface, or NULL if there was an error.
+#
+proc renderTextBlendedWrapped*(font: FontPtr; text: cstring; fg: Color; wrapLength: uint32):
+  SurfacePtr {.importc: "TTF_RenderText_Blended_Wrapped".}
+proc renderUtf8BlendedWrapped*(font: FontPtr; text: cstring; fg: Color;
+  wrapLength: uint32): SurfacePtr {.importc: "TTF_RenderUTF8_Blended_Wrapped".}
+proc renderUnicodeBlendedWrapped*(font: FontPtr; text: ptr uint16; fg: Color;
+  wrapLength: uint32): SurfacePtr  {.importc: "TTF_RenderUNICODE_Blended_Wrapped".}
+# Create a 32-bit ARGB surface and render the given glyph at high quality,
+#   using alpha blending to dither the font with the given color.
+#   The glyph is rendered without any padding or centering in the X
+#   direction, and aligned normally in the Y direction.
+#   This function returns the new surface, or NULL if there was an error.
+#
+proc renderGlyphBlended*(font: FontPtr; ch: uint16; fg: Color): SurfacePtr {.
+  importc: "TTF_RenderGlyph_Blended".}
+
+
+#
+#/* Close an opened font file
+proc close*(font: FontPtr) {.importc: "TTF_CloseFont".}
+# De-initialize the TTF engine
+proc ttfQuit*() {.importc: "TTF_Quit".}
+# Check if the TTF engine is initialized
+proc ttfWasInit*(): bool {.importc: "TTF_WasInit".}
+# Get the kerning size of two glyphs
+proc getFontKerningSize*(font: FontPtr; prev_index, indx: cint): cint {.
+  importc: "TTF_GetFontKerningSize".}
+
+when not defined(SDL_Static):
+  {.pop.}
+
+
+# For compatibility with previous versions, here are the old functions
+##define TTF_RenderText(font, text, fg, bg)     \
+# TTF_RenderText_Shaded(font, text, fg, bg)
+##define TTF_RenderUTF8(font, text, fg, bg)     \
+# TTF_RenderUTF8_Shaded(font, text, fg, bg)
+##define TTF_RenderUNICODE(font, text, fg, bg)  \
+# TTF_RenderUNICODE_Shaded(font, text, fg, bg)
+
+proc renderText*(font: FontPtr; text: cstring;
+  fg, bg: Color): SurfacePtr = renderTextShaded(font, text, fg, bg)

+ 2 - 2
src/nodesnim/default/imagenodes.nim

@@ -1,6 +1,6 @@
 # author: Ethosa
-import sdl2
-import sdl2/image
+import ../core/sdl2
+import ../core/sdl2/image
 {.used.}
 
 

+ 1 - 1
src/nodesnim/default/input.nim

@@ -1,5 +1,5 @@
 # author: Ethosa
-import sdl2
+import ../core/sdl2
 
 
 type

+ 2 - 2
src/nodesnim/defaultnodes/canvas.nim

@@ -1,7 +1,7 @@
 # author: Ethosa
 import math
-import sdl2
-import sdl2/gfx
+import ../core/sdl2
+import ../core/sdl2/gfx
 import ../default/vector2
 import ../default/rect2
 import ../default/anchor

+ 1 - 1
src/nodesnim/defaultnodes/music_stream_player.nim

@@ -1,5 +1,5 @@
 # author: Ethosa
-import sdl2/mixer
+import ../core/sdl2/mixer
 import node
 {.used.}
 

+ 1 - 1
src/nodesnim/defaultnodes/node.nim

@@ -1,6 +1,6 @@
 # author: Ethosa
 import strutils
-import sdl2
+import ../core/sdl2
 import ../default/vector2
 import ../default/enums
 import ../default/input

+ 1 - 1
src/nodesnim/window.nim

@@ -1,5 +1,5 @@
 # author: Ethosa
-import sdl2
+import core/sdl2
 import environment
 import defaultnodes/node
 import defaultnodes/scene

BIN
tests/test14.exe