diff --git a/src/hud/hotbar_hud.rs b/src/hud/hotbar_hud.rs index b959ff6..51a914f 100644 --- a/src/hud/hotbar_hud.rs +++ b/src/hud/hotbar_hud.rs @@ -1,5 +1,3 @@ -use std::convert::TryInto; - use wgpu::{BufferUsage, RenderPass}; use crate::{ diff --git a/src/vertex.rs b/src/vertex.rs index bf09592..81d9c82 100644 --- a/src/vertex.rs +++ b/src/vertex.rs @@ -6,30 +6,6 @@ pub trait Vertex { fn descriptor() -> wgpu::VertexBufferLayout<'static>; } -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, bytemuck::Pod, bytemuck::Zeroable)] -pub struct PlainVertex { - pub position: [f32; 3], - pub texture_coordinates: [f32; 2], - pub normal: [f32; 3], -} - -const PLAIN_VERTEX_ATTRIBUTES: &[VertexAttribute] = &wgpu::vertex_attr_array![ - 0 => Float32x3, - 1 => Float32x2, - 2 => Float32x3, -]; - -impl Vertex for PlainVertex { - fn descriptor() -> wgpu::VertexBufferLayout<'static> { - wgpu::VertexBufferLayout { - array_stride: size_of::() as wgpu::BufferAddress, - step_mode: wgpu::InputStepMode::Vertex, - attributes: PLAIN_VERTEX_ATTRIBUTES, - } - } -} - /// Represents a vertex in HUD geometry. /// /// Used to bind vertex information to shaders with a 2D position, texture