tp::Swapchain class

Manages presenting the rendering results to a surface.

Base classes

class Ownable
A customizable base class that is used for objects returned by the API in an OwningPtr.

Public functions

auto acquireNextImage(Timeout timeout = Timeout::Indefinite()) -> std::optional<AcquiredImageInfo>
Acquires the next available image in the swapchain.
auto getStatus() const -> SwapchainStatus
Returns the current status of the swapchain.
auto vkGetSwapchainHandle() const -> VkSwapchainHandleKHR
Returns the Vulkan VkSwapchainKHR handle.

Function documentation

std::optional<AcquiredImageInfo> tp::Swapchain::acquireNextImage(Timeout timeout = Timeout::Indefinite())

Acquires the next available image in the swapchain.

Parameters
timeout The time limit for waiting.
Returns The details of the acquired image, unless the operation timed out.