[−][src]Struct nobs_vulkanism::wnd::swapchain::Swapchain
Wrapper around a vulkan swapchain
Additionally implements commands for blitting an image to the swapchain and presenting the swapchain image.
Fields
extent: Extent2D
handle: SwapchainKHR
images: 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]
inst: Instance,
pdevice: PhysicalDevice,
device: Device,
surface: SurfaceKHR
) -> Builder
Return a swapchain builder
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,