DRW manager: Always assume that the GL_DITHER and GL_SCISSOR_TEST should be disabled...
authormano-wii <germano.costa@ig.com.br>
Wed, 27 Mar 2019 22:36:12 +0000 (19:36 -0300)
committermano-wii <germano.costa@ig.com.br>
Wed, 27 Mar 2019 22:36:12 +0000 (19:36 -0300)
This may fix a glitch detected when you perform edited mesh selection.
See comment in rB00bdb5cdf08f

source/blender/draw/intern/draw_manager.c

index 9f956717fb22049d9368fea97689b6ccf05da6b7..9dd6d08afcccfcd2fadad4001b9f7022bffe3b06 100644 (file)
@@ -1784,11 +1784,6 @@ void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph
 
        drw_viewport_var_init();
 
-       /* set default viewport */
-       gpuPushAttr(GPU_ENABLE_BIT | GPU_VIEWPORT_BIT);
-       glDisable(GL_SCISSOR_TEST);
-       glViewport(0, 0, size[0], size[1]);
-
        /* Main rendering. */
        rctf view_rect;
        rcti render_rect;
@@ -1810,8 +1805,6 @@ void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph
        glDisable(GL_DEPTH_TEST);
 
        /* Restore Drawing area. */
-       gpuPopAttr();
-       glEnable(GL_SCISSOR_TEST);
        GPU_framebuffer_restore();
 
        /* Changing Context */
@@ -2543,9 +2536,7 @@ void DRW_framebuffer_select_id_release(ARegion *ar)
                ED_view3d_clipping_disable();
        }
 
-       glEnable(GL_SCISSOR_TEST);
        GPU_depth_test(false);
-       glEnable(GL_DITHER);
 
        GPU_framebuffer_restore();