]> git.cworth.org Git - apitrace/blobdiff - specs/glapi.py
Distinguish linear pointers.
[apitrace] / specs / glapi.py
index ebfd9ff75b2c6f5be9ab09ff5ae4d689f685165f..886da1cd84f693a62dc688db5ea1947c46b55b52 100644 (file)
@@ -47,7 +47,7 @@ def GlFunction(*args, **kwargs):
 glapi = API('GL')
 
 
-glapi.add_functions([
+glapi.addFunctions([
     # GL_VERSION_1_0
     GlFunction(Void, "glCullFace", [(GLenum, "mode")]),
     GlFunction(Void, "glFrontFace", [(GLenum, "mode")]),
@@ -82,14 +82,14 @@ glapi.add_functions([
     GlFunction(Void, "glPixelStoref", [(GLenum, "pname"), (GLfloat, "param")]),
     GlFunction(Void, "glPixelStorei", [(GLenum, "pname"), (GLint, "param")]),
     GlFunction(Void, "glReadBuffer", [(GLenum, "mode")]),
-    GlFunction(Void, "glReadPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), Out(OpaquePointer(GLvoid), "pixels")]),
+    GlFunction(Void, "glReadPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), Out(GLpointer, "pixels")]),
     GlFunction(Void, "glGetBooleanv", [(GLenum, "pname"), Out(Array(GLboolean, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetDoublev", [(GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(GLenum_error, "glGetError", [], sideeffects=False),
     GlFunction(Void, "glGetFloatv", [(GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetIntegerv", [(GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(String("const GLubyte *"), "glGetString", [(GLenum, "name")], sideeffects=False),
-    GlFunction(Void, "glGetTexImage", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), Out(OpaquePointer(GLvoid), "pixels")]),
+    GlFunction(Void, "glGetTexImage", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), Out(GLpointer, "pixels")]),
     GlFunction(Void, "glGetTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetTexLevelParameterfv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
@@ -109,37 +109,37 @@ glapi.add_functions([
     GlFunction(Void, "glBegin", [(GLenum_mode, "mode")]),
     GlFunction(Void, "glBitmap", [(GLsizei, "width"), (GLsizei, "height"), (GLfloat, "xorig"), (GLfloat, "yorig"), (GLfloat, "xmove"), (GLfloat, "ymove"), (Blob(Const(GLubyte), "__glBitmap_size(width, height)"), "bitmap")]),
     GlFunction(Void, "glColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
-    GlFunction(Void, "glColor3bv", [(Array(Const(GLbyte), "3"), "v")]),
+    GlFunction(Void, "glColor3bv", [(Array(Const(GLbyte), 3), "v")]),
     GlFunction(Void, "glColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
-    GlFunction(Void, "glColor3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glColor3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
-    GlFunction(Void, "glColor3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glColor3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
-    GlFunction(Void, "glColor3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glColor3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
-    GlFunction(Void, "glColor3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glColor3sv", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
-    GlFunction(Void, "glColor3ubv", [(Array(Const(GLubyte), "3"), "v")]),
+    GlFunction(Void, "glColor3ubv", [(Array(Const(GLubyte), 3), "v")]),
     GlFunction(Void, "glColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
-    GlFunction(Void, "glColor3uiv", [(Array(Const(GLuint), "3"), "v")]),
+    GlFunction(Void, "glColor3uiv", [(Array(Const(GLuint), 3), "v")]),
     GlFunction(Void, "glColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
-    GlFunction(Void, "glColor3usv", [(Array(Const(GLushort), "3"), "v")]),
+    GlFunction(Void, "glColor3usv", [(Array(Const(GLushort), 3), "v")]),
     GlFunction(Void, "glColor4b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue"), (GLbyte, "alpha")]),
-    GlFunction(Void, "glColor4bv", [(Array(Const(GLbyte), "4"), "v")]),
+    GlFunction(Void, "glColor4bv", [(Array(Const(GLbyte), 4), "v")]),
     GlFunction(Void, "glColor4d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue"), (GLdouble, "alpha")]),
-    GlFunction(Void, "glColor4dv", [(Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glColor4dv", [(Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glColor4f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
-    GlFunction(Void, "glColor4fv", [(Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glColor4fv", [(Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glColor4i", [(GLint, "red"), (GLint, "green"), (GLint, "blue"), (GLint, "alpha")]),
-    GlFunction(Void, "glColor4iv", [(Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glColor4iv", [(Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glColor4s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue"), (GLshort, "alpha")]),
-    GlFunction(Void, "glColor4sv", [(Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glColor4sv", [(Array(Const(GLshort), 4), "v")]),
     GlFunction(Void, "glColor4ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue"), (GLubyte, "alpha")]),
-    GlFunction(Void, "glColor4ubv", [(Array(Const(GLubyte), "4"), "v")]),
+    GlFunction(Void, "glColor4ubv", [(Array(Const(GLubyte), 4), "v")]),
     GlFunction(Void, "glColor4ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue"), (GLuint, "alpha")]),
-    GlFunction(Void, "glColor4uiv", [(Array(Const(GLuint), "4"), "v")]),
+    GlFunction(Void, "glColor4uiv", [(Array(Const(GLuint), 4), "v")]),
     GlFunction(Void, "glColor4us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue"), (GLushort, "alpha")]),
-    GlFunction(Void, "glColor4usv", [(Array(Const(GLushort), "4"), "v")]),
+    GlFunction(Void, "glColor4usv", [(Array(Const(GLushort), 4), "v")]),
     GlFunction(Void, "glEdgeFlag", [(GLboolean, "flag")]),
     GlFunction(Void, "glEdgeFlagv", [(Pointer(Const(GLboolean)), "flag")]),
     GlFunction(Void, "glEnd", []),
@@ -152,47 +152,47 @@ glapi.add_functions([
     GlFunction(Void, "glIndexs", [(GLshort, "c")]),
     GlFunction(Void, "glIndexsv", [(Pointer(Const(GLshort)), "c")]),
     GlFunction(Void, "glNormal3b", [(GLbyte, "nx"), (GLbyte, "ny"), (GLbyte, "nz")]),
-    GlFunction(Void, "glNormal3bv", [(Array(Const(GLbyte), "3"), "v")]),
+    GlFunction(Void, "glNormal3bv", [(Array(Const(GLbyte), 3), "v")]),
     GlFunction(Void, "glNormal3d", [(GLdouble, "nx"), (GLdouble, "ny"), (GLdouble, "nz")]),
-    GlFunction(Void, "glNormal3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glNormal3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glNormal3f", [(GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz")]),
-    GlFunction(Void, "glNormal3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glNormal3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glNormal3i", [(GLint, "nx"), (GLint, "ny"), (GLint, "nz")]),
-    GlFunction(Void, "glNormal3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glNormal3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glNormal3s", [(GLshort, "nx"), (GLshort, "ny"), (GLshort, "nz")]),
-    GlFunction(Void, "glNormal3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glNormal3sv", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glRasterPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glRasterPos2dv", [(Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glRasterPos2dv", [(Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glRasterPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glRasterPos2fv", [(Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glRasterPos2fv", [(Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glRasterPos2i", [(GLint, "x"), (GLint, "y")]),
-    GlFunction(Void, "glRasterPos2iv", [(Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glRasterPos2iv", [(Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glRasterPos2s", [(GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glRasterPos2sv", [(Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glRasterPos2sv", [(Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glRasterPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glRasterPos3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glRasterPos3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glRasterPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glRasterPos3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glRasterPos3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glRasterPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    GlFunction(Void, "glRasterPos3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glRasterPos3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glRasterPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glRasterPos3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glRasterPos3sv", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glRasterPos4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glRasterPos4dv", [(Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glRasterPos4dv", [(Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glRasterPos4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glRasterPos4fv", [(Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glRasterPos4fv", [(Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glRasterPos4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glRasterPos4iv", [(Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glRasterPos4iv", [(Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glRasterPos4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glRasterPos4sv", [(Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glRasterPos4sv", [(Array(Const(GLshort), 4), "v")]),
     GlFunction(Void, "glRectd", [(GLdouble, "x1"), (GLdouble, "y1"), (GLdouble, "x2"), (GLdouble, "y2")]),
-    GlFunction(Void, "glRectdv", [(Array(Const(GLdouble), "2"), "v1"), (Array(Const(GLdouble), "2"), "v2")]),
+    GlFunction(Void, "glRectdv", [(Array(Const(GLdouble), 2), "v1"), (Array(Const(GLdouble), 2), "v2")]),
     GlFunction(Void, "glRectf", [(GLfloat, "x1"), (GLfloat, "y1"), (GLfloat, "x2"), (GLfloat, "y2")]),
-    GlFunction(Void, "glRectfv", [(Array(Const(GLfloat), "2"), "v1"), (Array(Const(GLfloat), "2"), "v2")]),
+    GlFunction(Void, "glRectfv", [(Array(Const(GLfloat), 2), "v1"), (Array(Const(GLfloat), 2), "v2")]),
     GlFunction(Void, "glRecti", [(GLint, "x1"), (GLint, "y1"), (GLint, "x2"), (GLint, "y2")]),
-    GlFunction(Void, "glRectiv", [(Array(Const(GLint), "2"), "v1"), (Array(Const(GLint), "2"), "v2")]),
+    GlFunction(Void, "glRectiv", [(Array(Const(GLint), 2), "v1"), (Array(Const(GLint), 2), "v2")]),
     GlFunction(Void, "glRects", [(GLshort, "x1"), (GLshort, "y1"), (GLshort, "x2"), (GLshort, "y2")]),
-    GlFunction(Void, "glRectsv", [(Array(Const(GLshort), "2"), "v1"), (Array(Const(GLshort), "2"), "v2")]),
+    GlFunction(Void, "glRectsv", [(Array(Const(GLshort), 2), "v1"), (Array(Const(GLshort), 2), "v2")]),
     GlFunction(Void, "glTexCoord1d", [(GLdouble, "s")]),
     GlFunction(Void, "glTexCoord1dv", [(Pointer(Const(GLdouble)), "v")]),
     GlFunction(Void, "glTexCoord1f", [(GLfloat, "s")]),
@@ -202,54 +202,54 @@ glapi.add_functions([
     GlFunction(Void, "glTexCoord1s", [(GLshort, "s")]),
     GlFunction(Void, "glTexCoord1sv", [(Pointer(Const(GLshort)), "v")]),
     GlFunction(Void, "glTexCoord2d", [(GLdouble, "s"), (GLdouble, "t")]),
-    GlFunction(Void, "glTexCoord2dv", [(Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glTexCoord2dv", [(Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glTexCoord2f", [(GLfloat, "s"), (GLfloat, "t")]),
-    GlFunction(Void, "glTexCoord2fv", [(Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glTexCoord2fv", [(Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glTexCoord2i", [(GLint, "s"), (GLint, "t")]),
-    GlFunction(Void, "glTexCoord2iv", [(Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glTexCoord2iv", [(Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glTexCoord2s", [(GLshort, "s"), (GLshort, "t")]),
-    GlFunction(Void, "glTexCoord2sv", [(Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glTexCoord2sv", [(Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glTexCoord3d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
-    GlFunction(Void, "glTexCoord3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glTexCoord3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glTexCoord3f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
-    GlFunction(Void, "glTexCoord3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTexCoord3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord3i", [(GLint, "s"), (GLint, "t"), (GLint, "r")]),
-    GlFunction(Void, "glTexCoord3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glTexCoord3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glTexCoord3s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
-    GlFunction(Void, "glTexCoord3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glTexCoord3sv", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glTexCoord4d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
-    GlFunction(Void, "glTexCoord4dv", [(Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4dv", [(Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glTexCoord4f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
-    GlFunction(Void, "glTexCoord4fv", [(Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4fv", [(Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glTexCoord4i", [(GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
-    GlFunction(Void, "glTexCoord4iv", [(Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4iv", [(Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glTexCoord4s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
-    GlFunction(Void, "glTexCoord4sv", [(Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4sv", [(Array(Const(GLshort), 4), "v")]),
     GlFunction(Void, "glVertex2d", [(GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glVertex2dv", [(Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glVertex2dv", [(Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glVertex2f", [(GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glVertex2fv", [(Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glVertex2fv", [(Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glVertex2i", [(GLint, "x"), (GLint, "y")]),
-    GlFunction(Void, "glVertex2iv", [(Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glVertex2iv", [(Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glVertex2s", [(GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glVertex2sv", [(Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glVertex2sv", [(Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glVertex3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glVertex3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glVertex3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glVertex3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glVertex3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glVertex3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glVertex3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    GlFunction(Void, "glVertex3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glVertex3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glVertex3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glVertex3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glVertex3sv", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glVertex4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glVertex4dv", [(Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glVertex4dv", [(Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glVertex4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glVertex4fv", [(Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glVertex4fv", [(Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glVertex4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glVertex4iv", [(Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glVertex4iv", [(Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glVertex4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glVertex4sv", [(Array(Const(GLshort), "4"), "v")]),
-    GlFunction(Void, "glClipPlane", [(GLenum, "plane"), (Array(Const(GLdouble), "4"), "equation")]),
+    GlFunction(Void, "glVertex4sv", [(Array(Const(GLshort), 4), "v")]),
+    GlFunction(Void, "glClipPlane", [(GLenum, "plane"), (Array(Const(GLdouble), 4), "equation")]),
     GlFunction(Void, "glColorMaterial", [(GLenum, "face"), (GLenum, "mode")]),
     GlFunction(Void, "glFogf", [(GLenum, "pname"), (GLfloat, "param")]),
     GlFunction(Void, "glFogfv", [(GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "params")]),
@@ -307,9 +307,9 @@ glapi.add_functions([
     GlFunction(Void, "glEvalCoord1f", [(GLfloat, "u")]),
     GlFunction(Void, "glEvalCoord1fv", [(Pointer(Const(GLfloat)), "u")]),
     GlFunction(Void, "glEvalCoord2d", [(GLdouble, "u"), (GLdouble, "v")]),
-    GlFunction(Void, "glEvalCoord2dv", [(Array(Const(GLdouble), "2"), "u")]),
+    GlFunction(Void, "glEvalCoord2dv", [(Array(Const(GLdouble), 2), "u")]),
     GlFunction(Void, "glEvalCoord2f", [(GLfloat, "u"), (GLfloat, "v")]),
-    GlFunction(Void, "glEvalCoord2fv", [(Array(Const(GLfloat), "2"), "u")]),
+    GlFunction(Void, "glEvalCoord2fv", [(Array(Const(GLfloat), 2), "u")]),
     GlFunction(Void, "glEvalMesh1", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2")]),
     GlFunction(Void, "glEvalPoint1", [(GLint, "i")]),
     GlFunction(Void, "glEvalMesh2", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2"), (GLint, "j1"), (GLint, "j2")]),
@@ -323,7 +323,7 @@ glapi.add_functions([
     GlFunction(Void, "glPixelMapusv", [(GLenum, "map"), (GLsizei, "mapsize"), (Array(Const(GLushort), "mapsize"), "values")]),
     GlFunction(Void, "glCopyPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "type")]),
     GlFunction(Void, "glDrawPixels", [(GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glDrawPixels_size(format, type, width, height)"), "pixels")]),
-    GlFunction(Void, "glGetClipPlane", [(GLenum, "plane"), Out(Array(GLdouble, "4"), "equation")], sideeffects=False),
+    GlFunction(Void, "glGetClipPlane", [(GLenum, "plane"), Out(Array(GLdouble, 4), "equation")], sideeffects=False),
     GlFunction(Void, "glGetLightfv", [(GLenum, "light"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetLightiv", [(GLenum, "light"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetMapdv", [(GLenum, "target"), (GLenum, "query"), Out(Pointer(GLdouble), "v")], sideeffects=False),
@@ -343,11 +343,11 @@ glapi.add_functions([
     GlFunction(GLboolean, "glIsList", [(GLuint, "list")], sideeffects=False),
     GlFunction(Void, "glFrustum", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
     GlFunction(Void, "glLoadIdentity", []),
-    GlFunction(Void, "glLoadMatrixf", [(Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glLoadMatrixd", [(Array(Const(GLdouble), "16"), "m")]),
+    GlFunction(Void, "glLoadMatrixf", [(Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glLoadMatrixd", [(Array(Const(GLdouble), 16), "m")]),
     GlFunction(Void, "glMatrixMode", [(GLenum, "mode")]),
-    GlFunction(Void, "glMultMatrixf", [(Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMultMatrixd", [(Array(Const(GLdouble), "16"), "m")]),
+    GlFunction(Void, "glMultMatrixf", [(Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMultMatrixd", [(Array(Const(GLdouble), 16), "m")]),
     GlFunction(Void, "glOrtho", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
     GlFunction(Void, "glPopMatrix", []),
     GlFunction(Void, "glPushMatrix", []),
@@ -360,8 +360,8 @@ glapi.add_functions([
 
     # GL_VERSION_1_1
     GlFunction(Void, "glDrawArrays", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count")]),
-    GlFunction(Void, "glDrawElements", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices")]),
-    GlFunction(Void, "glGetPointerv", [(GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
+    GlFunction(Void, "glDrawElements", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices")]),
+    GlFunction(Void, "glGetPointerv", [(GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
     GlFunction(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]),
     GlFunction(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]),
     GlFunction(Void, "glCopyTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border")]),
@@ -376,15 +376,15 @@ glapi.add_functions([
 
     # GL_VERSION_1_1_DEPRECATED
     GlFunction(Void, "glArrayElement", [(GLint, "i")]),
-    GlFunction(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glDisableClientState", [(GLenum, "array")]),
-    GlFunction(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glEnableClientState", [(GLenum, "array")]),
-    GlFunction(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glInterleavedArrays", [(GLenum, "format"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glNormalPointer", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glInterleavedArrays", [(GLenum, "format"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glNormalPointer", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures"), Out(Array(GLboolean, "n"), "residences")], sideeffects=False),
     GlFunction(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures"), (Array(Const(GLclampf), "n"), "priorities")]),
     GlFunction(Void, "glIndexub", [(GLubyte, "c")]),
@@ -395,7 +395,7 @@ glapi.add_functions([
     # GL_VERSION_1_2
     GlFunction(Void, "glBlendColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]),
     GlFunction(Void, "glBlendEquation", [(GLenum, "mode")]),
-    GlFunction(Void, "glDrawRangeElements", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices")]),
+    GlFunction(Void, "glDrawRangeElements", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices")]),
     GlFunction(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLenum_int, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexImage3D_size(format, type, width, height, depth)"), "pixels")]),
     GlFunction(Void, "glTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexSubImage3D_size(format, type, width, height, depth)"), "pixels")]),
     GlFunction(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
@@ -421,7 +421,7 @@ glapi.add_functions([
     GlFunction(Void, "glGetConvolutionFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "__glGetConvolutionFilter_size(target, format, type)"), "image")]),
     GlFunction(Void, "glGetConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetSeparableFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "__glGetSeparableFilter_size(target, format, type)"), "row"), Out(OpaqueBlob(GLvoid, "__glGetSeparableFilter_size(target, format, type)"), "column"), Out(OpaquePointer(GLvoid), "span")]),
+    GlFunction(Void, "glGetSeparableFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "__glGetSeparableFilter_size(target, format, type)"), "row"), Out(OpaqueBlob(GLvoid, "__glGetSeparableFilter_size(target, format, type)"), "column"), Out(GLpointer, "span")]),
     GlFunction(Void, "glSeparableFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glConvolutionFilter1D_size(format, type, width)"), "row"), (Blob(Const(GLvoid), "__glConvolutionFilter1D_size(format, type, height)"), "column")]),
     GlFunction(Void, "glGetHistogram", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), Out(OpaqueBlob(GLvoid, "__glGetHistogram_size(target, format, type)"), "values")]),
     GlFunction(Void, "glGetHistogramParameterfv", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
@@ -456,38 +456,38 @@ glapi.add_functions([
     GlFunction(Void, "glMultiTexCoord1s", [(GLenum, "target"), (GLshort, "s")]),
     GlFunction(Void, "glMultiTexCoord1sv", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
     GlFunction(Void, "glMultiTexCoord2d", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t")]),
-    GlFunction(Void, "glMultiTexCoord2dv", [(GLenum, "target"), (Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2dv", [(GLenum, "target"), (Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord2f", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t")]),
-    GlFunction(Void, "glMultiTexCoord2fv", [(GLenum, "target"), (Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2fv", [(GLenum, "target"), (Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord2i", [(GLenum, "target"), (GLint, "s"), (GLint, "t")]),
-    GlFunction(Void, "glMultiTexCoord2iv", [(GLenum, "target"), (Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2iv", [(GLenum, "target"), (Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord2s", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t")]),
-    GlFunction(Void, "glMultiTexCoord2sv", [(GLenum, "target"), (Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2sv", [(GLenum, "target"), (Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord3d", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
-    GlFunction(Void, "glMultiTexCoord3dv", [(GLenum, "target"), (Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3dv", [(GLenum, "target"), (Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord3f", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
-    GlFunction(Void, "glMultiTexCoord3fv", [(GLenum, "target"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3fv", [(GLenum, "target"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord3i", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r")]),
-    GlFunction(Void, "glMultiTexCoord3iv", [(GLenum, "target"), (Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3iv", [(GLenum, "target"), (Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord3s", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
-    GlFunction(Void, "glMultiTexCoord3sv", [(GLenum, "target"), (Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3sv", [(GLenum, "target"), (Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord4d", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
-    GlFunction(Void, "glMultiTexCoord4dv", [(GLenum, "target"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4dv", [(GLenum, "target"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord4f", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
-    GlFunction(Void, "glMultiTexCoord4fv", [(GLenum, "target"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4fv", [(GLenum, "target"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord4i", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
-    GlFunction(Void, "glMultiTexCoord4iv", [(GLenum, "target"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4iv", [(GLenum, "target"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord4s", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
-    GlFunction(Void, "glMultiTexCoord4sv", [(GLenum, "target"), (Array(Const(GLshort), "4"), "v")]),
-    GlFunction(Void, "glLoadTransposeMatrixf", [(Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glLoadTransposeMatrixd", [(Array(Const(GLdouble), "16"), "m")]),
-    GlFunction(Void, "glMultTransposeMatrixf", [(Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMultTransposeMatrixd", [(Array(Const(GLdouble), "16"), "m")]),
+    GlFunction(Void, "glMultiTexCoord4sv", [(GLenum, "target"), (Array(Const(GLshort), 4), "v")]),
+    GlFunction(Void, "glLoadTransposeMatrixf", [(Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glLoadTransposeMatrixd", [(Array(Const(GLdouble), 16), "m")]),
+    GlFunction(Void, "glMultTransposeMatrixf", [(Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMultTransposeMatrixd", [(Array(Const(GLdouble), 16), "m")]),
 
     # GL_VERSION_1_4
     GlFunction(Void, "glBlendFuncSeparate", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
     GlFunction(Void, "glMultiDrawArrays", [(GLenum_mode, "mode"), (Array(Const(GLint), "primcount"), "first"), (Array(Const(GLsizei), "primcount"), "count"), (GLsizei, "primcount")]),
-    GlFunction(Void, "glMultiDrawElements", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(Opaque("const GLvoid *"), "primcount"), "indices"), (GLsizei, "primcount")]),
+    GlFunction(Void, "glMultiDrawElements", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(GLpointerConst, "primcount"), "indices"), (GLsizei, "primcount")]),
     GlFunction(Void, "glPointParameterf", [(GLenum, "pname"), (GLfloat, "param")]),
     GlFunction(Void, "glPointParameterfv", [(GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glPointParameteri", [(GLenum, "pname"), (GLint, "param")]),
@@ -498,40 +498,40 @@ glapi.add_functions([
     GlFunction(Void, "glFogCoordfv", [(Pointer(Const(GLfloat)), "coord")]),
     GlFunction(Void, "glFogCoordd", [(GLdouble, "coord")]),
     GlFunction(Void, "glFogCoorddv", [(Pointer(Const(GLdouble)), "coord")]),
-    GlFunction(Void, "glFogCoordPointer", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glFogCoordPointer", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glSecondaryColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
-    GlFunction(Void, "glSecondaryColor3bv", [(Array(Const(GLbyte), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3bv", [(Array(Const(GLbyte), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
-    GlFunction(Void, "glSecondaryColor3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
-    GlFunction(Void, "glSecondaryColor3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
-    GlFunction(Void, "glSecondaryColor3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
-    GlFunction(Void, "glSecondaryColor3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3sv", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
-    GlFunction(Void, "glSecondaryColor3ubv", [(Array(Const(GLubyte), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3ubv", [(Array(Const(GLubyte), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
-    GlFunction(Void, "glSecondaryColor3uiv", [(Array(Const(GLuint), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3uiv", [(Array(Const(GLuint), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
-    GlFunction(Void, "glSecondaryColor3usv", [(Array(Const(GLushort), "3"), "v")]),
-    GlFunction(Void, "glSecondaryColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glSecondaryColor3usv", [(Array(Const(GLushort), 3), "v")]),
+    GlFunction(Void, "glSecondaryColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glWindowPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glWindowPos2dv", [(Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2dv", [(Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glWindowPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glWindowPos2fv", [(Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2fv", [(Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glWindowPos2i", [(GLint, "x"), (GLint, "y")]),
-    GlFunction(Void, "glWindowPos2iv", [(Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2iv", [(Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glWindowPos2s", [(GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glWindowPos2sv", [(Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2sv", [(Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glWindowPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glWindowPos3dv", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3dv", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glWindowPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glWindowPos3fv", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3fv", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glWindowPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    GlFunction(Void, "glWindowPos3iv", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3iv", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glWindowPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glWindowPos3sv", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3sv", [(Array(Const(GLshort), 3), "v")]),
 
     # GL_VERSION_1_5
     GlFunction(Void, "glGenQueries", [(GLsizei, "n"), Out(Array(GLquery, "n"), "ids")]),
@@ -552,7 +552,7 @@ glapi.add_functions([
     GlFunction(GLmap, "glMapBuffer", [(GLenum, "target"), (GLenum, "access")]),
     GlFunction(GLboolean, "glUnmapBuffer", [(GLenum, "target")]),
     GlFunction(Void, "glGetBufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetBufferPointerv", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
+    GlFunction(Void, "glGetBufferPointerv", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
 
     # GL_VERSION_2_0
     GlFunction(Void, "glBlendEquationSeparate", [(GLenum, "modeRGB"), (GLenum, "modeAlpha")]),
@@ -585,7 +585,7 @@ glapi.add_functions([
     GlFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetVertexAttribPointerv", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "pointer")], sideeffects=False),
+    GlFunction(Void, "glGetVertexAttribPointerv", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLpointer), "pointer")], sideeffects=False),
     GlFunction(GLboolean, "glIsProgram", [(GLprogram, "program")], sideeffects=False),
     GlFunction(GLboolean, "glIsShader", [(GLshader, "shader")], sideeffects=False),
     GlFunction(Void, "glLinkProgram", [(GLprogram, "program")]),
@@ -618,36 +618,36 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttrib1s", [(GLuint, "index"), (GLshort, "x")]),
     GlFunction(Void, "glVertexAttrib1sv", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
     GlFunction(Void, "glVertexAttrib2d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glVertexAttrib2dv", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2dv", [(GLuint, "index"), (Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glVertexAttrib2f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glVertexAttrib2fv", [(GLuint, "index"), (Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2fv", [(GLuint, "index"), (Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glVertexAttrib2s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glVertexAttrib2sv", [(GLuint, "index"), (Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2sv", [(GLuint, "index"), (Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glVertexAttrib3d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glVertexAttrib3dv", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3dv", [(GLuint, "index"), (Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glVertexAttrib3f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glVertexAttrib3fv", [(GLuint, "index"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3fv", [(GLuint, "index"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glVertexAttrib3s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glVertexAttrib3sv", [(GLuint, "index"), (Array(Const(GLshort), "3"), "v")]),
-    GlFunction(Void, "glVertexAttrib4Nbv", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4Niv", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4Nsv", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib3sv", [(GLuint, "index"), (Array(Const(GLshort), 3), "v")]),
+    GlFunction(Void, "glVertexAttrib4Nbv", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4Niv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4Nsv", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4Nub", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
-    GlFunction(Void, "glVertexAttrib4Nubv", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4Nuiv", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4Nusv", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4bv", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4Nubv", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4Nuiv", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4Nusv", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4bv", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glVertexAttrib4dv", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4dv", [(GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glVertexAttrib4fv", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4iv", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4fv", [(GLuint, "index"), (Array(Const(GLfloat), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4iv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glVertexAttrib4sv", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4ubv", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4uiv", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4usv", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexAttrib4sv", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4ubv", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4uiv", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4usv", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
+    GlFunction(Void, "glVertexAttribPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
 
     # GL_VERSION_2_1
     GlFunction(Void, "glUniformMatrix2x3fv", [(GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*2*3"), "value")]),
@@ -673,7 +673,7 @@ glapi.add_functions([
     GlFunction(Void, "glClampColor", [(GLenum, "target"), (GLenum, "clamp")]),
     GlFunction(Void, "glBeginConditionalRender", [(GLuint, "id"), (GLenum, "mode")]),
     GlFunction(Void, "glEndConditionalRender", []),
-    GlFunction(Void, "glVertexAttribIPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexAttribIPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glGetVertexAttribIiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribIuiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLuint, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glVertexAttribI1i", [(GLuint, "index"), (GLint, "x")]),
@@ -685,17 +685,17 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribI3ui", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z")]),
     GlFunction(Void, "glVertexAttribI4ui", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z"), (GLuint, "w")]),
     GlFunction(Void, "glVertexAttribI1iv", [(GLuint, "index"), (Pointer(Const(GLint)), "v")]),
-    GlFunction(Void, "glVertexAttribI2iv", [(GLuint, "index"), (Array(Const(GLint), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribI3iv", [(GLuint, "index"), (Array(Const(GLint), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribI4iv", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glVertexAttribI2iv", [(GLuint, "index"), (Array(Const(GLint), 2), "v")]),
+    GlFunction(Void, "glVertexAttribI3iv", [(GLuint, "index"), (Array(Const(GLint), 3), "v")]),
+    GlFunction(Void, "glVertexAttribI4iv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glVertexAttribI1uiv", [(GLuint, "index"), (Pointer(Const(GLuint)), "v")]),
-    GlFunction(Void, "glVertexAttribI2uiv", [(GLuint, "index"), (Array(Const(GLuint), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribI3uiv", [(GLuint, "index"), (Array(Const(GLuint), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribI4uiv", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4bv", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4sv", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4ubv", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4usv", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
+    GlFunction(Void, "glVertexAttribI2uiv", [(GLuint, "index"), (Array(Const(GLuint), 2), "v")]),
+    GlFunction(Void, "glVertexAttribI3uiv", [(GLuint, "index"), (Array(Const(GLuint), 3), "v")]),
+    GlFunction(Void, "glVertexAttribI4uiv", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4bv", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4sv", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4ubv", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4usv", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
     GlFunction(Void, "glGetUniformuiv", [(GLprogram, "program"), (GLlocation, "location"), Out(OpaqueArray(GLuint, "__glGetUniformuiv_size(program, location)"), "params")], sideeffects=False),
     GlFunction(Void, "glBindFragDataLocation", [(GLprogram, "program"), (GLuint, "color"), (Const(GLstring), "name")]),
     GlFunction(GLlocation, "glGetFragDataLocation", [(GLprogram, "program"), (Const(GLstring), "name")]),
@@ -719,7 +719,7 @@ glapi.add_functions([
 
     # GL_VERSION_3_1
     GlFunction(Void, "glDrawArraysInstanced", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count"), (GLsizei, "primcount")]),
-    GlFunction(Void, "glDrawElementsInstanced", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLsizei, "primcount")]),
+    GlFunction(Void, "glDrawElementsInstanced", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLsizei, "primcount")]),
     GlFunction(Void, "glTexBuffer", [(GLenum, "target"), (GLenum, "internalformat"), (GLbuffer, "buffer")]),
     GlFunction(Void, "glPrimitiveRestartIndex", [(GLuint, "index")]),
 
@@ -750,35 +750,35 @@ glapi.add_functions([
     GlFunction(Void, "glMultiTexCoord1sARB", [(GLenum, "target"), (GLshort, "s")]),
     GlFunction(Void, "glMultiTexCoord1svARB", [(GLenum, "target"), (Pointer(Const(GLshort)), "v")]),
     GlFunction(Void, "glMultiTexCoord2dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t")]),
-    GlFunction(Void, "glMultiTexCoord2dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2dvARB", [(GLenum, "target"), (Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord2fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t")]),
-    GlFunction(Void, "glMultiTexCoord2fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2fvARB", [(GLenum, "target"), (Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord2iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t")]),
-    GlFunction(Void, "glMultiTexCoord2ivARB", [(GLenum, "target"), (Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2ivARB", [(GLenum, "target"), (Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord2sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t")]),
-    GlFunction(Void, "glMultiTexCoord2svARB", [(GLenum, "target"), (Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2svARB", [(GLenum, "target"), (Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord3dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
-    GlFunction(Void, "glMultiTexCoord3dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3dvARB", [(GLenum, "target"), (Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord3fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
-    GlFunction(Void, "glMultiTexCoord3fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3fvARB", [(GLenum, "target"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord3iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r")]),
-    GlFunction(Void, "glMultiTexCoord3ivARB", [(GLenum, "target"), (Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3ivARB", [(GLenum, "target"), (Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord3sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
-    GlFunction(Void, "glMultiTexCoord3svARB", [(GLenum, "target"), (Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3svARB", [(GLenum, "target"), (Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord4dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
-    GlFunction(Void, "glMultiTexCoord4dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4dvARB", [(GLenum, "target"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord4fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
-    GlFunction(Void, "glMultiTexCoord4fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4fvARB", [(GLenum, "target"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord4iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
-    GlFunction(Void, "glMultiTexCoord4ivARB", [(GLenum, "target"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4ivARB", [(GLenum, "target"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord4sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
-    GlFunction(Void, "glMultiTexCoord4svARB", [(GLenum, "target"), (Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4svARB", [(GLenum, "target"), (Array(Const(GLshort), 4), "v")]),
 
     # GL_ARB_transpose_matrix
-    GlFunction(Void, "glLoadTransposeMatrixfARB", [(Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glLoadTransposeMatrixdARB", [(Array(Const(GLdouble), "16"), "m")]),
-    GlFunction(Void, "glMultTransposeMatrixfARB", [(Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMultTransposeMatrixdARB", [(Array(Const(GLdouble), "16"), "m")]),
+    GlFunction(Void, "glLoadTransposeMatrixfARB", [(Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glLoadTransposeMatrixdARB", [(Array(Const(GLdouble), 16), "m")]),
+    GlFunction(Void, "glMultTransposeMatrixfARB", [(Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMultTransposeMatrixdARB", [(Array(Const(GLdouble), 16), "m")]),
 
     # GL_ARB_multisample
     GlFunction(Void, "glSampleCoverageARB", [(GLclampf, "value"), (GLboolean, "invert")]),
@@ -790,7 +790,7 @@ glapi.add_functions([
     GlFunction(Void, "glCompressedTexSubImage3DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
     GlFunction(Void, "glCompressedTexSubImage2DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
     GlFunction(Void, "glCompressedTexSubImage1DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "data")]),
-    GlFunction(Void, "glGetCompressedTexImageARB", [(GLenum, "target"), (GLint, "level"), Out(OpaquePointer(GLvoid), "img")], sideeffects=False),
+    GlFunction(Void, "glGetCompressedTexImageARB", [(GLenum, "target"), (GLint, "level"), Out(GLpointer, "img")], sideeffects=False),
 
     # GL_ARB_point_parameters
     GlFunction(Void, "glPointParameterfARB", [(GLenum, "pname"), (GLfloat, "param")]),
@@ -805,7 +805,7 @@ glapi.add_functions([
     GlFunction(Void, "glWeightubvARB", [(GLint, "size"), (Array(Const(GLubyte), "size"), "weights")]),
     GlFunction(Void, "glWeightusvARB", [(GLint, "size"), (Array(Const(GLushort), "size"), "weights")]),
     GlFunction(Void, "glWeightuivARB", [(GLint, "size"), (Array(Const(GLuint), "size"), "weights")]),
-    GlFunction(Void, "glWeightPointerARB", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glWeightPointerARB", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glVertexBlendARB", [(GLint, "count")]),
 
     # GL_ARB_matrix_palette
@@ -813,25 +813,25 @@ glapi.add_functions([
     GlFunction(Void, "glMatrixIndexubvARB", [(GLint, "size"), (Array(Const(GLubyte), "size"), "indices")]),
     GlFunction(Void, "glMatrixIndexusvARB", [(GLint, "size"), (Array(Const(GLushort), "size"), "indices")]),
     GlFunction(Void, "glMatrixIndexuivARB", [(GLint, "size"), (Array(Const(GLuint), "size"), "indices")]),
-    GlFunction(Void, "glMatrixIndexPointerARB", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glMatrixIndexPointerARB", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
 
     # GL_ARB_window_pos
     GlFunction(Void, "glWindowPos2dARB", [(GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glWindowPos2dvARB", [(Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2dvARB", [(Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glWindowPos2fARB", [(GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glWindowPos2fvARB", [(Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2fvARB", [(Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glWindowPos2iARB", [(GLint, "x"), (GLint, "y")]),
-    GlFunction(Void, "glWindowPos2ivARB", [(Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2ivARB", [(Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glWindowPos2sARB", [(GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glWindowPos2svARB", [(Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2svARB", [(Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glWindowPos3dARB", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glWindowPos3dvARB", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3dvARB", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glWindowPos3fARB", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glWindowPos3fvARB", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3fvARB", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glWindowPos3iARB", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    GlFunction(Void, "glWindowPos3ivARB", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3ivARB", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glWindowPos3sARB", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glWindowPos3svARB", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3svARB", [(Array(Const(GLshort), 3), "v")]),
 
     # GL_ARB_vertex_program
     GlFunction(Void, "glVertexAttrib1dARB", [(GLuint, "index"), (GLdouble, "x")]),
@@ -841,36 +841,36 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttrib1sARB", [(GLuint, "index"), (GLshort, "x")]),
     GlFunction(Void, "glVertexAttrib1svARB", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
     GlFunction(Void, "glVertexAttrib2dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glVertexAttrib2dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2dvARB", [(GLuint, "index"), (Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glVertexAttrib2fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glVertexAttrib2fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2fvARB", [(GLuint, "index"), (Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glVertexAttrib2sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glVertexAttrib2svARB", [(GLuint, "index"), (Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2svARB", [(GLuint, "index"), (Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glVertexAttrib3dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glVertexAttrib3dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3dvARB", [(GLuint, "index"), (Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glVertexAttrib3fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glVertexAttrib3fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3fvARB", [(GLuint, "index"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glVertexAttrib3sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glVertexAttrib3svARB", [(GLuint, "index"), (Array(Const(GLshort), "3"), "v")]),
-    GlFunction(Void, "glVertexAttrib4NbvARB", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4NivARB", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4NsvARB", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib3svARB", [(GLuint, "index"), (Array(Const(GLshort), 3), "v")]),
+    GlFunction(Void, "glVertexAttrib4NbvARB", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4NivARB", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4NsvARB", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4NubARB", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
-    GlFunction(Void, "glVertexAttrib4NubvARB", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4NuivARB", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4NusvARB", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4bvARB", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4NubvARB", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4NuivARB", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4NusvARB", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4bvARB", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glVertexAttrib4dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4dvARB", [(GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glVertexAttrib4fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4ivARB", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4fvARB", [(GLuint, "index"), (Array(Const(GLfloat), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4ivARB", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glVertexAttrib4svARB", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4ubvARB", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4uivARB", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttrib4usvARB", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribPointerARB", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexAttrib4svARB", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4ubvARB", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4uivARB", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
+    GlFunction(Void, "glVertexAttrib4usvARB", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
+    GlFunction(Void, "glVertexAttribPointerARB", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glEnableVertexAttribArrayARB", [(GLuint, "index")]),
     GlFunction(Void, "glDisableVertexAttribArrayARB", [(GLuint, "index")]),
     GlFunction(Void, "glProgramStringARB", [(GLenum, "target"), (GLenum, "format"), (GLsizei, "len"), (String("const void *", "len"), "string")]),
@@ -878,23 +878,23 @@ glapi.add_functions([
     GlFunction(Void, "glDeleteProgramsARB", [(GLsizei, "n"), (Array(Const(GLprogramARB), "n"), "programs")]),
     GlFunction(Void, "glGenProgramsARB", [(GLsizei, "n"), Out(Array(GLprogramARB, "n"), "programs")]),
     GlFunction(Void, "glProgramEnvParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glProgramEnvParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
+    GlFunction(Void, "glProgramEnvParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), 4), "params")]),
     GlFunction(Void, "glProgramEnvParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glProgramEnvParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
+    GlFunction(Void, "glProgramEnvParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), 4), "params")]),
     GlFunction(Void, "glProgramLocalParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glProgramLocalParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
+    GlFunction(Void, "glProgramLocalParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), 4), "params")]),
     GlFunction(Void, "glProgramLocalParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glProgramLocalParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
-    GlFunction(Void, "glGetProgramEnvParameterdvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramEnvParameterfvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramLocalParameterdvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramLocalParameterfvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "4"), "params")], sideeffects=False),
+    GlFunction(Void, "glProgramLocalParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), 4), "params")]),
+    GlFunction(Void, "glGetProgramEnvParameterdvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramEnvParameterfvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramLocalParameterdvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramLocalParameterfvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, 4), "params")], sideeffects=False),
     GlFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramStringARB", [(GLenum, "target"), (GLenum, "pname"), Out(OpaquePointer(GLvoid), "string")], sideeffects=False),
+    GlFunction(Void, "glGetProgramStringARB", [(GLenum, "target"), (GLenum, "pname"), Out(GLpointer, "string")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetVertexAttribPointervARB", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "pointer")], sideeffects=False),
+    GlFunction(Void, "glGetVertexAttribPointervARB", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLpointer), "pointer")], sideeffects=False),
     GlFunction(GLboolean, "glIsProgramARB", [(GLprogramARB, "program")], sideeffects=False),
 
     # GL_ARB_vertex_buffer_object
@@ -908,7 +908,7 @@ glapi.add_functions([
     GlFunction(GLmap, "glMapBufferARB", [(GLenum, "target"), (GLenum, "access")]),
     GlFunction(GLboolean, "glUnmapBufferARB", [(GLenum, "target")]),
     GlFunction(Void, "glGetBufferParameterivARB", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetBufferPointervARB", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
+    GlFunction(Void, "glGetBufferPointervARB", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
 
     # GL_ARB_occlusion_query
     GlFunction(Void, "glGenQueriesARB", [(GLsizei, "n"), Out(Array(GLquery, "n"), "ids")]),
@@ -974,7 +974,7 @@ glapi.add_functions([
 
     # GL_ARB_draw_instanced
     GlFunction(Void, "glDrawArraysInstancedARB", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count"), (GLsizei, "primcount")]),
-    GlFunction(Void, "glDrawElementsInstancedARB", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLsizei, "primcount")]),
+    GlFunction(Void, "glDrawElementsInstancedARB", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLsizei, "primcount")]),
 
     # GL_ARB_framebuffer_object
     GlFunction(GLboolean, "glIsRenderbuffer", [(GLrenderbuffer, "renderbuffer")], sideeffects=False),
@@ -1033,10 +1033,10 @@ glapi.add_functions([
     GlFunction(Void, "glCopyBufferSubData", [(GLenum, "readTarget"), (GLenum, "writeTarget"), (GLintptr, "readOffset"), (GLintptr, "writeOffset"), (GLsizeiptr, "size")]),
 
     # GL_ARB_draw_elements_base_vertex
-    GlFunction(Void, "glDrawElementsBaseVertex", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLint, "basevertex")]),
-    GlFunction(Void, "glDrawRangeElementsBaseVertex", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLint, "basevertex")]),
-    GlFunction(Void, "glDrawElementsInstancedBaseVertex", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLsizei, "primcount"), (GLint, "basevertex")]),
-    GlFunction(Void, "glMultiDrawElementsBaseVertex", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(Opaque("const GLvoid *"), "primcount"), "indices"), (GLsizei, "primcount"), (Array(Const(GLint), "primcount"), "basevertex")]),
+    GlFunction(Void, "glDrawElementsBaseVertex", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLint, "basevertex")]),
+    GlFunction(Void, "glDrawRangeElementsBaseVertex", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLint, "basevertex")]),
+    GlFunction(Void, "glDrawElementsInstancedBaseVertex", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLsizei, "primcount"), (GLint, "basevertex")]),
+    GlFunction(Void, "glMultiDrawElementsBaseVertex", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(GLpointerConst, "primcount"), "indices"), (GLsizei, "primcount"), (Array(Const(GLint), "primcount"), "basevertex")]),
 
     # GL_ARB_provoking_vertex
     GlFunction(Void, "glProvokingVertex", [(GLenum, "mode")]),
@@ -1139,8 +1139,8 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribP4uiv", [(GLuint, "index"), (GLenum, "type"), (GLboolean, "normalized"), (Pointer(Const(GLuint)), "value")]),
 
     # GL_ARB_draw_indirect
-    GlFunction(Void, "glDrawArraysIndirect", [(GLenum_mode, "mode"), (OpaquePointer(Const(GLvoid)), "indirect")]),
-    GlFunction(Void, "glDrawElementsIndirect", [(GLenum_mode, "mode"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indirect")]),
+    GlFunction(Void, "glDrawArraysIndirect", [(GLenum_mode, "mode"), (GLpointerConst, "indirect")]),
+    GlFunction(Void, "glDrawElementsIndirect", [(GLenum_mode, "mode"), (GLenum, "type"), (GLpointerConst, "indirect")]),
 
     # GL_ARB_gpu_shader_fp64
     GlFunction(Void, "glUniform1d", [(GLlocation, "location"), (GLdouble, "x")]),
@@ -1194,7 +1194,7 @@ glapi.add_functions([
     # GL_ARB_ES2_compatibility
     GlFunction(Void, "glReleaseShaderCompiler", []),
     GlFunction(Void, "glShaderBinary", [(GLsizei, "count"), (Array(Const(GLuint), "count"), "shaders"), (GLenum, "binaryformat"), (Blob(Const(GLvoid), "length"), "binary"), (GLsizei, "length")]),
-    GlFunction(Void, "glGetShaderPrecisionFormat", [(GLenum, "shadertype"), (GLenum, "precisiontype"), Out(Array(GLint, "2"), "range"), Out(Array(GLint, "2"), "precision")], sideeffects=False),
+    GlFunction(Void, "glGetShaderPrecisionFormat", [(GLenum, "shadertype"), (GLenum, "precisiontype"), Out(Array(GLint, 2), "range"), Out(Array(GLint, 2), "precision")], sideeffects=False),
     GlFunction(Void, "glDepthRangef", [(GLclampf, "n"), (GLclampf, "f")]),
     GlFunction(Void, "glClearDepthf", [(GLclampf, "d")]),
 
@@ -1271,19 +1271,19 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribL3d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
     GlFunction(Void, "glVertexAttribL4d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
     GlFunction(Void, "glVertexAttribL1dv", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    GlFunction(Void, "glVertexAttribL2dv", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribL3dv", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribL4dv", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribLPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexAttribL2dv", [(GLuint, "index"), (Array(Const(GLdouble), 2), "v")]),
+    GlFunction(Void, "glVertexAttribL3dv", [(GLuint, "index"), (Array(Const(GLdouble), 3), "v")]),
+    GlFunction(Void, "glVertexAttribL4dv", [(GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
+    GlFunction(Void, "glVertexAttribLPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glGetVertexAttribLdv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
 
     # GL_ARB_viewport_array
     GlFunction(Void, "glViewportArrayv", [(GLuint, "first"), (GLsizei, "count"), (Array(Const(GLfloat), "count*4"), "v")]),
     GlFunction(Void, "glViewportIndexedf", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "w"), (GLfloat, "h")]),
-    GlFunction(Void, "glViewportIndexedfv", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glViewportIndexedfv", [(GLuint, "index"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glScissorArrayv", [(GLuint, "first"), (GLsizei, "count"), (Array(Const(GLint), "count*4"), "v")]),
     GlFunction(Void, "glScissorIndexed", [(GLuint, "index"), (GLint, "left"), (GLint, "bottom"), (GLsizei, "width"), (GLsizei, "height")]),
-    GlFunction(Void, "glScissorIndexedv", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glScissorIndexedv", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glDepthRangeArrayv", [(GLuint, "first"), (GLsizei, "count"), (Array(Const(GLclampd), "count*2"), "v")]),
     GlFunction(Void, "glDepthRangeIndexed", [(GLuint, "index"), (GLclampd, "n"), (GLclampd, "f")]),
     GlFunction(Void, "glGetFloati_v", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "__gl_param_size(target)"), "data")], sideeffects=False),
@@ -1292,7 +1292,7 @@ glapi.add_functions([
     # GL_ARB_debug_output
     GlFunction(Void, "glDebugMessageControlARB", [(GLenum, "source"), (GLenum, "type"), (GLenum, "severity"), (GLsizei, "count"), (Array(Const(GLuint), "count"), "ids"), (GLboolean, "enabled")], sideeffects=False),
     GlFunction(Void, "glDebugMessageInsertARB", [(GLenum, "source"), (GLenum, "type"), (GLuint, "id"), (GLenum, "severity"), (GLsizei, "length"), (Const(String("GLchar *", "length")), "buf")], sideeffects=False),
-    GlFunction(Void, "glDebugMessageCallbackARB", [(GLDEBUGPROCARB, "callback"), (Opaque("const GLvoid *"), "userParam")], sideeffects=False),
+    GlFunction(Void, "glDebugMessageCallbackARB", [(GLDEBUGPROCARB, "callback"), (GLpointerConst, "userParam")], sideeffects=False),
     GlFunction(GLuint, "glGetDebugMessageLogARB", [(GLuint, "count"), (GLsizei, "bufsize"), Out(Array(GLenum, "count"), "sources"), Out(Array(GLenum, "count"), "types"), Out(Array(GLuint, "count"), "ids"), Out(Array(GLenum, "count"), "severities"), Out(Array(GLsizei, "count"), "lengths"), Out(GLstring, "messageLog")], sideeffects=False),
 
     # GL_ARB_robustness
@@ -1306,7 +1306,7 @@ glapi.add_functions([
     GlFunction(Void, "glGetnPolygonStippleARB", [(GLsizei, "bufSize"), Out(Blob(GLubyte, "bufSize"), "pattern")]),
     GlFunction(Void, "glGetnColorTableARB", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "bufSize"), Out(Blob(GLvoid, "bufSize"), "table")], sideeffects=False),
     GlFunction(Void, "glGetnConvolutionFilterARB", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "bufSize"), Out(Blob(GLvoid, "bufSize"), "image")]),
-    GlFunction(Void, "glGetnSeparableFilterARB", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "rowBufSize"), Out(Blob(GLvoid, "rowBufSize"), "row"), (GLsizei, "columnBufSize"), Out(Blob(GLvoid, "columnBufSize"), "column"), Out(OpaquePointer(GLvoid), "span")]),
+    GlFunction(Void, "glGetnSeparableFilterARB", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "rowBufSize"), Out(Blob(GLvoid, "rowBufSize"), "row"), (GLsizei, "columnBufSize"), Out(Blob(GLvoid, "columnBufSize"), "column"), Out(GLpointer, "span")]),
     GlFunction(Void, "glGetnHistogramARB", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "bufSize"), Out(Blob(GLvoid, "bufSize"), "values")]),
     GlFunction(Void, "glGetnMinmaxARB", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "bufSize"), Out(Blob(GLvoid, "bufSize"), "values")]),
     GlFunction(Void, "glGetnTexImageARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), (GLsizei, "bufSize"), Out(Blob(GLvoid, "bufSize"), "img")]),
@@ -1319,8 +1319,8 @@ glapi.add_functions([
 
     # GL_ARB_base_instance
     GlFunction(Void, "glDrawArraysInstancedBaseInstance", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count"), (GLsizei, "primcount"), (GLuint, "baseinstance")]),
-    GlFunction(Void, "glDrawElementsInstancedBaseInstance", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLsizei, "primcount"), (GLuint, "baseinstance")]),
-    GlFunction(Void, "glDrawElementsInstancedBaseVertexBaseInstance", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLsizei, "primcount"), (GLint, "basevertex"), (GLuint, "baseinstance")]),
+    GlFunction(Void, "glDrawElementsInstancedBaseInstance", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLsizei, "primcount"), (GLuint, "baseinstance")]),
+    GlFunction(Void, "glDrawElementsInstancedBaseVertexBaseInstance", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLsizei, "primcount"), (GLint, "basevertex"), (GLuint, "baseinstance")]),
 
     # GL_ARB_transform_feedback_instanced
     GlFunction(Void, "glDrawTransformFeedbackInstanced", [(GLenum_mode, "mode"), (GLfeedback, "id"), (GLsizei, "primcount")]),
@@ -1442,14 +1442,14 @@ glapi.add_functions([
 
     # GL_EXT_vertex_array
     GlFunction(Void, "glArrayElementEXT", [(GLint, "i")]),
-    GlFunction(Void, "glColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glDrawArraysEXT", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count")]),
     GlFunction(Void, "glEdgeFlagPointerEXT", [(GLsizei, "stride"), (GLsizei, "count"), (OpaquePointer(Const(GLboolean)), "pointer")]),
-    GlFunction(Void, "glGetPointervEXT", [(GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
-    GlFunction(Void, "glIndexPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glNormalPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glTexCoordPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glVertexPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glGetPointervEXT", [(GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
+    GlFunction(Void, "glIndexPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glNormalPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glTexCoordPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glVertexPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (GLpointerConst, "pointer")]),
 
     # GL_EXT_blend_minmax
     GlFunction(Void, "glBlendEquationEXT", [(GLenum, "mode")]),
@@ -1470,7 +1470,7 @@ glapi.add_functions([
 
     # GL_SGIX_instruments
     GlFunction(GLint, "glGetInstrumentsSGIX", [], sideeffects=False),
-    GlFunction(Void, "glInstrumentsBufferSGIX", [(GLsizei, "size"), Out(OpaquePointer(GLint), "buffer")]),
+    GlFunction(Void, "glInstrumentsBufferSGIX", [(GLsizei, "size"), (OpaqueArray(GLint, "size"), "buffer")]),
     GlFunction(GLint, "glPollInstrumentsSGIX", [Out(Pointer(GLint), "marker_p")]),
     GlFunction(Void, "glReadInstrumentsSGIX", [(GLint, "marker")]),
     GlFunction(Void, "glStartInstrumentsSGIX", []),
@@ -1489,7 +1489,7 @@ glapi.add_functions([
     GlFunction(Void, "glLoadIdentityDeformationMapSGIX", [(GLbitfield, "mask")]),
 
     # GL_SGIX_reference_plane
-    GlFunction(Void, "glReferencePlaneSGIX", [(Array(Const(GLdouble), "4"), "equation")]),
+    GlFunction(Void, "glReferencePlaneSGIX", [(Array(Const(GLdouble), 4), "equation")]),
 
     # GL_SGIX_flush_raster
     GlFunction(Void, "glFlushRasterSGIX", []),
@@ -1538,8 +1538,8 @@ glapi.add_functions([
     GlFunction(Void, "glUnlockArraysEXT", []),
 
     # GL_EXT_cull_vertex
-    GlFunction(Void, "glCullParameterdvEXT", [(GLenum, "pname"), Out(Array(GLdouble, "4"), "params")]),
-    GlFunction(Void, "glCullParameterfvEXT", [(GLenum, "pname"), Out(Array(GLfloat, "4"), "params")]),
+    GlFunction(Void, "glCullParameterdvEXT", [(GLenum, "pname"), Out(Array(GLdouble, 4), "params")]),
+    GlFunction(Void, "glCullParameterfvEXT", [(GLenum, "pname"), Out(Array(GLfloat, 4), "params")]),
 
     # GL_SGIX_fragment_lighting
     GlFunction(Void, "glFragmentColorMaterialSGIX", [(GLenum, "face"), (GLenum, "mode")]),
@@ -1562,7 +1562,7 @@ glapi.add_functions([
     GlFunction(Void, "glLightEnviSGIX", [(GLenum, "pname"), (GLint, "param")]),
 
     # GL_EXT_draw_range_elements
-    GlFunction(Void, "glDrawRangeElementsEXT", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices")]),
+    GlFunction(Void, "glDrawRangeElementsEXT", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices")]),
 
     # GL_EXT_light_texture
     GlFunction(Void, "glApplyTextureEXT", [(GLenum, "mode")]),
@@ -1578,10 +1578,10 @@ glapi.add_functions([
     GlFunction(GLboolean, "glIsAsyncMarkerSGIX", [(GLuint, "marker")], sideeffects=False),
 
     # GL_INTEL_parallel_arrays
-    GlFunction(Void, "glVertexPointervINTEL", [(GLint, "size"), (GLenum, "type"), (OpaqueArray(Opaque("const GLvoid *"), "size"), "pointer")]),
-    GlFunction(Void, "glNormalPointervINTEL", [(GLenum, "type"), (OpaqueArray(Opaque("const GLvoid *"), "size"), "pointer")]),
-    GlFunction(Void, "glColorPointervINTEL", [(GLint, "size"), (GLenum, "type"), (OpaqueArray(Opaque("const GLvoid *"), "size"), "pointer")]),
-    GlFunction(Void, "glTexCoordPointervINTEL", [(GLint, "size"), (GLenum, "type"), (OpaqueArray(Opaque("const GLvoid *"), "size"), "pointer")]),
+    GlFunction(Void, "glVertexPointervINTEL", [(GLint, "size"), (GLenum, "type"), (OpaqueArray(GLpointerConst, "size"), "pointer")]),
+    GlFunction(Void, "glNormalPointervINTEL", [(GLenum, "type"), (OpaqueArray(GLpointerConst, "size"), "pointer")]),
+    GlFunction(Void, "glColorPointervINTEL", [(GLint, "size"), (GLenum, "type"), (OpaqueArray(GLpointerConst, "size"), "pointer")]),
+    GlFunction(Void, "glTexCoordPointervINTEL", [(GLint, "size"), (GLenum, "type"), (OpaqueArray(GLpointerConst, "size"), "pointer")]),
 
     # GL_EXT_pixel_transform
     GlFunction(Void, "glPixelTransformParameteriEXT", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
@@ -1591,60 +1591,60 @@ glapi.add_functions([
 
     # GL_EXT_secondary_color
     GlFunction(Void, "glSecondaryColor3bEXT", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
-    GlFunction(Void, "glSecondaryColor3bvEXT", [(Array(Const(GLbyte), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3bvEXT", [(Array(Const(GLbyte), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3dEXT", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
-    GlFunction(Void, "glSecondaryColor3dvEXT", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3dvEXT", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3fEXT", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
-    GlFunction(Void, "glSecondaryColor3fvEXT", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3fvEXT", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3iEXT", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
-    GlFunction(Void, "glSecondaryColor3ivEXT", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3ivEXT", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3sEXT", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
-    GlFunction(Void, "glSecondaryColor3svEXT", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3svEXT", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3ubEXT", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
-    GlFunction(Void, "glSecondaryColor3ubvEXT", [(Array(Const(GLubyte), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3ubvEXT", [(Array(Const(GLubyte), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3uiEXT", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
-    GlFunction(Void, "glSecondaryColor3uivEXT", [(Array(Const(GLuint), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3uivEXT", [(Array(Const(GLuint), 3), "v")]),
     GlFunction(Void, "glSecondaryColor3usEXT", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
-    GlFunction(Void, "glSecondaryColor3usvEXT", [(Array(Const(GLushort), "3"), "v")]),
-    GlFunction(Void, "glSecondaryColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glSecondaryColor3usvEXT", [(Array(Const(GLushort), 3), "v")]),
+    GlFunction(Void, "glSecondaryColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
 
     # GL_EXT_texture_perturb_normal
     GlFunction(Void, "glTextureNormalEXT", [(GLenum, "mode")]),
 
     # GL_EXT_multi_draw_arrays
     GlFunction(Void, "glMultiDrawArraysEXT", [(GLenum_mode, "mode"), (Array(Const(GLint), "primcount"), "first"), (Array(Const(GLsizei), "primcount"), "count"), (GLsizei, "primcount")]),
-    GlFunction(Void, "glMultiDrawElementsEXT", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(Opaque("const GLvoid *"), "primcount"), "indices"), (GLsizei, "primcount")]),
+    GlFunction(Void, "glMultiDrawElementsEXT", [(GLenum_mode, "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(GLpointerConst, "primcount"), "indices"), (GLsizei, "primcount")]),
 
     # GL_EXT_fog_coord
     GlFunction(Void, "glFogCoordfEXT", [(GLfloat, "coord")]),
     GlFunction(Void, "glFogCoordfvEXT", [(Pointer(Const(GLfloat)), "coord")]),
     GlFunction(Void, "glFogCoorddEXT", [(GLdouble, "coord")]),
     GlFunction(Void, "glFogCoorddvEXT", [(Pointer(Const(GLdouble)), "coord")]),
-    GlFunction(Void, "glFogCoordPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glFogCoordPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
 
     # GL_EXT_coordinate_frame
     GlFunction(Void, "glTangent3bEXT", [(GLbyte, "tx"), (GLbyte, "ty"), (GLbyte, "tz")]),
-    GlFunction(Void, "glTangent3bvEXT", [(Array(Const(GLbyte), "3"), "v")]),
+    GlFunction(Void, "glTangent3bvEXT", [(Array(Const(GLbyte), 3), "v")]),
     GlFunction(Void, "glTangent3dEXT", [(GLdouble, "tx"), (GLdouble, "ty"), (GLdouble, "tz")]),
-    GlFunction(Void, "glTangent3dvEXT", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glTangent3dvEXT", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glTangent3fEXT", [(GLfloat, "tx"), (GLfloat, "ty"), (GLfloat, "tz")]),
-    GlFunction(Void, "glTangent3fvEXT", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTangent3fvEXT", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTangent3iEXT", [(GLint, "tx"), (GLint, "ty"), (GLint, "tz")]),
-    GlFunction(Void, "glTangent3ivEXT", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glTangent3ivEXT", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glTangent3sEXT", [(GLshort, "tx"), (GLshort, "ty"), (GLshort, "tz")]),
-    GlFunction(Void, "glTangent3svEXT", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glTangent3svEXT", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glBinormal3bEXT", [(GLbyte, "bx"), (GLbyte, "by"), (GLbyte, "bz")]),
-    GlFunction(Void, "glBinormal3bvEXT", [(Array(Const(GLbyte), "3"), "v")]),
+    GlFunction(Void, "glBinormal3bvEXT", [(Array(Const(GLbyte), 3), "v")]),
     GlFunction(Void, "glBinormal3dEXT", [(GLdouble, "bx"), (GLdouble, "by"), (GLdouble, "bz")]),
-    GlFunction(Void, "glBinormal3dvEXT", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glBinormal3dvEXT", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glBinormal3fEXT", [(GLfloat, "bx"), (GLfloat, "by"), (GLfloat, "bz")]),
-    GlFunction(Void, "glBinormal3fvEXT", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glBinormal3fvEXT", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glBinormal3iEXT", [(GLint, "bx"), (GLint, "by"), (GLint, "bz")]),
-    GlFunction(Void, "glBinormal3ivEXT", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glBinormal3ivEXT", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glBinormal3sEXT", [(GLshort, "bx"), (GLshort, "by"), (GLshort, "bz")]),
-    GlFunction(Void, "glBinormal3svEXT", [(Array(Const(GLshort), "3"), "v")]),
-    GlFunction(Void, "glTangentPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-    GlFunction(Void, "glBinormalPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glBinormal3svEXT", [(Array(Const(GLshort), 3), "v")]),
+    GlFunction(Void, "glTangentPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
+    GlFunction(Void, "glBinormalPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
 
     # GL_SUNX_constant_data
     GlFunction(Void, "glFinishTextureSUNX", []),
@@ -1666,49 +1666,49 @@ glapi.add_functions([
     GlFunction(Void, "glReplacementCodeuivSUN", [(OpaqueArray(Const(GLuint), "__glReplacementCodeuivSUN_size()"), "code")]),
     GlFunction(Void, "glReplacementCodeusvSUN", [(OpaqueArray(Const(GLushort), "__glReplacementCodeusvSUN_size()"), "code")]),
     GlFunction(Void, "glReplacementCodeubvSUN", [(OpaqueArray(Const(GLubyte), "__glReplacementCodeubvSUN_size()"), "code")]),
-    GlFunction(Void, "glReplacementCodePointerSUN", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer")]),
+    GlFunction(Void, "glReplacementCodePointerSUN", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(GLpointerConst), "pointer")]),
 
     # GL_SUN_vertex
     GlFunction(Void, "glColor4ubVertex2fSUN", [(GLubyte, "r"), (GLubyte, "g"), (GLubyte, "b"), (GLubyte, "a"), (GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glColor4ubVertex2fvSUN", [(Array(Const(GLubyte), "4"), "c"), (Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glColor4ubVertex2fvSUN", [(Array(Const(GLubyte), 4), "c"), (Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glColor4ubVertex3fSUN", [(GLubyte, "r"), (GLubyte, "g"), (GLubyte, "b"), (GLubyte, "a"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glColor4ubVertex3fvSUN", [(Array(Const(GLubyte), "4"), "c"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glColor4ubVertex3fvSUN", [(Array(Const(GLubyte), 4), "c"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glColor3fVertex3fSUN", [(GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glColor3fVertex3fvSUN", [(Array(Const(GLfloat), "3"), "c"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glColor3fVertex3fvSUN", [(Array(Const(GLfloat), 3), "c"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glNormal3fVertex3fSUN", [(GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glNormal3fVertex3fvSUN", [(Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glNormal3fVertex3fvSUN", [(Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glColor4fNormal3fVertex3fSUN", [(GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "a"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glColor4fNormal3fVertex3fvSUN", [(Array(Const(GLfloat), "4"), "c"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glColor4fNormal3fVertex3fvSUN", [(Array(Const(GLfloat), 4), "c"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord2fVertex3fSUN", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glTexCoord2fVertex3fvSUN", [(Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTexCoord2fVertex3fvSUN", [(Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord4fVertex4fSUN", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "p"), (GLfloat, "q"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glTexCoord4fVertex4fvSUN", [(Array(Const(GLfloat), "4"), "tc"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4fVertex4fvSUN", [(Array(Const(GLfloat), 4), "tc"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glTexCoord2fColor4ubVertex3fSUN", [(GLfloat, "s"), (GLfloat, "t"), (GLubyte, "r"), (GLubyte, "g"), (GLubyte, "b"), (GLubyte, "a"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glTexCoord2fColor4ubVertex3fvSUN", [(Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLubyte), "4"), "c"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTexCoord2fColor4ubVertex3fvSUN", [(Array(Const(GLfloat), 2), "tc"), (Array(Const(GLubyte), 4), "c"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord2fColor3fVertex3fSUN", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glTexCoord2fColor3fVertex3fvSUN", [(Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "3"), "c"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTexCoord2fColor3fVertex3fvSUN", [(Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 3), "c"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord2fNormal3fVertex3fSUN", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glTexCoord2fNormal3fVertex3fvSUN", [(Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTexCoord2fNormal3fVertex3fvSUN", [(Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord2fColor4fNormal3fVertex3fSUN", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "a"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glTexCoord2fColor4fNormal3fVertex3fvSUN", [(Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "4"), "c"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glTexCoord2fColor4fNormal3fVertex3fvSUN", [(Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 4), "c"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glTexCoord4fColor4fNormal3fVertex4fSUN", [(GLfloat, "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")]),
-    GlFunction(Void, "glTexCoord4fColor4fNormal3fVertex4fvSUN", [(Array(Const(GLfloat), "4"), "tc"), (Array(Const(GLfloat), "4"), "c"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4fColor4fNormal3fVertex4fvSUN", [(Array(Const(GLfloat), 4), "tc"), (Array(Const(GLfloat), 4), "c"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glReplacementCodeuiVertex3fSUN", [(GLuint, "rc"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiColor4ubVertex3fSUN", [(GLuint, "rc"), (GLubyte, "r"), (GLubyte, "g"), (GLubyte, "b"), (GLubyte, "a"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiColor4ubVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLubyte), "4"), "c"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiColor4ubVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLubyte), 4), "c"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiColor3fVertex3fSUN", [(GLuint, "rc"), (GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiColor3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "3"), "c"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiColor3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 3), "c"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiNormal3fVertex3fSUN", [(GLuint, "rc"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiColor4fNormal3fVertex3fSUN", [(GLuint, "rc"), (GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "a"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "4"), "c"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 4), "c"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiTexCoord2fVertex3fSUN", [(GLuint, "rc"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiTexCoord2fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiTexCoord2fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN", [(GLuint, "rc"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN", [(GLuint, "rc"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "g"), (GLfloat, "b"), (GLfloat, "a"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), "2"), "tc"), (Array(Const(GLfloat), "4"), "c"), (Array(Const(GLfloat), "3"), "n"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", [(Pointer(Const(GLuint)), "rc"), (Array(Const(GLfloat), 2), "tc"), (Array(Const(GLfloat), 4), "c"), (Array(Const(GLfloat), 3), "n"), (Array(Const(GLfloat), 3), "v")]),
 
     # GL_EXT_blend_func_separate
     GlFunction(Void, "glBlendFuncSeparateEXT", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
@@ -1719,69 +1719,69 @@ glapi.add_functions([
     # GL_EXT_vertex_weighting
     GlFunction(Void, "glVertexWeightfEXT", [(GLfloat, "weight")]),
     GlFunction(Void, "glVertexWeightfvEXT", [(Pointer(Const(GLfloat)), "weight")]),
-    GlFunction(Void, "glVertexWeightPointerEXT", [(GLsizei, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexWeightPointerEXT", [(GLsizei, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
 
     # GL_NV_vertex_array_range
     GlFunction(Void, "glFlushVertexArrayRangeNV", []),
-    GlFunction(Void, "glVertexArrayRangeNV", [(GLsizei, "length"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexArrayRangeNV", [(GLsizei, "length"), (GLpointerConst, "pointer")]),
 
     # GL_NV_register_combiners
-    GlFunction(Void, "glCombinerParameterfvNV", [(GLenum, "pname"), (OpaquePointer(Const(GLfloat)), "params")]),
+    GlFunction(Void, "glCombinerParameterfvNV", [(GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glCombinerParameterfNV", [(GLenum, "pname"), (GLfloat, "param")]),
-    GlFunction(Void, "glCombinerParameterivNV", [(GLenum, "pname"), (OpaquePointer(Const(GLint)), "params")]),
+    GlFunction(Void, "glCombinerParameterivNV", [(GLenum, "pname"), (Array(Const(GLint), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glCombinerParameteriNV", [(GLenum, "pname"), (GLint, "param")]),
     GlFunction(Void, "glCombinerInputNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "input"), (GLenum, "mapping"), (GLenum, "componentUsage")]),
     GlFunction(Void, "glCombinerOutputNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "abOutput"), (GLenum, "cdOutput"), (GLenum, "sumOutput"), (GLenum, "scale"), (GLenum, "bias"), (GLboolean, "abDotProduct"), (GLboolean, "cdDotProduct"), (GLboolean, "muxSum")]),
     GlFunction(Void, "glFinalCombinerInputNV", [(GLenum, "variable"), (GLenum, "input"), (GLenum, "mapping"), (GLenum, "componentUsage")]),
-    GlFunction(Void, "glGetCombinerInputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
-    GlFunction(Void, "glGetCombinerInputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), Out(OpaquePointer(GLint), "params")], sideeffects=False),
-    GlFunction(Void, "glGetCombinerOutputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
-    GlFunction(Void, "glGetCombinerOutputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), Out(OpaquePointer(GLint), "params")], sideeffects=False),
-    GlFunction(Void, "glGetFinalCombinerInputParameterfvNV", [(GLenum, "variable"), (GLenum, "pname"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
-    GlFunction(Void, "glGetFinalCombinerInputParameterivNV", [(GLenum, "variable"), (GLenum, "pname"), Out(OpaquePointer(GLint), "params")], sideeffects=False),
+    GlFunction(Void, "glGetCombinerInputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetCombinerInputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetCombinerOutputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetCombinerOutputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetFinalCombinerInputParameterfvNV", [(GLenum, "variable"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetFinalCombinerInputParameterivNV", [(GLenum, "variable"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
 
     # GL_MESA_resize_buffers
     GlFunction(Void, "glResizeBuffersMESA", []),
 
     # GL_MESA_window_pos
     GlFunction(Void, "glWindowPos2dMESA", [(GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glWindowPos2dvMESA", [(Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2dvMESA", [(Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glWindowPos2fMESA", [(GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glWindowPos2fvMESA", [(Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2fvMESA", [(Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glWindowPos2iMESA", [(GLint, "x"), (GLint, "y")]),
-    GlFunction(Void, "glWindowPos2ivMESA", [(Array(Const(GLint), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2ivMESA", [(Array(Const(GLint), 2), "v")]),
     GlFunction(Void, "glWindowPos2sMESA", [(GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glWindowPos2svMESA", [(Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glWindowPos2svMESA", [(Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glWindowPos3dMESA", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glWindowPos3dvMESA", [(Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3dvMESA", [(Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glWindowPos3fMESA", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glWindowPos3fvMESA", [(Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3fvMESA", [(Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glWindowPos3iMESA", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    GlFunction(Void, "glWindowPos3ivMESA", [(Array(Const(GLint), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3ivMESA", [(Array(Const(GLint), 3), "v")]),
     GlFunction(Void, "glWindowPos3sMESA", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glWindowPos3svMESA", [(Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glWindowPos3svMESA", [(Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glWindowPos4dMESA", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glWindowPos4dvMESA", [(Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glWindowPos4dvMESA", [(Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glWindowPos4fMESA", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glWindowPos4fvMESA", [(Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glWindowPos4fvMESA", [(Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glWindowPos4iMESA", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glWindowPos4ivMESA", [(Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glWindowPos4ivMESA", [(Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glWindowPos4sMESA", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glWindowPos4svMESA", [(Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glWindowPos4svMESA", [(Array(Const(GLshort), 4), "v")]),
 
     # GL_IBM_multimode_draw_arrays
     GlFunction(Void, "glMultiModeDrawArraysIBM", [(Array(Const(GLenum), "primcount"), "mode"), (Array(Const(GLint), "primcount"), "first"), (Array(Const(GLsizei), "primcount"), "count"), (GLsizei, "primcount"), (GLint, "modestride")]),
-    GlFunction(Void, "glMultiModeDrawElementsIBM", [(Array(Const(GLenum), "primcount"), "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(Const(Opaque("const GLvoid *")), "primcount"), "indices"), (GLsizei, "primcount"), (GLint, "modestride")]),
+    GlFunction(Void, "glMultiModeDrawElementsIBM", [(Array(Const(GLenum), "primcount"), "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(Const(GLpointerConst), "primcount"), "indices"), (GLsizei, "primcount"), (GLint, "modestride")]),
 
     # GL_IBM_vertex_array_lists
-    GlFunction(Void, "glColorPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
-    GlFunction(Void, "glSecondaryColorPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glColorPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glSecondaryColorPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
     GlFunction(Void, "glEdgeFlagPointerListIBM", [(GLint, "stride"), (OpaquePointer(Opaque("const GLboolean *")), "pointer"), (GLint, "ptrstride")]),
-    GlFunction(Void, "glFogCoordPointerListIBM", [(GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
-    GlFunction(Void, "glIndexPointerListIBM", [(GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
-    GlFunction(Void, "glNormalPointerListIBM", [(GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
-    GlFunction(Void, "glTexCoordPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
-    GlFunction(Void, "glVertexPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(Opaque("const GLvoid *")), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glFogCoordPointerListIBM", [(GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glIndexPointerListIBM", [(GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glNormalPointerListIBM", [(GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glTexCoordPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
+    GlFunction(Void, "glVertexPointerListIBM", [(GLint, "size"), (GLenum, "type"), (GLint, "stride"), (OpaquePointer(GLpointerConst), "pointer"), (GLint, "ptrstride")]),
 
     # GL_3DFX_tbuffer
     GlFunction(Void, "glTbufferMask3DFX", [(GLuint, "mask")]),
@@ -1824,28 +1824,28 @@ glapi.add_functions([
     GlFunction(GLboolean, "glAreProgramsResidentNV", [(GLsizei, "n"), (Array(Const(GLprogramARB), "n"), "ids"), Out(Array(GLboolean, "n"), "residences")]),
     GlFunction(Void, "glBindProgramNV", [(GLenum, "target"), (GLprogramARB, "program")]),
     GlFunction(Void, "glDeleteProgramsNV", [(GLsizei, "n"), (Array(Const(GLprogramARB), "n"), "programs")]),
-    GlFunction(Void, "glExecuteProgramNV", [(GLenum, "target"), (GLprogramARB, "id"), (Array(Const(GLfloat), "4"), "params")]),
+    GlFunction(Void, "glExecuteProgramNV", [(GLenum, "target"), (GLprogramARB, "id"), (Array(Const(GLfloat), 4), "params")]),
     GlFunction(Void, "glGenProgramsNV", [(GLsizei, "n"), Out(Array(GLprogramARB, "n"), "programs")]),
-    GlFunction(Void, "glGetProgramParameterdvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), Out(OpaquePointer(GLdouble), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramParameterfvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramParameterdvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramParameterfvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetProgramivNV", [(GLprogramARB, "id"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramStringNV", [(GLprogramARB, "id"), (GLenum, "pname"), Out(OpaquePointer(GLubyte), "program")], sideeffects=False),
-    GlFunction(Void, "glGetTrackMatrixivNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "pname"), Out(OpaquePointer(GLint), "params")], sideeffects=False),
-    GlFunction(Void, "glGetVertexAttribdvNV", [(GLuint, "index"), (GLenum, "pname"), Out(OpaquePointer(GLdouble), "params")], sideeffects=False),
-    GlFunction(Void, "glGetVertexAttribfvNV", [(GLuint, "index"), (GLenum, "pname"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
-    GlFunction(Void, "glGetVertexAttribivNV", [(GLuint, "index"), (GLenum, "pname"), Out(OpaquePointer(GLint), "params")], sideeffects=False),
-    GlFunction(Void, "glGetVertexAttribPointervNV", [(GLuint, "index"), (GLenum, "pname"), Out(OpaquePointer(OpaquePointer(GLvoid)), "pointer")], sideeffects=False),
+    GlFunction(Void, "glGetProgramStringNV", [(GLprogramARB, "id"), (GLenum, "pname"), Out(Array(GLubyte, "__gl_param_size(pname)"), "program")], sideeffects=False),
+    GlFunction(Void, "glGetTrackMatrixivNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetVertexAttribdvNV", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetVertexAttribfvNV", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetVertexAttribivNV", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetVertexAttribPointervNV", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLpointer), "pointer")], sideeffects=False),
     GlFunction(GLboolean, "glIsProgramNV", [(GLprogramARB, "program")], sideeffects=False),
     GlFunction(Void, "glLoadProgramNV", [(GLenum, "target"), (GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "program")]),
     GlFunction(Void, "glProgramParameter4dNV", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glProgramParameter4dvNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glProgramParameter4dvNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glProgramParameter4fNV", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glProgramParameter4fvNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glProgramParameter4fvNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glProgramParameters4dvNV", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLdouble), "count*4"), "v")]),
     GlFunction(Void, "glProgramParameters4fvNV", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLfloat), "count*4"), "v")]),
     GlFunction(Void, "glRequestResidentProgramsNV", [(GLsizei, "n"), (Array(Const(GLprogramARB), "n"), "programs")]),
     GlFunction(Void, "glTrackMatrixNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "matrix"), (GLenum, "transform")]),
-    GlFunction(Void, "glVertexAttribPointerNV", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexAttribPointerNV", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glVertexAttrib1dNV", [(GLuint, "index"), (GLdouble, "x")]),
     GlFunction(Void, "glVertexAttrib1dvNV", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
     GlFunction(Void, "glVertexAttrib1fNV", [(GLuint, "index"), (GLfloat, "x")]),
@@ -1853,25 +1853,25 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttrib1sNV", [(GLuint, "index"), (GLshort, "x")]),
     GlFunction(Void, "glVertexAttrib1svNV", [(GLuint, "index"), (Pointer(Const(GLshort)), "v")]),
     GlFunction(Void, "glVertexAttrib2dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glVertexAttrib2dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2dvNV", [(GLuint, "index"), (Array(Const(GLdouble), 2), "v")]),
     GlFunction(Void, "glVertexAttrib2fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glVertexAttrib2fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2fvNV", [(GLuint, "index"), (Array(Const(GLfloat), 2), "v")]),
     GlFunction(Void, "glVertexAttrib2sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glVertexAttrib2svNV", [(GLuint, "index"), (Array(Const(GLshort), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2svNV", [(GLuint, "index"), (Array(Const(GLshort), 2), "v")]),
     GlFunction(Void, "glVertexAttrib3dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glVertexAttrib3dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3dvNV", [(GLuint, "index"), (Array(Const(GLdouble), 3), "v")]),
     GlFunction(Void, "glVertexAttrib3fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glVertexAttrib3fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3fvNV", [(GLuint, "index"), (Array(Const(GLfloat), 3), "v")]),
     GlFunction(Void, "glVertexAttrib3sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glVertexAttrib3svNV", [(GLuint, "index"), (Array(Const(GLshort), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3svNV", [(GLuint, "index"), (Array(Const(GLshort), 3), "v")]),
     GlFunction(Void, "glVertexAttrib4dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glVertexAttrib4dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4dvNV", [(GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glVertexAttrib4fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4fvNV", [(GLuint, "index"), (Array(Const(GLfloat), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glVertexAttrib4svNV", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4svNV", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
     GlFunction(Void, "glVertexAttrib4ubNV", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
-    GlFunction(Void, "glVertexAttrib4ubvNV", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4ubvNV", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
     GlFunction(Void, "glVertexAttribs1dvNV", [(GLuint, "index"), (GLsizei, "count"), (Array(Const(GLdouble), "count"), "v")]),
     GlFunction(Void, "glVertexAttribs1fvNV", [(GLuint, "index"), (GLsizei, "count"), (Array(Const(GLfloat), "count"), "v")]),
     GlFunction(Void, "glVertexAttribs1svNV", [(GLuint, "index"), (GLsizei, "count"), (Array(Const(GLshort), "count"), "v")]),
@@ -1887,10 +1887,10 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribs4ubvNV", [(GLuint, "index"), (GLsizei, "count"), (Array(Const(GLubyte), "count*4"), "v")]),
 
     # GL_ATI_envmap_bumpmap
-    GlFunction(Void, "glTexBumpParameterivATI", [(GLenum, "pname"), (OpaquePointer(Const(GLint)), "param")]),
-    GlFunction(Void, "glTexBumpParameterfvATI", [(GLenum, "pname"), (OpaquePointer(Const(GLfloat)), "param")]),
-    GlFunction(Void, "glGetTexBumpParameterivATI", [(GLenum, "pname"), Out(OpaquePointer(GLint), "param")], sideeffects=False),
-    GlFunction(Void, "glGetTexBumpParameterfvATI", [(GLenum, "pname"), Out(OpaquePointer(GLfloat), "param")], sideeffects=False),
+    GlFunction(Void, "glTexBumpParameterivATI", [(GLenum, "pname"), (Array(Const(GLint), "__gl_param_size(pname)"), "param")]),
+    GlFunction(Void, "glTexBumpParameterfvATI", [(GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "param")]),
+    GlFunction(Void, "glGetTexBumpParameterivATI", [(GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "param")], sideeffects=False),
+    GlFunction(Void, "glGetTexBumpParameterfvATI", [(GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "param")], sideeffects=False),
 
     # GL_ATI_fragment_shader
     GlFunction(Handle("fragmentShaderATI", GLuint, "range"), "glGenFragmentShadersATI", [(GLuint, "range")]),
@@ -1906,7 +1906,7 @@ glapi.add_functions([
     GlFunction(Void, "glAlphaFragmentOp1ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod")]),
     GlFunction(Void, "glAlphaFragmentOp2ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod")]),
     GlFunction(Void, "glAlphaFragmentOp3ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod"), (GLuint, "arg3"), (GLuint, "arg3Rep"), (GLuint, "arg3Mod")]),
-    GlFunction(Void, "glSetFragmentShaderConstantATI", [(GLuint, "dst"), (Array(Const(GLfloat), "4"), "value")]),
+    GlFunction(Void, "glSetFragmentShaderConstantATI", [(GLuint, "dst"), (Array(Const(GLfloat), 4), "value")]),
 
     # GL_ATI_pn_triangles
     GlFunction(Void, "glPNTrianglesiATI", [(GLenum, "pname"), (GLint, "param")]),
@@ -1962,7 +1962,7 @@ glapi.add_functions([
     GlFunction(Void, "glGetVariantBooleanvEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLboolean, "__glGetVariantBooleanvEXT_size(id)"), "data")], sideeffects=False),
     GlFunction(Void, "glGetVariantIntegervEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLint, "__glGetVariantIntegervEXT_size(id)"), "data")], sideeffects=False),
     GlFunction(Void, "glGetVariantFloatvEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLfloat, "__glGetVariantFloatvEXT_size(id)"), "data")], sideeffects=False),
-    GlFunction(Void, "glGetVariantPointervEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(OpaquePointer(GLvoid), "__glGetVariantPointervEXT_size(id)"), "data")], sideeffects=False),
+    GlFunction(Void, "glGetVariantPointervEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLpointer, "__glGetVariantPointervEXT_size(id)"), "data")], sideeffects=False),
     GlFunction(Void, "glGetInvariantBooleanvEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLboolean, "__glGetInvariantBooleanvEXT_size(id)"), "data")], sideeffects=False),
     GlFunction(Void, "glGetInvariantIntegervEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLint, "__glGetInvariantIntegervEXT_size(id)"), "data")], sideeffects=False),
     GlFunction(Void, "glGetInvariantFloatvEXT", [(GLuint, "id"), (GLenum, "value"), Out(OpaqueArray(GLfloat, "__glGetInvariantFloatvEXT_size(id)"), "data")], sideeffects=False),
@@ -1980,45 +1980,45 @@ glapi.add_functions([
     GlFunction(Void, "glVertexStream1dATI", [(GLenum, "stream"), (GLdouble, "x")]),
     GlFunction(Void, "glVertexStream1dvATI", [(GLenum, "stream"), (Pointer(Const(GLdouble)), "coords")]),
     GlFunction(Void, "glVertexStream2sATI", [(GLenum, "stream"), (GLshort, "x"), (GLshort, "y")]),
-    GlFunction(Void, "glVertexStream2svATI", [(GLenum, "stream"), (Array(Const(GLshort), "2"), "coords")]),
+    GlFunction(Void, "glVertexStream2svATI", [(GLenum, "stream"), (Array(Const(GLshort), 2), "coords")]),
     GlFunction(Void, "glVertexStream2iATI", [(GLenum, "stream"), (GLint, "x"), (GLint, "y")]),
-    GlFunction(Void, "glVertexStream2ivATI", [(GLenum, "stream"), (Array(Const(GLint), "2"), "coords")]),
+    GlFunction(Void, "glVertexStream2ivATI", [(GLenum, "stream"), (Array(Const(GLint), 2), "coords")]),
     GlFunction(Void, "glVertexStream2fATI", [(GLenum, "stream"), (GLfloat, "x"), (GLfloat, "y")]),
-    GlFunction(Void, "glVertexStream2fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), "2"), "coords")]),
+    GlFunction(Void, "glVertexStream2fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), 2), "coords")]),
     GlFunction(Void, "glVertexStream2dATI", [(GLenum, "stream"), (GLdouble, "x"), (GLdouble, "y")]),
-    GlFunction(Void, "glVertexStream2dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), "2"), "coords")]),
+    GlFunction(Void, "glVertexStream2dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), 2), "coords")]),
     GlFunction(Void, "glVertexStream3sATI", [(GLenum, "stream"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
-    GlFunction(Void, "glVertexStream3svATI", [(GLenum, "stream"), (Array(Const(GLshort), "3"), "coords")]),
+    GlFunction(Void, "glVertexStream3svATI", [(GLenum, "stream"), (Array(Const(GLshort), 3), "coords")]),
     GlFunction(Void, "glVertexStream3iATI", [(GLenum, "stream"), (GLint, "x"), (GLint, "y"), (GLint, "z")]),
-    GlFunction(Void, "glVertexStream3ivATI", [(GLenum, "stream"), (Array(Const(GLint), "3"), "coords")]),
+    GlFunction(Void, "glVertexStream3ivATI", [(GLenum, "stream"), (Array(Const(GLint), 3), "coords")]),
     GlFunction(Void, "glVertexStream3fATI", [(GLenum, "stream"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
-    GlFunction(Void, "glVertexStream3fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), "3"), "coords")]),
+    GlFunction(Void, "glVertexStream3fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), 3), "coords")]),
     GlFunction(Void, "glVertexStream3dATI", [(GLenum, "stream"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
-    GlFunction(Void, "glVertexStream3dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), "3"), "coords")]),
+    GlFunction(Void, "glVertexStream3dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), 3), "coords")]),
     GlFunction(Void, "glVertexStream4sATI", [(GLenum, "stream"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
-    GlFunction(Void, "glVertexStream4svATI", [(GLenum, "stream"), (Array(Const(GLshort), "4"), "coords")]),
+    GlFunction(Void, "glVertexStream4svATI", [(GLenum, "stream"), (Array(Const(GLshort), 4), "coords")]),
     GlFunction(Void, "glVertexStream4iATI", [(GLenum, "stream"), (GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glVertexStream4ivATI", [(GLenum, "stream"), (Array(Const(GLint), "4"), "coords")]),
+    GlFunction(Void, "glVertexStream4ivATI", [(GLenum, "stream"), (Array(Const(GLint), 4), "coords")]),
     GlFunction(Void, "glVertexStream4fATI", [(GLenum, "stream"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glVertexStream4fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), "4"), "coords")]),
+    GlFunction(Void, "glVertexStream4fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), 4), "coords")]),
     GlFunction(Void, "glVertexStream4dATI", [(GLenum, "stream"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glVertexStream4dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), "4"), "coords")]),
+    GlFunction(Void, "glVertexStream4dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), 4), "coords")]),
     GlFunction(Void, "glNormalStream3bATI", [(GLenum, "stream"), (GLbyte, "nx"), (GLbyte, "ny"), (GLbyte, "nz")]),
-    GlFunction(Void, "glNormalStream3bvATI", [(GLenum, "stream"), (Array(Const(GLbyte), "3"), "coords")]),
+    GlFunction(Void, "glNormalStream3bvATI", [(GLenum, "stream"), (Array(Const(GLbyte), 3), "coords")]),
     GlFunction(Void, "glNormalStream3sATI", [(GLenum, "stream"), (GLshort, "nx"), (GLshort, "ny"), (GLshort, "nz")]),
-    GlFunction(Void, "glNormalStream3svATI", [(GLenum, "stream"), (Array(Const(GLshort), "3"), "coords")]),
+    GlFunction(Void, "glNormalStream3svATI", [(GLenum, "stream"), (Array(Const(GLshort), 3), "coords")]),
     GlFunction(Void, "glNormalStream3iATI", [(GLenum, "stream"), (GLint, "nx"), (GLint, "ny"), (GLint, "nz")]),
-    GlFunction(Void, "glNormalStream3ivATI", [(GLenum, "stream"), (Array(Const(GLint), "3"), "coords")]),
+    GlFunction(Void, "glNormalStream3ivATI", [(GLenum, "stream"), (Array(Const(GLint), 3), "coords")]),
     GlFunction(Void, "glNormalStream3fATI", [(GLenum, "stream"), (GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz")]),
-    GlFunction(Void, "glNormalStream3fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), "3"), "coords")]),
+    GlFunction(Void, "glNormalStream3fvATI", [(GLenum, "stream"), (Array(Const(GLfloat), 3), "coords")]),
     GlFunction(Void, "glNormalStream3dATI", [(GLenum, "stream"), (GLdouble, "nx"), (GLdouble, "ny"), (GLdouble, "nz")]),
-    GlFunction(Void, "glNormalStream3dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), "3"), "coords")]),
+    GlFunction(Void, "glNormalStream3dvATI", [(GLenum, "stream"), (Array(Const(GLdouble), 3), "coords")]),
     GlFunction(Void, "glClientActiveVertexStreamATI", [(GLenum, "stream")]),
     GlFunction(Void, "glVertexBlendEnviATI", [(GLenum, "pname"), (GLint, "param")]),
     GlFunction(Void, "glVertexBlendEnvfATI", [(GLenum, "pname"), (GLfloat, "param")]),
 
     # GL_ATI_element_array
-    GlFunction(Void, "glElementPointerATI", [(GLenum, "type"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glElementPointerATI", [(GLenum, "type"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glDrawElementArrayATI", [(GLenum_mode, "mode"), (GLsizei, "count")]),
     GlFunction(Void, "glDrawRangeElementArrayATI", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count")]),
 
@@ -2036,7 +2036,7 @@ glapi.add_functions([
 
     # GL_NV_point_sprite
     GlFunction(Void, "glPointParameteriNV", [(GLenum, "pname"), (GLint, "param")]),
-    GlFunction(Void, "glPointParameterivNV", [(GLenum, "pname"), (OpaquePointer(Const(GLint)), "params")]),
+    GlFunction(Void, "glPointParameterivNV", [(GLenum, "pname"), (Array(Const(GLint), "__gl_param_size(pname)"), "params")]),
 
     # GL_EXT_stencil_two_side
     GlFunction(Void, "glActiveStencilFaceEXT", [(GLenum, "face")]),
@@ -2078,56 +2078,56 @@ glapi.add_functions([
     GlFunction(Void, "glDrawBuffersATI", [(GLsizei, "n"), (Array(Const(GLenum), "n"), "bufs")]),
 
     # GL_NV_fragment_program
-    GlFunction(Void, "glProgramNamedParameter4fNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *"), "name"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glProgramNamedParameter4dNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *"), "name"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glProgramNamedParameter4fvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *"), "name"), (Array(Const(GLfloat), "4"), "v")]),
-    GlFunction(Void, "glProgramNamedParameter4dvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *"), "name"), (Array(Const(GLdouble), "4"), "v")]),
-    GlFunction(Void, "glGetProgramNamedParameterdvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *"), "name"), Out(OpaquePointer(GLdouble), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramNamedParameterfvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *"), "name"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False),
+    GlFunction(Void, "glProgramNamedParameter4fNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "name"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
+    GlFunction(Void, "glProgramNamedParameter4dNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "name"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
+    GlFunction(Void, "glProgramNamedParameter4fvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "name"), (Array(Const(GLfloat), 4), "v")]),
+    GlFunction(Void, "glProgramNamedParameter4dvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "name"), (Array(Const(GLdouble), 4), "v")]),
+    GlFunction(Void, "glGetProgramNamedParameterdvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "name"), Out(Array(GLdouble, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramNamedParameterfvNV", [(GLprogramARB, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "name"), Out(Array(GLfloat, 4), "params")], sideeffects=False),
 
     # GL_NV_half_float
     GlFunction(Void, "glVertex2hNV", [(GLhalfNV, "x"), (GLhalfNV, "y")]),
-    GlFunction(Void, "glVertex2hvNV", [(Array(Const(GLhalfNV), "2"), "v")]),
+    GlFunction(Void, "glVertex2hvNV", [(Array(Const(GLhalfNV), 2), "v")]),
     GlFunction(Void, "glVertex3hNV", [(GLhalfNV, "x"), (GLhalfNV, "y"), (GLhalfNV, "z")]),
-    GlFunction(Void, "glVertex3hvNV", [(Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glVertex3hvNV", [(Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glVertex4hNV", [(GLhalfNV, "x"), (GLhalfNV, "y"), (GLhalfNV, "z"), (GLhalfNV, "w")]),
-    GlFunction(Void, "glVertex4hvNV", [(Array(Const(GLhalfNV), "4"), "v")]),
+    GlFunction(Void, "glVertex4hvNV", [(Array(Const(GLhalfNV), 4), "v")]),
     GlFunction(Void, "glNormal3hNV", [(GLhalfNV, "nx"), (GLhalfNV, "ny"), (GLhalfNV, "nz")]),
-    GlFunction(Void, "glNormal3hvNV", [(Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glNormal3hvNV", [(Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glColor3hNV", [(GLhalfNV, "red"), (GLhalfNV, "green"), (GLhalfNV, "blue")]),
-    GlFunction(Void, "glColor3hvNV", [(Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glColor3hvNV", [(Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glColor4hNV", [(GLhalfNV, "red"), (GLhalfNV, "green"), (GLhalfNV, "blue"), (GLhalfNV, "alpha")]),
-    GlFunction(Void, "glColor4hvNV", [(Array(Const(GLhalfNV), "4"), "v")]),
+    GlFunction(Void, "glColor4hvNV", [(Array(Const(GLhalfNV), 4), "v")]),
     GlFunction(Void, "glTexCoord1hNV", [(GLhalfNV, "s")]),
     GlFunction(Void, "glTexCoord1hvNV", [(Pointer(Const(GLhalfNV)), "v")]),
     GlFunction(Void, "glTexCoord2hNV", [(GLhalfNV, "s"), (GLhalfNV, "t")]),
-    GlFunction(Void, "glTexCoord2hvNV", [(Array(Const(GLhalfNV), "2"), "v")]),
+    GlFunction(Void, "glTexCoord2hvNV", [(Array(Const(GLhalfNV), 2), "v")]),
     GlFunction(Void, "glTexCoord3hNV", [(GLhalfNV, "s"), (GLhalfNV, "t"), (GLhalfNV, "r")]),
-    GlFunction(Void, "glTexCoord3hvNV", [(Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glTexCoord3hvNV", [(Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glTexCoord4hNV", [(GLhalfNV, "s"), (GLhalfNV, "t"), (GLhalfNV, "r"), (GLhalfNV, "q")]),
-    GlFunction(Void, "glTexCoord4hvNV", [(Array(Const(GLhalfNV), "4"), "v")]),
+    GlFunction(Void, "glTexCoord4hvNV", [(Array(Const(GLhalfNV), 4), "v")]),
     GlFunction(Void, "glMultiTexCoord1hNV", [(GLenum, "target"), (GLhalfNV, "s")]),
     GlFunction(Void, "glMultiTexCoord1hvNV", [(GLenum, "target"), (Pointer(Const(GLhalfNV)), "v")]),
     GlFunction(Void, "glMultiTexCoord2hNV", [(GLenum, "target"), (GLhalfNV, "s"), (GLhalfNV, "t")]),
-    GlFunction(Void, "glMultiTexCoord2hvNV", [(GLenum, "target"), (Array(Const(GLhalfNV), "2"), "v")]),
+    GlFunction(Void, "glMultiTexCoord2hvNV", [(GLenum, "target"), (Array(Const(GLhalfNV), 2), "v")]),
     GlFunction(Void, "glMultiTexCoord3hNV", [(GLenum, "target"), (GLhalfNV, "s"), (GLhalfNV, "t"), (GLhalfNV, "r")]),
-    GlFunction(Void, "glMultiTexCoord3hvNV", [(GLenum, "target"), (Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glMultiTexCoord3hvNV", [(GLenum, "target"), (Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glMultiTexCoord4hNV", [(GLenum, "target"), (GLhalfNV, "s"), (GLhalfNV, "t"), (GLhalfNV, "r"), (GLhalfNV, "q")]),
-    GlFunction(Void, "glMultiTexCoord4hvNV", [(GLenum, "target"), (Array(Const(GLhalfNV), "4"), "v")]),
+    GlFunction(Void, "glMultiTexCoord4hvNV", [(GLenum, "target"), (Array(Const(GLhalfNV), 4), "v")]),
     GlFunction(Void, "glFogCoordhNV", [(GLhalfNV, "fog")]),
     GlFunction(Void, "glFogCoordhvNV", [(Pointer(Const(GLhalfNV)), "fog")]),
     GlFunction(Void, "glSecondaryColor3hNV", [(GLhalfNV, "red"), (GLhalfNV, "green"), (GLhalfNV, "blue")]),
-    GlFunction(Void, "glSecondaryColor3hvNV", [(Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glSecondaryColor3hvNV", [(Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glVertexWeighthNV", [(GLhalfNV, "weight")]),
     GlFunction(Void, "glVertexWeighthvNV", [(Pointer(Const(GLhalfNV)), "weight")]),
     GlFunction(Void, "glVertexAttrib1hNV", [(GLuint, "index"), (GLhalfNV, "x")]),
     GlFunction(Void, "glVertexAttrib1hvNV", [(GLuint, "index"), (Pointer(Const(GLhalfNV)), "v")]),
     GlFunction(Void, "glVertexAttrib2hNV", [(GLuint, "index"), (GLhalfNV, "x"), (GLhalfNV, "y")]),
-    GlFunction(Void, "glVertexAttrib2hvNV", [(GLuint, "index"), (Array(Const(GLhalfNV), "2"), "v")]),
+    GlFunction(Void, "glVertexAttrib2hvNV", [(GLuint, "index"), (Array(Const(GLhalfNV), 2), "v")]),
     GlFunction(Void, "glVertexAttrib3hNV", [(GLuint, "index"), (GLhalfNV, "x"), (GLhalfNV, "y"), (GLhalfNV, "z")]),
-    GlFunction(Void, "glVertexAttrib3hvNV", [(GLuint, "index"), (Array(Const(GLhalfNV), "3"), "v")]),
+    GlFunction(Void, "glVertexAttrib3hvNV", [(GLuint, "index"), (Array(Const(GLhalfNV), 3), "v")]),
     GlFunction(Void, "glVertexAttrib4hNV", [(GLuint, "index"), (GLhalfNV, "x"), (GLhalfNV, "y"), (GLhalfNV, "z"), (GLhalfNV, "w")]),
-    GlFunction(Void, "glVertexAttrib4hvNV", [(GLuint, "index"), (Array(Const(GLhalfNV), "4"), "v")]),
+    GlFunction(Void, "glVertexAttrib4hvNV", [(GLuint, "index"), (Array(Const(GLhalfNV), 4), "v")]),
     GlFunction(Void, "glVertexAttribs1hvNV", [(GLuint, "index"), (GLsizei, "n"), (Array(Const(GLhalfNV), "n"), "v")]),
     GlFunction(Void, "glVertexAttribs2hvNV", [(GLuint, "index"), (GLsizei, "n"), (Array(Const(GLhalfNV), "n"), "v")]),
     GlFunction(Void, "glVertexAttribs3hvNV", [(GLuint, "index"), (GLsizei, "n"), (Array(Const(GLhalfNV), "n"), "v")]),
@@ -2142,7 +2142,7 @@ glapi.add_functions([
     GlFunction(Void, "glPrimitiveRestartIndexNV", [(GLuint, "index")]),
 
     # GL_ATI_map_object_buffer
-    GlFunction(GLmap, "glMapObjectBufferATI", [(GLbuffer, "buffer")]),
+    GlFunction(GLpointer, "glMapObjectBufferATI", [(GLbuffer, "buffer")]),
     GlFunction(Void, "glUnmapObjectBufferATI", [(GLbuffer, "buffer")]),
 
     # GL_ATI_separate_stencil
@@ -2205,21 +2205,21 @@ glapi.add_functions([
 
     # GL_NV_gpu_program4
     GlFunction(Void, "glProgramLocalParameterI4iNV", [(GLenum, "target"), (GLuint, "index"), (GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glProgramLocalParameterI4ivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLint), "4"), "params")]),
+    GlFunction(Void, "glProgramLocalParameterI4ivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLint), 4), "params")]),
     GlFunction(Void, "glProgramLocalParametersI4ivNV", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLint), "count*4"), "params")]),
     GlFunction(Void, "glProgramLocalParameterI4uiNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z"), (GLuint, "w")]),
-    GlFunction(Void, "glProgramLocalParameterI4uivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLuint), "4"), "params")]),
+    GlFunction(Void, "glProgramLocalParameterI4uivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLuint), 4), "params")]),
     GlFunction(Void, "glProgramLocalParametersI4uivNV", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLuint), "count*4"), "params")]),
     GlFunction(Void, "glProgramEnvParameterI4iNV", [(GLenum, "target"), (GLuint, "index"), (GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glProgramEnvParameterI4ivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLint), "4"), "params")]),
+    GlFunction(Void, "glProgramEnvParameterI4ivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLint), 4), "params")]),
     GlFunction(Void, "glProgramEnvParametersI4ivNV", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLint), "count*4"), "params")]),
     GlFunction(Void, "glProgramEnvParameterI4uiNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z"), (GLuint, "w")]),
-    GlFunction(Void, "glProgramEnvParameterI4uivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLuint), "4"), "params")]),
+    GlFunction(Void, "glProgramEnvParameterI4uivNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLuint), 4), "params")]),
     GlFunction(Void, "glProgramEnvParametersI4uivNV", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLuint), "count*4"), "params")]),
-    GlFunction(Void, "glGetProgramLocalParameterIivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLint, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramLocalParameterIuivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLuint, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramEnvParameterIivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLint, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetProgramEnvParameterIuivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLuint, "4"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramLocalParameterIivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLint, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramLocalParameterIuivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLuint, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramEnvParameterIivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLint, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetProgramEnvParameterIuivNV", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLuint, 4), "params")], sideeffects=False),
 
     # GL_NV_geometry_program4
     GlFunction(Void, "glProgramVertexLimitNV", [(GLenum, "target"), (GLint, "limit")]),
@@ -2240,18 +2240,18 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribI3uiEXT", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z")]),
     GlFunction(Void, "glVertexAttribI4uiEXT", [(GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z"), (GLuint, "w")]),
     GlFunction(Void, "glVertexAttribI1ivEXT", [(GLuint, "index"), (Pointer(Const(GLint)), "v")]),
-    GlFunction(Void, "glVertexAttribI2ivEXT", [(GLuint, "index"), (Array(Const(GLint), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribI3ivEXT", [(GLuint, "index"), (Array(Const(GLint), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribI4ivEXT", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
+    GlFunction(Void, "glVertexAttribI2ivEXT", [(GLuint, "index"), (Array(Const(GLint), 2), "v")]),
+    GlFunction(Void, "glVertexAttribI3ivEXT", [(GLuint, "index"), (Array(Const(GLint), 3), "v")]),
+    GlFunction(Void, "glVertexAttribI4ivEXT", [(GLuint, "index"), (Array(Const(GLint), 4), "v")]),
     GlFunction(Void, "glVertexAttribI1uivEXT", [(GLuint, "index"), (Pointer(Const(GLuint)), "v")]),
-    GlFunction(Void, "glVertexAttribI2uivEXT", [(GLuint, "index"), (Array(Const(GLuint), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribI3uivEXT", [(GLuint, "index"), (Array(Const(GLuint), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribI4uivEXT", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4bvEXT", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4svEXT", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4ubvEXT", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribI4usvEXT", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
-    GlFunction(Void, "glVertexAttribIPointerEXT", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glVertexAttribI2uivEXT", [(GLuint, "index"), (Array(Const(GLuint), 2), "v")]),
+    GlFunction(Void, "glVertexAttribI3uivEXT", [(GLuint, "index"), (Array(Const(GLuint), 3), "v")]),
+    GlFunction(Void, "glVertexAttribI4uivEXT", [(GLuint, "index"), (Array(Const(GLuint), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4bvEXT", [(GLuint, "index"), (Array(Const(GLbyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4svEXT", [(GLuint, "index"), (Array(Const(GLshort), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4ubvEXT", [(GLuint, "index"), (Array(Const(GLubyte), 4), "v")]),
+    GlFunction(Void, "glVertexAttribI4usvEXT", [(GLuint, "index"), (Array(Const(GLushort), 4), "v")]),
+    GlFunction(Void, "glVertexAttribIPointerEXT", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glGetVertexAttribIivEXT", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribIuivEXT", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLuint), "params")], sideeffects=False),
 
@@ -2270,7 +2270,7 @@ glapi.add_functions([
 
     # GL_EXT_draw_instanced
     GlFunction(Void, "glDrawArraysInstancedEXT", [(GLenum_mode, "mode"), (GLint, "start"), (GLsizei, "count"), (GLsizei, "primcount")]),
-    GlFunction(Void, "glDrawElementsInstancedEXT", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices"), (GLsizei, "primcount")]),
+    GlFunction(Void, "glDrawElementsInstancedEXT", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (GLpointerConst, "indices"), (GLsizei, "primcount")]),
 
     # GL_EXT_texture_buffer_object
     GlFunction(Void, "glTexBufferEXT", [(GLenum, "target"), (GLenum, "internalformat"), (GLbuffer, "buffer")]),
@@ -2350,10 +2350,10 @@ glapi.add_functions([
     # GL_EXT_direct_state_access
     GlFunction(Void, "glClientAttribDefaultEXT", [(GLbitfield_client_attrib, "mask")]),
     GlFunction(Void, "glPushClientAttribDefaultEXT", [(GLbitfield_client_attrib, "mask")]),
-    GlFunction(Void, "glMatrixLoadfEXT", [(GLenum, "mode"), (Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMatrixLoaddEXT", [(GLenum, "mode"), (Array(Const(GLdouble), "16"), "m")]),
-    GlFunction(Void, "glMatrixMultfEXT", [(GLenum, "mode"), (Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMatrixMultdEXT", [(GLenum, "mode"), (Array(Const(GLdouble), "16"), "m")]),
+    GlFunction(Void, "glMatrixLoadfEXT", [(GLenum, "mode"), (Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMatrixLoaddEXT", [(GLenum, "mode"), (Array(Const(GLdouble), 16), "m")]),
+    GlFunction(Void, "glMatrixMultfEXT", [(GLenum, "mode"), (Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMatrixMultdEXT", [(GLenum, "mode"), (Array(Const(GLdouble), 16), "m")]),
     GlFunction(Void, "glMatrixLoadIdentityEXT", [(GLenum, "mode")]),
     GlFunction(Void, "glMatrixRotatefEXT", [(GLenum, "mode"), (GLfloat, "angle"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
     GlFunction(Void, "glMatrixRotatedEXT", [(GLenum, "mode"), (GLdouble, "angle"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
@@ -2365,10 +2365,10 @@ glapi.add_functions([
     GlFunction(Void, "glMatrixOrthoEXT", [(GLenum, "mode"), (GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
     GlFunction(Void, "glMatrixPopEXT", [(GLenum, "mode")]),
     GlFunction(Void, "glMatrixPushEXT", [(GLenum, "mode")]),
-    GlFunction(Void, "glMatrixLoadTransposefEXT", [(GLenum, "mode"), (Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMatrixLoadTransposedEXT", [(GLenum, "mode"), (Array(Const(GLdouble), "16"), "m")]),
-    GlFunction(Void, "glMatrixMultTransposefEXT", [(GLenum, "mode"), (Array(Const(GLfloat), "16"), "m")]),
-    GlFunction(Void, "glMatrixMultTransposedEXT", [(GLenum, "mode"), (Array(Const(GLdouble), "16"), "m")]),
+    GlFunction(Void, "glMatrixLoadTransposefEXT", [(GLenum, "mode"), (Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMatrixLoadTransposedEXT", [(GLenum, "mode"), (Array(Const(GLdouble), 16), "m")]),
+    GlFunction(Void, "glMatrixMultTransposefEXT", [(GLenum, "mode"), (Array(Const(GLfloat), 16), "m")]),
+    GlFunction(Void, "glMatrixMultTransposedEXT", [(GLenum, "mode"), (Array(Const(GLdouble), 16), "m")]),
     GlFunction(Void, "glTextureParameterfEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
     GlFunction(Void, "glTextureParameterfvEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glTextureParameteriEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
@@ -2412,7 +2412,7 @@ glapi.add_functions([
     GlFunction(Void, "glBindMultiTextureEXT", [(GLenum, "texunit"), (GLenum, "target"), (GLtexture, "texture")]),
     GlFunction(Void, "glEnableClientStateIndexedEXT", [(GLenum, "array"), (GLuint, "index")]),
     GlFunction(Void, "glDisableClientStateIndexedEXT", [(GLenum, "array"), (GLuint, "index")]),
-    GlFunction(Void, "glMultiTexCoordPointerEXT", [(GLenum, "texunit"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
+    GlFunction(Void, "glMultiTexCoordPointerEXT", [(GLenum, "texunit"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLpointerConst, "pointer")]),
     GlFunction(Void, "glMultiTexEnvfEXT", [(GLenum, "texunit"), (GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
     GlFunction(Void, "glMultiTexEnvfvEXT", [(GLenum, "texunit"), (GLenum, "target"), (GLenum, "pname"), (Array(Const(GLfloat), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glMultiTexEnviEXT", [(GLenum, "texunit"), (GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
@@ -2430,7 +2430,7 @@ glapi.add_functions([
     GlFunction(Void, "glGetMultiTexGenivEXT", [(GLenum, "texunit"), (GLenum, "coord"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetFloatIndexedvEXT", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "__gl_param_size(target)"), "data")], sideeffects=False),
     GlFunction(Void, "glGetDoubleIndexedvEXT", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, "__gl_param_size(target)"), "data")], sideeffects=False),
-    GlFunction(Void, "glGetPointerIndexedvEXT", [(GLenum, "target"), (GLuint, "index"), Out(Array(OpaquePointer(GLvoid), "__gl_param_size(target)"), "data")], sideeffects=False),
+    GlFunction(Void, "glGetPointerIndexedvEXT", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLpointer, "__gl_param_size(target)"), "data")], sideeffects=False),
     GlFunction(Void, "glCompressedTextureImage3DEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "bits")]),
     GlFunction(Void, "glCompressedTextureImage2DEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "bits")]),
     GlFunction(Void, "glCompressedTextureImage1DEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLsizei, "imageSize"), (Blob(Const(GLvoid), "imageSize"), "bits")]),
@@ -2447,22 +2447,22 @@ glapi.add_functions([
     GlFunction(Void, "glGetCompressedMultiTexImageEXT", [(GLenum, "texunit"), (GLenum, "target"), (GLint, "lod"), Out(OpaqueBlob(GLvoid, "__glGetCompressedMultiTexImageEXT_size(target, lod)"), "img")], sideeffects=False),
     GlFunction(Void, "glNamedProgramStringEXT", [(GLprogram, "program"), (GLenum, "target"), (GLenum, "format"), (GLsizei, "len"), (Const(String("GLvoid *", "len")), "string")]),
     GlFunction(Void, "glNamedProgramLocalParameter4dEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-    GlFunction(Void, "glNamedProgramLocalParameter4dvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
+    GlFunction(Void, "glNamedProgramLocalParameter4dvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), 4), "params")]),
     GlFunction(Void, "glNamedProgramLocalParameter4fEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-    GlFunction(Void, "glNamedProgramLocalParameter4fvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
-    GlFunction(Void, "glGetNamedProgramLocalParameterdvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetNamedProgramLocalParameterfvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "4"), "params")], sideeffects=False),
+    GlFunction(Void, "glNamedProgramLocalParameter4fvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), 4), "params")]),
+    GlFunction(Void, "glGetNamedProgramLocalParameterdvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetNamedProgramLocalParameterfvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, 4), "params")], sideeffects=False),
     GlFunction(Void, "glGetNamedProgramivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False),
     GlFunction(Void, "glGetNamedProgramStringEXT", [(GLprogram, "program"), (GLenum, "target"), (GLenum, "pname"), Out(OpaqueBlob(GLvoid, "__glGetNamedProgramStringEXT_size(program,pname)"), "string")], sideeffects=False),
     GlFunction(Void, "glNamedProgramLocalParameters4fvEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLfloat), "count*4"), "params")]),
     GlFunction(Void, "glNamedProgramLocalParameterI4iEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
-    GlFunction(Void, "glNamedProgramLocalParameterI4ivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLint), "4"), "params")]),
+    GlFunction(Void, "glNamedProgramLocalParameterI4ivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLint), 4), "params")]),
     GlFunction(Void, "glNamedProgramLocalParametersI4ivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLint), "count*4"), "params")]),
     GlFunction(Void, "glNamedProgramLocalParameterI4uiEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLuint, "x"), (GLuint, "y"), (GLuint, "z"), (GLuint, "w")]),
-    GlFunction(Void, "glNamedProgramLocalParameterI4uivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLuint), "4"), "params")]),
+    GlFunction(Void, "glNamedProgramLocalParameterI4uivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (Array(Const(GLuint), 4), "params")]),
     GlFunction(Void, "glNamedProgramLocalParametersI4uivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Array(Const(GLuint), "count*4"), "params")]),
-    GlFunction(Void, "glGetNamedProgramLocalParameterIivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLint, "4"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetNamedProgramLocalParameterIuivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLuint, "4"), "params")], sideeffects=False),
+    GlFunction(Void, "glGetNamedProgramLocalParameterIivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLint, 4), "params")], sideeffects=False),
+    GlFunction(Void, "glGetNamedProgramLocalParameterIuivEXT", [(GLprogram, "program"), (GLenum, "target"), (GLuint, "index"), Out(Array(GLuint, 4), "params")], sideeffects=False),
     GlFunction(Void, "glTextureParameterIivEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "pname"), (Array(Const(GLint), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glTextureParameterIuivEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "pname"), (Array(Const(GLuint), "__gl_param_size(pname)"), "params")]),
     GlFunction(Void, "glGetTextureParameterIivEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
@@ -2512,7 +2512,7 @@ glapi.add_functions([
     GlFunction(Void, "glFlushMappedNamedBufferRangeEXT", [(GLbuffer, "buffer"), (GLintptr, "offset"), (GLsizeiptr, "length")]),
     GlFunction(Void, "glNamedCopyBufferSubDataEXT", [(GLbuffer, "readBuffer"), (GLbuffer, "writeBuffer"), (GLintptr, "readOffset"), (GLintptr, "writeOffset"), (GLsizeiptr, "size")]),
     GlFunction(Void, "glGetNamedBufferParameterivEXT", [(GLbuffer, "buffer"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False),
-    GlFunction(Void, "glGetNamedBufferPointervEXT", [(GLbuffer, "buffer"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
+    GlFunction(Void, "glGetNamedBufferPointervEXT", [(GLbuffer, "buffer"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
     GlFunction(Void, "glGetNamedBufferSubDataEXT", [(GLbuffer, "buffer"), (GLintptr, "offset"), (GLsizeiptr, "size"), Out(OpaqueBlob(GLvoid, "size"), "data")], sideeffects=False),
     GlFunction(Void, "glTextureBufferEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLenum, "internalformat"), (GLbuffer, "buffer")]),
     GlFunction(Void, "glMultiTexBufferEXT", [(GLenum, "texunit"), (GLenum, "target"), (GLenum, "internalformat"), (GLbuffer, "buffer")]),
@@ -2570,12 +2570,12 @@ glapi.add_functions([
     GlFunction(Void, "glEnableVertexArrayAttribEXT", [(GLarray, "vaobj"), (GLuint, "index")]),
     GlFunction(Void, "glDisableVertexArrayAttribEXT", [(GLarray, "vaobj"), (GLuint, "index")]),
     GlFunction(Void, "glGetVertexArrayIntegervEXT", [(GLarray, "vaobj"), (GLenum, "pname"), Out(Pointer(GLint), "param")]),
-    GlFunction(Void, "glGetVertexArrayPointervEXT", [(GLarray, "vaobj"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "param")]),
+    GlFunction(Void, "glGetVertexArrayPointervEXT", [(GLarray, "vaobj"), (GLenum, "pname"), Out(Pointer(GLpointer), "param")]),
     GlFunction(Void, "glGetVertexArrayIntegeri_vEXT", [(GLarray, "vaobj"), (GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLint), "param")]),
-    GlFunction(Void, "glGetVertexArrayPointeri_vEXT", [(GLarray, "vaobj"), (GLuint, "index"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "param")]),
+    GlFunction(Void, "glGetVertexArrayPointeri_vEXT", [(GLarray, "vaobj"), (GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLpointer), "param")]),
 
     # GL_NV_explicit_multisample
-    GlFunction(Void, "glGetMultisamplefvNV", [(GLenum, "pname"), (GLuint, "index"), Out(Array(GLfloat, "2"), "val")], sideeffects=False),
+    GlFunction(Void, "glGetMultisamplefvNV", [(GLenum, "pname"), (GLuint, "index"), Out(Array(GLfloat, 2), "val")], sideeffects=False),
     GlFunction(Void, "glSampleMaskIndexedNV", [(GLuint, "index"), (GLbitfield, "mask")]),
     GlFunction(Void, "glTexRenderbufferNV", [(GLenum, "target"), (GLuint, "renderbuffer")]),
 
@@ -2616,7 +2616,7 @@ glapi.add_functions([
 
     # GL_APPLE_texture_range
     GlFunction(Void, "glTextureRangeAPPLE", [(GLenum, "target"), (GLsizei, "length"), (Blob(Const(GLvoid), "length"), "pointer")]),
-    GlFunction(Void, "glGetTexParameterPointervAPPLE", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
+    GlFunction(Void, "glGetTexParameterPointervAPPLE", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLpointer), "params")], sideeffects=False),
 
     # GL_APPLE_vertex_program_evaluators
     GlFunction(Void, "glEnableVertexAttribAPPLE", [(GLuint, "index"), (GLenum, "pname")]),
@@ -2697,9 +2697,9 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribL3dEXT", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
     GlFunction(Void, "glVertexAttribL4dEXT", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
     GlFunction(Void, "glVertexAttribL1dvEXT", [(GLuint, "index"), (Pointer(Const(GLdouble)), "v")]),
-    GlFunction(Void, "glVertexAttribL2dvEXT", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribL3dvEXT", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribL4dvEXT", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
+    GlFunction(Void, "glVertexAttribL2dvEXT", [(GLuint, "index"), (Array(Const(GLdouble), 2), "v")]),
+    GlFunction(Void, "glVertexAttribL3dvEXT", [(GLuint, "index"), (Array(Const(GLdouble), 3), "v")]),
+    GlFunction(Void, "glVertexAttribL4dvEXT", [(GLuint, "index"), (Array(Const(GLdouble), 4), "v")]),
     GlFunction(Void, "glVertexAttribLPointerEXT", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Blob(Const(GLvoid), "size"), "pointer")]),
     GlFunction(Void, "glGetVertexAttribLdvEXT", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glVertexArrayVertexAttribLOffsetEXT", [(GLarray, "vaobj"), (GLuint, "buffer"), (GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLintptr, "offset")]),
@@ -2749,17 +2749,17 @@ glapi.add_functions([
     GlFunction(Void, "glVertexAttribL3i64NV", [(GLuint, "index"), (GLint64EXT, "x"), (GLint64EXT, "y"), (GLint64EXT, "z")]),
     GlFunction(Void, "glVertexAttribL4i64NV", [(GLuint, "index"), (GLint64EXT, "x"), (GLint64EXT, "y"), (GLint64EXT, "z"), (GLint64EXT, "w")]),
     GlFunction(Void, "glVertexAttribL1i64vNV", [(GLuint, "index"), (Pointer(Const(GLint64EXT)), "v")]),
-    GlFunction(Void, "glVertexAttribL2i64vNV", [(GLuint, "index"), (Array(Const(GLint64EXT), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribL3i64vNV", [(GLuint, "index"), (Array(Const(GLint64EXT), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribL4i64vNV", [(GLuint, "index"), (Array(Const(GLint64EXT), "4"), "v")]),
+    GlFunction(Void, "glVertexAttribL2i64vNV", [(GLuint, "index"), (Array(Const(GLint64EXT), 2), "v")]),
+    GlFunction(Void, "glVertexAttribL3i64vNV", [(GLuint, "index"), (Array(Const(GLint64EXT), 3), "v")]),
+    GlFunction(Void, "glVertexAttribL4i64vNV", [(GLuint, "index"), (Array(Const(GLint64EXT), 4), "v")]),
     GlFunction(Void, "glVertexAttribL1ui64NV", [(GLuint, "index"), (GLuint64EXT, "x")]),
     GlFunction(Void, "glVertexAttribL2ui64NV", [(GLuint, "index"), (GLuint64EXT, "x"), (GLuint64EXT, "y")]),
     GlFunction(Void, "glVertexAttribL3ui64NV", [(GLuint, "index"), (GLuint64EXT, "x"), (GLuint64EXT, "y"), (GLuint64EXT, "z")]),
     GlFunction(Void, "glVertexAttribL4ui64NV", [(GLuint, "index"), (GLuint64EXT, "x"), (GLuint64EXT, "y"), (GLuint64EXT, "z"), (GLuint64EXT, "w")]),
     GlFunction(Void, "glVertexAttribL1ui64vNV", [(GLuint, "index"), (Pointer(Const(GLuint64EXT)), "v")]),
-    GlFunction(Void, "glVertexAttribL2ui64vNV", [(GLuint, "index"), (Array(Const(GLuint64EXT), "2"), "v")]),
-    GlFunction(Void, "glVertexAttribL3ui64vNV", [(GLuint, "index"), (Array(Const(GLuint64EXT), "3"), "v")]),
-    GlFunction(Void, "glVertexAttribL4ui64vNV", [(GLuint, "index"), (Array(Const(GLuint64EXT), "4"), "v")]),
+    GlFunction(Void, "glVertexAttribL2ui64vNV", [(GLuint, "index"), (Array(Const(GLuint64EXT), 2), "v")]),
+    GlFunction(Void, "glVertexAttribL3ui64vNV", [(GLuint, "index"), (Array(Const(GLuint64EXT), 3), "v")]),
+    GlFunction(Void, "glVertexAttribL4ui64vNV", [(GLuint, "index"), (Array(Const(GLuint64EXT), 4), "v")]),
     GlFunction(Void, "glGetVertexAttribLi64vNV", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint64EXT, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glGetVertexAttribLui64vNV", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLuint64EXT, "__gl_param_size(pname)"), "params")], sideeffects=False),
     GlFunction(Void, "glVertexAttribLFormatNV", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride")]),
@@ -2772,7 +2772,7 @@ glapi.add_functions([
     # GL_AMD_debug_output
     GlFunction(Void, "glDebugMessageEnableAMD", [(GLenum, "category"), (GLenum, "severity"), (GLsizei, "count"), (Array(Const(GLuint), "count"), "ids"), (GLboolean, "enabled")], sideeffects=False),
     GlFunction(Void, "glDebugMessageInsertAMD", [(GLenum, "category"), (GLenum, "severity"), (GLuint, "id"), (GLsizei, "length"), (Array(Const(GLchar), "length"), "buf")], sideeffects=False),
-    GlFunction(Void, "glDebugMessageCallbackAMD", [(GLDEBUGPROCAMD, "callback"), (Opaque("GLvoid *"), "userParam")], sideeffects=False),
+    GlFunction(Void, "glDebugMessageCallbackAMD", [(GLDEBUGPROCAMD, "callback"), (GLpointer, "userParam")], sideeffects=False),
     GlFunction(GLuint, "glGetDebugMessageLogAMD", [(GLuint, "count"), (GLsizei, "bufsize"), Out(Array(GLenum, "count"), "categories"), Out(Array(GLuint, "count"), "severities"), Out(Array(GLuint, "count"), "ids"), Out(Array(GLsizei, "count"), "lengths"), Out(Array(GLchar, "bufsize"), "message")], sideeffects=False),
 
     # GL_NV_texture_multisample
@@ -2784,14 +2784,14 @@ glapi.add_functions([
     GlFunction(Void, "glTextureImage3DMultisampleCoverageNV", [(GLuint, "texture"), (GLenum, "target"), (GLsizei, "coverageSamples"), (GLsizei, "colorSamples"), (GLint, "internalFormat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLboolean, "fixedSampleLocations")]),
 
     # GL_AMD_sample_positions
-    GlFunction(Void, "glSetMultisamplefvAMD", [(GLenum, "pname"), (GLuint, "index"), (Array(Const(GLfloat), "2"), "val")]),
+    GlFunction(Void, "glSetMultisamplefvAMD", [(GLenum, "pname"), (GLuint, "index"), (Array(Const(GLfloat), 2), "val")]),
 
     # GL_EXT_x11_sync_object
     GlFunction(GLsync, "glImportSyncEXT", [(GLenum, "external_sync_type"), (GLintptr, "external_sync"), (GLbitfield, "flags")]),
 
     # GL_AMD_multi_draw_indirect
-    GlFunction(Void, "glMultiDrawArraysIndirectAMD", [(GLenum_mode, "mode"), (OpaquePointer(Const(GLvoid)), "indirect"), (GLsizei, "primcount"), (GLsizei, "stride")]),
-    GlFunction(Void, "glMultiDrawElementsIndirectAMD", [(GLenum_mode, "mode"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indirect"), (GLsizei, "primcount"), (GLsizei, "stride")]),
+    GlFunction(Void, "glMultiDrawArraysIndirectAMD", [(GLenum_mode, "mode"), (GLpointerConst, "indirect"), (GLsizei, "primcount"), (GLsizei, "stride")]),
+    GlFunction(Void, "glMultiDrawElementsIndirectAMD", [(GLenum_mode, "mode"), (GLenum, "type"), (GLpointerConst, "indirect"), (GLsizei, "primcount"), (GLsizei, "stride")]),
 
     # GL_KTX_buffer_region
     # XXX: http://www.west.net/~brittain/3dsmax2.htm does not mention EXT suffix
@@ -2804,9 +2804,3 @@ glapi.add_functions([
     # GL_WIN_swap_hint
     GlFunction(Void, "glAddSwapHintRectWIN", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
 ])
-
-
-# memcpy's prototype.  We don't really want to trace all memcpy calls -- just
-# emit a few fake memcpy calls --, which is why the prototype is not together
-# with the rest.
-memcpy = Function(Void, "memcpy", [(GLmap, "dest"), (Blob(Const(Void), "n"), "src"), (SizeT, "n")])