Struct vulkano::image::swapchain::SwapchainImage[][src]

pub struct SwapchainImage<W> { /* fields omitted */ }

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

impl<W> SwapchainImage<W>[src]

pub unsafe fn from_raw(
    swapchain: Arc<Swapchain<W>>,
    id: usize
) -> Result<Arc<SwapchainImage<W>>, OomError>
[src]

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> Eq for SwapchainImage<W>[src]

impl<W> Hash for SwapchainImage<W>[src]

impl<W> ImageAccess for SwapchainImage<W>[src]

impl<W> ImageClearValue<<Format as FormatDesc>::ClearValue> for SwapchainImage<W>[src]

impl<P, W> ImageContent<P> for SwapchainImage<W>[src]

impl<W> PartialEq<SwapchainImage<W>> for SwapchainImage<W>[src]

Auto Trait Implementations

impl<W> RefUnwindSafe for SwapchainImage<W> where
    W: RefUnwindSafe

impl<W> Send for SwapchainImage<W> where
    W: Send + Sync

impl<W> Sync for SwapchainImage<W> where
    W: Send + Sync

impl<W> Unpin for SwapchainImage<W>

impl<W> UnwindSafe for SwapchainImage<W> where
    W: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Content for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.