diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/tests/shaders_test.cc | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/draw/tests/shaders_test.cc b/source/blender/draw/tests/shaders_test.cc index b2f1020ed98..c991b791686 100644 --- a/source/blender/draw/tests/shaders_test.cc +++ b/source/blender/draw/tests/shaders_test.cc @@ -24,8 +24,9 @@ class DrawTest : public ::testing::Test { void SetUp() override { + GHOST_GLSettings glSettings = {0}; ghost_system = GHOST_CreateSystem(); - ghost_context = GHOST_CreateOpenGLContext(ghost_system); + ghost_context = GHOST_CreateOpenGLContext(ghost_system, glSettings); context = GPU_context_create(0); GPU_init(); DRW_draw_state_init_gtests(GPU_SHADER_CFG_DEFAULT); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 04d5aeb337d..0e19f79e659 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2485,7 +2485,12 @@ void *WM_opengl_context_create(void) */ BLI_assert(BLI_thread_is_main()); BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); - return GHOST_CreateOpenGLContext(g_system); + + GHOST_GLSettings glSettings = {0}; + if (G.debug & G_DEBUG_GPU) { + glSettings.flags |= GHOST_glDebugContext; + } + return GHOST_CreateOpenGLContext(g_system, glSettings); } void WM_opengl_context_dispose(void *context) |