]> git.cworth.org Git - apitrace/blobdiff - specs/gltypes.py
Retrace applications with mix ARB and core uniform calls correctly.
[apitrace] / specs / gltypes.py
index e187688a73ae5c6dfad41a25e55b3b4fe95e4a5e..829f0d84661caba35807633ee4fb259661fde6c3 100644 (file)
@@ -64,6 +64,9 @@ GLuint64EXT = Alias("GLuint64EXT", UInt64)
 GLDEBUGPROCARB = Opaque("GLDEBUGPROCARB")
 GLDEBUGPROCAMD = Opaque("GLDEBUGPROCAMD")
 
+GLpointer = OpaquePointer(GLvoid)
+GLpointerConst = OpaquePointer(Const(GLvoid))
+
 GLlist = Handle("list", GLuint)
 GLtexture = Handle("texture", GLuint)
 GLbuffer = Handle("buffer", GLuint)
@@ -71,15 +74,31 @@ GLquery = Handle("query", GLuint)
 GLfenceNV = Handle("fenceNV", GLuint)
 GLprogram = Handle("program", GLuint)
 GLshader = Handle("shader", GLuint)
-GLlocation = Handle("location", GLint, key=('program', GLuint))
-GLlocationARB = Handle("locationARB", GLint, key=('programObj', GLhandleARB))
+
+# Share the same mapping table for uniform locations of both core and
+# GL_ARB_shader_objects programs.  For a combination of reasons:
+#
+# - all OpenGL implementations appear to alias the names for both kind of
+#   programs;
+#
+# - most applications will use only one kind of shader programs;
+#
+# - some applications actually mix glUniformXxx calls with
+#   GL_ARB_shader_objects programs and glUniformXxxARB calls with core
+#   programs, and therefore, rely on a joint implementation.
+#
+# We use GLhandleARB as program key, since it is wider (void *) on MacOSX.
+#
+GLlocation = Handle("location", GLint, key=('program', GLhandleARB))
+GLlocationARB = Handle("location", GLint, key=('programObj', GLhandleARB))
+
 GLprogramARB = Handle("programARB", GLuint)
 GLframebuffer = Handle("framebuffer", GLuint)
 GLrenderbuffer = Handle("renderbuffer", GLuint)
 GLfragmentShaderATI = Handle("fragmentShaderATI", GLuint)
 GLarray = Handle("array", GLuint)
 GLregion = Handle("region", GLuint)
-GLmap = Handle("map", OpaquePointer(GLvoid))
+GLmap = GLpointer
 GLpipeline = Handle("pipeline", GLuint)
 GLsampler = Handle("sampler", GLuint)
 GLfeedback = Handle("feedback", GLuint)