From 87559f480badc2be26279bd1822980e7ce5dbba5 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 16 Dec 2017 14:52:57 +0100 Subject: Show some performance stats. --- src/render.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/render.cpp') diff --git a/src/render.cpp b/src/render.cpp index 792d70d..f773f92 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -27,6 +27,10 @@ void state_t::begin_frame(double now_, double dt_) now = now_; dt = dt_; window->clear(); + + stats.sectors = 0; + stats.tiles = 0; + stats.entities = 0; } void state_t::end_frame(void) @@ -101,7 +105,11 @@ void state_t::render_sector(world::sector_t *sector) text.setScale(0.005, 0.005); window->draw(text); } + + stats.tiles++; } + + stats.sectors++; } void state_t::render(game::state_t *game) @@ -141,6 +149,8 @@ void state_t::render(game::state_t *game) if (debug_draw_cmodels) drender_entity(ent); + + stats.entities++; } } -- cgit