use chair::*; use wgpu::*; #[derive(Clone, Copy, Debug, Pod, Zeroable)] #[repr(C)] pub struct TexturedVertex { pub pos: [f32; 3], pub uvs: [f32; 2] } const ATTRIBS: &[VertexAttribute] = &vertex_attr_array![ 0 => Float32x3, 1 => Float32x2 ]; impl Vertex for TexturedVertex { fn new(pos: [f32; 3], _: [f32; 4], _: [f32; 3], uvs: [f32; 2]) -> Self { Self { pos, uvs } } fn features() -> MeshFeatures { features!(Textured) } fn attribs() -> &'static [VertexAttribute] { ATTRIBS } }