diff --git a/experiments/2024-10-30/src/render/geometry.rs b/experiments/2024-10-30/src/render/geometry.rs index 78246d47d..a5a3f9378 100644 --- a/experiments/2024-10-30/src/render/geometry.rs +++ b/experiments/2024-10-30/src/render/geometry.rs @@ -50,7 +50,7 @@ impl Geometry { } } -impl Geometry { +impl Geometry { pub fn triangles( device: &wgpu::Device, operation: &impl Operation, @@ -82,7 +82,7 @@ impl Geometry { for point in triangle { let index = vertices.len() as u32; - let vertex = triangles::TrianglesVertex { + let vertex = triangles::Vertex { position: point.into(), normal: normal.into(), }; diff --git a/experiments/2024-10-30/src/render/pipelines/pipelines.rs b/experiments/2024-10-30/src/render/pipelines/pipelines.rs index c3a02a846..9cc16b65b 100644 --- a/experiments/2024-10-30/src/render/pipelines/pipelines.rs +++ b/experiments/2024-10-30/src/render/pipelines/pipelines.rs @@ -7,7 +7,7 @@ use super::{triangles, vertices, Pipeline}; pub struct Pipelines { pub vertices: Pipeline, - pub triangles: Pipeline, + pub triangles: Pipeline, } impl Pipelines { diff --git a/experiments/2024-10-30/src/render/pipelines/triangles.rs b/experiments/2024-10-30/src/render/pipelines/triangles.rs index 707cb406d..15bc4ebc5 100644 --- a/experiments/2024-10-30/src/render/pipelines/triangles.rs +++ b/experiments/2024-10-30/src/render/pipelines/triangles.rs @@ -2,12 +2,12 @@ use super::pipeline::IsVertex; #[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] -pub struct TrianglesVertex { +pub struct Vertex { pub position: [f32; 3], pub normal: [f32; 3], } -impl IsVertex for TrianglesVertex { +impl IsVertex for Vertex { const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![ 0 => Float32x3, 1 => Float32x3,