Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed multi-threaded asset loader problem
GVRAssetLoader was adding a listener per thread to GVRContext for asset events. GearVRF event manager only permits one listener per target object for a particular event class. I modified the asset loader to not rely on the event manager for propagating internal asset load events. GVRAssetLoader no longer adds listeners for its internal event management, making direct calls whenever possible. To do asset loading from multiple threads you have to add a user handler to the loadModel function. This API was already there, I just made it avoid the event manager. I also gave embedded textures their own cache. I tried using the ResourceCache used for texture loading but this would not reliably cache stuff - it sometimes reported something as not cached when it actually was. Not sure what is wrong with this - we probably should look closely at texture caching to see if it actually still works.
- Loading branch information