diff options
| author | Micha White <botahamec@outlook.com> | 2022-09-18 16:45:05 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-09-18 16:45:05 -0400 |
| commit | 83295e01008bdf25e03f6b5aa18b93b735a5e326 (patch) | |
| tree | 7010e0f2fb8994a7168e3a11b4fa996804a49342 /src/vertex.rs | |
| parent | 3e913d329ebdb36b66ccb8ac7ccea203db266d20 (diff) | |
instancing
Diffstat (limited to 'src/vertex.rs')
| -rw-r--r-- | src/vertex.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vertex.rs b/src/vertex.rs index 7735801..6514fd3 100644 --- a/src/vertex.rs +++ b/src/vertex.rs @@ -2,6 +2,7 @@ use std::mem::size_of; use bytemuck::{Pod, Zeroable}; +/// The vertices needed to form a square pub const SQUARE: [Vertex; 4] = [ Vertex::new(-0.5, -0.5), Vertex::new(0.5, -0.5), @@ -22,7 +23,9 @@ impl Vertex { } impl Vertex { - const ATTRIBUTES: [wgpu::VertexAttribute; 1] = wgpu::vertex_attr_array![0 => Float32x2]; + // whenever this is updated, please also update `sprite.wgsl` + pub(crate) const ATTRIBUTES: [wgpu::VertexAttribute; 1] = + wgpu::vertex_attr_array![0 => Float32x2]; pub(crate) const fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { wgpu::VertexBufferLayout { |
