[Bf-blender-cvs] [f3d65ad] blender2.8: OpenGL: debug context on Windows

Mike Erwin noreply at git.blender.org
Tue Aug 9 09:30:03 CEST 2016


Commit: f3d65ad23c7b12f608ad8ee8cfe3976b782b0155
Author: Mike Erwin
Date:   Tue Aug 9 03:29:49 2016 -0400
Branches: blender2.8
https://developer.blender.org/rBf3d65ad23c7b12f608ad8ee8cfe3976b782b0155

OpenGL: debug context on Windows

Enable based on --debug-gpu at the command line. Linux already works
this way.

===================================================================

M	intern/ghost/intern/GHOST_ContextWGL.h
M	intern/ghost/intern/GHOST_WindowWin32.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h
index 580b4dc..99efcc5 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.h
+++ b/intern/ghost/intern/GHOST_ContextWGL.h
@@ -46,14 +46,6 @@
 extern "C" WGLEWContext *wglewContext;
 #endif
 
-#ifndef GHOST_OPENGL_WGL_CONTEXT_FLAGS
-#  ifdef WITH_GPU_DEBUG
-#    define GHOST_OPENGL_WGL_CONTEXT_FLAGS WGL_CONTEXT_DEBUG_BIT_ARB
-#  else
-#    define GHOST_OPENGL_WGL_CONTEXT_FLAGS 0
-#  endif
-#endif
-
 #ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
 #define GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY 0
 #endif
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 1ea6eab..3bf3c94 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -628,7 +628,7 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty
 		        m_hDC,
 		        profile_mask,
 		        3, 2, // GL version requested
-		        GHOST_OPENGL_WGL_CONTEXT_FLAGS,
+		        (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0),
 		        GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
 
 		if (context->initializeDrawingContext())




More information about the Bf-blender-cvs mailing list