~ted/apitrace/ubuntu

« back to all changes in this revision

Viewing changes to gltrace.py

  • Committer: José Fonseca
  • Date: 2011-06-04 12:13:10 UTC
  • Revision ID: git-v1:fd34e4ee3ffdcb4276e89666e62a007131f654ed
Support glMulti*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
511
511
            print '    __glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &__element_array_buffer);'
512
512
            print '    if (!__element_array_buffer) {'
513
513
            if isinstance(arg.type, stdapi.Array):
514
 
                Tracer.dump_arg_instance(self, function, arg)
515
514
                print '        __writer.beginArray(%s);' % arg.type.length
516
515
                print '        for(GLsizei i = 0; i < %s; ++i) {' % arg.type.length
517
516
                print '            __writer.beginElement();'
518
 
                print '            __writer.writeBlob((const void *)%s, count[i]*__gl_type_size(type));' % (arg.name)
 
517
                print '            __writer.writeBlob(%s[i], count[i]*__gl_type_size(type));' % (arg.name)
519
518
                print '            __writer.endElement();'
520
519
                print '        }'
521
520
                print '        __writer.endArray();'
522
521
            else:
523
 
                print '        __writer.writeBlob((const void *)%s, count*__gl_type_size(type));' % (arg.name)
 
522
                print '        __writer.writeBlob(%s, count*__gl_type_size(type));' % (arg.name)
524
523
            print '    } else {'
525
524
            Tracer.dump_arg_instance(self, function, arg)
526
525
            print '    }'