summaryrefslogtreecommitdiff
path: root/src/instance.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-09-24 18:20:46 -0400
committerMicha White <botahamec@outlook.com>2022-09-24 18:20:46 -0400
commitc29555bddac1c0027bf6e15d91e219adaa088065 (patch)
tree59e671e4ded20b58027987053e207e4fe6a51307 /src/instance.rs
parent7f364d2642784fcffea730b1f168270ce907a27c (diff)
Implemented a camera
Diffstat (limited to 'src/instance.rs')
-rw-r--r--src/instance.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/instance.rs b/src/instance.rs
index 554d02d..6ea5321 100644
--- a/src/instance.rs
+++ b/src/instance.rs
@@ -15,7 +15,7 @@ pub struct Instance {
/// Rotation, in radians
pub rotation: f32,
/// z-index
- pub z_index: i32,
+ pub z_index: u32,
}
impl Default for Instance {
@@ -32,7 +32,7 @@ impl Default for Instance {
impl Instance {
// whenever this is updated, please also update `sprite.wgsl`
const ATTRIBUTES: [wgpu::VertexAttribute; 4] =
- wgpu::vertex_attr_array![1 => Float32x2, 2 => Float32x2, 3 => Float32, 4 => Sint32];
+ wgpu::vertex_attr_array![1 => Float32x2, 2 => Float32x2, 3 => Float32, 4 => Uint32];
pub(crate) fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
// make sure these two don't conflict