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 image_count(&self) -> Result<u32> { ... }
fn images(
&self,
sink: &mut [MaybeUninit<VkImage>],
) -> Result<(u32, ArrayQueryResult)> { ... }
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>
fn acquire_next( &mut self, timeout: Option<u64>, completion: CompletionHandlerMut<'_>, ) -> Result<u32>
Retrieve the index of the next available presentation image
§Failures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORYVK_ERROR_DEVICE_LOSTVK_ERROR_OUT_OF_DATE_KHRVK_ERROR_SURFACE_LOST_KHR
Sourcefn image_count(&self) -> Result<u32>
fn image_count(&self) -> Result<u32>
Obtain a count of the array of presentable images associated with a swapchain
§Failures
On failure, this command returns
Sourcefn images(
&self,
sink: &mut [MaybeUninit<VkImage>],
) -> Result<(u32, ArrayQueryResult)>
fn images( &self, sink: &mut [MaybeUninit<VkImage>], ) -> Result<(u32, ArrayQueryResult)>
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,
fn images_alloc(&self) -> Result<Vec<SwapchainImage<&Self>>>where
Self: Sized,
Obtain the array of presentable images associated with a swapchain
§Failures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY