SourceRenderer
SourceRenderer copied to clipboard
Implement multi threading for the web platform
- Render thread
- Thread pool similar to bevy_tasks
- Mostly to the AssetLoader work on to
Partially done.
- There's a way to start web worker based threads from Rust now.
- GPU & IO are optionally !Send depending on the platform and the renderer & asset manager can handle that
- There's a super bare ones abstraction for spawning tasks
To do:
- Work around Chrome bug when sending OffscreenCanvas from worker to worker. Start the renderer worker at the start and pick that if the send date is instanceof OffscreenCanvas.
- Wait for a response for the Firefox bug report. (Probably needs another workaround).
- Test Safari
- Write thread pool and use that for asset loading in the asset manager (right now it just calls spawn_local)