Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-02-26 21:49:06 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-02-26 21:49:06 +0300
commitfa7e4cc685d4f2af50a36ce8c5bc61d1dd918bae (patch)
tree9480d9b9df886ee25f0458543bcd436f5fb1605d /source/blender/windowmanager
parent13261304a331b4cff37de477ddf19c915ed64b2c (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.c5
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);