diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-16 02:53:57 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-16 03:18:29 +0000 |
| commit | 09533ab9379a675a89638132fb6831b420ebb8f4 (patch) | |
| tree | 984985821bcad18e0d8d93831150407e0d5b1a8e /ui/mainApplication.cpp | |
| parent | Tidy thirdparty jam, use -isystem for thirdparty includes (diff) | |
| download | ilt-09533ab9379a675a89638132fb6831b420ebb8f4.tar.bz2 ilt-09533ab9379a675a89638132fb6831b420ebb8f4.tar.xz ilt-09533ab9379a675a89638132fb6831b420ebb8f4.zip | |
Add glDebugScope
Wrapper for glPushDebugGroup/glPopDebugGroup which allows neatly
grouping OpenGL calls in diagnostic tools.
Diffstat (limited to 'ui/mainApplication.cpp')
| -rw-r--r-- | ui/mainApplication.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/mainApplication.cpp b/ui/mainApplication.cpp index 78f4fd4..bb91c21 100644 --- a/ui/mainApplication.cpp +++ b/ui/mainApplication.cpp @@ -2,6 +2,7 @@ #include "backends/imgui_impl_sdl2.h" #include "game/gamestate.h" #include "game/worldobject.h" +#include "gfx/gl/gldebug.h" void MainApplication::mainLoop() @@ -13,10 +14,13 @@ MainApplication::mainLoop() const auto t_passed = std::chrono::duration_cast<TickDuration>(t_end - t_start); if (gameState) { + glDebugScope _ {0, "Tick all game state world objects"}; gameState->world.apply(&WorldObject::tick, t_passed); } windows.apply(&Window::tick, t_passed); - windows.apply(&Window::refresh); + if (glDebugScope _ {0, "Refresh all windows"}) { + windows.apply(&Window::refresh); + } ImGui::UpdatePlatformWindows(); ImGui::RenderPlatformWindowsDefault(); |
