]> git.cworth.org Git - apitrace/commitdiff
Fix array swizzling.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 19 Oct 2012 13:51:48 +0000 (14:51 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 19 Oct 2012 13:51:48 +0000 (14:51 +0100)
specs/glapi.py
specs/gltypes.py
specs/stdapi.py

index c2b13e2e136b12bd907a9ee863780321feb47fe6..3db0739dc3767b5608e350ac00007affcbea6dc9 100644 (file)
@@ -2143,10 +2143,10 @@ glapi.addFunctions([
     GlFunction(Void, "glFinishObjectAPPLE", [(GLenum, "object"), (GLint, "name")]), # XXX: name needs swizzling
 
     # GL_APPLE_vertex_array_object
-    GlFunction(Void, "glBindVertexArrayAPPLE", [(GLarray, "array")]),
-    GlFunction(Void, "glDeleteVertexArraysAPPLE", [(GLsizei, "n"), (Array(Const(GLarray), "n"), "arrays")]),
-    GlFunction(Void, "glGenVertexArraysAPPLE", [(GLsizei, "n"), Out(Array(GLarray, "n"), "arrays")]),
-    GlFunction(GLboolean, "glIsVertexArrayAPPLE", [(GLarray, "array")], sideeffects=False),
+    GlFunction(Void, "glBindVertexArrayAPPLE", [(GLarrayAPPLE, "array")]),
+    GlFunction(Void, "glDeleteVertexArraysAPPLE", [(GLsizei, "n"), (Array(Const(GLarrayAPPLE), "n"), "arrays")]),
+    GlFunction(Void, "glGenVertexArraysAPPLE", [(GLsizei, "n"), Out(Array(GLarrayAPPLE, "n"), "arrays")]),
+    GlFunction(GLboolean, "glIsVertexArrayAPPLE", [(GLarrayAPPLE, "array")], sideeffects=False),
 
     # GL_APPLE_vertex_array_range
     GlFunction(Void, "glVertexArrayRangeAPPLE", [(GLsizei, "length"), (GLpointer, "pointer")]),
index 5256e598d3b3e8d840f50a8d483bf4ee13d143ee..4324ac7e389ad75a6fb9abfadc5127a685a3a10f 100644 (file)
@@ -100,11 +100,14 @@ GLshader = Handle("shader", GLuint)
 GLlocation = Handle("location", GLint, key=('program', GLhandleARB))
 GLlocationARB = Handle("location", GLint, key=('programObj', GLhandleARB))
 
+contextKey = ('reinterpret_cast<uintptr_t>(glretrace::currentContext)', UIntPtr)
+
 GLprogramARB = Handle("programARB", GLuint)
 GLframebuffer = Handle("framebuffer", GLuint)
 GLrenderbuffer = Handle("renderbuffer", GLuint)
 GLfragmentShaderATI = Handle("fragmentShaderATI", GLuint)
-GLarray = Handle("array", GLuint)
+GLarray = Handle("array", GLuint, key=contextKey) # per-context
+GLarrayAPPLE = Handle("arrayAPPLE", GLuint) # shared
 GLregion = Handle("region", GLuint)
 GLpipeline = Handle("pipeline", GLuint)
 GLsampler = Handle("sampler", GLuint)
index cde94cb6fa522a583f0deb31edce660901d6c9cb..8a5a5a7fa5b647f3e45a29fbe3c06db114d87b6c 100644 (file)
@@ -129,6 +129,8 @@ UInt32 = Literal("uint32_t", "UInt")
 Int64 = Literal("int64_t", "SInt")
 UInt64 = Literal("uint64_t", "UInt")
 
+IntPtr = Literal("intptr_t", "SInt")
+UIntPtr = Literal("uintptr_t", "UInt")
 
 class Const(Type):