X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fgltrace.py;h=853a4bc36ec81d192ab70f28814fa81a28d5d827;hb=ddf6d2c5e347f8ca25dad4d9be4a1494d8929d30;hp=feb96e44276842d515efd79b254946708ad74c6f;hpb=a33d0bb7742807d710005ff8fb257d8d6aa0e8b2;p=apitrace diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py index feb96e4..853a4bc 100644 --- a/wrappers/gltrace.py +++ b/wrappers/gltrace.py @@ -298,12 +298,7 @@ class GlTracer(Tracer): print ' switch (pname) {' for function, type, count, name in glparams.parameters: if type is not None: - print ' case %s: return %u;' % (name, count) - print ' case GL_COMPRESSED_TEXTURE_FORMATS: {' - print ' GLint num_compressed_texture_formats = 0;' - print ' _glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &num_compressed_texture_formats);' - print ' return num_compressed_texture_formats;' - print ' }' + print ' case %s: return %s;' % (name, count) print ' default:' print r' os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);' print ' return 1;' @@ -337,7 +332,7 @@ class GlTracer(Tracer): print ' if (!procPtr) {' print ' return procPtr;' print ' }' - for function in api.functions: + for function in api.getAllFunctions(): ptype = function_pointer_type(function) pvalue = function_pointer_value(function) print ' if (strcmp("%s", (const char *)procName) == 0) {' % function.name @@ -824,25 +819,6 @@ class GlTracer(Tracer): ]) def serializeArgValue(self, function, arg): - if function.name in self.draw_function_names and arg.name == 'indices': - print ' GLint _element_array_buffer = 0;' - print ' _glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &_element_array_buffer);' - print ' if (!_element_array_buffer) {' - if isinstance(arg.type, stdapi.Array): - print ' trace::localWriter.beginArray(%s);' % arg.type.length - print ' for(GLsizei i = 0; i < %s; ++i) {' % arg.type.length - print ' trace::localWriter.beginElement();' - print ' trace::localWriter.writeBlob(%s[i], count[i]*_gl_type_size(type));' % (arg.name) - print ' trace::localWriter.endElement();' - print ' }' - print ' trace::localWriter.endArray();' - else: - print ' trace::localWriter.writeBlob(%s, count*_gl_type_size(type));' % (arg.name) - print ' } else {' - Tracer.serializeArgValue(self, function, arg) - print ' }' - return - # Recognize offsets instead of blobs when a PBO is bound if function.name in self.unpack_function_names \ and (isinstance(arg.type, stdapi.Blob) \