pub struct SwapchainPresentInfo {
    pub swapchain: Arc<Swapchain>,
    pub image_index: u32,
    pub present_id: Option<NonZeroU64>,
    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_regions: Vec<RectangleLayer>

Am 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, 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

Returns a SwapchainPresentInfo with the specified swapchain and image_index.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.