wgsl_bindgen 0.22.2

Type safe Rust bindings workflow for wgsl shaders in wgpu
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
source: wgsl_bindgen/src/structs.rs
---
#[derive(Debug, PartialEq, Clone, encase :: ShaderType)]
pub struct RtsStruct {
  pub other_data: i32,
  #[size(runtime)]
  pub the_array: Vec<u32>,
}
impl RtsStruct {
  pub const fn new(other_data: i32, the_array: Vec<u32>) -> Self {
    Self {
      other_data,
      the_array,
    }
  }
}