Merge pull request #3958 from FernandoS27/gl-debug

OpenGL: Enable Debug Context and Synchronous debugging when graphics debugging is enabled
This commit is contained in:
bunnei 2020-05-31 17:04:27 -04:00 committed by GitHub
commit edbf3144d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

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