From c8547d38a29bb4756e3351bdfa45ea72635286d8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 24 Oct 2022 11:03:25 +0200 Subject: a --- main/debug.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'main/debug.cpp') diff --git a/main/debug.cpp b/main/debug.cpp index efc47a6c..14cdad00 100644 --- a/main/debug.cpp +++ b/main/debug.cpp @@ -58,16 +58,29 @@ void main_impl::_debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Ty static_cast(self)->debug_callback(src, type, id, severity, str); } -void* main_impl::register_debug_callback() noexcept +void main_impl::register_debug_callback() { GL::DebugOutput::setCallback(_debug_callback, this); -#if 1 +#if 0 /* 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 +} - return nullptr; +char main_impl::maybe_register_debug_callback(fm_gpu_debug flag) +{ + using enum fm_gpu_debug; + switch (flag) + { + default: + register_debug_callback(); + break; + case off: + case no_error: + break; + } + return '\0'; } } // namespace floormat -- cgit v1.2.3