diff options
Diffstat (limited to 'main/debug.cpp')
| -rw-r--r-- | main/debug.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
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<const main_impl*>(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 |
