[Bf-blender-cvs] [b8bdb8e9e99] blender-v2.82-release: DRW: Fix stencil being modified by passes that are read only

Clément Foucault noreply at git.blender.org
Mon Jan 13 17:31:04 CET 2020


Commit: b8bdb8e9e99d33fc16d69307330d160abbba923e
Author: Clément Foucault
Date:   Mon Jan 13 16:26:42 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBb8bdb8e9e99d33fc16d69307330d160abbba923e

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.

===================================================================

M	source/blender/draw/intern/draw_manager_exec.c

===================================================================

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);
       }
     }
   }



More information about the Bf-blender-cvs mailing list