From 1d840e8d858c459f4ef4a2657f6e68085e792f6f Mon Sep 17 00:00:00 2001 From: Vijfhoek Date: Fri, 11 Jun 2021 17:02:11 +0200 Subject: [PATCH] Remove unused PlainVertex --- src/hud/hotbar_hud.rs | 2 -- src/vertex.rs | 24 ------------------------ 2 files changed, 26 deletions(-) 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