diff --git a/all-is-cubes-gpu/src/in_wgpu/glue.rs b/all-is-cubes-gpu/src/in_wgpu/glue.rs index 5f9cb5d36..471ce08cf 100644 --- a/all-is-cubes-gpu/src/in_wgpu/glue.rs +++ b/all-is-cubes-gpu/src/in_wgpu/glue.rs @@ -6,35 +6,10 @@ use core::ops::Range; use bytemuck::Pod; use wgpu::util::DeviceExt as _; -use all_is_cubes::euclid::{Point3D, Vector3D}; +use all_is_cubes::euclid::Point3D; use all_is_cubes::math::{GridAab, GridCoordinate, GridSize, Rgba}; use all_is_cubes_mesh::IndexSlice; -/// A vector of 3 f32s padded to resemble a vector of 4, to satisfy -/// GPU alignment expectations. -#[repr(C, align(16))] -#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] -pub(crate) struct PaddedVec3 { - pub data: [f32; 3], - padding: f32, -} - -impl PartialEq for PaddedVec3 { - fn eq(&self, other: &Self) -> bool { - self.data == other.data - } -} -impl Eq for PaddedVec3 {} - -impl From> for PaddedVec3 { - fn from(data: Vector3D) -> Self { - Self { - data: data.into(), - padding: 0., - } - } -} - pub fn to_wgpu_color(color: Rgba) -> wgpu::Color { // TODO: Check whether this is gamma-correct wgpu::Color {