mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 18:09:46 +00:00
add vertices count to debug panel
This commit is contained in:
parent
e3b475d2bb
commit
d857e7326d
4 changed files with 21 additions and 2 deletions
|
|
@ -78,6 +78,8 @@ std::shared_ptr<UINode> create_debug_panel(
|
|||
static int drawCallsMax = drawCalls;
|
||||
static std::wstring drawCallsAvgString = L"";
|
||||
static std::wstring drawCallsMinMaxString = L"";
|
||||
static int verticesCount = 0;
|
||||
static std::wstring verticesCountString = L"";
|
||||
|
||||
static size_t lastTotalDownload = 0;
|
||||
static size_t lastTotalUpload = 0;
|
||||
|
|
@ -151,6 +153,18 @@ std::shared_ptr<UINode> create_debug_panel(
|
|||
panel->add(create_label(gui, []() {
|
||||
return drawCallsMinMaxString;
|
||||
}));
|
||||
panel->add(create_label(gui, []() {
|
||||
static int frame = 0;
|
||||
verticesCount = std::max<int>(verticesCount, MeshStats::vertices);
|
||||
if (frame % 4 == 0) {
|
||||
verticesCountString =
|
||||
L"vertices: " + std::to_wstring(verticesCount);
|
||||
}
|
||||
frame++;
|
||||
MeshStats::vertices = 0;
|
||||
verticesCount = 0;
|
||||
return verticesCountString;
|
||||
}));
|
||||
panel->add(create_label(gui, []() {
|
||||
return L"speakers: " + std::to_wstring(audio::count_speakers()) +
|
||||
L" streams: " + std::to_wstring(audio::count_streams());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue