Struct vulkano::swapchain::SwapchainBuilder [−][src]
pub struct SwapchainBuilder<W> { /* fields omitted */ }
Expand description
Builder for a Swapchain
.
Implementations
Builds a new swapchain. Allocates images who content can be made visible on a surface.
See also the Surface::get_capabilities
function which returns the values that are
supported by the implementation. All the parameters that you pass to the builder
must be supported.
This function returns the swapchain plus a list of the images that belong to the
swapchain. The order in which the images are returned is important for the
acquire_next_image
and present
functions.
Panic
- Panics if the device and the surface don’t belong to the same instance.
- Panics if
usage
is empty.
Sets the number of images that will be created.
The default is 2.
Sets the pixel format that will be used for the images.
The default is either R8G8B8A8Unorm
or B8G8R8A8Unorm
, whichever is supported.
Sets the color space that will be used for the images.
The default is SrgbNonLinear
.
Sets the dimensions of the images.
The default is None
, which means the value of
Capabilities::current_extent
will be
used. Setting this will override it with a custom Some
value.
Sets the number of layers for each image.
The default is 1.
Sets how the images will be used.
The default is ImageUsage::none()
.
Sets the sharing mode of the images.
The default is Exclusive
.
Sets the transform that is to be applied to the surface.
The default is Identity
.
Sets how alpha values of the pixels in the image are to be treated.
The default is Opaque
.
Sets the present mode for the swapchain.
The default is Fifo
.
Sets how fullscreen exclusivity is to be handled.
The default is Default
.
Sets whether the implementation is allowed to discard rendering operations that affect regions of the surface which aren’t visible. This is important to take into account if your fragment shader has side-effects or if you want to read back the content of the image afterwards.
The default is true
.
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for SwapchainBuilder<W> where
W: RefUnwindSafe,
impl<W> Send for SwapchainBuilder<W> where
W: Send + Sync,
impl<W> Sync for SwapchainBuilder<W> where
W: Send + Sync,
impl<W> Unpin for SwapchainBuilder<W>
impl<W> UnwindSafe for SwapchainBuilder<W> where
W: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.