diff options
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_engine.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_engine.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index 99adc21bf56..70af3b4067c 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -365,21 +365,31 @@ static void eevee_view_update(void *vedata) static void eevee_id_object_update(void *UNUSED(vedata), Object *object) { - /* This is a bit mask of components which update is to be ignored. */ EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(object); - if (ped != NULL && ped->engine_data.recalc != 0) { + if (ped != NULL && ped->dd.recalc != 0) { ped->need_full_update = true; - ped->engine_data.recalc = 0; + ped->dd.recalc = 0; } EEVEE_LampEngineData *led = EEVEE_lamp_data_get(object); - if (led != NULL && led->engine_data.recalc != 0) { + if (led != NULL && led->dd.recalc != 0) { led->need_update = true; - led->engine_data.recalc = 0; + led->dd.recalc = 0; } EEVEE_ObjectEngineData *oedata = EEVEE_object_data_get(object); - if (oedata != NULL && oedata->engine_data.recalc != 0) { + if (oedata != NULL && oedata->dd.recalc != 0) { oedata->need_update = true; - oedata->engine_data.recalc = 0; + oedata->dd.recalc = 0; + } +} + +static void eevee_id_world_update(void *vedata, World *wo) +{ + EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl; + + EEVEE_WorldEngineData *wedata = EEVEE_world_data_ensure(wo); + + if (wedata != NULL && wedata->dd.recalc != 0) { + wedata->dd.recalc = 0; } } @@ -387,6 +397,9 @@ static void eevee_id_update(void *vedata, ID *id) { /* Handle updates based on ID type. */ switch (GS(id->name)) { + case ID_WO: + eevee_id_world_update(vedata, (World *)id); + break; case ID_OB: eevee_id_object_update(vedata, (Object *)id); break; |