diff options
author | Germano <germano.costa@ig.com.br> | 2018-03-08 02:05:51 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-03-08 02:05:51 +0300 |
commit | 8d8f7e52c1dbf7e7c56eb212ff9e934131fdaf83 (patch) | |
tree | a57eccfe25a507e89c78c6af9489945ee17208a0 /source/blender/windowmanager | |
parent | fef1b0155309ea50674ef6726061e42547b6a608 (diff) |
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").
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |