From d15bdf098c2c16fb0e517726bf362b912f8a8a22 Mon Sep 17 00:00:00 2001 From: Martin Helmut Fieber Date: Thu, 12 Sep 2024 13:46:04 +0200 Subject: [PATCH 1/2] Upgrade dependencies --- vendor/CMakeLists.txt | 6 +++--- vendor/imgui-setup/CMakeLists.txt | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 5c368aa..58fab49 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -11,19 +11,19 @@ FetchContent_Declare( FetchContent_Declare( fmt GIT_REPOSITORY "https://github.com/fmtlib/fmt.git" - GIT_TAG 11.0.1 + GIT_TAG 11.0.2 ) FetchContent_Declare( imgui GIT_REPOSITORY "https://github.com/ocornut/imgui.git" - GIT_TAG 527b2c45af2f8964f95826bd16ab7c7ed372ae41 # Branch: docking, date: 02.07.2024, 19:05 GMT+2 + GIT_TAG 68aa9a86ec933510073932980a0940742ecc833c # Branch: docking, date: 10.09.2024, 04:29 GMT+2 ) FetchContent_Declare( SDL2 GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git" - GIT_TAG release-2.30.5 + GIT_TAG release-2.30.7 ) FetchContent_Declare( diff --git a/vendor/imgui-setup/CMakeLists.txt b/vendor/imgui-setup/CMakeLists.txt index ef9a2f2..d9889f0 100644 --- a/vendor/imgui-setup/CMakeLists.txt +++ b/vendor/imgui-setup/CMakeLists.txt @@ -1,7 +1,4 @@ -FetchContent_GetProperties(imgui) -if (NOT imgui_POPULATED) - FetchContent_Populate(imgui) -endif () +FetchContent_MakeAvailable(imgui) add_library(imgui ${imgui_SOURCE_DIR}/imgui.cpp ${imgui_SOURCE_DIR}/imgui.h From 386bc0e66f2a309c79014fb3a7de20963e89ffb0 Mon Sep 17 00:00:00 2001 From: Martin Helmut Fieber Date: Thu, 12 Sep 2024 13:46:23 +0200 Subject: [PATCH 2/2] Add extended ImGui debug panels --- src/core/Core/Application.cpp | 7 +++++-- src/core/Core/Window.cpp | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/Core/Application.cpp b/src/core/Core/Application.cpp index 21b7b32..73a3cea 100644 --- a/src/core/Core/Application.cpp +++ b/src/core/Core/Application.cpp @@ -112,7 +112,7 @@ ExitStatus App::Application::run() { if (ImGui::BeginMenu("View")) { ImGui::MenuItem("Some Panel", nullptr, &m_show_some_panel); ImGui::MenuItem("ImGui Demo Panel", nullptr, &m_show_demo_panel); - ImGui::MenuItem("Debug Panel", nullptr, &m_show_debug_panel); + ImGui::MenuItem("Debug Panels", nullptr, &m_show_debug_panel); ImGui::EndMenu(); } @@ -133,7 +133,10 @@ ExitStatus App::Application::run() { // Debug panel if (m_show_debug_panel) { - ImGui::Begin("Debug panel", &m_show_debug_panel); + ImGui::ShowMetricsWindow(); + ImGui::ShowDebugLogWindow(); + + ImGui::Begin("App debug panel", &m_show_debug_panel); ImGui::Text("User config path: %s", user_config_path.c_str()); ImGui::Separator(); ImGui::Text("Font path: %s", font_path.c_str()); diff --git a/src/core/Core/Window.cpp b/src/core/Core/Window.cpp index 0728d51..6965079 100644 --- a/src/core/Core/Window.cpp +++ b/src/core/Core/Window.cpp @@ -22,8 +22,7 @@ Window::Window(const Settings& settings) { size.height, window_flags); - auto renderer_flags{ - static_cast(SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED)}; + Uint32 renderer_flags{SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED}; m_renderer = SDL_CreateRenderer(m_window, -1, renderer_flags); if (m_renderer == nullptr) {