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
This commit is contained in:
parent
a6dd22d431
commit
ed44bb902d
Notes:
blender-bot
2023-02-14 00:20:19 +01:00
Referenced by issue #74872, Clipping Region delay
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue