Struct SurfaceSwapchainObject

Source
pub struct SurfaceSwapchainObject<Device: VkHandle<Handle = VkDevice>, Surface: VkHandle<Handle = VkSurfaceKHR>> { /* private fields */ }
Expand description

Opaque handle to as swapchain object, backed with specific surface

Implementations§

Source§

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

Source

pub fn deconstruct(self) -> (Device, Surface)

Available on crate feature Implements only.

Deconstructs the swapchain and retrieves its parents

Trait Implementations§

Source§

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

Source§

type ConcreteDevice = Device

A concrete type of the parent device object.
Source§

fn device(&self) -> &Self::ConcreteDevice

Retrieve a reference to a device object that creates this object
Source§

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

Source§

fn device_handle(&self) -> VkDevice

Retrieve a reference to a device handle that creates this objecs
Source§

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

Available on crate feature Implements only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

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

Source§

fn format(&self) -> VkFormat

Source§

fn size(&self) -> &VkExtent2D

Source§

fn acquire_next( &mut self, timeout: Option<u64>, completion: CompletionHandlerMut<'_>, ) -> Result<u32>

Available on crate feature Implements only.
Retrieve the index of the next available presentation image Read more
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. Read more
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.
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 Read more
Source§

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

Available on crate feature Implements only.
Obtain the array of presentable images associated with a swapchain Read more
Source§

fn images_alloc(&self) -> Result<Vec<SwapchainImage<&Self>>>
where Self: Sized,

Available on crate features Implements and alloc only.
Obtain the array of presentable images associated with a swapchain Read more
Source§

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

Source§

type Handle = VkSwapchainKHR

Source§

fn native_ptr(&self) -> Self::Handle

Retrieve an underlying handle
Source§

fn as_transparent_ref(&self) -> VkHandleRef<'_, Self::Handle>

Source§

impl<Device: VkHandle<Handle = VkDevice>, Surface: VkHandle<Handle = VkSurfaceKHR>> VkHandleMut for SurfaceSwapchainObject<Device, Surface>

Source§

fn native_ptr_mut(&mut self) -> Self::Handle

Retrieve an underlying mutable handle
Source§

fn as_transparent_ref_mut(&mut self) -> VkHandleRefMut<'_, Self::Handle>

Source§

impl<Device: VkHandle<Handle = VkDevice>, Surface: VkHandle<Handle = VkSurfaceKHR>> VkObject for SurfaceSwapchainObject<Device, Surface>

Source§

const TYPE: VkObjectType = 1_000_001_000i32

Source§

fn set_name(&self, name: Option<&CStr>) -> Result<()>
where Self: DeviceChild<ConcreteDevice: InstanceChild<ConcreteInstance: InstanceExtensions>>, Self::Handle: VkRawHandle,

Available on crate features Implements and VK_EXT_debug_utils only.
Give a user-friendly name to this object. Read more
Source§

impl<Device, Surface> Send for SurfaceSwapchainObject<Device, Surface>
where Device: VkHandle<Handle = VkDevice> + Send, Surface: VkHandle<Handle = VkSurfaceKHR> + Send,

Source§

impl<Device, Surface> Sync for SurfaceSwapchainObject<Device, Surface>
where Device: VkHandle<Handle = VkDevice> + Sync, Surface: VkHandle<Handle = VkSurfaceKHR> + Sync,

Auto Trait Implementations§

§

impl<Device, Surface> Freeze for SurfaceSwapchainObject<Device, Surface>
where Device: Freeze, Surface: Freeze,

§

impl<Device, Surface> RefUnwindSafe for SurfaceSwapchainObject<Device, Surface>
where Device: RefUnwindSafe, Surface: RefUnwindSafe,

§

impl<Device, Surface> Unpin for SurfaceSwapchainObject<Device, Surface>
where Device: Unpin, Surface: Unpin,

§

impl<Device, Surface> UnwindSafe for SurfaceSwapchainObject<Device, Surface>
where Device: UnwindSafe, Surface: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> VkHandleExt for T
where T: VkHandle,

Source§

fn eq_handle(&self, other: &Self) -> bool
where Self::Handle: VkRawHandle,

Checks the equality between vulkan objects by their handle value.