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