]> git.cworth.org Git - apitrace/blobdiff - glapi.py
Less opaqueness.
[apitrace] / glapi.py
index a19c412f9302c09463ac828df24032a14ce519dc..22db8f271bb5bbfd9e4abe5363d039000557946a 100644 (file)
--- a/glapi.py
+++ b/glapi.py
@@ -54,8 +54,8 @@ GLhalfNV = Alias("GLhalfNV", UShort)
 GLint64EXT = Alias("GLint64EXT", LongLong)
 GLuint64EXT = Alias("GLuint64EXT", ULongLong)
 
-GLstring = Alias("const GLchar *", CString)
-GLstringARB = Alias("const GLcharARB *", CString)
+GLstring = String("GLchar *")
+GLstringARB = String("GLcharARB *")
 
 GLenum = Enum("GLenum", [
     #"GL_NO_ERROR",                       # 0x0
@@ -2518,9 +2518,14 @@ GLbitfield_client_attrib = Flags(GLbitfield, [
     "GL_CLIENT_VERTEX_ARRAY_BIT", # 0x00000002
 ])
 
-texture = Handle("texture", GLuint)
-framebuffer = Handle("framebuffer", GLuint)
-renderbuffer = Handle("renderbuffer", GLuint)
+GLlist = Handle("list", GLuint)
+GLtexture = Handle("texture", GLuint)
+GLbuffer = Handle("buffer", GLuint)
+GLquery = Handle("query", GLuint)
+GLfence = Handle("fence", GLuint)
+GLprogram = Handle("program", GLuint)
+GLframebuffer = Handle("framebuffer", GLuint)
+GLrenderbuffer = Handle("renderbuffer", GLuint)
 
 
 def GlFunction(*args, **kwargs):
@@ -2532,12 +2537,12 @@ def basic_functions(Function):
         kwargs.setdefault('call', 'GLAPIENTRY')
         return Function(*args, **kwargs)
     return [
-        F(Void, "glNewList", [(GLuint, "list"), (GLenum, "mode")]),
+        F(Void, "glNewList", [(GLlist, "list"), (GLenum, "mode")]),
         F(Void, "glEndList", []),
-        F(Void, "glCallList", [(GLuint, "list")]),
-        F(Void, "glCallLists", [(GLsizei, "n"), (GLenum, "type"), (Blob(Const(GLvoid), "__gl_calllists_size(n, type)"), "lists")]),
-        F(Void, "glDeleteLists", [(GLuint, "list"), (GLsizei, "range")]),
-        F(GLuint, "glGenLists", [(GLsizei, "range")]),
+        F(Void, "glCallList", [(GLlist, "list")]),
+        F(Void, "glCallLists", [(GLsizei, "n"), (GLenum, "type"), (Blob(Const(GLvoid), "__gl_calllists_size(n, type)"), "lists")]), # XXX
+        F(Void, "glDeleteLists", [(GLlist, "list"), (GLsizei, "range")]), # XXX
+        F(GLlist, "glGenLists", [(GLsizei, "range")]), # XXX
         F(Void, "glListBase", [(GLuint, "base")]),
         F(Void, "glBegin", [(GLenum_mode, "mode")]),
         F(Void, "glBitmap", [(GLsizei, "width"), (GLsizei, "height"), (GLfloat, "xorig"), (GLfloat, "yorig"), (GLfloat, "xmove"), (GLfloat, "ymove"), (Blob(Const(GLubyte), "__gl_bitmap_size(width, height)"), "bitmap")]),
@@ -2839,7 +2844,7 @@ def basic_functions(Function):
         F(Void, "glTranslatef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
         F(Void, "glViewport", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
         F(Void, "glArrayElement", [(GLint, "i")]),
-        F(Void, "glBindTexture", [(GLenum, "target"), (texture, "texture")]),
+        F(Void, "glBindTexture", [(GLenum, "target"), (GLtexture, "texture")]),
         F(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
         F(Void, "glDisableClientState", [(GLenum, "array")]),
         F(Void, "glDrawArrays", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count")]),
@@ -2854,16 +2859,16 @@ def basic_functions(Function):
         F(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]),
         F(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
         F(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-        F(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Array(Const(texture), "n"), "textures"), Out(Array(GLboolean, "n"), "residences")]),
+        F(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures"), Out(Array(GLboolean, "n"), "residences")]),
         F(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]),
         F(Void, "glCopyTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border")]),
         F(Void, "glCopyTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
         F(Void, "glCopyTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
-        F(Void, "glDeleteTextures", [(GLsizei, "n"), (Array(Const(texture), "n"), "textures")]),
-        F(Void, "glGenTextures", [(GLsizei, "n"), Out(Array(texture, "n"), "textures")]),
+        F(Void, "glDeleteTextures", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures")]),
+        F(Void, "glGenTextures", [(GLsizei, "n"), Out(Array(GLtexture, "n"), "textures")]),
         F(Void, "glGetPointerv", [(GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
-        F(GLboolean, "glIsTexture", [(texture, "texture")]),
-        F(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Array(Const(texture), "n"), "textures"), (Array(Const(GLclampf), "n"), "priorities")]),
+        F(GLboolean, "glIsTexture", [(GLtexture, "texture")]),
+        F(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Array(Const(GLtexture), "n"), "textures"), (Array(Const(GLclampf), "n"), "priorities")]),
         F(Void, "glTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__gl_image_size(format, type, width, 1, 1, 0)"), "pixels")]),
         F(Void, "glTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__gl_image_size(format, type, width, height, 1, 0)"), "pixels")]),
         F(Void, "glPopClientAttrib", []),
@@ -2958,9 +2963,9 @@ def extended_functions(Function):
         F(Void, "glDeleteShader", [(GLuint, "program")]),
         F(Void, "glDetachShader", [(GLuint, "program"), (GLuint, "shader")]),
         F(Void, "glGetAttachedShaders", [(GLuint, "program"), (GLsizei, "maxCount"), Out(Pointer(GLsizei), "count"), Out(Array(GLuint, "maxCount"), "obj")], sideeffects=False),
-        F(Void, "glGetProgramInfoLog", [(GLuint, "program"), (GLsizei, "bufSize"), (OpaquePointer(GLsizei), "length"), (OpaquePointer(GLchar), "infoLog")], sideeffects=False),
+        F(Void, "glGetProgramInfoLog", [(GLuint, "program"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(GLstring, "infoLog")], sideeffects=False),
         F(Void, "glGetProgramiv", [(GLuint, "program"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(Void, "glGetShaderInfoLog", [(GLuint, "shader"), (GLsizei, "bufSize"), (OpaquePointer(GLsizei), "length"), (OpaquePointer(GLchar), "infoLog")], sideeffects=False),
+        F(Void, "glGetShaderInfoLog", [(GLuint, "shader"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(GLstring, "infoLog")], sideeffects=False),
         F(Void, "glGetShaderiv", [(GLuint, "shader"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(GLboolean, "glIsProgram", [(GLuint, "program")]),
         F(GLboolean, "glIsShader", [(GLuint, "shader")]),
@@ -2997,14 +3002,14 @@ def extended_functions(Function):
         F(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
         F(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glProgramEnvParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-        F(Void, "glProgramEnvParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (OpaquePointer(Const(GLdouble)), "params")]),
+        F(Void, "glProgramEnvParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
         F(Void, "glProgramEnvParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-        F(Void, "glProgramEnvParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (OpaquePointer(Const(GLfloat)), "params")]),
+        F(Void, "glProgramEnvParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
         F(Void, "glProgramLocalParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-        F(Void, "glProgramLocalParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (OpaquePointer(Const(GLdouble)), "params")]),
+        F(Void, "glProgramLocalParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
         F(Void, "glProgramLocalParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-        F(Void, "glProgramLocalParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (OpaquePointer(Const(GLfloat)), "params")]),
-        F(Void, "glProgramStringARB", [(GLenum, "target"), (GLenum, "format"), (GLsizei, "len"), (Alias("const void *", String("len")), "string")]),
+        F(Void, "glProgramLocalParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
+        F(Void, "glProgramStringARB", [(GLenum, "target"), (GLenum, "format"), (GLsizei, "len"), (String("const void *", "len"), "string")]),
         F(Void, "glVertexAttrib1dARB", [(GLuint, "index"), (GLdouble, "x")]),
         F(Void, "glVertexAttrib1dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "1"), "v")]),
         F(Void, "glVertexAttrib1fARB", [(GLuint, "index"), (GLfloat, "x")]),
@@ -3042,59 +3047,59 @@ def extended_functions(Function):
         F(Void, "glVertexAttrib4uivARB", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
         F(Void, "glVertexAttrib4usvARB", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
         F(Void, "glVertexAttribPointerARB", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
-        F(Void, "glBindBufferARB", [(GLenum, "target"), (GLuint, "buffer")]),
+        F(Void, "glBindBufferARB", [(GLenum, "target"), (GLbuffer, "buffer")]),
         F(Void, "glBufferDataARB", [(GLenum, "target"), (GLsizeiptrARB, "size"), (Blob(Const(GLvoid), "size"), "data"), (GLenum, "usage")]),
         F(Void, "glBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), (Blob(Const(GLvoid), "size"), "data")]),
-        F(Void, "glDeleteBuffersARB", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "buffer")]),
-        F(Void, "glGenBuffersARB", [(GLsizei, "n"), Out(Array(GLuint, "n"), "buffer")]),
+        F(Void, "glDeleteBuffersARB", [(GLsizei, "n"), (Array(Const(GLbuffer), "n"), "buffer")]),
+        F(Void, "glGenBuffersARB", [(GLsizei, "n"), Out(Array(GLbuffer, "n"), "buffer")]),
         F(Void, "glGetBufferParameterivARB", [(GLenum, "target"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glGetBufferPointervARB", [(GLenum, "target"), (GLenum, "pname"), (OpaquePointer(OpaquePointer(GLvoid)), "params")], sideeffects=False),
         F(Void, "glGetBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), Out(Blob(GLvoid, "size"), "data")], sideeffects=False),
-        F(GLboolean, "glIsBufferARB", [(GLuint, "buffer")]),
+        F(GLboolean, "glIsBufferARB", [(GLbuffer, "buffer")]),
         F(OpaquePointer(GLvoid), "glMapBufferARB", [(GLenum, "target"), (GLenum, "access")]),
         F(GLboolean, "glUnmapBufferARB", [(GLenum, "target")]),
-        F(Void, "glBeginQueryARB", [(GLenum, "target"), (GLuint, "id")]),
-        F(Void, "glDeleteQueriesARB", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "ids")]),
+        F(Void, "glBeginQueryARB", [(GLenum, "target"), (GLquery, "id")]),
+        F(Void, "glDeleteQueriesARB", [(GLsizei, "n"), (Array(Const(GLquery), "n"), "ids")]),
         F(Void, "glEndQueryARB", [(GLenum, "target")]),
-        F(Void, "glGenQueriesARB", [(GLsizei, "n"), Out(Array(GLuint, "n"), "ids")]),
-        F(Void, "glGetQueryObjectivARB", [(GLuint, "id"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(Void, "glGetQueryObjectuivARB", [(GLuint, "id"), (GLenum, "pname"), (OpaquePointer(GLuint), "params")], sideeffects=False),
+        F(Void, "glGenQueriesARB", [(GLsizei, "n"), Out(Array(GLquery, "n"), "ids")]),
+        F(Void, "glGetQueryObjectivARB", [(GLquery, "id"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
+        F(Void, "glGetQueryObjectuivARB", [(GLquery, "id"), (GLenum, "pname"), (OpaquePointer(GLuint), "params")], sideeffects=False),
         F(Void, "glGetQueryivARB", [(GLenum, "target"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(GLboolean, "glIsQueryARB", [(GLuint, "id")]),
+        F(GLboolean, "glIsQueryARB", [(GLquery, "id")]),
         F(Void, "glAttachObjectARB", [(GLhandleARB, "containerObj"), (GLhandleARB, "obj")]),
         F(Void, "glCompileShaderARB", [(GLhandleARB, "shader")]),
         F(GLhandleARB, "glCreateProgramObjectARB", []),
         F(GLhandleARB, "glCreateShaderObjectARB", [(GLenum, "shaderType")]),
         F(Void, "glDeleteObjectARB", [(GLhandleARB, "obj")]),
         F(Void, "glDetachObjectARB", [(GLhandleARB, "containerObj"), (GLhandleARB, "attachedObj")]),
-        F(Void, "glGetActiveUniformARB", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (OpaquePointer(GLsizei), "length"), (OpaquePointer(GLint), "size"), (OpaquePointer(GLenum), "type"), (OpaquePointer(GLcharARB), "name")], sideeffects=False),
+        F(Void, "glGetActiveUniformARB", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(Pointer(GLint), "size"), Out(Pointer(GLenum), "type"), Out(GLstringARB, "name")], sideeffects=False),
         F(Void, "glGetAttachedObjectsARB", [(GLhandleARB, "containerObj"), (GLsizei, "maxLength"), (OpaquePointer(GLsizei), "length"), (OpaquePointer(GLhandleARB), "infoLog")], sideeffects=False),
         F(GLhandleARB, "glGetHandleARB", [(GLenum, "pname")], sideeffects=False),
-        F(Void, "glGetInfoLogARB", [(GLhandleARB, "obj"), (GLsizei, "maxLength"), (OpaquePointer(GLsizei), "length"), (OpaquePointer(GLcharARB), "infoLog")], sideeffects=False),
+        F(Void, "glGetInfoLogARB", [(GLhandleARB, "obj"), (GLsizei, "maxLength"), Out(Pointer(GLsizei), "length"), Out(GLstringARB, "infoLog")], sideeffects=False),
         F(Void, "glGetObjectParameterfvARB", [(GLhandleARB, "obj"), (GLenum, "pname"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
         F(Void, "glGetObjectParameterivARB", [(GLhandleARB, "obj"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(Void, "glGetShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "bufSize"), (OpaquePointer(GLsizei), "length"), (OpaquePointer(GLcharARB), "source")], sideeffects=False),
+        F(Void, "glGetShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(GLstringARB, "source")], sideeffects=False),
         F(GLint, "glGetUniformLocationARB", [(GLhandleARB, "program"), (OpaquePointer(Const(GLcharARB)), "name")], sideeffects=False),
         F(Void, "glGetUniformfvARB", [(GLhandleARB, "program"), (GLint, "location"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
         F(Void, "glGetUniformivARB", [(GLhandleARB, "program"), (GLint, "location"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glLinkProgramARB", [(GLhandleARB, "program")]),
-        F(Void, "glShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "count"), (Array(GLstringARB, "count"), "string"), (Array(Const(GLint), "count"), "length")]), # FIXME
+        F(Void, "glShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "count"), (Const(Array(Const(GLstringARB), "count")), "string"), (Const(Array(GLint, "count")), "length")]),
         F(Void, "glUniform1fARB", [(GLint, "location"), (GLfloat, "v0")]),
-        F(Void, "glUniform1fvARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLfloat)), "value")]),
+        F(Void, "glUniform1fvARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLfloat, "count")), "value")]),
         F(Void, "glUniform1iARB", [(GLint, "location"), (GLint, "v0")]),
-        F(Void, "glUniform1ivARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLint)), "value")]),
+        F(Void, "glUniform1ivARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLint, "count")), "value")]),
         F(Void, "glUniform2fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1")]),
-        F(Void, "glUniform2fvARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLfloat)), "value")]),
+        F(Void, "glUniform2fvARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLfloat, "(2*count)")), "value")]),
         F(Void, "glUniform2iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1")]),
-        F(Void, "glUniform2ivARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLint)), "value")]),
+        F(Void, "glUniform2ivARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLint, "(2*count)")), "value")]),
         F(Void, "glUniform3fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2")]),
-        F(Void, "glUniform3fvARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLfloat)), "value")]),
+        F(Void, "glUniform3fvARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLfloat, "(3*count)")), "value")]),
         F(Void, "glUniform3iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2")]),
-        F(Void, "glUniform3ivARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLint)), "value")]),
+        F(Void, "glUniform3ivARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLint, "(3*count)")), "value")]),
         F(Void, "glUniform4fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2"), (GLfloat, "v3")]),
-        F(Void, "glUniform4fvARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLfloat)), "value")]),
+        F(Void, "glUniform4fvARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLfloat, "(4*count)")), "value")]),
         F(Void, "glUniform4iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2"), (GLint, "v3")]),
-        F(Void, "glUniform4ivARB", [(GLint, "location"), (GLsizei, "count"), (OpaquePointer(Const(GLint)), "value")]),
+        F(Void, "glUniform4ivARB", [(GLint, "location"), (GLsizei, "count"), (Const(Array(GLint, "(4*count)")), "value")]),
         F(Void, "glUniformMatrix2fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
         F(Void, "glUniformMatrix3fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
         F(Void, "glUniformMatrix4fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
@@ -3194,29 +3199,29 @@ def extended_functions(Function):
         F(Void, "glWindowPos4svMESA", [(Array(Const(GLshort), "4"), "v")]),
         F(Void, "glMultiModeDrawArraysIBM", [(Array(Const(GLenum_mode), "primcount"), "mode"), (Array(Const(GLint), "primcount"), "first"), (Array(Const(GLsizei), "primcount"), "count"), (GLsizei, "primcount"), (GLint, "modestride")]),
         F(Void, "glMultiModeDrawElementsIBM", [(Array(Const(GLenum_mode), "primcount"), "mode"), (Array(Const(GLsizei), "primcount"), "count"), (GLenum, "type"), (Array(Const(OpaquePointer(Const(GLvoid))), "primcount"), "indices"), (GLsizei, "primcount"), (GLint, "modestride")]),
-        F(Void, "glDeleteFencesNV", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "fences")]),
-        F(Void, "glFinishFenceNV", [(GLuint, "fence")]),
-        F(Void, "glGenFencesNV", [(GLsizei, "n"), Out(Array(GLuint, "n"), "fences")]),
-        F(Void, "glGetFenceivNV", [(GLuint, "fence"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(GLboolean, "glIsFenceNV", [(GLuint, "fence")]),
-        F(Void, "glSetFenceNV", [(GLuint, "fence"), (GLenum, "condition")]),
-        F(GLboolean, "glTestFenceNV", [(GLuint, "fence")]),
-        F(GLboolean, "glAreProgramsResidentNV", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "ids"), Out(Array(GLboolean, "n"), "residences")]),
-        F(Void, "glBindProgramNV", [(GLenum, "target"), (GLuint, "program")]),
-        F(Void, "glDeleteProgramsNV", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "programs")]),
-        F(Void, "glExecuteProgramNV", [(GLenum, "target"), (GLuint, "id"), (OpaquePointer(Const(GLfloat)), "params")]),
-        F(Void, "glGenProgramsNV", [(GLsizei, "n"), Out(Array(GLuint, "n"), "programs")]),
+        F(Void, "glDeleteFencesNV", [(GLsizei, "n"), (Array(Const(GLfence), "n"), "fences")]),
+        F(Void, "glFinishFenceNV", [(GLfence, "fence")]),
+        F(Void, "glGenFencesNV", [(GLsizei, "n"), Out(Array(GLfence, "n"), "fences")]),
+        F(Void, "glGetFenceivNV", [(GLfence, "fence"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
+        F(GLboolean, "glIsFenceNV", [(GLfence, "fence")]),
+        F(Void, "glSetFenceNV", [(GLfence, "fence"), (GLenum, "condition")]),
+        F(GLboolean, "glTestFenceNV", [(GLfence, "fence")]),
+        F(GLboolean, "glAreProgramsResidentNV", [(GLsizei, "n"), (Array(Const(GLprogram), "n"), "ids"), Out(Array(GLboolean, "n"), "residences")]),
+        F(Void, "glBindProgramNV", [(GLenum, "target"), (GLprogram, "program")]),
+        F(Void, "glDeleteProgramsNV", [(GLsizei, "n"), (Array(Const(GLprogram), "n"), "programs")]),
+        F(Void, "glExecuteProgramNV", [(GLenum, "target"), (GLprogram, "id"), (Const(Array(GLfloat, "4")), "params")]),
+        F(Void, "glGenProgramsNV", [(GLsizei, "n"), Out(Array(GLprogram, "n"), "programs")]),
         F(Void, "glGetProgramParameterdvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLdouble), "params")], sideeffects=False),
         F(Void, "glGetProgramParameterfvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
-        F(Void, "glGetProgramStringNV", [(GLuint, "id"), (GLenum, "pname"), (OpaquePointer(GLubyte), "program")], sideeffects=False),
-        F(Void, "glGetProgramivNV", [(GLuint, "id"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
+        F(Void, "glGetProgramStringNV", [(GLprogram, "id"), (GLenum, "pname"), (OpaquePointer(GLubyte), "program")], sideeffects=False),
+        F(Void, "glGetProgramivNV", [(GLprogram, "id"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glGetTrackMatrixivNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glGetVertexAttribPointervNV", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(OpaquePointer(GLvoid)), "pointer")], sideeffects=False),
         F(Void, "glGetVertexAttribdvNV", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLdouble), "params")], sideeffects=False),
         F(Void, "glGetVertexAttribfvNV", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
         F(Void, "glGetVertexAttribivNV", [(GLuint, "index"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(GLboolean, "glIsProgramNV", [(GLuint, "program")]),
-        F(Void, "glLoadProgramNV", [(GLenum, "target"), (GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "program")]),
+        F(GLboolean, "glIsProgramNV", [(GLprogram, "program")]),
+        F(Void, "glLoadProgramNV", [(GLenum, "target"), (GLprogram, "id"), (GLsizei, "len"), (String("const GLubyte *", "len"), "program")]),
         F(Void, "glProgramParameters4dvNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "num"), (OpaquePointer(Const(GLdouble)), "params")]),
         F(Void, "glProgramParameters4fvNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "num"), (OpaquePointer(Const(GLfloat)), "params")]),
         F(Void, "glRequestResidentProgramsNV", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "ids")]),
@@ -3286,54 +3291,54 @@ def extended_functions(Function):
         F(Void, "glDeleteVertexArraysAPPLE", [(GLsizei, "n"), (Array(Const(GLuint), "n"), "arrays")]),
         F(Void, "glGenVertexArraysAPPLE", [(GLsizei, "n"), Out(Array(GLuint, "n"), "arrays")]),
         F(GLboolean, "glIsVertexArrayAPPLE", [(GLuint, "array")]),
-        F(Void, "glGetProgramNamedParameterdvNV", [(GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (OpaquePointer(GLdouble), "params")], sideeffects=False),
-        F(Void, "glGetProgramNamedParameterfvNV", [(GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
-        F(Void, "glProgramNamedParameter4dNV", [(GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
-        F(Void, "glProgramNamedParameter4dvNV", [(GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (Array(Const(GLdouble), "4"), "v")]),
-        F(Void, "glProgramNamedParameter4fNV", [(GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
-        F(Void, "glProgramNamedParameter4fvNV", [(GLuint, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (Array(Const(GLfloat), "4"), "v")]),
+        F(Void, "glGetProgramNamedParameterdvNV", [(GLprogram, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (OpaquePointer(GLdouble), "params")], sideeffects=False),
+        F(Void, "glGetProgramNamedParameterfvNV", [(GLprogram, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (OpaquePointer(GLfloat), "params")], sideeffects=False),
+        F(Void, "glProgramNamedParameter4dNV", [(GLprogram, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
+        F(Void, "glProgramNamedParameter4dvNV", [(GLprogram, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (Array(Const(GLdouble), "4"), "v")]),
+        F(Void, "glProgramNamedParameter4fNV", [(GLprogram, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
+        F(Void, "glProgramNamedParameter4fvNV", [(GLprogram, "id"), (GLsizei, "len"), (OpaquePointer(Const(GLubyte)), "name"), (Array(Const(GLfloat), "4"), "v")]),
         F(Void, "glDepthBoundsEXT", [(GLclampd, "zmin"), (GLclampd, "zmax")]),
         F(Void, "glBlendEquationSeparateEXT", [(GLenum, "modeRGB"), (GLenum, "modeA")]),
 
-        F(Void, "glBindFramebuffer", [(GLenum, "target"), (framebuffer, "framebuffer")]),
-        F(Void, "glBindRenderbuffer", [(GLenum, "target"), (renderbuffer, "renderbuffer")]),
+        F(Void, "glBindFramebuffer", [(GLenum, "target"), (GLframebuffer, "framebuffer")]),
+        F(Void, "glBindRenderbuffer", [(GLenum, "target"), (GLrenderbuffer, "renderbuffer")]),
         F(GLenum, "glCheckFramebufferStatus", [(GLenum, "target")]),
-        F(Void, "glDeleteFramebuffers", [(GLsizei, "n"), (Array(Const(framebuffer), "n"), "framebuffers")]),
-        F(Void, "glDeleteRenderbuffers", [(GLsizei, "n"), (Array(Const(renderbuffer), "n"), "renderbuffers")]),
+        F(Void, "glDeleteFramebuffers", [(GLsizei, "n"), (Array(Const(GLframebuffer), "n"), "framebuffers")]),
+        F(Void, "glDeleteRenderbuffers", [(GLsizei, "n"), (Array(Const(GLrenderbuffer), "n"), "renderbuffers")]),
         F(Void, "glFramebufferRenderbuffer", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLuint, "renderbuffer")]),
-        F(Void, "glFramebufferTexture1D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (texture, "texture"), (GLint, "level")]),
-        F(Void, "glFramebufferTexture2D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (texture, "texture"), (GLint, "level")]),
-        F(Void, "glFramebufferTexture3D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (texture, "texture"), (GLint, "level"), (GLint, "zoffset")]),
-        F(Void, "glGenFramebuffers", [(GLsizei, "n"), Out(Array(framebuffer, "n"), "framebuffers")]),
-        F(Void, "glGenRenderbuffers", [(GLsizei, "n"), Out(Array(renderbuffer, "n"), "renderbuffers")]),
+        F(Void, "glFramebufferTexture1D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
+        F(Void, "glFramebufferTexture2D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
+        F(Void, "glFramebufferTexture3D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level"), (GLint, "zoffset")]),
+        F(Void, "glGenFramebuffers", [(GLsizei, "n"), Out(Array(GLframebuffer, "n"), "framebuffers")]),
+        F(Void, "glGenRenderbuffers", [(GLsizei, "n"), Out(Array(GLrenderbuffer, "n"), "renderbuffers")]),
         F(Void, "glGenerateMipmap", [(GLenum, "target")]),
         F(Void, "glGetFramebufferAttachmentParameteriv", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glGetRenderbufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(GLboolean, "glIsFramebuffer", [(framebuffer, "framebuffer")]),
-        F(GLboolean, "glIsRenderbuffer", [(renderbuffer, "renderbuffer")]),
+        F(GLboolean, "glIsFramebuffer", [(GLframebuffer, "framebuffer")]),
+        F(GLboolean, "glIsRenderbuffer", [(GLrenderbuffer, "renderbuffer")]),
         F(Void, "glRenderbufferStorage", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
         F(Void, "glBlitFramebuffer", [(GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield_attrib, "mask"), (GLenum, "filter")]),
-        F(Void, "glFramebufferTextureLayer", [(GLenum, "target"), (GLenum, "attachment"), (texture, "texture"), (GLint, "level"), (GLint, "layer")]),
+        F(Void, "glFramebufferTextureLayer", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level"), (GLint, "layer")]),
 
-        F(Void, "glBindFramebufferEXT", [(GLenum, "target"), (framebuffer, "framebuffer")]),
-        F(Void, "glBindRenderbufferEXT", [(GLenum, "target"), (renderbuffer, "renderbuffer")]),
+        F(Void, "glBindFramebufferEXT", [(GLenum, "target"), (GLframebuffer, "framebuffer")]),
+        F(Void, "glBindRenderbufferEXT", [(GLenum, "target"), (GLrenderbuffer, "renderbuffer")]),
         F(GLenum, "glCheckFramebufferStatusEXT", [(GLenum, "target")]),
-        F(Void, "glDeleteFramebuffersEXT", [(GLsizei, "n"), (Array(Const(framebuffer), "n"), "framebuffers")]),
-        F(Void, "glDeleteRenderbuffersEXT", [(GLsizei, "n"), (Array(Const(renderbuffer), "n"), "renderbuffers")]),
+        F(Void, "glDeleteFramebuffersEXT", [(GLsizei, "n"), (Array(Const(GLframebuffer), "n"), "framebuffers")]),
+        F(Void, "glDeleteRenderbuffersEXT", [(GLsizei, "n"), (Array(Const(GLrenderbuffer), "n"), "renderbuffers")]),
         F(Void, "glFramebufferRenderbufferEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLuint, "renderbuffer")]),
-        F(Void, "glFramebufferTexture1DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (texture, "texture"), (GLint, "level")]),
-        F(Void, "glFramebufferTexture2DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (texture, "texture"), (GLint, "level")]),
-        F(Void, "glFramebufferTexture3DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (texture, "texture"), (GLint, "level"), (GLint, "zoffset")]),
-        F(Void, "glGenFramebuffersEXT", [(GLsizei, "n"), Out(Array(framebuffer, "n"), "framebuffers")]),
-        F(Void, "glGenRenderbuffersEXT", [(GLsizei, "n"), Out(Array(renderbuffer, "n"), "renderbuffers")]),
+        F(Void, "glFramebufferTexture1DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
+        F(Void, "glFramebufferTexture2DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level")]),
+        F(Void, "glFramebufferTexture3DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level"), (GLint, "zoffset")]),
+        F(Void, "glGenFramebuffersEXT", [(GLsizei, "n"), Out(Array(GLframebuffer, "n"), "framebuffers")]),
+        F(Void, "glGenRenderbuffersEXT", [(GLsizei, "n"), Out(Array(GLrenderbuffer, "n"), "renderbuffers")]),
         F(Void, "glGenerateMipmapEXT", [(GLenum, "target")]),
         F(Void, "glGetFramebufferAttachmentParameterivEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
         F(Void, "glGetRenderbufferParameterivEXT", [(GLenum, "target"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False),
-        F(GLboolean, "glIsFramebufferEXT", [(framebuffer, "framebuffer")]),
-        F(GLboolean, "glIsRenderbufferEXT", [(renderbuffer, "renderbuffer")]),
+        F(GLboolean, "glIsFramebufferEXT", [(GLframebuffer, "framebuffer")]),
+        F(GLboolean, "glIsRenderbufferEXT", [(GLrenderbuffer, "renderbuffer")]),
         F(Void, "glRenderbufferStorageEXT", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
         F(Void, "glBlitFramebufferEXT", [(GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield_attrib, "mask"), (GLenum, "filter")]),
-        F(Void, "glFramebufferTextureLayerEXT", [(GLenum, "target"), (GLenum, "attachment"), (texture, "texture"), (GLint, "level"), (GLint, "layer")]),
+        F(Void, "glFramebufferTextureLayerEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLtexture, "texture"), (GLint, "level"), (GLint, "layer")]),
 
         F(Void, "glStencilFuncSeparateATI", [(GLenum, "frontfunc"), (GLenum, "backfunc"), (GLint, "ref"), (GLuint, "mask")]),
         F(Void, "glProgramEnvParameters4fvEXT", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (OpaquePointer(Const(GLfloat)), "params")]),