Struct vulkano::image::swapchain::SwapchainImage
source · pub struct SwapchainImage { /* private fields */ }
Expand description
An image that is part of a swapchain.
Creating a SwapchainImage
is automatically done when creating a swapchain.
A swapchain image is special in the sense that it can only be used after being acquired by
calling the acquire
method on the swapchain. You have no way to know in advance which
swapchain image is going to be acquired, so you should keep all of them alive.
After a swapchain image has been acquired, you are free to perform all the usual operations on it. When you are done you can then present the image (by calling the corresponding method on the swapchain), which will have the effect of showing the content of the image to the screen. Once an image has been presented, it can no longer be used unless it is acquired again.
Implementations
Trait Implementations
sourceimpl Debug for SwapchainImage
impl Debug for SwapchainImage
sourceimpl DeviceOwned for SwapchainImage
impl DeviceOwned for SwapchainImage
sourceimpl Hash for SwapchainImage
impl Hash for SwapchainImage
sourceimpl ImageAccess for SwapchainImage
impl ImageAccess for SwapchainImage
sourcefn inner(&self) -> ImageInner<'_>
fn inner(&self) -> ImageInner<'_>
Returns the inner unsafe image object used by this image.
sourcefn initial_layout_requirement(&self) -> ImageLayout
fn initial_layout_requirement(&self) -> ImageLayout
Returns the layout that the image has when it is first used in a primary command buffer. Read more
sourcefn final_layout_requirement(&self) -> ImageLayout
fn final_layout_requirement(&self) -> ImageLayout
Returns the layout that the image must be returned to before the end of the command buffer. Read more
sourcefn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>
fn descriptor_layouts(&self) -> Option<ImageDescriptorLayouts>
Returns an
ImageDescriptorLayouts
structure specifying the image layout to use
in descriptors of various kinds. Read moresourceunsafe fn layout_initialized(&self)
unsafe fn layout_initialized(&self)
When images are created their memory layout is initially
Undefined
or Preinitialized
.
This method allows the image memory barrier creation process to signal when an image
has been transitioned out of its initial Undefined
or Preinitialized
state. This
allows vulkano to avoid creating unnecessary image memory barriers between future
uses of the image. Read morefn is_layout_initialized(&self) -> bool
sourcefn dimensions(&self) -> ImageDimensions
fn dimensions(&self) -> ImageDimensions
Returns the dimensions of the image.
sourcefn format_features(&self) -> &FormatFeatures
fn format_features(&self) -> &FormatFeatures
Returns the features supported by the image’s format.
sourcefn mip_levels(&self) -> u32
fn mip_levels(&self) -> u32
Returns the number of mipmap levels of this image.
sourcefn samples(&self) -> SampleCount
fn samples(&self) -> SampleCount
Returns the number of samples of this image.
sourcefn usage(&self) -> &ImageUsage
fn usage(&self) -> &ImageUsage
Returns the usage the image was created with.
sourcefn stencil_usage(&self) -> &ImageUsage
fn stencil_usage(&self) -> &ImageUsage
Returns the stencil usage the image was created with.
sourcefn subresource_layers(&self) -> ImageSubresourceLayers
fn subresource_layers(&self) -> ImageSubresourceLayers
Returns an
ImageSubresourceLayers
covering the first mip level of the image. All aspects
of the image are selected, or plane0
if the image is multi-planar. Read moresourcefn subresource_range(&self) -> ImageSubresourceRange
fn subresource_range(&self) -> ImageSubresourceRange
Returns an
ImageSubresourceRange
covering the whole image. If the image is multi-planar,
only the color
aspect is selected. Read morefn initial_layout(&self) -> ImageLayout
sourceunsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> Arc<ImageAccessFromUndefinedLayout<Self>>where
Self: Sized,
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> Arc<ImageAccessFromUndefinedLayout<Self>>where
Self: Sized,
Wraps around this
ImageAccess
and returns an identical ImageAccess
but whose initial
layout requirement is either Undefined
or Preinitialized
. Read moresourceimpl<P> ImageContent<P> for SwapchainImage
impl<P> ImageContent<P> for SwapchainImage
sourcefn matches_format(&self) -> bool
fn matches_format(&self) -> bool
Checks whether pixels of type
P
match the format of the image.sourceimpl PartialEq<SwapchainImage> for SwapchainImage
impl PartialEq<SwapchainImage> for SwapchainImage
impl Eq for SwapchainImage
Auto Trait Implementations
impl !RefUnwindSafe for SwapchainImage
impl Send for SwapchainImage
impl Sync for SwapchainImage
impl Unpin for SwapchainImage
impl !UnwindSafe for SwapchainImage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more