diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-06 14:26:15 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-06 14:56:40 -0700 |
| commit | 5b5f7bb4b3cac1fa96b2325e7c3d0784ade28ebf (patch) | |
| tree | df536be69c964533bf19c75119a8e406f9daad31 /src/shader_data.rs | |
| parent | 562693fe2d0afbe9c828fa1acb4473db9752eeed (diff) | |
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
Diffstat (limited to 'src/shader_data.rs')
| -rw-r--r-- | src/shader_data.rs | 9 |
1 files changed, 7 insertions, 2 deletions
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<T: Copy> { #[repr(C)] #[derive(Clone, Debug)] pub struct UniformBlock<T: Copy> { - pub scale: Vec3<T>, - pub model: Transformation<T>, pub view: Transformation<T>, pub projection: Mat4<T>, } +#[repr(C)] +#[derive(Clone, Debug)] +pub struct VertexPushBlock<T: Copy> { + pub scale: Vec3<T>, + pub model: Transformation<T>, +} + impl<T: Copy> Vertex<T> { pub const fn new(position: Vec3<T>, color: Vec3<T>, texture_coordinates: Vec2<T>) |