mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[rs] First step for WebGL support.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user