]> git.tdb.fi Git - gldbg.git/blobdiff - source/glwrap.funcs.t
Don't call glGetError between glBegin and glEnd
[gldbg.git] / source / glwrap.funcs.t
index a58a1c5288f96a01018c282280e02d052d6eab9f..eb77b0a7a3e0e5ce15e19101bffcb18ad73e8928 100644 (file)
@@ -1,4 +1,9 @@
 # $Id$
+!handcode glBegin
+!handcode glEnd
+!handcode glGetError
+!handcode glXGetProcAddress
+!handcode glXGetProcAddressARB
 wl('%s APIENTRY %s(%s)', ret.ctype, func.name, ", ".join([p.ctype+" "+p.name for p in params]))
 wl('{')
 wl('   static %s (*orig)(%s);', ret.ctype, ", ".join([p.ctype for p in params]))
@@ -12,10 +17,12 @@ if ret.ctype!='void':
 wl('orig(%s);', ", ".join([p.name for p in params]))
 wl('   begin_packet(FUNC_%s);', func.name.upper())
 if ret.ctype!='void':
-       wl('    write_%s(ret);', ret.io[0])
+       wl('    write_%s(ret);', ret.io[0].replace(' ', '_'))
 for p in params:
        if p.kind=="value":
-               wl('    write_%s(%s);', p.io[0], p.name)
+               wl('    write_%s(%s);', p.io[0].replace(' ', '_'), p.name)
+       elif p.kind=="array" and p.io and p.io[0]=="string":
+               wl('  write_string_array(%s, %s);', p.name, p.csize)
        elif p.csize:
                wl('    write_data(%s, %s);', p.name, p.csize)
        else: