Skip to content

Commit

Permalink
Simplify name of struct
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 22, 2024
1 parent 81e4cb1 commit 4e54390
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions experiments/2024-10-30/src/render/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl Geometry<vertices::Vertex> {
}
}

impl Geometry<triangles::TrianglesVertex> {
impl Geometry<triangles::Vertex> {
pub fn triangles(
device: &wgpu::Device,
operation: &impl Operation,
Expand Down Expand Up @@ -82,7 +82,7 @@ impl Geometry<triangles::TrianglesVertex> {

for point in triangle {
let index = vertices.len() as u32;
let vertex = triangles::TrianglesVertex {
let vertex = triangles::Vertex {
position: point.into(),
normal: normal.into(),
};
Expand Down
2 changes: 1 addition & 1 deletion experiments/2024-10-30/src/render/pipelines/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::{triangles, vertices, Pipeline};

pub struct Pipelines {
pub vertices: Pipeline<vertices::Vertex>,
pub triangles: Pipeline<triangles::TrianglesVertex>,
pub triangles: Pipeline<triangles::Vertex>,
}

impl Pipelines {
Expand Down
4 changes: 2 additions & 2 deletions experiments/2024-10-30/src/render/pipelines/triangles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4e54390

Please sign in to comment.