pub struct Swapchain { /* private fields */ }
Implementations§
Source§impl Swapchain
impl Swapchain
pub fn new(instance: &Instance, device: &Device) -> Self
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 acquire_next_image(
&self,
swapchain: SwapchainKHR,
timeout: u64,
semaphore: Semaphore,
fence: Fence,
) -> VkResult<(u32, bool)>
pub unsafe fn acquire_next_image( &self, swapchain: SwapchainKHR, timeout: u64, semaphore: Semaphore, fence: Fence, ) -> VkResult<(u32, bool)>
On success, returns the next image’s index and whether the swapchain is suboptimal for the surface. https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImageKHR.html
Sourcepub unsafe fn create_swapchain(
&self,
create_info: &SwapchainCreateInfoKHR,
allocation_callbacks: Option<&AllocationCallbacks>,
) -> VkResult<SwapchainKHR>
pub unsafe fn create_swapchain( &self, create_info: &SwapchainCreateInfoKHR, allocation_callbacks: Option<&AllocationCallbacks>, ) -> VkResult<SwapchainKHR>
Sourcepub unsafe fn queue_present(
&self,
queue: Queue,
present_info: &PresentInfoKHR,
) -> VkResult<bool>
pub unsafe fn queue_present( &self, queue: Queue, present_info: &PresentInfoKHR, ) -> VkResult<bool>
On success, returns whether the swapchain is suboptimal for the surface. https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkQueuePresentKHR.html
Sourcepub unsafe fn get_swapchain_images(
&self,
swapchain: SwapchainKHR,
) -> VkResult<Vec<Image>>
pub unsafe fn get_swapchain_images( &self, swapchain: SwapchainKHR, ) -> VkResult<Vec<Image>>
pub const fn name() -> &'static CStr
pub fn fp(&self) -> &KhrSwapchainFn
pub fn device(&self) -> Device
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Swapchain
impl RefUnwindSafe for Swapchain
impl Send for Swapchain
impl Sync for Swapchain
impl Unpin for Swapchain
impl UnwindSafe for Swapchain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)