From 70ef42236805f676cc943da5a7982b0f3978c62c Mon Sep 17 00:00:00 2001 From: Deamon87 Date: Sat, 7 Jan 2023 21:54:18 +0200 Subject: [PATCH] Expose "Disable portal culling" in the menu --- src/ui/FrontendUI.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/FrontendUI.cpp b/src/ui/FrontendUI.cpp index ef19c3a4..71d17fdc 100644 --- a/src/ui/FrontendUI.cpp +++ b/src/ui/FrontendUI.cpp @@ -1097,10 +1097,16 @@ void FrontendUI::showSettingsDialog() { m_api->getConfig()->drawM2BB = drawM2BB; } + bool disablePortalCulling = !m_api->getConfig()->usePortalCulling; + if (ImGui::Checkbox("Disable portal culling", &disablePortalCulling)) { + m_api->getConfig()->usePortalCulling = !disablePortalCulling; + } + bool renderPortals = m_api->getConfig()->renderPortals; if (ImGui::Checkbox("Render portals", &renderPortals)) { m_api->getConfig()->renderPortals = renderPortals; } + if (renderPortals) { bool renderPortalsIgnoreDepth = m_api->getConfig()->renderPortalsIgnoreDepth; if (ImGui::Checkbox("Ignore depth test for rendering portals", &renderPortalsIgnoreDepth)) {