diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-30 14:49:07 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-30 14:52:25 +0300 |
commit | 85221f6fa738cfdf23695b3927b718bbc348ec09 (patch) | |
tree | 3c0738261d372f3ae3deb80d56e2677065e30a18 /source/blender/windowmanager/intern | |
parent | 005711ffefa82037ecb95008da4bd6786a8ee799 (diff) |
Fix Eevee shadows not working in certain cases, after recent WM changes.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 685e6f7e216..55e7ce4a1d8 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -363,14 +363,14 @@ static void wm_draw_region_bind(ARegion *ar, int view) } else { GPU_offscreen_bind(ar->draw_buffer->offscreen[view], false); + + /* For now scissor is expected by region drawing, we could disable it + * and do the enable/disable in the specific cases that setup scissor. */ + glEnable(GL_SCISSOR_TEST); + glScissor(0, 0, ar->winx, ar->winy); } ar->draw_buffer->bound_view = view; - - /* For now scissor is expected by region drawing, we could disable it - * and do the enable/disable in the specific cases that setup scissor. */ - glEnable(GL_SCISSOR_TEST); - glScissor(0, 0, ar->winx, ar->winy); } static void wm_draw_region_unbind(ARegion *ar, int view) @@ -379,14 +379,13 @@ static void wm_draw_region_unbind(ARegion *ar, int view) return; } - glDisable(GL_SCISSOR_TEST); - ar->draw_buffer->bound_view = -1; if (ar->draw_buffer->viewport[view]) { GPU_viewport_unbind(ar->draw_buffer->viewport[view]); } else { + glDisable(GL_SCISSOR_TEST); GPU_offscreen_unbind(ar->draw_buffer->offscreen[view], false); } } |