Merge pull request #4052 from ReinUsesLisp/debug-output

renderer_opengl: Only enable DEBUG_OUTPUT when graphics debugging is enabled
This commit is contained in:
bunnei 2020-06-08 10:16:41 -04:00 committed by GitHub
commit 98d2461529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -751,11 +751,9 @@ void RendererOpenGL::RenderScreenshot() {
} }
bool RendererOpenGL::Init() { bool RendererOpenGL::Init() {
if (GLAD_GL_KHR_debug) { if (Settings::values.renderer_debug && GLAD_GL_KHR_debug) {
glEnable(GL_DEBUG_OUTPUT); glEnable(GL_DEBUG_OUTPUT);
if (Settings::values.renderer_debug) { glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
glDebugMessageCallback(DebugHandler, nullptr); glDebugMessageCallback(DebugHandler, nullptr);
} }