3 !handcode glXGetProcAddress
4 !handcode glXGetProcAddressARB
5 wl('%s APIENTRY %s(%s)', ret.ctype, func.name, ", ".join([p.ctype+" "+p.name for p in params]))
7 wl(' static %s (*orig)(%s);', ret.ctype, ", ".join([p.ctype for p in params]))
9 wl(' %s ret;', ret.ctype)
11 wl(' orig = glsym("%s");', func.name)
15 wl('orig(%s);', ", ".join([p.name for p in params]))
16 wl(' begin_packet(FUNC_%s);', func.name.upper())
18 wl(' write_%s(ret);', ret.io[0])
21 wl(' write_%s(%s);', p.io[0], p.name)
22 elif p.kind=="array" and p.io and p.io[0]=="string":
23 wl(' write_string_array(%s, %s);', p.name, p.csize)
25 wl(' write_data(%s, %s);', p.name, p.csize)
27 wl(' write_pointer(%s);', p.name)
29 if not func.name.startswith("glX"):