[][src]Struct nobs_vulkanism::wnd::swapchain::Swapchain

pub struct Swapchain {
    pub extent: Extent2D,
    pub handle: SwapchainKHR,
    pub images: Vec<Image>,
    pub views: Vec<ImageView>,
    pub signals: Vec<Semaphore>,
    // some fields omitted
}

Wrapper around a vulkan swapchain

Additionally implements commands for blitting an image to the swapchain and presenting the swapchain image.

Fields

extent: Extent2Dhandle: SwapchainKHRimages: Vec<Image>views: Vec<ImageView>signals: Vec<Semaphore>

Methods

impl Swapchain[src]

pub fn build(
    inst: Instance,
    pdevice: PhysicalDevice,
    device: Device,
    surface: SurfaceKHR
) -> Builder
[src]

pub fn next_image(&mut self) -> NextImage[src]

Aquire the next swapchain image

This function is usually called once every frame, before commands are submitted to draw to the swapchain image Returns a NextImage, with the index of the swapchain image and a semaphore that is signalled when the image is ready.

pub fn blit(&self, index: u32, src: Image) -> Blit[src]

Returns a blit command

The command is configured to blit the specified src image to the swapchain image at position index.

pub fn present(&self, q: Queue, index: u32, wait_for: &[Semaphore])[src]

Presents a swapchain image

Presents the swapchain image at position index after all semaphores in wait_for have been signalled. The queue needs to be a presentable queue.

Trait Implementations

impl Drop for Swapchain[src]

Auto Trait Implementations

impl Send for Swapchain

impl Sync for Swapchain

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.