From 9fa473a57de5592ed39f74a1ee2f39587522132e Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 31 May 2015 17:55:34 +0200 Subject: [PATCH] gsdx-ogl: glDebugMessageCallback is optional Not even used in release build --- plugins/GSdx/GSDeviceOGL.cpp | 2 +- plugins/GSdx/GSWnd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 207b33e435..91fa170c69 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -197,7 +197,7 @@ bool GSDeviceOGL::Create(GSWnd* wnd) // Debug helper // **************************************************************** #ifdef ENABLE_OGL_DEBUG - if (theApp.GetConfig("debug_opengl", 0)) { + if (theApp.GetConfig("debug_opengl", 0) && gl_DebugMessageCallback) { gl_DebugMessageCallback((GLDEBUGPROC)DebugOutputToFile, NULL); glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); } diff --git a/plugins/GSdx/GSWnd.cpp b/plugins/GSdx/GSWnd.cpp index 5223fd3e27..f4f58f2d8e 100644 --- a/plugins/GSdx/GSWnd.cpp +++ b/plugins/GSdx/GSWnd.cpp @@ -58,7 +58,7 @@ void GSWndGL::PopulateGlFunction() *(void**)&(gl_GenVertexArrays) = GetProcAddress("glGenVertexArrays"); *(void**)&(gl_GetBufferParameteriv) = GetProcAddress("glGetBufferParameteriv"); *(void**)&(gl_GetDebugMessageLogARB) = GetProcAddress("glGetDebugMessageLogARB"); - *(void**)&(gl_DebugMessageCallback) = GetProcAddress("glDebugMessageCallback"); + *(void**)&(gl_DebugMessageCallback) = GetProcAddress("glDebugMessageCallback", true); *(void**)&(gl_GetProgramInfoLog) = GetProcAddress("glGetProgramInfoLog"); *(void**)&(gl_GetProgramiv) = GetProcAddress("glGetProgramiv"); *(void**)&(gl_GetShaderiv) = GetProcAddress("glGetShaderiv");