]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.c
added entity caching stats in graph
[xonotic/darkplaces.git] / cl_screen.c
index cfa8f8f51e2533856d524042e0cfbaa58f37f788..126f8284ce06aab2288b9abfbf81c89d98bb1ae1 100644 (file)
@@ -878,6 +878,26 @@ const char *r_stat_name[r_stat_count] =
        "dynamic_surfaces_because_derived",
        "dynamic_vertices_because_derived",
        "dynamic_triangles_because_derived",
+       "entitycache_count",
+       "entitycache_surfaces",
+       "entitycache_vertices",
+       "entitycache_triangles",
+       "entityanimate_count",
+       "entityanimate_surfaces",
+       "entityanimate_vertices",
+       "entityanimate_triangles",
+       "entityskeletal_count",
+       "entityskeletal_surfaces",
+       "entityskeletal_vertices",
+       "entityskeletal_triangles",
+       "entitystatic_count",
+       "entitystatic_surfaces",
+       "entitystatic_vertices",
+       "entitystatic_triangles",
+       "entitycustom_count",
+       "entitycustom_surfaces",
+       "entitycustom_vertices",
+       "entitycustom_triangles",
 };
 
 char r_speeds_timestring[4096];
@@ -1090,7 +1110,6 @@ static void R_TimeReport_EndFrame(void)
                int color, stat, stats, index, range_min, range_max;
                int graph_current, graph_length, *graph_data;
                int statindex[R_SPEEDS_GRAPH_COLORS];
-               int frameslastsecond;
                int sum;
 
                // add current stats to the graph_data
@@ -1122,21 +1141,6 @@ static void R_TimeReport_EndFrame(void)
                x = bound(0, r_speeds_graph_x.value, vid_conwidth.value - width);
                y = bound(0, r_speeds_graph_y.value, vid_conheight.value - height);
 
-               // count how many frames were in the last second
-               data = graph_data + r_stat_timedelta * graph_length;
-               index = graph_current;
-               sum = 0;
-               for (i = 0;i < graph_length;i++)
-               {
-                       sum += data[index];
-                       if (sum >= 1000000)
-                               break;
-                       index--;
-                       if (index < 0)
-                               index = graph_length - 1;
-               }
-               frameslastsecond = i;
-
                // fill background with a pattern of gray and black at one second intervals
                scalex = (float)width / (float)r_speeds_graph_seconds.value;
                for (i = 0;i < r_speeds_graph_seconds.integer + 1;i++)
@@ -1173,8 +1177,6 @@ static void R_TimeReport_EndFrame(void)
                        // count how many stats we need to graph in vertex buffer
                        stats++;
                }
-               dpsnprintf(legend, sizeof(legend), "%10i  frames last second", frameslastsecond);
-               DrawQ_String(x, y + stats * 8, legend, 0, 8, 8, 0.5f, 0.5f, 0.5f, 0.5f, 0, NULL, true, FONT_DEFAULT);
 
                if (stats)
                {