wip 2
This commit is contained in:
parent
0877a91373
commit
9845d5717b
12 changed files with 903 additions and 148 deletions
|
|
@ -4,4 +4,5 @@ version = "0.1.0"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
glam.workspace = true
|
||||
spirv-std.workspace = true
|
||||
bytemuck.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#![cfg_attr(target_arch = "spirv", no_std)]
|
||||
|
||||
use glam::{Mat4, Vec3};
|
||||
use spirv_std::glam::{Mat4, Vec3, Vec4};
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone)]
|
||||
|
|
@ -10,3 +10,12 @@ pub struct UniformBufferObject {
|
|||
pub proj: Mat4,
|
||||
pub model_color: Vec3,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct PushConstants {
|
||||
pub texture_size: Vec4,
|
||||
}
|
||||
|
||||
unsafe impl bytemuck::Pod for PushConstants {}
|
||||
unsafe impl bytemuck::Zeroable for PushConstants {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue