]> git.cworth.org Git - apitrace/commitdiff
Handle more GL functions correctly.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 22 Nov 2010 18:36:30 +0000 (18:36 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 22 Nov 2010 18:36:30 +0000 (18:36 +0000)
gl.py

diff --git a/gl.py b/gl.py
index 2fa1153fb98ddc5f8f3134e2cdac47351d11a99e..8c12dc55b472e6250837e99312a605638d784a43 100644 (file)
--- a/gl.py
+++ b/gl.py
@@ -2835,7 +2835,7 @@ def basic_functions(Function):
         F(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
         F(Void, "glDisableClientState", [(GLenum, "array")]),
         F(Void, "glDrawArrays", [(GLenum, "mode"), (GLint, "first"), (GLsizei, "count")]),
-        F(Void, "glDrawElements", [(GLenum, "mode"), (GLsizei, "count"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "indices")]),
+        F(Void, "glDrawElements", [(GLenum, "mode"), (GLsizei, "count"), (GLenum, "type"), (Blob(Const(GLvoid), "__gl_calllists_size(count, type)"), "indices")]),
         F(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
         F(Void, "glEnableClientState", [(GLenum, "array")]),
         F(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (OpaquePointer(Const(GLvoid)), "pointer")]),
@@ -2846,7 +2846,7 @@ 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"), (OpaquePointer(Const(GLuint)), "textures"), Out(Pointer(GLboolean), "residences")]),
+        F(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Array(Const(GLuint), "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")]),
@@ -2896,7 +2896,7 @@ def basic_functions(Function):
         F(Void, "glResetHistogram", [(GLenum, "target")]),
         F(Void, "glResetMinmax", [(GLenum, "target")]),
         F(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__gl_image_size(format, type, width, height, depth, border)"), "pixels")]),
-        F(Void, "glTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (OpaquePointer(Const(GLvoid)), "pixels")]),
+        F(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), "__gl_image_size(format, type, width, height, depth, 0)"), "pixels")]),
         F(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
         F(Void, "glActiveTextureARB", [(GLenum, "texture")]),
         F(Void, "glClientActiveTextureARB", [(GLenum, "texture")]),
@@ -2946,7 +2946,7 @@ def extended_functions(Function):
         F(Void, "glDeleteProgram", [(GLuint, "program")]),
         F(Void, "glDeleteShader", [(GLuint, "program")]),
         F(Void, "glDetachShader", [(GLuint, "program"), (GLuint, "shader")]),
-        F(Void, "glGetAttachedShaders", [(GLuint, "program"), (GLsizei, "maxCount"), (OpaquePointer(GLsizei), "count"), (OpaquePointer(GLuint), "obj")], sideeffects=False),
+        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, "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),
@@ -2956,12 +2956,12 @@ def extended_functions(Function):
         F(Void, "glStencilFuncSeparate", [(GLenum, "face"), (GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
         F(Void, "glStencilMaskSeparate", [(GLenum, "face"), (GLuint, "mask")]),
         F(Void, "glStencilOpSeparate", [(GLenum, "face"), (GLenum, "sfail"), (GLenum, "zfail"), (GLenum, "zpass")]),
-        F(Void, "glUniformMatrix2x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
-        F(Void, "glUniformMatrix2x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
-        F(Void, "glUniformMatrix3x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
-        F(Void, "glUniformMatrix3x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
-        F(Void, "glUniformMatrix4x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
-        F(Void, "glUniformMatrix4x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (OpaquePointer(Const(GLfloat)), "value")]),
+        F(Void, "glUniformMatrix2x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "(2*3)"), "value")]),
+        F(Void, "glUniformMatrix2x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "(2*4)"), "value")]),
+        F(Void, "glUniformMatrix3x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "(3*2)"), "value")]),
+        F(Void, "glUniformMatrix3x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "(3*4)"), "value")]),
+        F(Void, "glUniformMatrix4x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "(4*2)"), "value")]),
+        F(Void, "glUniformMatrix4x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "(4*3)"), "value")]),
         F(Void, "glLoadTransposeMatrixdARB", [(OpaquePointer(Const(GLdouble)), "m")]),
         F(Void, "glLoadTransposeMatrixfARB", [(OpaquePointer(Const(GLfloat)), "m")]),
         F(Void, "glMultTransposeMatrixdARB", [(OpaquePointer(Const(GLdouble)), "m")]),
@@ -3032,13 +3032,13 @@ def extended_functions(Function):
         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, "glBufferDataARB", [(GLenum, "target"), (GLsizeiptrARB, "size"), (OpaquePointer(Const(GLvoid)), "data"), (GLenum, "usage")]),
-        F(Void, "glBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), (OpaquePointer(Const(GLvoid)), "data")]),
-        F(Void, "glDeleteBuffersARB", [(GLsizei, "n"), (OpaquePointer(Const(GLuint)), "buffer")]),
-        F(Void, "glGenBuffersARB", [(GLsizei, "n"), (OpaquePointer(GLuint), "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"), (Array(GLuint, "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"), (OpaquePointer(GLvoid), "data")], sideeffects=False),
+        F(Void, "glGetBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), Out(Blob(GLvoid, "size"), "data")], sideeffects=False),
         F(GLboolean, "glIsBufferARB", [(GLuint, "buffer")]),
         F(OpaquePointer(GLvoid), "glMapBufferARB", [(GLenum, "target"), (GLenum, "access")]),
         F(GLboolean, "glUnmapBufferARB", [(GLenum, "target")]),