summaryrefslogtreecommitdiff
path: root/src/vertex.rs
diff options
context:
space:
mode:
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 {