Skip to content

Commit 0f1d276

Browse files
committed
template: remove glam, use spirv-std reexport
selecting the correct glam version manually when testing various spirv-std versions is hard
1 parent 0982968 commit 0f1d276

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

crates/shader-crate-template/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/shader-crate-template/Cargo.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ crate-type = ["rlib", "cdylib"]
1111
# TODO: use a simple crate version once v0.10.0 is released
1212
spirv-std = { git = "https://github.com/Rust-GPU/rust-gpu", rev = "86fc48032c4cd4afb74f1d81ae859711d20386a1" }
1313

14-
# Dependencies for GPU code
15-
[target.'cfg(target_arch = "spirv")'.dependencies]
16-
glam = { version = "0.29", default-features = false, features = ["libm"] }
17-
18-
# Dependencies for CPU code
19-
[target.'cfg(not(target_arch = "spirv"))'.dependencies]
20-
glam = { version = "0.29", features = ["std"] }
21-
2214
[package.metadata.rust-gpu.build]
2315
# Where to output the compiled shader. Defaults to where `cargo gpu` is called from.
2416
# TODO: Should it default to the root of the shader crate?

crates/shader-crate-template/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! Contains an example vertex shader, fragment shader.
44
#![no_std]
5-
use glam::{Vec2, Vec4};
5+
use spirv_std::glam::{Vec2, Vec4};
66
use spirv_std::spirv;
77

88
pub const CLIP_SPACE_COORD_QUAD_CCW: [Vec4; 6] = {

0 commit comments

Comments
 (0)