diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-29 09:36:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-29 09:39:11 +0100 |
commit | f70410132b161332e164d013e6a7963c10d823ce (patch) | |
tree | b5dae1b108cefc40755715a413f50473aa814ec4 /src/log.cpp | |
parent | 531c86fea3275214b37f50a2a44f8c0bd258156f (diff) |
{main,src}: only output jank debug info on verbose log
Diffstat (limited to 'src/log.cpp')
-rw-r--r-- | src/log.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/log.cpp b/src/log.cpp new file mode 100644 index 00000000..c0b0ea60 --- /dev/null +++ b/src/log.cpp @@ -0,0 +1,27 @@ +#include "log.hpp" +#include <mg/Context.h> + +namespace floormat { + +bool is_log_quiet() +{ + using GLCCF = GL::Implementation::ContextConfigurationFlag; + auto flags = GL::Context::current().configurationFlags(); + return !!(flags & GLCCF::QuietLog); +} + +bool is_log_verbose() +{ + using GLCCF = GL::Implementation::ContextConfigurationFlag; + auto flags = GL::Context::current().configurationFlags(); + return !!(flags & GLCCF::VerboseLog); +} + +bool is_log_standard() +{ + using GLCCF = GL::Implementation::ContextConfigurationFlag; + auto flags = GL::Context::current().configurationFlags(); + return !(flags & (GLCCF::VerboseLog|GLCCF::QuietLog)); +} + +} // namespace floormat |