diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-29 21:45:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-29 21:50:22 +0300 |
commit | 56fe8239abea80c8a9ab8e86f7dd5616ca78d18c (patch) | |
tree | d9ef76e29b94800e3724b1454c402e05049abaf2 | |
parent | 3a3e5fb365bac2f3ee653c446215727d9e339648 (diff) |
Fix T70320: View clipping doesn't hide extra wireframe
-rw-r--r-- | source/blender/draw/modes/overlay_mode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c index 587046589ee..9106e89663d 100644 --- a/source/blender/draw/modes/overlay_mode.c +++ b/source/blender/draw/modes/overlay_mode.c @@ -239,11 +239,6 @@ static void overlay_cache_init(void *vedata) geometry_shader_uniforms(g_data->face_wires_shgrp); geometry_shader_uniforms(g_data->face_wires_xray_shgrp); } - if (rv3d->rflag & RV3D_CLIPPING) { - DRW_shgroup_state_enable(g_data->face_wires_shgrp, DRW_STATE_CLIP_PLANES); - DRW_shgroup_state_enable(g_data->face_wires_xray_shgrp, DRW_STATE_CLIP_PLANES); - } - g_data->wire_step_param = stl->g_data->overlay.wireframe_threshold - 254.0f / 255.0f; } } @@ -414,6 +409,10 @@ static void overlay_cache_populate(void *vedata, Object *ob) shgrp = DRW_shgroup_create_sub(pd->face_wires_shgrp); } + if (draw_ctx->rv3d->rflag & RV3D_CLIPPING) { + DRW_shgroup_state_enable(shgrp, DRW_STATE_CLIP_PLANES); + } + float wire_step_param = 10.0f; if (!use_sculpt_pbvh) { wire_step_param = (all_wires) ? 1.0f : pd->wire_step_param; |