diff options
Diffstat (limited to 'src/graphics/window_dressing.rs')
| -rw-r--r-- | src/graphics/window_dressing.rs | 18 |
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)?; |