Vulkan Refactoring - Implemented KRSwapchain

This commit is contained in:
2022-04-03 21:49:54 -07:00
parent c58487c00f
commit f48fb5b14f
10 changed files with 420 additions and 260 deletions

View File

@@ -37,6 +37,7 @@
class KRDevice;
class KRRenderPass;
class KRSwapchain;
class KRSurface : public KRContextObject
{
@@ -58,7 +59,6 @@ public:
KrResult initialize();
KrResult recreateSwapChain();
void createRenderPasses();
KRRenderPass& getForwardOpaquePass();
void endFrame();
@@ -68,19 +68,11 @@ public:
#endif
KrDeviceHandle m_deviceHandle;
VkSurfaceKHR m_surface;
VkSwapchainKHR m_swapChain;
std::vector<VkImage> m_swapChainImages;
VkFormat m_swapChainImageFormat;
VkExtent2D m_swapChainExtent;
std::vector<VkImageView> m_swapChainImageViews;
std::vector<VkFramebuffer> m_swapChainFramebuffers;
VkFormat m_depthImageFormat;
VkImage m_depthImage;
VmaAllocation m_depthImageAllocation;
VkImageView m_depthImageView;
VkSemaphore m_imageAvailableSemaphore;
VkSemaphore m_renderFinishedSemaphore;
std::unique_ptr<KRSwapchain> m_swapChain;
std::unique_ptr<KRRenderPass> m_forwardOpaquePass;
// TODO - This needs to be advanced per swap chain