Skip to main content

Swapchain

Trait Swapchain 

Source
pub trait Swapchain: VkHandle<Handle = VkSwapchainKHR> + DeviceChild {
    // Provided methods
    fn image_count(&self) -> Result<u32> { ... }
    fn images(
        &self,
        sink: &mut [MaybeUninit<VkImage>],
    ) -> Result<ArrayQueryResult<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 { ... }
}
Available on crate features VK_KHR_surface and VK_KHR_swapchain only.

Provided Methods§

Source

fn image_count(&self) -> Result<u32>

Available on crate feature Implements only.

Obtain a count of the array of presentable images associated with a swapchain

§Failures

On failure, this command returns

  • [brvk::VK_ERROR_OUT_OF_HOST_MEMORY]
  • [brvk::VK_ERROR_OUT_OF_DEVICE_MEMORY]
Source

fn images( &self, sink: &mut [MaybeUninit<VkImage>], ) -> Result<ArrayQueryResult<u32>>

Available on crate feature Implements only.

Obtain the array of presentable images associated with a swapchain

§Failures

On failure, this command returns

  • [brvk::VK_ERROR_OUT_OF_HOST_MEMORY]
  • [brvk::VK_ERROR_OUT_OF_DEVICE_MEMORY]
Source

fn acquire_full_screen_exclusive_mode(&self) -> Result<()>

Available on crate features Implements and VK_EXT_full_screen_exclusive only.

Acquire full-screen exclusive mode for a swapchain.

§Failures

On failure, this command returns

  • brvk::VK_ERROR_OUT_OF_HOST_MEMORY
  • brvk::VK_ERROR_OUT_OF_DEVICE_MEMORY
  • brvk::VK_ERROR_INITIALIZATION_FAILED
  • brvk::VK_ERROR_SURFACE_LOST_KHR
Source

fn release_full_screen_exclusive_mode(&self) -> Result<()>

Available on crate features Implements and VK_EXT_full_screen_exclusive only.

Release full-screen exclusive mode from a swapchain.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'s, T> Swapchain for &'s T
where T: Swapchain + ?Sized,

Source§

impl<'s, T> Swapchain for &'s mut T
where T: Swapchain + ?Sized,

Source§

impl<T> Swapchain for Arc<T>
where T: Swapchain + ?Sized,

Source§

impl<T> Swapchain for Box<T>
where T: Swapchain + ?Sized,

Source§

impl<T> Swapchain for ManuallyDrop<T>
where T: Swapchain,

Source§

impl<T> Swapchain for Rc<T>
where T: Swapchain + ?Sized,

Implementors§

Source§

impl<Device, Surface> Swapchain for SurfaceSwapchainObject<Device, Surface>
where Device: Device, Surface: VkHandle<Handle = VkSurfaceKHR>,