[go: up one dir, main page]

encase 0.4.0

Provides a mechanism to lay out data into GPU buffers ensuring WGSL's memory layout requirements are met
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(trivial_bounds)]

use core::cell::Cell;
use encase::ShaderType;
use std::{borrow::Cow, rc::Rc, sync::Arc};

fn main() {}

#[derive(ShaderType)]
struct Test<'a> {
    a: &'a u32,
    b: &'a mut u32,
    c: Box<u32>,
    d: Cow<'a, u32>,
    e: Rc<u32>,
    f: Arc<u32>,
    g: Cell<u32>,
}