Skip to content

Commit

Permalink
Fixed multi-threaded asset loader problem
Browse files Browse the repository at this point in the history
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
NolaDonato authored and liaxim committed Nov 23, 2016
1 parent 5ef39d5 commit ea08e38
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 171 deletions.
Loading

0 comments on commit ea08e38

Please sign in to comment.