forked from gfx-rs/wgpu-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run event loop outside async function
Running the event loop inside an async function blocks new futures from being spawned in the examples using spawn_local. This change moves the event loop out of the async function and runs it directly in main. To still be able to initialize the wgpu-rs adapter and device asynchronously, we therefore need to introduce a custom event that is sent to the event loop once the wgpu-rs adapter and device have been created. Fixes #454
- Loading branch information
Showing
1 changed file
with
158 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters