summaryrefslogtreecommitdiff
path: root/src/render.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 14:52:57 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 14:55:33 +0100
commit87559f480badc2be26279bd1822980e7ce5dbba5 (patch)
tree7a2efd491089f4cc8683dd2c3f4648f1ff03b2ac /src/render.cpp
parent8e81450c561b626b919ecce37b61491cbcc8c103 (diff)
Show some performance stats.
Diffstat (limited to 'src/render.cpp')
-rw-r--r--src/render.cpp10
1 files changed, 10 insertions, 0 deletions
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++;
}
}