diff --git a/experiments/2024-10-30/src/render/geometry.rs b/experiments/2024-10-30/src/render/geometry.rs index 8c06f7f70..78246d47d 100644 --- a/experiments/2024-10-30/src/render/geometry.rs +++ b/experiments/2024-10-30/src/render/geometry.rs @@ -14,7 +14,7 @@ pub struct Geometry { _vertex: PhantomData, } -impl Geometry { +impl Geometry { pub fn vertices(device: &wgpu::Device, operation: &impl Operation) -> Self { let mut mesh_vertices = Vec::new(); operation.vertices(&mut mesh_vertices); @@ -35,7 +35,7 @@ impl Geometry { for vertex in [a, b, c, c, b, d] { let index = vertices.len() as u32; - let vertex = vertices::VerticesVertex { + let vertex = vertices::Vertex { position: vertex, center: p.coords.components.map(|s| s.value() as f32), radius: s as f32, diff --git a/experiments/2024-10-30/src/render/pipelines/pipelines.rs b/experiments/2024-10-30/src/render/pipelines/pipelines.rs index f05d521ac..c3a02a846 100644 --- a/experiments/2024-10-30/src/render/pipelines/pipelines.rs +++ b/experiments/2024-10-30/src/render/pipelines/pipelines.rs @@ -6,7 +6,7 @@ use wgpu::util::DeviceExt; use super::{triangles, vertices, Pipeline}; pub struct Pipelines { - pub vertices: Pipeline, + pub vertices: Pipeline, pub triangles: Pipeline, } diff --git a/experiments/2024-10-30/src/render/pipelines/vertices.rs b/experiments/2024-10-30/src/render/pipelines/vertices.rs index 77a160fc1..8f76d7d86 100644 --- a/experiments/2024-10-30/src/render/pipelines/vertices.rs +++ b/experiments/2024-10-30/src/render/pipelines/vertices.rs @@ -2,13 +2,13 @@ use super::pipeline::IsVertex; #[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] -pub struct VerticesVertex { +pub struct Vertex { pub position: [f32; 3], pub center: [f32; 3], pub radius: f32, } -impl IsVertex for VerticesVertex { +impl IsVertex for Vertex { const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![ 0 => Float32x3, 1 => Float32x3,