From ab9adf9cdc3b2fd91dcade32ea4b4359f4897392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 30 Mar 2018 19:16:14 +0200 Subject: BLF: Use Batch API instead of IMM. This is not a perfect win just yet. It's now calling glBufferSubData for every call (instead of using glMapBufferRange which is almost faster), but with this system we will be able to batch drawcalls together. See next commit. --- source/blender/windowmanager/intern/wm_window.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 2ed16dd20db..14376b1bbb1 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -519,6 +519,7 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win) } if (tmpwin) { + BLF_batch_reset(); gpu_batch_presets_reset(); immDeactivate(); } @@ -1168,6 +1169,7 @@ void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win) printf("%s: set drawable %d\n", __func__, win->winid); } + BLF_batch_reset(); gpu_batch_presets_reset(); immDeactivate(); GHOST_ActivateWindowDrawingContext(win->ghostwin); @@ -1192,6 +1194,7 @@ void wm_window_reset_drawable(void) wmWindow *win = wm->windrawable; if (win && win->ghostwin) { + BLF_batch_reset(); gpu_batch_presets_reset(); immDeactivate(); GHOST_ActivateWindowDrawingContext(win->ghostwin); -- cgit v1.2.3