Remove redundant trait

This commit is contained in:
Hanno Braun 2025-01-13 20:08:53 +01:00
parent 12adfa68f6
commit 9e01da248e
2 changed files with 2 additions and 8 deletions

View File

@ -135,10 +135,6 @@ impl Pipeline {
}
}
pub trait IsVertex {
const ATTRIBUTES: &[wgpu::VertexAttribute];
}
fn default_transform(aspect_ratio: f32) -> Mat4 {
let fov_y_radians = std::f32::consts::PI / 2.;
let z_near = 0.1;

View File

@ -1,5 +1,3 @@
use super::pipeline::IsVertex;
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
#[repr(C)]
pub struct Vertex {
@ -7,8 +5,8 @@ pub struct Vertex {
pub normal: [f32; 3],
}
impl IsVertex for Vertex {
const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![
impl Vertex {
pub const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![
0 => Float32x3,
1 => Float32x3,
];