From 5b5f7bb4b3cac1fa96b2325e7c3d0784ade28ebf Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Thu, 6 Aug 2026 14:26:15 -0700 Subject: factor out the render commands into a new scene module use push constants this concludes the tutorial; there's now a bit of fairly obvious refactoring to do to group objects in a way that reflects when they're needed, which can be followed by building a real scene graph Change-Id: Id3b76d00d08ae915270095bd606e41767b7ec177 Force-Push: yes --- src/shader_data.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/shader_data.rs') diff --git a/src/shader_data.rs b/src/shader_data.rs index 8197bfc..892260d 100644 --- a/src/shader_data.rs +++ b/src/shader_data.rs @@ -16,12 +16,17 @@ pub struct Vertex { #[repr(C)] #[derive(Clone, Debug)] pub struct UniformBlock { - pub scale: Vec3, - pub model: Transformation, pub view: Transformation, pub projection: Mat4, } +#[repr(C)] +#[derive(Clone, Debug)] +pub struct VertexPushBlock { + pub scale: Vec3, + pub model: Transformation, +} + impl Vertex { pub const fn new(position: Vec3, color: Vec3, texture_coordinates: Vec2) -- cgit 1.4.1