pub trait Swapchain: VkHandle<Handle = VkSwapchainKHR> + DeviceChild {
// Required methods
fn format(&self) -> VkFormat;
fn size(&self) -> &VkExtent2D;
// Provided methods
fn acquire_next(
&mut self,
timeout: Option<u64>,
completion: CompletionHandlerMut<'_>,
) -> Result<u32> { ... }
fn acquire_full_screen_exclusive_mode(&self) -> Result<()>
where Self::ConcreteDevice: DeviceFullScreenExclusiveExtension { ... }
fn release_full_screen_exclusive_mode(&self) -> Result<()>
where Self::ConcreteDevice: DeviceFullScreenExclusiveExtension { ... }
fn image_count(&self) -> Result<u32> { ... }
fn images(&self, sink: &mut [VkImage]) -> Result<u32> { ... }
fn images_alloc(&self) -> Result<Vec<SwapchainImage<&Self>>>
where Self: Sized { ... }
}
Required Methods§
Provided Methods§
Sourcefn acquire_next(
&mut self,
timeout: Option<u64>,
completion: CompletionHandlerMut<'_>,
) -> Result<u32>
Available on crate feature Implements
only.
fn acquire_next( &mut self, timeout: Option<u64>, completion: CompletionHandlerMut<'_>, ) -> Result<u32>
Implements
only.Retrieve the index of the next available presentation image
§Failures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
VK_ERROR_OUT_OF_DATE_KHR
VK_ERROR_SURFACE_LOST_KHR
Sourcefn acquire_full_screen_exclusive_mode(&self) -> Result<()>where
Self::ConcreteDevice: DeviceFullScreenExclusiveExtension,
Available on crate features Implements
and VK_EXT_full_screen_exclusive
only.
fn acquire_full_screen_exclusive_mode(&self) -> Result<()>where
Self::ConcreteDevice: DeviceFullScreenExclusiveExtension,
Implements
and VK_EXT_full_screen_exclusive
only.Acquire full-screen exclusive mode for a swapchain.
§Failures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_INITIALIZATION_FAILED
VK_ERROR_SURFACE_LOST_KHR
Sourcefn release_full_screen_exclusive_mode(&self) -> Result<()>where
Self::ConcreteDevice: DeviceFullScreenExclusiveExtension,
Available on crate features Implements
and VK_EXT_full_screen_exclusive
only.
fn release_full_screen_exclusive_mode(&self) -> Result<()>where
Self::ConcreteDevice: DeviceFullScreenExclusiveExtension,
Implements
and VK_EXT_full_screen_exclusive
only.Release full-screen exclusive mode from a swapchain.
Sourcefn image_count(&self) -> Result<u32>
Available on crate feature Implements
only.
fn image_count(&self) -> Result<u32>
Implements
only.Obtain a count of the array of presentable images associated with a swapchain
§Failures
On failure, this command returns
Sourcefn images(&self, sink: &mut [VkImage]) -> Result<u32>
Available on crate feature Implements
only.
fn images(&self, sink: &mut [VkImage]) -> Result<u32>
Implements
only.Obtain the array of presentable images associated with a swapchain
§Failures
On failure, this command returns
Sourcefn images_alloc(&self) -> Result<Vec<SwapchainImage<&Self>>>where
Self: Sized,
Available on crate features Implements
and alloc
only.
fn images_alloc(&self) -> Result<Vec<SwapchainImage<&Self>>>where
Self: Sized,
Implements
and alloc
only.Obtain the array of presentable images associated with a swapchain
§Failures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY