[−][src]Struct nannou::vk::SwapchainImage
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.
Methods
impl<W> SwapchainImage<W>
[src]
pub unsafe fn from_raw(
swapchain: Arc<Swapchain<W>>,
id: usize
) -> Result<Arc<SwapchainImage<W>>, OomError>
[src]
swapchain: Arc<Swapchain<W>>,
id: usize
) -> Result<Arc<SwapchainImage<W>>, OomError>
Builds a SwapchainImage
from raw components.
This is an internal method that you shouldn't call.
pub fn dimensions(&self) -> [u32; 2]
[src]
Returns the dimensions of the image.
A SwapchainImage
is always two-dimensional.
pub fn swapchain(&self) -> &Arc<Swapchain<W>>
[src]
Returns the swapchain this image belongs to.
Trait Implementations
impl<W> ImageViewAccess for SwapchainImage<W>
[src]
fn parent(&self) -> &dyn ImageAccess
[src]
fn dimensions(&self) -> Dimensions
[src]
fn inner(&self) -> &UnsafeImageView
[src]
fn descriptor_set_storage_image_layout(&self) -> ImageLayout
[src]
fn descriptor_set_combined_image_sampler_layout(&self) -> ImageLayout
[src]
fn descriptor_set_sampled_image_layout(&self) -> ImageLayout
[src]
fn descriptor_set_input_attachment_layout(&self) -> ImageLayout
[src]
fn identity_swizzle(&self) -> bool
[src]
fn format(&self) -> Format
[src]
Returns the format of this view. This can be different from the parent's format.
fn samples(&self) -> u32
[src]
fn can_be_sampled(&self, _sampler: &Sampler) -> bool
[src]
Returns true if the given sampler can be used with this image view. Read more
impl<W> ImageClearValue<<Format as FormatDesc>::ClearValue> for SwapchainImage<W>
[src]
fn decode(
&self,
value: <Format as FormatDesc>::ClearValue
) -> Option<ClearValue>
[src]
&self,
value: <Format as FormatDesc>::ClearValue
) -> Option<ClearValue>
impl<W> ImageAccess for SwapchainImage<W>
[src]
fn inner(&self) -> ImageInner
[src]
fn initial_layout_requirement(&self) -> ImageLayout
[src]
fn final_layout_requirement(&self) -> ImageLayout
[src]
fn conflicts_buffer(&self, other: &dyn BufferAccess) -> bool
[src]
fn conflicts_image(&self, other: &dyn ImageAccess) -> bool
[src]
fn conflict_key(&self) -> u64
[src]
fn try_gpu_lock(&self, bool, ImageLayout) -> Result<(), AccessError>
[src]
unsafe fn layout_initialized(&self)
[src]
fn is_layout_initialized(&self) -> bool
[src]
unsafe fn increase_gpu_lock(&self)
[src]
unsafe fn unlock(&self, Option<ImageLayout>)
[src]
fn format(&self) -> Format
[src]
Returns the format of this image.
fn has_color(&self) -> bool
[src]
Returns true if the image is a color image.
fn has_depth(&self) -> bool
[src]
Returns true if the image has a depth component. In other words, if it is a depth or a depth-stencil format. Read more
fn has_stencil(&self) -> bool
[src]
Returns true if the image has a stencil component. In other words, if it is a stencil or a depth-stencil format. Read more
fn mipmap_levels(&self) -> u32
[src]
Returns the number of mipmap levels of this image.
fn samples(&self) -> u32
[src]
Returns the number of samples of this image.
fn dimensions(&self) -> ImageDimensions
[src]
Returns the dimensions of the image.
fn supports_blit_source(&self) -> bool
[src]
Returns true if the image can be used as a source for blits.
fn supports_blit_destination(&self) -> bool
[src]
Returns true if the image can be used as a destination for blits.
unsafe fn preinitialized_layout(&self) -> bool
[src]
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self>
[src]
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self>
Wraps around this ImageAccess
and returns an identical ImageAccess
but whose initial layout requirement is either Undefined
or Preinitialized
. Read more
impl<P, W> ImageContent<P> for SwapchainImage<W>
[src]
fn matches_format(&self) -> bool
[src]
Auto Trait Implementations
impl<W> Send for SwapchainImage<W> where
W: Send + Sync,
W: Send + Sync,
impl<W> Sync for SwapchainImage<W> where
W: Send + Sync,
W: Send + Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ImageAccess for T where
T: SafeDeref,
<T as Deref>::Target: ImageAccess,
[src]
T: SafeDeref,
<T as Deref>::Target: ImageAccess,
fn inner(&self) -> ImageInner
[src]
fn initial_layout_requirement(&self) -> ImageLayout
[src]
fn final_layout_requirement(&self) -> ImageLayout
[src]
fn conflicts_buffer(&self, other: &dyn BufferAccess) -> bool
[src]
fn conflicts_image(&self, other: &dyn ImageAccess) -> bool
[src]
fn conflict_key(&self) -> u64
[src]
fn try_gpu_lock(
&self,
exclusive_access: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
[src]
&self,
exclusive_access: bool,
expected_layout: ImageLayout
) -> Result<(), AccessError>
unsafe fn increase_gpu_lock(&self)
[src]
unsafe fn unlock(&self, transitioned_layout: Option<ImageLayout>)
[src]
unsafe fn layout_initialized(&self)
[src]
fn is_layout_initialized(&self) -> bool
[src]
fn format(&self) -> Format
[src]
Returns the format of this image.
fn has_color(&self) -> bool
[src]
Returns true if the image is a color image.
fn has_depth(&self) -> bool
[src]
Returns true if the image has a depth component. In other words, if it is a depth or a depth-stencil format. Read more
fn has_stencil(&self) -> bool
[src]
Returns true if the image has a stencil component. In other words, if it is a stencil or a depth-stencil format. Read more
fn mipmap_levels(&self) -> u32
[src]
Returns the number of mipmap levels of this image.
fn samples(&self) -> u32
[src]
Returns the number of samples of this image.
fn dimensions(&self) -> ImageDimensions
[src]
Returns the dimensions of the image.
fn supports_blit_source(&self) -> bool
[src]
Returns true if the image can be used as a source for blits.
fn supports_blit_destination(&self) -> bool
[src]
Returns true if the image can be used as a destination for blits.
unsafe fn preinitialized_layout(&self) -> bool
[src]
unsafe fn forced_undefined_initial_layout(
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self>
[src]
self,
preinitialized: bool
) -> ImageAccessFromUndefinedLayout<Self>
Wraps around this ImageAccess
and returns an identical ImageAccess
but whose initial layout requirement is either Undefined
or Preinitialized
. Read more
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> ImageViewAccess for T where
T: SafeDeref,
<T as Deref>::Target: ImageViewAccess,
[src]
T: SafeDeref,
<T as Deref>::Target: ImageViewAccess,
fn parent(&self) -> &dyn ImageAccess
[src]
fn inner(&self) -> &UnsafeImageView
[src]
fn dimensions(&self) -> Dimensions
[src]
fn descriptor_set_storage_image_layout(&self) -> ImageLayout
[src]
fn descriptor_set_combined_image_sampler_layout(&self) -> ImageLayout
[src]
fn descriptor_set_sampled_image_layout(&self) -> ImageLayout
[src]
fn descriptor_set_input_attachment_layout(&self) -> ImageLayout
[src]
fn identity_swizzle(&self) -> bool
[src]
fn can_be_sampled(&self, sampler: &Sampler) -> bool
[src]
fn format(&self) -> Format
[src]
Returns the format of this view. This can be different from the parent's format.
fn samples(&self) -> u32
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.