summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-13 22:41:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-13 22:41:02 +0200
commite251232d0cb603a2c3fcfbe30e0a2d96f9348f66 (patch)
tree94c8721ddef5752c45de15dae5f8f5420b1b3f6e
parent4c24cdc2724801b7f98bce219085806577174e12 (diff)
fix debug display and breakpoint
-rw-r--r--main/debug.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/main/debug.cpp b/main/debug.cpp
index 12aaaf9f..d0f16fb2 100644
--- a/main/debug.cpp
+++ b/main/debug.cpp
@@ -15,13 +15,13 @@ void main_impl::debug_callback(unsigned src, unsigned type, unsigned id, unsigne
static const auto t0 = clock.now();
#if 1
- [[maybe_unused]] volatile auto _type = type;
- [[maybe_unused]] volatile auto _id = id;
- [[maybe_unused]] volatile auto _src = src;
- [[maybe_unused]] volatile auto _severity = severity;
+ [[maybe_unused]] volatile const auto _type = type;
+ [[maybe_unused]] volatile const auto _id = id;
+ [[maybe_unused]] volatile const auto _src = src;
+ [[maybe_unused]] volatile const auto _severity = severity;
[[maybe_unused]] volatile const char* _str = str.data();
+ (void)_type; (void)_id; (void)_src; (void)_severity; (void)_str;
#endif
- (void)src; (void)type;
if (auto pfx = "Buffer detailed info: "_s; str.hasPrefix(pfx))
str = str.exceptPrefix(pfx.size());
@@ -46,13 +46,16 @@ void main_impl::debug_callback(unsigned src, unsigned type, unsigned id, unsigne
std::fflush(stdout);
std::fputs("", stdout); // put breakpoint here
-#if 0
- if (severity != Severity::Notification)
- std::abort();
-#endif
-
- //debug_break();
- gl_debug_put_breakpoint_here();
+ switch (Severity{severity})
+ {
+ default:
+ break;
+ case Severity::High:
+ //std::abort();
+ //debug_break();
+ gl_debug_put_breakpoint_here();
+ break;
+ }
}
static void _debug_callback(GL::DebugOutput::Source src, GL::DebugOutput::Type type, UnsignedInt id,