diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-03-20 13:41:25 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-03-24 11:54:28 +0300 |
commit | ed44bb902d6b2f861cbcdbb1bffd5339ab3b50e7 (patch) | |
tree | a3ac7fe49dd547c676faad93c4f506e2aa47a929 /source/blender/draw | |
parent | a6dd22d4311ce0265bd7678b68bff71c59404771 (diff) |
Fix T74872: Clipping Region not updating
Caused by rBc476c36e4008.
This hooks into the existing FIXME (workaround for a missing update
tagging), needs to also check the clip_state (to detect
changes in DRW_STATE_CLIP_PLANES).
Maniphest Tasks: T74872
Differential Revision: https://developer.blender.org/D7193
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_data.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c index ceb57327fb0..432179e68e2 100644 --- a/source/blender/draw/engines/workbench/workbench_data.c +++ b/source/blender/draw/engines/workbench/workbench_data.c @@ -189,7 +189,15 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd) wpd->preferences = &U; wpd->scene = scene; wpd->sh_cfg = draw_ctx->sh_cfg; - wpd->clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; + + /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. + * But this is a workaround for a missing update tagging. */ + DRWState clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; + if (clip_state != wpd->clip_state) { + wpd->view_updated = true; + } + wpd->clip_state = clip_state; + wpd->cull_state = CULL_BACKFACE_ENABLED(wpd) ? DRW_STATE_CULL_BACK : 0; wpd->vldata = vldata; wpd->world_ubo = vldata->world_ubo; |