Move Vertex to more appropriate location

This commit is contained in:
Hanno Braun 2024-11-22 19:37:25 +01:00
parent f4838b14ee
commit 3440690452
2 changed files with 6 additions and 6 deletions

View File

@ -4,6 +4,8 @@ use glam::Mat4;
pub use self::pipeline::Pipeline;
use self::pipeline::Vertex;
pub struct Pipelines {
pub vertices: Pipeline<VerticesVertex>,
pub triangles: Pipeline<TrianglesVertex>,
@ -53,10 +55,6 @@ impl Uniforms {
}
}
pub trait Vertex {
const ATTRIBUTES: &[wgpu::VertexAttribute];
}
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
#[repr(C)]
pub struct TrianglesVertex {

View File

@ -2,8 +2,6 @@ use std::marker::PhantomData;
use crate::render::geometry::Geometry;
use super::Vertex;
pub struct Pipeline<V> {
render_pipeline: wgpu::RenderPipeline,
bind_group: wgpu::BindGroup,
@ -152,3 +150,7 @@ impl<V> Pipeline<V> {
}
}
}
pub trait Vertex {
const ATTRIBUTES: &[wgpu::VertexAttribute];
}