OpenGL: debug context on Windows
authorMike Erwin <significant.bit@gmail.com>
Mon, 15 Aug 2016 08:49:07 +0000 (04:49 -0400)
committerMike Erwin <significant.bit@gmail.com>
Mon, 15 Aug 2016 08:49:07 +0000 (04:49 -0400)
Enable based on --debug-gpu at the command line. Linux already works
this way.

This commit in master (2.78 timeframe) is the smallest change that gets
the desired result. I did a similar commit in blender2.8. Most ongoing
GL debug work will go into 2.8, not 2.7x.

In support of T49089

intern/ghost/intern/GHOST_WindowWin32.cpp

index 6a27d7aadf94f7cdaa48f59e853d814e75c09d97..2aa950f82781e9efa95e3622945d293f10ae2281 100644 (file)
@@ -649,7 +649,7 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty
                        WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
                        3, 2,
 #endif
-                       GHOST_OPENGL_WGL_CONTEXT_FLAGS,
+                       (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0),
                        GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
 #else
 #  error