X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglwrap.funcs.t;h=547d53f1529d91fcaeaf766a45b99a2becfb8ce3;hb=151c65f1157f3b55d0b794db788b557bbc50ed0c;hp=decf22e9bb320196fbcc1ee9bce31dc431137b2d;hpb=49f8063ce156a50d4b3b8c77a1508a21ea2bfe90;p=gldbg.git diff --git a/source/glwrap.funcs.t b/source/glwrap.funcs.t index decf22e..547d53f 100644 --- a/source/glwrap.funcs.t +++ b/source/glwrap.funcs.t @@ -1,4 +1,7 @@ # $Id$ +!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,15 +15,19 @@ 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: wl(' write_pointer(%s);', p.name) wl(' send_packet();') +if not func.name.startswith("glX"): + wl(' check_error();') if ret.ctype!='void': wl(' return ret;') wl('}')