Renderer: Expose present mode and allow to query/set it

This commit is contained in:
SirLynix
2023-08-13 18:16:03 +02:00
parent 28d69ab552
commit e8620894f7
21 changed files with 420 additions and 43 deletions

View File

@@ -53,12 +53,16 @@ namespace Nz
inline Vk::QueueHandle& GetGraphicsQueue();
const VulkanRenderPass& GetRenderPass() const override;
const Vector2ui& GetSize() const override;
PresentMode GetPresentMode() const override;
PresentModeFlags GetSupportedPresentModes() const override;
inline const Vk::Swapchain& GetSwapchain() const;
void NotifyResize(const Vector2ui& newSize) override;
void Present(UInt32 imageIndex, VkSemaphore waitSemaphore = VK_NULL_HANDLE);
void SetPresentMode(PresentMode presentMode) override;
TransientResources& Transient() override;
VulkanSwapchain& operator=(const VulkanSwapchain&) = delete;
@@ -85,6 +89,8 @@ namespace Nz
Vk::QueueHandle m_transferQueue;
Vk::Surface m_surface;
Vk::Swapchain m_swapchain;
PresentMode m_presentMode;
PresentModeFlags m_supportedPresentModes;
Vector2ui m_swapchainSize;
VkFormat m_depthStencilFormat;
VkSurfaceFormatKHR m_surfaceFormat;