fix remote UI when dropping a new .hdr ibl file

- the ibl wasn't updated in internal structures
- the previous ibl was leaked
This commit is contained in:
Mathias Agopian
2021-12-07 14:48:40 -08:00
committed by Mathias Agopian
parent 078de4e422
commit c91f28b6be

View File

@@ -221,8 +221,13 @@ class MainActivity : Activity() {
equirectToCubemap.destroy();
context.destroy();
// destroy the previous IBl
engine.destroyIndirectLight(modelViewer.scene.indirectLight!!);
engine.destroySkybox(modelViewer.scene.skybox!!);
modelViewer.scene.skybox = sky
modelViewer.scene.indirectLight = ibl
viewerContent.indirectLight = ibl
}
}
}