Remove unused PlainVertex

This commit is contained in:
Sijmen 2021-06-11 17:02:11 +02:00
parent bba3c52228
commit 1d840e8d85
Signed by: vijfhoek
GPG key ID: 82D05C89B28B0DAE
2 changed files with 0 additions and 26 deletions

View file

@ -1,5 +1,3 @@
use std::convert::TryInto;
use wgpu::{BufferUsage, RenderPass}; use wgpu::{BufferUsage, RenderPass};
use crate::{ use crate::{

View file

@ -6,30 +6,6 @@ pub trait Vertex {
fn descriptor() -> wgpu::VertexBufferLayout<'static>; 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::<Self>() as wgpu::BufferAddress,
step_mode: wgpu::InputStepMode::Vertex,
attributes: PLAIN_VERTEX_ATTRIBUTES,
}
}
}
/// Represents a vertex in HUD geometry. /// Represents a vertex in HUD geometry.
/// ///
/// Used to bind vertex information to shaders with a 2D position, texture /// Used to bind vertex information to shaders with a 2D position, texture