Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2016-08-09 10:29:49 +0300
committerMike Erwin <significant.bit@gmail.com>2016-08-09 10:29:49 +0300
commitf3d65ad23c7b12f608ad8ee8cfe3976b782b0155 (patch)
treeb12d2619b07695bb321d6ea2662a736e6dc11930 /intern/ghost
parentb7f3fb0ef9d9d4885349806421f1145d2c5d7e6b (diff)
OpenGL: debug context on Windows
Enable based on --debug-gpu at the command line. Linux already works this way.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_ContextWGL.h8
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp2
2 files changed, 1 insertions, 9 deletions
diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h
index 580b4dcb82f..99efcc5ebd7 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 1ea6eab06cd..3bf3c9427f9 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())