Struct vulkano::swapchain::SwapchainPresentInfo
source · 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§
source§impl SwapchainPresentInfo
impl SwapchainPresentInfo
sourcepub fn swapchain_image_index(swapchain: Arc<Swapchain>, image_index: u32) -> Self
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
impl Clone for SwapchainPresentInfo
source§fn clone(&self) -> SwapchainPresentInfo
fn clone(&self) -> SwapchainPresentInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more