summary refs log tree commit diff
path: root/src/graphics/window_dressing.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-08-09 17:36:41 -0700
committerIrene Knapp <ireneista@irenes.space>2026-08-09 17:53:43 -0700
commitd672e147db0df6186c528262367770dcde9d75fc (patch)
tree58d590891fffec7d5db47e8adf9beb677a5a1356 /src/graphics/window_dressing.rs
parent4158fed109ae789cb3ca7ff53c2790797a3b4087 (diff)
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
Diffstat (limited to 'src/graphics/window_dressing.rs')
-rw-r--r--src/graphics/window_dressing.rs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/graphics/window_dressing.rs b/src/graphics/window_dressing.rs
index 9afb03e..cca0dc8 100644
--- a/src/graphics/window_dressing.rs
+++ b/src/graphics/window_dressing.rs
@@ -1,9 +1,7 @@
 #![deny(unsafe_code)]
 use crate::error::*;
-use crate::graphics::permanent::{
-  PermanentGraphicsState, GraphicsStateForReinit, QueueFamilyIndices,
-  EnableAnisotropy
-};
+use crate::graphics::{ Permanent, ForReinit };
+use crate::graphics::permanent::{ QueueFamilyIndices, EnableAnisotropy };
 use crate::graphics::util::{
   allocate_buffer, allocate_image, init_image_view
 };
@@ -27,8 +25,8 @@ pub const N_SIMULTANEOUS_FRAMES: usize = 5;
 //   The WindowDressing collects the Vulkan graphics objects which need to be
 // regenerated or modified when the window changes in certain ways, such as
 // resizing, but are not needed during rendering. The ones which don't need to
-// be regenerated are collected in PermanentGraphicsState. The ones which are
-// needed during rendering are collected in RenderState, below.
+// be regenerated are collected in Permanent. The ones which are needed during
+// rendering are collected in RenderState, below.
 #[derive(Debug)]
 pub struct WindowDressing {
   pub swapchain: Swapchain,
@@ -89,8 +87,7 @@ pub struct Concurrency {
 
 
 impl WindowDressing {
-  pub fn new(permanent: &PermanentGraphicsState,
-             for_reinit: &GraphicsStateForReinit,
+  pub fn new(permanent: &Permanent, for_reinit: &ForReinit,
              enable_anisotropy: EnableAnisotropy, mip_count: u32)
       -> Result<Self>
   {
@@ -140,8 +137,7 @@ impl WindowDressing {
 
 
   #[allow(unsafe_code)]
-  pub fn reinit(&mut self, permanent: &PermanentGraphicsState,
-                for_reinit: &GraphicsStateForReinit)
+  pub fn reinit(&mut self, permanent: &Permanent, for_reinit: &ForReinit)
       -> Result<()>
   {
     let window = &permanent.window;
@@ -254,7 +250,7 @@ fn init_swapchain(window: &Window, instance: &Instance,
   let physical_device = device.physical_device();
 
   let (capabilities, formats, presentation_modes)
-          = PermanentGraphicsState::find_device_swapchain_features(
+          = Permanent::find_device_swapchain_features(
                 instance, surface, &physical_device)?.require()?;
 
   let format = pick_surface_format(&formats)?;