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

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

Implementations

Creates a new Swapchain.

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.

Panics
  • Panics if the device and the surface don’t belong to the same instance.
  • Panics if create_info.usage is empty.

Creates a new swapchain from this one.

Use this when a swapchain has become invalidated, such as due to window resizes.

Panics
  • Panics if create_info.usage is empty.

Returns the creation parameters of the swapchain.

Returns the saved Surface, from the Swapchain creation.

If image is one of the images of this swapchain, returns its index within the swapchain.

Returns the number of images of the swapchain.

Returns the format of the images of the swapchain.

Returns the color space of the images of the swapchain.

Returns the extent of the images of the swapchain.

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

Returns the usage of the images of the swapchain.

Returns the sharing of the images of the swapchain.

Returns the pre-transform that was passed when creating the swapchain.

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

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

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

Returns the value of ’full_screen_exclusive` that was passed when creating the swapchain.

Acquires full-screen exclusivity.

The swapchain must have been created with FullScreenExclusive::ApplicationControlled, and must not already hold full-screen exclusivity. Full-screen exclusivity is held until either the release_full_screen_exclusive is called, or if any of the the other Swapchain functions return FullScreenExclusiveLost.

Releases full-screen exclusivity.

The swapchain must have been created with FullScreenExclusive::ApplicationControlled, and must currently hold full-screen exclusivity.

FullScreenExclusive::AppControlled is not the active full-screen exclusivity mode, then this function will always return false. If true is returned the swapchain is in FullScreenExclusive::AppControlled full-screen exclusivity mode and exclusivity is currently acquired.

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
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of 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

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.