diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-13 07:37:47 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-13 07:38:29 +0300 |
commit | 6f220c1c55fd2cd4692ff017ccb2b0e6b28c6d3f (patch) | |
tree | 0c026b27f22572807487c7d45d442593431451e7 /source/blender/windowmanager | |
parent | 71656ac222a7381e460cb799edc4284a8a254057 (diff) |
inform immediate mode when switching OpenGL context
Longstanding to-do is now to-done.
Heinous bug reported by @dfelinto pushed me to fix this.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 2d43c47679d..718a9afea1f 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -76,7 +76,7 @@ #include "GPU_draw.h" #include "GPU_extensions.h" #include "GPU_init_exit.h" -#include "GPU_glew.h" +#include "GPU_immediate.h" /* for assert */ #ifndef NDEBUG @@ -827,13 +827,16 @@ void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win) { if (win != wm->windrawable && win->ghostwin) { // win->lmbut = 0; /* keeps hanging when mousepressed while other window opened */ - + wm->windrawable = win; if (G.debug & G_DEBUG_EVENTS) { printf("%s: set drawable %d\n", __func__, win->winid); } + + immDeactivate(); GHOST_ActivateWindowDrawingContext(win->ghostwin); - + immActivate(); + /* this can change per window */ U.pixelsize = wm_window_pixelsize(win); BKE_blender_userdef_refresh(); |