pub struct Swapchain<W> { /* private fields */ }
Expand description

Contains the swapping system and the images that can be shown on a surface.

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 Swapchain::new must be supported.

The clipped parameter indicates 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.

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.

Recreates the swapchain with new dimensions.

Returns of the images that belong to this swapchain.

Returns the number of images of the swapchain.

See the documentation of Swapchain::new.

Returns the format of the images of the swapchain.

See the documentation of Swapchain::new.

Returns the dimensions of the images of the swapchain.

See the documentation of Swapchain::new.

Returns the number of layers of the images of the swapchain.

See the documentation of Swapchain::new.

Returns the transform that was passed when creating the swapchain.

See the documentation of Swapchain::new.

Returns the alpha mode that was passed when creating the swapchain.

See the documentation of Swapchain::new.

Returns the present mode that was passed when creating the swapchain.

See the documentation of Swapchain::new.

Returns the value of clipped that was passed when creating the swapchain.

See the documentation of Swapchain::new.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
Executes the destructor for this type. Read more
The type of the object.
The DebugReportObjectTypeEXT of the internal Vulkan handle.
Returns a reference to the object.

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
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.

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.