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>2020-10-09 18:00:00 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-10-09 18:00:10 +0300
commit2d94b0d6b062ecdaa1fb8553073cc4d80699ea0e (patch)
tree4365e5925fb0d8c9ec7dd5e581645ddd7e7a544c /source/blender/windowmanager
parent16ca29527883d6bc6fcdaacfe063d74dc51d03c2 (diff)
GPU: Add more safeguard for BGL calls
This makes sure no BGL call before window drawing locks the GPUState.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 2853481381d..a805e00e0a2 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -863,6 +863,10 @@ static void wm_draw_window(bContext *C, wmWindow *win)
{
bScreen *screen = WM_window_get_active_screen(win);
bool stereo = WM_stereo3d_enabled(win, false);
+
+ /* Avoid any BGL call issued before this to alter the window drawin. */
+ GPU_bgl_end();
+
/* Draw area regions into their own framebuffer. This way we can redraw
* the areas that need it, and blit the rest from existing framebuffers. */
wm_draw_window_offscreen(C, win, stereo);