1 w('static void print_%s(void *user_data', func.name)
3 w(', %s ret', ret.ctype)
5 w(', %s %s', p.ctype, p.name)
8 wl(' GlPrintData *gpd = (GlPrintData *)user_data;')
9 w(' snprintf(gpd->buffer, gpd->bufsize, "%s(', func.name)
18 if pname and p.name=="param" and p.base_ctype=="GLint":
20 elif p.type=="TextureComponentCount":
24 elif p.kind=="reference" and not p.io:
25 w('<ref:%s %%p>', p.type)
33 for p in params+[ret]:
36 if pname and p.name=="param" and p.base_ctype=="GLint":
37 w(', print_parameter(%s, %s)', pname.name, p.name)
38 elif p.type=="TextureComponentCount":
39 w(', print_internal_format(%s)', p.name)
40 elif len(p.io)>=3 and p.io[2]:
42 w(', %s%s', p.io[2], p.name)
44 w(', %s(%s, "%s")', p.io[2], p.name, p.type)
47 elif p.kind=="reference" and not p.io:
50 w(', print_data(%s, 0)', p.name)
51 elif p.base_ctype=="GLvoid" or p.base_ctype=="void":
52 w(', print_data(%s, %s)', p.name, p.csize)
53 elif len(p.io)>=3 and p.io[2]:
54 w(', print_array_described(%s, "%s", %s, sizeof(%s), %s)', p.io[2], p.type, p.name, p.base_ctype, p.csize)
56 w(', print_array("%s", %s, sizeof(%s), %s)', p.io[1], p.name, p.base_ctype, p.csize)
59 :static void init_print(GlDecoder *dec)
61 wl(' dec->%s = print_%s;', func.name, func.name)