Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_data.c
| Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | void workbench_private_data_init(WORKBENCH_PrivateData *wpd) | ||||
| /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. | /* FIXME: This reproduce old behavior when workbench was separated in 2 engines. | ||||
| * But this is a workaround for a missing update tagging. */ | * But this is a workaround for a missing update tagging. */ | ||||
| DRWState clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; | DRWState clip_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; | ||||
| if (clip_state != wpd->clip_state) { | if (clip_state != wpd->clip_state) { | ||||
| wpd->view_updated = true; | wpd->view_updated = true; | ||||
| } | } | ||||
| wpd->clip_state = clip_state; | wpd->clip_state = clip_state; | ||||
| if (v3d) { | |||||
| wpd->cull_state = CULL_BACKFACE_ENABLED(v3d) ? DRW_STATE_CULL_BACK : 0; | wpd->cull_state = CULL_BACKFACE_ENABLED(v3d) ? DRW_STATE_CULL_BACK : 0; | ||||
jbakker: Can't we just always use `wpd`. the macro was created to work on `wpd`. | |||||
| } | |||||
| else { | |||||
| wpd->cull_state = CULL_BACKFACE_ENABLED(wpd) ? DRW_STATE_CULL_BACK : 0; | |||||
| } | |||||
| wpd->vldata = vldata; | wpd->vldata = vldata; | ||||
| wpd->world_ubo = vldata->world_ubo; | wpd->world_ubo = vldata->world_ubo; | ||||
| wpd->taa_sample_len = workbench_antialiasing_sample_count_get(wpd); | wpd->taa_sample_len = workbench_antialiasing_sample_count_get(wpd); | ||||
| wpd->volumes_do = false; | wpd->volumes_do = false; | ||||
| BLI_listbase_clear(&wpd->smoke_domains); | BLI_listbase_clear(&wpd->smoke_domains); | ||||
| ▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines | |||||
Can't we just always use wpd. the macro was created to work on wpd.