mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-10 04:48:29 +00:00
Prepare for adding more shaders
This commit is contained in:
parent
3e275dcf57
commit
2e9a7af4d9
@ -90,6 +90,10 @@ impl Uniforms {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
@ -97,8 +101,8 @@ pub struct TrianglesVertex {
|
|||||||
pub normal: [f32; 3],
|
pub normal: [f32; 3],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TrianglesVertex {
|
impl Vertex for TrianglesVertex {
|
||||||
pub const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![
|
const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![
|
||||||
0 => Float32x3,
|
0 => Float32x3,
|
||||||
1 => Float32x3,
|
1 => Float32x3,
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user