summaryrefslogtreecommitdiffhomepage
path: root/editor/draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/draw.cpp')
-rw-r--r--editor/draw.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index 52b3af2e..f15a93af 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -1,5 +1,6 @@
#include "app.hpp"
#include "floormat/main.hpp"
+#include "floormat/settings.hpp"
#include "shaders/tile.hpp"
#include <Magnum/GL/DebugOutput.h>
@@ -45,7 +46,12 @@ void app::draw_msaa()
void app::draw()
{
+ const bool debug = M->settings().gpu_debug >= fm_gpu_debug::on;
+ if (debug)
+ GL::DebugOutput::setEnabled(GL::DebugOutput::Source::Api, GL::DebugOutput::Type::Other, {131185}, false); // nvidia krap
render_menu();
+ if (debug)
+ GL::DebugOutput::setEnabled(GL::DebugOutput::Source::Api, GL::DebugOutput::Type::Other, {131185}, true); // nvidia krap
}
} // namespace floormat