urho3d/Urho3D — pull request #411 by cadaver (2014-07-24 21:45:19+00:00)
Title: Background loading of resources

- Adds a mechanism for background loading resources. Resource loading is split into two functions: BeginLoad(), which can run in a background thread, and EndLoad(), which always runs in the main thread and for example uploads GPU data.
- Scene::LoadAsync() and LoadAsyncXML() have been expanded to support background preloading the scene's resources, and also a mode where only the resources are loaded, but not the scene content itself. This can be used to preload resources from an object prefab to ensure fast instantiation later.
- Improvements for threading. Log messages are supported from outside main thread, using the Profiler becomes a safe no-op, while sending events & ResourceCache::GetResouce() log errors if attempted from outside the main thread.