summaryrefslogtreecommitdiff
path: root/src/vertex.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-09-18 16:45:05 -0400
committerMicha White <botahamec@outlook.com>2022-09-18 16:45:05 -0400
commit83295e01008bdf25e03f6b5aa18b93b735a5e326 (patch)
tree7010e0f2fb8994a7168e3a11b4fa996804a49342 /src/vertex.rs
parent3e913d329ebdb36b66ccb8ac7ccea203db266d20 (diff)
instancing
Diffstat (limited to 'src/vertex.rs')
-rw-r--r--src/vertex.rs5
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 {