From 00808eb39ac04c484fcabac6b18666cb2a0191e7 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 2 Jul 2015 19:30:08 +0200 Subject: Make OpenGL debug contexts a flag --debug-gpu instead of a compile time option. This makes sense, since contexts get created at runtime, there is little reason to require recompilation for this. Only works on linux currently, will be doing more OSs later --- source/blender/windowmanager/intern/wm_window.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index d11d88db147..5f4869d3386 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -400,6 +400,10 @@ static void wm_window_add_ghostwindow(wmWindowManager *wm, const char *title, wm if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) glSettings.flags |= GHOST_glStereoVisual; + if (G.debug & G_DEBUG_GPU) { + glSettings.flags |= GHOST_glDebugContext; + } + if (!(U.uiflag2 & USER_OPENGL_NO_WARN_SUPPORT)) glSettings.flags |= GHOST_glWarnSupport; -- cgit v1.2.3