+ ResetResourceTask(mIblDiffuseLoadTask);
+ ResetResourceTask(mIblSpecularLoadTask);
+
+ mIblDiffuseDirty = false;
+ mIblSpecularDirty = false;
+ mIblDiffuseResourceReady = true;
+ mIblSpecularResourceReady = true;
+
+ mDiffuseTexture.Reset();
+ mSpecularTexture.Reset();
+ UpdateImageBasedLightTexture();
+ }
+ else
+ {
+ if(isOnScene && mIblDiffuseDirty)
+ {
+ ResetResourceTask(mIblDiffuseLoadTask);
+ mIblDiffuseLoadTask = new EnvironmentMapLoadTask(mDiffuseIblUrl, Scene3D::EnvironmentMapType::CUBEMAP, MakeCallback(this, &Model::OnIblDiffuseLoadComplete));
+ Dali::AsyncTaskManager::Get().AddTask(mIblDiffuseLoadTask);
+ mIblDiffuseDirty = false;
+ }
+
+ if(isOnScene && mIblSpecularDirty)
+ {
+ ResetResourceTask(mIblSpecularLoadTask);
+ mIblSpecularLoadTask = new EnvironmentMapLoadTask(mSpecularIblUrl, Scene3D::EnvironmentMapType::CUBEMAP, MakeCallback(this, &Model::OnIblSpecularLoadComplete));
+ Dali::AsyncTaskManager::Get().AddTask(mIblSpecularLoadTask);
+ mIblSpecularDirty = false;
+ }