pub struct SwapchainPresentInfo {
    pub swapchain: Arc<Swapchain>,
    pub image_index: u32,
    pub present_id: Option<NonZeroU64>,
    pub present_mode: Option<PresentMode>,
    pub present_regions: Vec<RectangleLayer>,
    pub _ne: NonExhaustive,
}
Expand description

Parameters for a single present operation on a swapchain.

Fields§

§swapchain: Arc<Swapchain>

The swapchain to present to.

There is no default value.

§image_index: u32

The index of the swapchain image to present to.

The image must have been acquired first; this is the index that acquire_next_image returns.

There is no default value.

§present_id: Option<NonZeroU64>

An id used to identify this present operation.

If present_id is Some, the present_id feature must be enabled on the device. The id must be greater than any id previously used for swapchain. If a swapchain is recreated, this resets.

The default value is None.

§present_mode: Option<PresentMode>

The new present mode to use for presenting. This mode will be used for the current present, and any future presents where this value is None.

If this is not None, then the provided present mode must be one of the present modes specified with present_modes when creating the swapchain.

The default value is None.

§present_regions: Vec<RectangleLayer>

An optimization hint to the implementation, that only some parts of the swapchain image are going to be updated by the present operation.

If present_regions is not empty, then the khr_incremental_present extension must be enabled on the device. The implementation will update the provided regions of the swapchain image, and may ignore the other areas. However, as this is just a hint, the Vulkan implementation is free to ignore the regions altogether and update everything.

If present_regions is empty, that means that all of the swapchain image must be updated.

The default value is empty.

§_ne: NonExhaustive

Implementations§

source§

impl SwapchainPresentInfo

source

pub fn swapchain_image_index( swapchain: Arc<Swapchain>, image_index: u32 ) -> Self

Returns a SwapchainPresentInfo with the specified swapchain and image_index.

Trait Implementations§

source§

impl Clone for SwapchainPresentInfo

source§

fn clone(&self) -> SwapchainPresentInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SwapchainPresentInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.