// Local use super::Pipeline; /// Used to store vertex data on the CPU pub struct Mesh { verts: Vec, } impl Mesh

{ pub fn new() -> Self { Self { verts: vec![] } } pub fn vertices(&self) -> &[P::Vertex] { &self.verts } pub fn push(&mut self, vert: P::Vertex) { self.verts.push(vert); } pub fn push_quad(&mut self, quad: Quad

) { // Tri 1 self.verts.push(quad.a.clone()); self.verts.push(quad.b); self.verts.push(quad.c.clone()); // Tri 2 self.verts.push(quad.c); self.verts.push(quad.d); self.verts.push(quad.a); } } /// Represents a quad pub struct Quad { a: P::Vertex, b: P::Vertex, c: P::Vertex, d: P::Vertex, } impl Quad

{ pub fn new( a: P::Vertex, b: P::Vertex, c: P::Vertex, d: P::Vertex, ) -> Self { Self { a, b, c, d } } }