diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-30 20:16:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-30 21:09:26 +0300 |
commit | ab9adf9cdc3b2fd91dcade32ea4b4359f4897392 (patch) | |
tree | 1f9e12d6a24fa1f74cfc4ab595ac1680d0202433 /source/blender/windowmanager | |
parent | 8568d38f1b0858a3138b72698babd6ba7b65d6b3 (diff) |
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.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |