|
TGUI 1.14-dev
|
Public Member Functions | |
| SwapchainVulkan (std::shared_ptr< BackendRendererVulkan > renderer, VkSurfaceKHR surface) | |
| Constructor. | |
| ~SwapchainVulkan () | |
| Destructor. | |
| SwapchainVulkan (const SwapchainVulkan &)=delete | |
| SwapchainVulkan & | operator= (const SwapchainVulkan &)=delete |
| VkCommandBuffer | beginFrame (Vector2u framebufferSize, Color clearColor) |
| Starts a new frame. | |
| void | endFrame () |
| Ends the render pass, submits the command buffer and presents the frame. | |
| VkRenderPass | getRenderPass () const |
| Returns the render pass that is started by beginFrame. | |
| VkFormat | getColorFormat () const |
| Returns the format of the swapchain images. | |
| bool | isSurfaceLost () const |
| Returns whether the surface was lost and the swapchain can no longer be used. | |
Static Public Attributes | |
| static constexpr std::uint32_t | FramesInFlight = 2 |
| tgui::SwapchainVulkan::SwapchainVulkan | ( | std::shared_ptr< BackendRendererVulkan > | renderer, |
| VkSurfaceKHR | surface ) |
Constructor.
| renderer | Renderer that holds the Vulkan device |
| surface | Surface of the window. Ownership is transferred, the destructor will destroy the surface. |
| Exception | when the queue of the renderer can't present to the surface or when an object couldn't be created |
|
nodiscard |
Starts a new frame.
| framebufferSize | Size of the window in pixels |
| clearColor | Color to clear the window with |
|
nodiscard |
Returns the format of the swapchain images.
|
nodiscard |
Returns the render pass that is started by beginFrame.
|
nodiscard |
Returns whether the surface was lost and the swapchain can no longer be used.
This happens on Android when the app is put in the background, as the window surface is destroyed then.