diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-08-14 22:10:35 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-08-14 22:10:35 +0300 |
commit | a5d72bac8e2309470781d6a77335583bbfa0a903 (patch) | |
tree | 0fadc60bba136934539c08379ce1e2de5d12ac0a /source/blender/render/intern | |
parent | b2966b70fe9f3cf76af52800e88fbb9395b44077 (diff) |
Fix (unreported): misuse of GL Context when creating new window and/or rendering.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 510a4aa4685..9d220e181fa 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1043,12 +1043,14 @@ void RE_gl_context_create(Render *re) void RE_gl_context_destroy(Render *re) { /* Needs to be called from the thread which used the ogl context for rendering. */ - if (re->gpu_context) { - GPU_context_active_set(re->gpu_context); - GPU_context_discard(re->gpu_context); - re->gpu_context = NULL; - } if (re->gl_context) { + if (re->gpu_context) { + WM_opengl_context_activate(re->gl_context); + GPU_context_active_set(re->gpu_context); + GPU_context_discard(re->gpu_context); + re->gpu_context = NULL; + } + WM_opengl_context_dispose(re->gl_context); re->gl_context = NULL; } |