I was trying to setup a playground to demo loading of glb files into an SPS and then disposing and loading a new one.
It turns out it’s quite complex to avoid leaving stray textures etc. in memory.
Unless I’m missing some really obvious much simpler way to do it. This is what I have so far.
Use the Load Model A / Load Model B buttons to toggle between models.
You can see from the code it’s not what I’d call straight forward. My first several attempts always left a memory leak.
Is there a better way to do this?