pub struct SwapchainOptions { /* private fields */ }Expand description
Swapchain configuration.
Implementations§
Source§impl SwapchainOptions
impl SwapchainOptions
Sourcepub fn frames_in_flight(&mut self, frames: usize) -> &mut Self
pub fn frames_in_flight(&mut self, frames: usize) -> &mut Self
Number of frames that may be concurrently worked on, including recording on the CPU. Defaults to 2.
Sourcepub fn format_preference(&mut self, formats: &[SurfaceFormatKHR]) -> &mut Self
pub fn format_preference(&mut self, formats: &[SurfaceFormatKHR]) -> &mut Self
Preference-ordered list of image formats and color spaces. Defaults to 8-bit sRGB.
Sourcepub fn present_mode_preference(&mut self, modes: &[PresentModeKHR]) -> &mut Self
pub fn present_mode_preference(&mut self, modes: &[PresentModeKHR]) -> &mut Self
Preference-ordered list of presentation modes. Defaults to vk::PresentModeKHR::FIFO_KHR.
Sourcepub fn usage(&mut self, usage: ImageUsageFlags) -> &mut Self
pub fn usage(&mut self, usage: ImageUsageFlags) -> &mut Self
Required swapchain image usage flags. Defaults to vk::ImageUsageFlags::COLOR_ATTACHMENT.
Sourcepub fn sharing_mode(&mut self, mode: SharingMode) -> &mut Self
pub fn sharing_mode(&mut self, mode: SharingMode) -> &mut Self
Requires swapchain image sharing mode. Defaults to vk::SharingMode::EXCLUSIVE.
Sourcepub fn composite_alpha(&mut self, value: CompositeAlphaFlagBitsKHR) -> &mut Self
pub fn composite_alpha(&mut self, value: CompositeAlphaFlagBitsKHR) -> &mut Self
Requires swapchain image composite alpha. Defaults to vk::CompositeAlphaFlagBitsKHR::OPAQUE_KHR.
Trait Implementations§
Source§impl Clone for SwapchainOptions
impl Clone for SwapchainOptions
Source§fn clone(&self) -> SwapchainOptions
fn clone(&self) -> SwapchainOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SwapchainOptions
impl Debug for SwapchainOptions
Auto Trait Implementations§
impl Freeze for SwapchainOptions
impl RefUnwindSafe for SwapchainOptions
impl Send for SwapchainOptions
impl Sync for SwapchainOptions
impl Unpin for SwapchainOptions
impl UnwindSafe for SwapchainOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more