diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-26 21:49:06 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-26 21:49:06 +0300 |
commit | fa7e4cc685d4f2af50a36ce8c5bc61d1dd918bae (patch) | |
tree | 9480d9b9df886ee25f0458543bcd436f5fb1605d /source/blender/windowmanager | |
parent | 13261304a331b4cff37de477ddf19c915ed64b2c (diff) |
WM/GPU: Clear VAO cache of batch preset when switching context.
This is needed for multiple windows to draw the batch presets.
This will not be needed once we use only one context for UI.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 278a70b9c9d..018318556e8 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -79,6 +79,7 @@ #include "PIL_time.h" +#include "GPU_batch.h" #include "GPU_draw.h" #include "GPU_extensions.h" #include "GPU_init_exit.h" @@ -381,6 +382,7 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win) } if (tmpwin) { + gpu_batch_presets_reset(); immDeactivate(); } @@ -501,7 +503,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm #endif GHOST_kDrawingContextTypeOpenGL, glSettings); - + if (ghostwin) { GHOST_RectangleHandle bounds; @@ -1028,6 +1030,7 @@ void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win) printf("%s: set drawable %d\n", __func__, win->winid); } + gpu_batch_presets_reset(); immDeactivate(); GHOST_ActivateWindowDrawingContext(win->ghostwin); GWN_context_active_set(win->gwnctx); |