diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-07-20 20:43:48 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-07-20 20:43:48 -0700 |
| commit | 3ac1e5e5a9ebcb4beb2bfe149dd5095f2250f60d (patch) | |
| tree | d409eb8dfcca1b56dffe8c143a2c9028818d6d5d /src/shader_data.rs | |
| parent | 365c2f8bdc217f33264e3aed394f67840a4c075d (diff) | |
yay Force-Push: yes Change-Id: Icb715692286c8560532ab73d32a49be8f485d790
Diffstat (limited to 'src/shader_data.rs')
| -rw-r--r-- | src/shader_data.rs | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/shader_data.rs b/src/shader_data.rs index bd7ff82..8197bfc 100644 --- a/src/shader_data.rs +++ b/src/shader_data.rs @@ -5,31 +5,6 @@ use std::mem::size_of; use vulkanalia::vk::{ self, HasBuilder }; -pub static VERTICES: [Vertex<f32>; 8] = [ - Vertex::new(Vec3::new(-0.5, -0.5, 0.0), Vec3::new(1.0, 0.0, 0.0), - Vec2::new(1.0, 0.0)), - Vertex::new(Vec3::new( 0.5, -0.5, 0.0), Vec3::new(0.0, 1.0, 0.0), - Vec2::new(0.0, 0.0)), - Vertex::new(Vec3::new( 0.5, 0.5, 0.0), Vec3::new(0.0, 0.0, 1.0), - Vec2::new(0.0, 1.0)), - Vertex::new(Vec3::new(-0.5, 0.5, 0.0), Vec3::new(1.0, 1.0, 1.0), - Vec2::new(1.0, 1.0)), - Vertex::new(Vec3::new(-0.5, -0.5, 0.5), Vec3::new(1.0, 0.0, 0.0), - Vec2::new(1.0, 0.0)), - Vertex::new(Vec3::new( 0.5, -0.5, 0.5), Vec3::new(0.0, 1.0, 0.0), - Vec2::new(0.0, 0.0)), - Vertex::new(Vec3::new( 0.5, 0.5, 0.5), Vec3::new(0.0, 0.0, 1.0), - Vec2::new(0.0, 1.0)), - Vertex::new(Vec3::new(-0.5, 0.5, 0.5), Vec3::new(1.0, 1.0, 1.0), - Vec2::new(1.0, 1.0)), -]; - -pub const INDICES: &[u16] = &[ - 0, 1, 2, 2, 3, 0, - 4, 5, 6, 6, 7, 4, -]; - - #[repr(C)] #[derive(Clone, Debug)] pub struct Vertex<T: Copy> { @@ -48,8 +23,8 @@ pub struct UniformBlock<T: Copy> { } impl<T: Copy> Vertex<T> { - const fn new(position: Vec3<T>, color: Vec3<T>, - texture_coordinates: Vec2<T>) + pub const fn new(position: Vec3<T>, color: Vec3<T>, + texture_coordinates: Vec2<T>) -> Self { Self { position, color, texture_coordinates } |