pub struct VulkanoWindowRenderer { /* private fields */ }
Expand description

A window renderer struct holding the winit window surface and functionality for organizing your render between frames.

Begin rendering with VulkanoWindowRenderer::acquire and finish with VulkanoWindowRenderer::present. Between those, you should execute your command buffers.

The intended usage of this struct is through crate::window::VulkanoWindows.

Implementations

Creates a new VulkanoWindowRenderer which is used to orchestrate your rendering with Vulkano. Pass WindowDescriptor and optionally a function modifying the SwapchainCreateInfo parameters.

Set window renderer present mode. This triggers a swapchain recreation.

Return swapchain image format

Returns the index of last swapchain image that is the next render target

Graphics queue of this window. You also can access this through VulkanoContext

Compute queue of this window. You can also access this through VulkanoContext

Render target surface

Winit window (you can manipulate window through this).

Size of the physical window

Size of the final swapchain image (surface)

Return the current swapchain image view

Return scale factor accounted window size

Resize swapchain and camera view images at the beginning of next frame based on window dimensions

Add interim image view that resizes with window

Get additional image view by key

Remove additional image by key

Begin your rendering by calling acquire. Returns a GpuFuture representing the time after which the swapchain image has been acquired and previous frame ended. Execute your command buffers after calling this function and finish rendering by calling VulkanoWindowRenderer::present.

Finishes rendering by presenting the swapchain. Pass your last future as an input to this function.

Depending on your implementation, you may want to wait on your future. For example, a compute shader dispatch using an image that’s being later drawn should probably be waited on.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.