diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-25 16:57:42 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-25 16:57:42 +0200 |
| commit | 343ce367077777dab463816a0d1c5bb9bee9c837 (patch) | |
| tree | cdbe30101390b9989ce456346b013c313cb0b207 | |
| parent | 0d97856bf6974450a8e72816be7bf271af04a458 (diff) | |
a
| -rw-r--r-- | editor/draw.cpp | 6 | ||||
| -rw-r--r-- | 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 <Magnum/GL/DebugOutput.h> @@ -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) |
