diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-03-17 15:53:19 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-03-17 15:56:25 +0300 |
commit | 8cb463f4ff24f05dde858f9706a2990c6c81d817 (patch) | |
tree | 598990093a11c5f29cd3be914fa16fe3c61f5170 /source/blender/draw | |
parent | 3c1433b6f3b29e5c651dd7103bd6e44aef103fb5 (diff) |
OverlayEngine: crash when using hidden faces
Unreported Crash. When hidden faces are active (retopology) the depth
test could fail as the default framebuffers aren't set. This patch will
check if we are rendering a depth only and skip the clearing of the
buffer.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_edit_mesh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.c b/source/blender/draw/engines/overlay/overlay_edit_mesh.c index 6c838568260..400947ea819 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_mesh.c +++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.c @@ -398,7 +398,7 @@ void OVERLAY_edit_mesh_draw(OVERLAY_Data *vedata) DRW_draw_pass(psl->edit_mesh_normals_ps); overlay_edit_mesh_draw_components(psl, pd, false); - if (v3d->shading.type == OB_SOLID && pd->edit_mesh.ghost_ob == 1 && + if (!DRW_state_is_depth() && v3d->shading.type == OB_SOLID && pd->edit_mesh.ghost_ob == 1 && pd->edit_mesh.edit_ob == 1) { /* In the case of single ghost object edit (common case for retopology): * we clear the depth buffer so that only the depth of the retopo mesh |