mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 03:48:27 +00:00
Move Vertex
to more appropriate location
This commit is contained in:
parent
f4838b14ee
commit
3440690452
@ -4,6 +4,8 @@ use glam::Mat4;
|
|||||||
|
|
||||||
pub use self::pipeline::Pipeline;
|
pub use self::pipeline::Pipeline;
|
||||||
|
|
||||||
|
use self::pipeline::Vertex;
|
||||||
|
|
||||||
pub struct Pipelines {
|
pub struct Pipelines {
|
||||||
pub vertices: Pipeline<VerticesVertex>,
|
pub vertices: Pipeline<VerticesVertex>,
|
||||||
pub triangles: Pipeline<TrianglesVertex>,
|
pub triangles: Pipeline<TrianglesVertex>,
|
||||||
@ -53,10 +55,6 @@ impl Uniforms {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Vertex {
|
|
||||||
const ATTRIBUTES: &[wgpu::VertexAttribute];
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct TrianglesVertex {
|
pub struct TrianglesVertex {
|
||||||
|
@ -2,8 +2,6 @@ use std::marker::PhantomData;
|
|||||||
|
|
||||||
use crate::render::geometry::Geometry;
|
use crate::render::geometry::Geometry;
|
||||||
|
|
||||||
use super::Vertex;
|
|
||||||
|
|
||||||
pub struct Pipeline<V> {
|
pub struct Pipeline<V> {
|
||||||
render_pipeline: wgpu::RenderPipeline,
|
render_pipeline: wgpu::RenderPipeline,
|
||||||
bind_group: wgpu::BindGroup,
|
bind_group: wgpu::BindGroup,
|
||||||
@ -152,3 +150,7 @@ impl<V> Pipeline<V> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub trait Vertex {
|
||||||
|
const ATTRIBUTES: &[wgpu::VertexAttribute];
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user