summaryrefslogtreecommitdiffhomepage
path: root/src/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.cpp')
-rw-r--r--src/log.cpp27
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