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/window_dressing.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/graphics/window_dressing.rs') 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 { @@ -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)?; -- cgit 1.4.1