diff options
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_sync.cc')
-rw-r--r-- | source/blender/draw/engines/eevee_next/eevee_sync.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_sync.cc b/source/blender/draw/engines/eevee_next/eevee_sync.cc index f2daba48d7a..08cda6f47cf 100644 --- a/source/blender/draw/engines/eevee_next/eevee_sync.cc +++ b/source/blender/draw/engines/eevee_next/eevee_sync.cc @@ -68,6 +68,20 @@ WorldHandle &SyncModule::sync_world(::World *world) return eevee_dd; } +SceneHandle &SyncModule::sync_scene(::Scene *scene) +{ + DrawEngineType *owner = (DrawEngineType *)&DRW_engine_viewport_eevee_next_type; + struct DrawData *dd = DRW_drawdata_ensure( + (ID *)scene, owner, sizeof(eevee::SceneHandle), draw_data_init_cb, nullptr); + SceneHandle &eevee_dd = *reinterpret_cast<SceneHandle *>(dd); + + const int recalc_flags = ID_RECALC_ALL; + if ((eevee_dd.recalc & recalc_flags) != 0) { + inst_.sampling.reset(); + } + return eevee_dd; +} + /** \} */ /* -------------------------------------------------------------------- */ |