From 8d8f7e52c1dbf7e7c56eb212ff9e934131fdaf83 Mon Sep 17 00:00:00 2001 From: Germano Date: Wed, 7 Mar 2018 20:05:51 -0300 Subject: Make sure that the WM_opengl_context_create is always called on the main thread Avoid the error 170 ("The requested resource is in use"). --- source/blender/windowmanager/intern/wm_window.c | 5 +++++ 1 file changed, 5 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 7fef86c006e..ecd91ff2d1a 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2075,6 +2075,11 @@ void wm_window_IME_end(wmWindow *win) void *WM_opengl_context_create(void) { + /* On Windows there is a problem creating contexts that share lists + * from one context that is current in another thread. + * So we should call this function only on the main thread. + */ + BLI_assert(BLI_thread_is_main()); return GHOST_CreateOpenGLContext(g_system); } -- cgit v1.2.3