]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
r_speeds now shows number of lightmap updates (and pixels) each frame
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Dec 2007 09:59:49 +0000 (09:59 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Dec 2007 09:59:49 +0000 (09:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7745 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
client.h
gl_rsurf.c

index 454e3e1f6f6c657f3b43e381b839ac0db5503a02..71f198fc7304755896555622868c4cf035740e69 100644 (file)
@@ -709,7 +709,8 @@ void R_TimeReport_Frame(void)
                        sprintf(r_speeds_string + strlen(r_speeds_string), "Location: %s\n", loc->name);
                sprintf(r_speeds_string + strlen(r_speeds_string), "org:'%+8.2f %+8.2f %+8.2f' dir:'%+2.3f %+2.3f %+2.3f'\n", r_view.origin[0], r_view.origin[1], r_view.origin[2], r_view.forward[0], r_view.forward[1], r_view.forward[2]);
                sprintf(r_speeds_string + strlen(r_speeds_string), "%7i surfaces%7i triangles %5i entities (%7i surfaces%7i triangles)\n", r_refdef.stats.world_surfaces, r_refdef.stats.world_triangles, r_refdef.stats.entities, r_refdef.stats.entities_surfaces, r_refdef.stats.entities_triangles);
-               sprintf(r_speeds_string + strlen(r_speeds_string), "%5ileafs%5i portals%6i particles%6i decals\n", r_refdef.stats.world_leafs, r_refdef.stats.world_portals, r_refdef.stats.particles, r_refdef.stats.decals);
+               sprintf(r_speeds_string + strlen(r_speeds_string), "%5i leafs%5i portals%6i particles%6i decals\n", r_refdef.stats.world_leafs, r_refdef.stats.world_portals, r_refdef.stats.particles, r_refdef.stats.decals);
+               sprintf(r_speeds_string + strlen(r_speeds_string), "%7i lightmap updates (%7i pixels)\n", r_refdef.stats.lightmapupdates, r_refdef.stats.lightmapupdatepixels);
                sprintf(r_speeds_string + strlen(r_speeds_string), "%4i lights%4i clears%4i scissored%7i light%7i shadow%7i dynamic\n", r_refdef.stats.lights, r_refdef.stats.lights_clears, r_refdef.stats.lights_scissored, r_refdef.stats.lights_lighttriangles, r_refdef.stats.lights_shadowtriangles, r_refdef.stats.lights_dynamicshadowtriangles);
                if (r_refdef.stats.bloom)
                        sprintf(r_speeds_string + strlen(r_speeds_string), "rendered%6i meshes%8i triangles bloompixels%8i copied%8i drawn\n", r_refdef.stats.meshes, r_refdef.stats.meshes_elements / 3, r_refdef.stats.bloom_copypixels, r_refdef.stats.bloom_drawpixels);
index 5ffc87a9d90afbe5676f699915ce29829a7a351b..8fe6d94ade944eff4216b98aa9a3f0b988d8986b 100644 (file)
--- a/client.h
+++ b/client.h
@@ -1328,6 +1328,8 @@ typedef struct r_refdef_stats_s
        int world_portals;
        int world_surfaces;
        int world_triangles;
+       int lightmapupdates;
+       int lightmapupdatepixels;
        int particles;
        int decals;
        int meshes;
index 6e642ce0fa09cdbe574e94888e86a849ebb075ff..b333d16f4a70361b9ad3cf7dd063df6f92a2f676 100644 (file)
@@ -52,6 +52,9 @@ void R_BuildLightMap (const entity_render_t *ent, msurface_t *surface)
        size = smax*tmax;
        size3 = size*3;
 
+       r_refdef.stats.lightmapupdatepixels += size;
+       r_refdef.stats.lightmapupdates++;
+
        if (cl.buildlightmapmemorysize < size*sizeof(int[3]))
        {
                cl.buildlightmapmemorysize = size*sizeof(int[3]);