X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglprint.funcs.t;h=b2fa11977580eefe8b7616e73ba7aaeac4e7f744;hb=e635951b05e1b0b0e5c972fcbaba691b86753d67;hp=5f703e1be510ff81272d0765d53530308930923c;hpb=6a5b15f6382ca79e2b5f724585d29b73a40e8194;p=gldbg.git diff --git a/source/glprint.funcs.t b/source/glprint.funcs.t index 5f703e1..b2fa119 100644 --- a/source/glprint.funcs.t +++ b/source/glprint.funcs.t @@ -9,11 +9,19 @@ wl('{') wl(' GlPrintData *gpd = (GlPrintData *)user_data;') w(' snprintf(gpd->buffer, gpd->bufsize, "%s(', func.name) first = True +pname = None for p in params: if not first: w(', ') + if p.name=="pname": + pname = p if p.kind=="value": - w('%s', p.io[1]) + if pname and p.name=="param" and p.base_ctype=="GLint": + w('%%s') + elif p.type=="TextureComponentCount": + w('%%s') + else: + w('%s', p.io[1]) elif p.kind=="reference" and not p.io: w('', p.type) else: @@ -26,7 +34,11 @@ w('"') for p in params+[ret]: if p.ctype!="void": if p.kind=="value": - if len(p.io)>=3 and p.io[2]: + if pname and p.name=="param" and p.base_ctype=="GLint": + w(', print_parameter(%s, %s)', pname.name, p.name) + elif p.type=="TextureComponentCount": + w(', print_internal_format(%s)', p.name) + elif len(p.io)>=3 and p.io[2]: w(', %s(%s, "%s")', p.io[2], p.name, p.type) else: w(', %s', p.name)