diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-15 18:16:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-15 18:16:21 +0300 |
commit | 38e08ec66bb4d05d530cc57f1a9a7c79470000b0 (patch) | |
tree | 607a4673a204f33abb35b4eb372361d85f594d70 /source/blender/windowmanager/intern/wm_draw.c | |
parent | 9bac3ffd3f691a9bb1280694668e643c6ed3bb18 (diff) |
Fix T56012: brush stencil overlay draws in the wrong location.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 160aeb6671b..c869ec90469 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -96,8 +96,7 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar) for (pc = wm->paintcursors.first; pc; pc = pc->next) { if (pc->poll == NULL || pc->poll(C)) { /* Prevent drawing outside region. */ - GLint scissor[4]; - glGetIntegerv(GL_SCISSOR_BOX, scissor); + glEnable(GL_SCISSOR_TEST); glScissor(ar->winrct.xmin, ar->winrct.ymin, BLI_rcti_size_x(&ar->winrct) + 1, @@ -112,7 +111,7 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar) pc->draw(C, win->eventstate->x, win->eventstate->y, pc->customdata); } - glScissor(scissor[0], scissor[1], scissor[2], scissor[3]); + glDisable(GL_SCISSOR_TEST); } } } |