-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OffscreenCanvas Support for WebGL Backend (#2603)
* First attempt of exposing create_surface_from_canvas for webgl * Test Fix Compile For WebGL Offscreen Canvas * Only specify web-sys feature version in wgpu-core, so that patch version is taken from workspace * Reuse already existing fn create_surface_from_canvas * Remove unnecessary unsafe * Remove unsafe prefix also from top-level create_surface_from_canvas * Add create_surface_from_offscreen_canvas() for webgl * Cargo fmt * Store webgl2_context instead of canvas, which works also for OffscreenCanvas * Copy skybox example for OffscreenCanvas example * Use offscreen_canvas instead in newly created example * Update skypbox_offscreen readme.md * Allow enabling OffscreenCanvas in examples via http://localhost:8000/?offscreen_canvas=true * Fix cargo fmt * [fix warning] Only import FromStr for wasm32 * [fix warning] Exclude offscreen_canvas_setup from non-wasm32 * [fix warning] Add ImageBitmap feature as well so that all related methods can be used * Fix cargo fmt * Fix emscripten build * Remove `webgl` feature from wgpu-core as webgl is the only wasm32 backend Co-authored-by: Zicklag <zicklag@katharostech.com>
- Loading branch information
1 parent
717bc40
commit 25b16d5
Showing
8 changed files
with
234 additions
and
42 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.