| 275 | } |
| 276 | |
| 277 | bool ExtendedScene::LoadWithThreadPool(const std::filesystem::path& jsonFileName, donut::engine::ThreadPool* threadPool) |
| 278 | { |
| 279 | if (!Scene::LoadWithThreadPool(jsonFileName, threadPool)) |
| 280 | return false; |
| 281 | |
| 282 | ProcessNodesRecursive( GetSceneGraph()->GetRootNode() ); |
| 283 | |
| 284 | #if 1 // example of modifying all materials after scene loading; this is the ideal place to do material modification without worrying about resetting relevant caches/dependencies |
| 285 | auto& materials = m_SceneGraph->GetMaterials(); |
| 286 | for( auto it : materials ) |
| 287 | { |
| 288 | Material & mat = *it; |
| 289 | LocalConfig::PostMaterialLoad(mat); |
| 290 | } |
| 291 | #endif |
| 292 | |
| 293 | return true; |
| 294 | } |
| 295 | |
| 296 | std::shared_ptr<EnvironmentLight> FindEnvironmentLight(std::vector <std::shared_ptr<donut::engine::Light>> lights) |
| 297 | { |
nothing calls this directly
no outgoing calls
no test coverage detected