From d672e147db0df6186c528262367770dcde9d75fc Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sun, 9 Aug 2026 17:36:41 -0700 Subject: rename and reexport a bunch of graphics state types the word "graphics" is part of the module name, so it does not need to be part of the struct name the fact that an object holds state is... not strictly implied by the fact it's a struct, but it happens that ALL our objects exist primarily to hold state, so we remove that word as well Force-Push: yes Change-Id: I1b3e2ac0f1c29304e75a190172463aabfba4b3a4 --- src/graphics/model.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/graphics/model.rs') diff --git a/src/graphics/model.rs b/src/graphics/model.rs index 7b912b6..9c62d51 100644 --- a/src/graphics/model.rs +++ b/src/graphics/model.rs @@ -1,7 +1,6 @@ #![deny(unsafe_code)] use crate::error::*; -use crate::graphics::permanent::PermanentGraphicsState; -use crate::graphics::render_state::RenderState; +use crate::graphics::{ Permanent, Render }; use crate::graphics::util::init_buffer; use crate::linear_algebra::{ Vec3, Vec4, Transformation }; use crate::shader_data::{ Vertex, VertexPushBlock }; @@ -25,7 +24,7 @@ pub struct Model { impl Model { pub fn new(vertices: Vec>, indices: Vec, - permanent: &PermanentGraphicsState) + permanent: &Permanent) -> Result { let device = &permanent.device; @@ -61,7 +60,7 @@ impl Model { } #[allow(unsafe_code)] - pub fn render(&self, time: f32, device: &Device, render_state: &RenderState, + pub fn render(&self, time: f32, device: &Device, render: &Render, command_buffer: &vk::CommandBuffer, descriptor_set: &vk::DescriptorSet) { @@ -78,7 +77,7 @@ impl Model { unsafe { device.cmd_bind_descriptor_sets(*command_buffer, vk::PipelineBindPoint::GRAPHICS, - render_state.pipeline_layout, + render.pipeline_layout, 0, &[*descriptor_set], &[]) @@ -99,7 +98,7 @@ impl Model { }; unsafe { - device.cmd_push_constants(*command_buffer, render_state.pipeline_layout, + device.cmd_push_constants(*command_buffer, render.pipeline_layout, vk::ShaderStageFlags::VERTEX, 0, push_block_bytes) -- cgit 1.4.1