Added GetCurrentThreadID() static function to Thread. Store the thread which created the Context.
Detect main thread when sending events or using profiler blocks; make these no-ops when called from outside the main thread.
Allow logging from outside the main thread. These log messages are collected and handled at the end of frame.
Protect some ResourceCache structures with a mutex so that eg. GetFile() or GetTempResource() can be called from worker threads. Verify that GetResource() is only called from the main thread.
Initial resource background loading API and implementation. Background loading-capable implementation for textures (load image in background thread, upload image to GPU in main thread), other resources todo.
Allow dynamically created profiler block names by copying the name C string.
Texture Load() function with image pointer renamed to SetData() to not confuse with the threaded/nonthreaded resource loading functions.
Merge branch 'master' into threaded-resource-load
Background loading of Materials.
Store dependencies of 3D & cube textures so that they will be properly live reloaded if the individual images change.
Log message for finalizing a background loaded resource.
Merge branch 'master' into threaded-resource-load
Precalculate texture's mip levels during async loading, if applicable. Use a timer to avoid spending too much time per frame on finishing async loaded resources.
Configurable max work time in ms per frame for finishing background loaded resources, and for non-threaded work in WorkQueue. Fix iteration bug if finishing several background loaded resources in one go.
Asynchronous loading for Model.
If loading a Model synchronously, read directly into the buffers like before to avoid extra allocation & copy.
Asynchronous loading of ScriptFile. Due to possibly accessing arbitrary engine functionality in script initializers the actual script compilation cannot be threaded even if AngelScript itself is compiled as thread-safe. Furthermore AngelScript allows only 1 simultaneous compile, and the resource loading system is not prepared to fail and retry in that case.
Asynchronous loading for ParticleEffect.
Asynchronous loading for ParticleEffect2D.
Correctly store material dependency when async loading ParticleEffect.
Asynchronous loading for Sprite2D & SpriteSheet2D.
Asynchronous loading for AnimationSet2D.
Fix deadlock when waiting for a resource that is background loading but is now needed immediately.
Disregard background load request with empty name.