summaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-09-07 18:40:35 +0000
committerrodri <rgl@antares-labs.eu>2024-09-07 18:40:35 +0000
commite862d6f0224de67b0a329e16b91841206feb844a (patch)
treea712a7447153a234daae207f26db21ef4f979477 /vis.c
parenta3add1cdcbd30704a34d2876f556d0bff8694402 (diff)
download3dee-e862d6f0224de67b0a329e16b91841206feb844a.tar.gz
3dee-e862d6f0224de67b0a329e16b91841206feb844a.tar.bz2
3dee-e862d6f0224de67b0a329e16b91841206feb844a.zip
let the renderer print the profiling results.
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/vis.c b/vis.c
index 589ce9b..32cedd1 100644
--- a/vis.c
+++ b/vis.c
@@ -602,12 +602,6 @@ renderproc(void *)
t0 = nsec();
for(;;){
shootcamera(maincam, shader);
- if(doprof)
- fprint(2, "R %llud %llud\nE %llud %llud\nT %llud %llud\nr %llud %llud\n\n",
- maincam->times.R[maincam->times.last].t0, maincam->times.R[maincam->times.last].t1,
- maincam->times.E[maincam->times.last].t0, maincam->times.E[maincam->times.last].t1,
- maincam->times.Tn[maincam->times.last].t0, maincam->times.Tn[maincam->times.last].t1,
- maincam->times.Rn[maincam->times.last].t0, maincam->times.Rn[maincam->times.last].t1);
Δt = nsec() - t0;
if(Δt > HZ2MS(60)*1000000ULL){
lockdisplay(display);
@@ -1112,6 +1106,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, 0x888888FF);
fprint(2, "screen %R\n", screenb->r);
for(i = 0; i < nelem(cams); i++){