1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#[repr(C)] #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] pub struct ModelUniform { pub model_pos: [f32; 3], pub padding: u32, } impl ModelUniform { pub fn new() -> Self { Self { model_pos: [0.0, 0.0, 0.0], padding: 0, } } }