From b8bdb8e9e99d33fc16d69307330d160abbba923e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 13 Jan 2020 16:26:42 +0100 Subject: [PATCH] DRW: Fix stencil being modified by passes that are read only This is because even if the glStencilMask is 0x00 the GL_DECR_WRAP and GL_INCR_WRAP states still works and will modify the stencil. Fix T73046 Overlapping parts of wireframes don't render at all in workench with shadows turned on. --- source/blender/draw/intern/draw_manager_exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 9d14b77119f..77234e9b834 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -129,6 +129,7 @@ void drw_state_set(DRWState state) } else { glStencilMask(0x00); + glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); } } }