add particles stats to debug panel

This commit is contained in:
MihailRis
2024-11-02 21:07:34 +03:00
parent 217176f74f
commit cee214754b
4 changed files with 24 additions and 4 deletions
+7
View File
@@ -9,6 +9,7 @@
#include "graphics/ui/elements/TrackBar.hpp"
#include "graphics/ui/elements/InputBindBox.hpp"
#include "graphics/render/WorldRenderer.hpp"
#include "graphics/render/ParticlesRenderer.hpp"
#include "logic/scripting/scripting.hpp"
#include "objects/Player.hpp"
#include "objects/Entities.hpp"
@@ -83,6 +84,12 @@ std::shared_ptr<UINode> create_debug_panel(
bool culling = settings.graphics.frustumCulling.get();
return L"frustum-culling: "+std::wstring(culling ? L"on" : L"off");
}));
panel->add(create_label([=]() {
return L"particles: " +
std::to_wstring(ParticlesRenderer::visibleParticles) +
L" emitters: " +
std::to_wstring(ParticlesRenderer::aliveEmitters);
}));
panel->add(create_label([=]() {
return L"chunks: "+std::to_wstring(level->chunks->getChunksCount())+
L" visible: "+std::to_wstring(level->chunks->visible);