Module vulkano::swapchain [] [src]

Link between Vulkan and a window and/or the screen.

In order to draw on the screen or a window, you have to use two steps:

  • Create a Surface object that represents the location where the image will show up.
  • Create a Swapchain using that Surface.

Creating a surface can be done with only an Instance object. However creating a swapchain requires a Device object.

Once you have a swapchain, you can retrieve Image objects from it and draw to them. However due to double-buffering or other caching mechanism, the rendering will not automatically be shown on screen. In order to show the output on screen, you have to present the swapchain by using the method with the same name.

Extensions

Theses capabilities depend on some extensions:

  • VK_KHR_surface
  • VK_KHR_swapchain
  • VK_KHR_display
  • VK_KHR_display_swapchain
  • VK_KHR_xlib_surface
  • VK_KHR_xcb_surface
  • VK_KHR_wayland_surface
  • VK_KHR_mir_surface
  • VK_KHR_android_surface
  • VK_KHR_win32_surface

Modules

display

Allows you to create surfaces that fill a whole display, outside of the windowing system.

Structs

Capabilities

The capabilities of a surface when used by a physical device.

Surface

Represents a surface on the screen.

Swapchain

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

Enums

AcquireError

Error that can happen when calling acquire_next_image.

ColorSpace

How the presentation engine should interpret the data.

CompositeAlpha

How the alpha values of the pixels of the window are treated.

PresentError

Error that can happen when calling acquire_next_image.

PresentMode

The way presenting a swapchain is accomplished.

SurfaceCreationError

Error that can happen when creating a debug callback.

SurfaceTransform

A transformation to apply to the image before showing it on the screen.