From e862d6f0224de67b0a329e16b91841206feb844a Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 7 Sep 2024 18:40:35 +0000 Subject: let the renderer print the profiling results. --- med.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'med.c') diff --git a/med.c b/med.c index 8d01511..ae56169 100644 --- a/med.c +++ b/med.c @@ -506,12 +506,6 @@ renderproc(void *) shootcamera(cam, shader); qunlock(&scenelk); shootcamera(compass.cam, getshader("ident")); - if(doprof) - fprint(2, "R %llud %llud\nE %llud %llud\nT %llud %llud\nr %llud %llud\n\n", - cam->times.R[cam->times.cur-1].t0, cam->times.R[cam->times.cur-1].t1, - cam->times.E[cam->times.cur-1].t0, cam->times.E[cam->times.cur-1].t1, - cam->times.Tn[cam->times.cur-1].t0, cam->times.Tn[cam->times.cur-1].t1, - cam->times.Rn[cam->times.cur-1].t0, cam->times.Rn[cam->times.cur-1].t1); Δt = nsec() - t0; if(Δt > HZ2MS(60)*1000000ULL){ lockdisplay(display); @@ -841,6 +835,8 @@ threadmain(int argc, char *argv[]) if((mctl = initmouse(nil, screen)) == nil) sysfatal("initmouse: %r"); + rctl->doprof = doprof; + screenb = eallocimage(display, rectsubpt(screen->r, screen->r.min), XRGB32, 0, DNofill); cam = Cam(screenb->r, rctl, camcfg.ptype, camcfg.fov, camcfg.clipn, camcfg.clipf); placecamera(cam, scene, camcfg.p, camcfg.lookat, camcfg.up); -- cgit v1.2.3