mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-23 07:14:01 +00:00
[rs] Merge #684
684: First step for WebGL support. r=grovesNL a=VincentFTS This permits to test WebGL backend in Wgpu-rs. Next step is to test examples to make them work with WebGL backend ! Co-authored-by: Vincent Jousse <contact@ftsoftware.fr>
This commit is contained in:
commit
f1604cdc57
@ -21,6 +21,7 @@ trace = ["serde", "wgc/trace"]
|
||||
replay = ["serde", "wgc/replay"]
|
||||
# Make Vulkan backend available on platforms where it is by default not, e.g. macOS
|
||||
vulkan-portability = ["wgc/gfx-backend-vulkan"]
|
||||
webgl = ["wgc"]
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
@ -28,6 +29,13 @@ git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "4ebe1f50b057046e4d4f015eb006330d62f5fe91"
|
||||
features = ["raw-window-handle"]
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "4ebe1f50b057046e4d4f015eb006330d62f5fe91"
|
||||
features = ["raw-window-handle"]
|
||||
optional = true
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
|
@ -1,15 +1,15 @@
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(all(target_arch = "wasm32", not(feature = "webgl")))]
|
||||
mod web;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(all(target_arch = "wasm32", not(feature = "webgl")))]
|
||||
pub(crate) use web::{BufferMappedRange, Context};
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "webgl"))]
|
||||
mod direct;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "webgl"))]
|
||||
mod error;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "webgl"))]
|
||||
pub(crate) use direct::{BufferMappedRange, Context};
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
#[cfg(any(not(target_arch = "wasm32"), feature = "webgl"))]
|
||||
mod native_gpu_future;
|
||||
|
Loading…
Reference in New Issue
Block a user