From 343ce367077777dab463816a0d1c5bb9bee9c837 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 25 Oct 2022 16:57:42 +0200 Subject: a --- editor/draw.cpp | 6 ++++++ main/debug.cpp | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/editor/draw.cpp b/editor/draw.cpp index 52b3af2e..f15a93af 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -1,5 +1,6 @@ #include "app.hpp" #include "floormat/main.hpp" +#include "floormat/settings.hpp" #include "shaders/tile.hpp" #include @@ -45,7 +46,12 @@ void app::draw_msaa() void app::draw() { + const bool debug = M->settings().gpu_debug >= fm_gpu_debug::on; + if (debug) + GL::DebugOutput::setEnabled(GL::DebugOutput::Source::Api, GL::DebugOutput::Type::Other, {131185}, false); // nvidia krap render_menu(); + if (debug) + GL::DebugOutput::setEnabled(GL::DebugOutput::Source::Api, GL::DebugOutput::Type::Other, {131185}, true); // nvidia krap } } // namespace floormat diff --git a/main/debug.cpp b/main/debug.cpp index a8483cd0..70752832 100644 --- a/main/debug.cpp +++ b/main/debug.cpp @@ -60,11 +60,6 @@ static void _debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Type t void main_impl::register_debug_callback() { GL::DebugOutput::setCallback(_debug_callback, this); - -#if 1 - /* Disable rather spammy "Buffer detailed info" debug messages on NVidia drivers */ - GL::DebugOutput::setEnabled(GL::DebugOutput::Source::Api, GL::DebugOutput::Type::Other, {131185}, false); -#endif } char main_impl::maybe_register_debug_callback(fm_gpu_debug flag) -- cgit v1.2.3