diff --git a/plugins/GSdx/GSWnd.cpp b/plugins/GSdx/GSWnd.cpp index ff34804258..5fbbc4f970 100644 --- a/plugins/GSdx/GSWnd.cpp +++ b/plugins/GSdx/GSWnd.cpp @@ -107,9 +107,14 @@ void GSWndGL::PopulateGlFunction() // GL4.3 *(void**)&(gl_CopyImageSubData) = GetProcAddress("glCopyImageSubData", true); *(void**)&(gl_InvalidateTexImage) = GetProcAddress("glInvalidateTexImage", true); - *(void**)&(gl_PushDebugGroup) = GetProcAddress("glPushDebugGroup", true); - *(void**)&(gl_PopDebugGroup) = GetProcAddress("glPopDebugGroup", true); - *(void**)&(gl_DebugMessageInsert) = GetProcAddress("glDebugMessageInsert", true); +#if defined(__linux__) && defined(ENABLE_OGL_DEBUG) + bool debug_optional = false; +#else + bool debug_optional = true; +#endif + *(void**)&(gl_PushDebugGroup) = GetProcAddress("glPushDebugGroup", debug_optional); + *(void**)&(gl_PopDebugGroup) = GetProcAddress("glPopDebugGroup", debug_optional); + *(void**)&(gl_DebugMessageInsert) = GetProcAddress("glDebugMessageInsert", debug_optional); // GL4.4 *(void**)&(gl_BufferStorage) = GetProcAddress("glBufferStorage", true); // GL_ARB_bindless_texture (GL5?) diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index ea2e0cec3d..d2da3ff693 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -494,7 +494,7 @@ extern void vmfree(void* ptr, size_t size); #endif // Except apple any sane driver support this extension -#ifdef ENABLE_OGL_DEBUG +#if defined(__linux__) && defined(ENABLE_OGL_DEBUG) #define GL_PUSH(s) gl_PushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, s); #define GL_POP(s) gl_PopDebugGroup(); #define GL_INS(s) gl_DebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0xDEAD, GL_DEBUG_SEVERITY_MEDIUM, -1, s);