pub struct Swapchain {
pub image_format: Format,
pub extent: Extent2D,
/* private fields */
}
Fields§
§image_format: Format
§extent: Extent2D
Implementations§
Methods from Deref<Target = Device>§
pub fn fp(&self) -> &DeviceFn
pub fn device(&self) -> Device
Sourcepub unsafe fn create_swapchain(
&self,
create_info: &SwapchainCreateInfoKHR<'_>,
allocation_callbacks: Option<&AllocationCallbacks<'_>>,
) -> Result<SwapchainKHR, Result>
pub unsafe fn create_swapchain( &self, create_info: &SwapchainCreateInfoKHR<'_>, allocation_callbacks: Option<&AllocationCallbacks<'_>>, ) -> Result<SwapchainKHR, Result>
Sourcepub unsafe fn destroy_swapchain(
&self,
swapchain: SwapchainKHR,
allocation_callbacks: Option<&AllocationCallbacks<'_>>,
)
pub unsafe fn destroy_swapchain( &self, swapchain: SwapchainKHR, allocation_callbacks: Option<&AllocationCallbacks<'_>>, )
Sourcepub unsafe fn get_swapchain_images(
&self,
swapchain: SwapchainKHR,
) -> Result<Vec<Image>, Result>
pub unsafe fn get_swapchain_images( &self, swapchain: SwapchainKHR, ) -> Result<Vec<Image>, Result>
Sourcepub unsafe fn acquire_next_image(
&self,
swapchain: SwapchainKHR,
timeout: u64,
semaphore: Semaphore,
fence: Fence,
) -> Result<(u32, bool), Result>
pub unsafe fn acquire_next_image( &self, swapchain: SwapchainKHR, timeout: u64, semaphore: Semaphore, fence: Fence, ) -> Result<(u32, bool), Result>
On success, returns the next image’s index and whether the swapchain is suboptimal for the surface.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImageKHR.html
Sourcepub unsafe fn queue_present(
&self,
queue: Queue,
present_info: &PresentInfoKHR<'_>,
) -> Result<bool, Result>
pub unsafe fn queue_present( &self, queue: Queue, present_info: &PresentInfoKHR<'_>, ) -> Result<bool, Result>
On success, returns whether the swapchain is suboptimal for the surface.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueuePresentKHR.html
Sourcepub unsafe fn get_device_group_present_capabilities(
&self,
device_group_present_capabilities: &mut DeviceGroupPresentCapabilitiesKHR<'_>,
) -> Result<(), Result>
pub unsafe fn get_device_group_present_capabilities( &self, device_group_present_capabilities: &mut DeviceGroupPresentCapabilitiesKHR<'_>, ) -> Result<(), Result>
Only available since Vulkan 1.1.
Also available as [khr::device_group::Device::get_device_group_present_capabilities()
]
when VK_KHR_surface
is enabled.
Sourcepub unsafe fn get_device_group_surface_present_modes(
&self,
surface: SurfaceKHR,
) -> Result<DeviceGroupPresentModeFlagsKHR, Result>
pub unsafe fn get_device_group_surface_present_modes( &self, surface: SurfaceKHR, ) -> Result<DeviceGroupPresentModeFlagsKHR, Result>
Only available since Vulkan 1.1.
Also available as [khr::device_group::Device::get_device_group_surface_present_modes()
]
when VK_KHR_surface
is enabled.
Sourcepub unsafe fn acquire_next_image2(
&self,
acquire_info: &AcquireNextImageInfoKHR<'_>,
) -> Result<(u32, bool), Result>
pub unsafe fn acquire_next_image2( &self, acquire_info: &AcquireNextImageInfoKHR<'_>, ) -> Result<(u32, bool), Result>
On success, returns the next image’s index and whether the swapchain is suboptimal for the surface.
Only available since Vulkan 1.1.
Also available as [khr::device_group::Device::acquire_next_image2()
]
when VK_KHR_swapchain
is enabled.
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImage2KHR.html