From bf371437b35c612be8e50b11a2e0c4ffce97f5a4 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 6 Jan 2014 19:02:19 -0700 Subject: [PATCH] Fixed debug extension check - Check the actual debug extension instead of checking GL 4.0 support; it appears that despite having GL 4.0 support, AMD does not implement the standard debug extensions even when the *_CONTEXT_DEBUG_BIT_ARB flag is set on the context. - Also, fixed a place where spaces where used for indents instead of a tab. --- libobs-opengl/gl-subsystem.c | 4 +--- libobs-opengl/gl-windows.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libobs-opengl/gl-subsystem.c b/libobs-opengl/gl-subsystem.c index 465e2d485..05afb7f74 100644 --- a/libobs-opengl/gl-subsystem.c +++ b/libobs-opengl/gl-subsystem.c @@ -73,10 +73,8 @@ static void gl_enable_debug() { /* Perhaps we should create GLEW contexts? */ - if (GLEW_VERSION_4_0) + if (GLEW_ARB_debug_output) glDebugMessageCallback(gl_debug_proc, NULL); - else if (GLEW_ARB_debug_output) - glDebugMessageCallbackARB(gl_debug_proc, NULL); else { blog(LOG_DEBUG, "Failed to set GL debug callback as it is " "not supported."); diff --git a/libobs-opengl/gl-windows.c b/libobs-opengl/gl-windows.c index bd2e285f3..cf04c62c1 100644 --- a/libobs-opengl/gl-windows.c +++ b/libobs-opengl/gl-windows.c @@ -156,7 +156,7 @@ static inline HGLRC gl_init_basic_context(HDC hdc) static const int attribs[] = { #ifdef _DEBUG - WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB, + WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB, #endif WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB, 0, 0