Dynamic window resizing
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
// std lib headers
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -16,6 +17,7 @@ class CveSwapChain {
|
||||
static constexpr int MAX_FRAMES_IN_FLIGHT = 2;
|
||||
|
||||
CveSwapChain(CveDevice &deviceRef, VkExtent2D windowExtent);
|
||||
CveSwapChain(CveDevice &deviceRef, VkExtent2D windowExtent, std::shared_ptr<CveSwapChain> previous);
|
||||
~CveSwapChain();
|
||||
|
||||
CveSwapChain(const CveSwapChain &) = delete;
|
||||
@@ -39,6 +41,7 @@ class CveSwapChain {
|
||||
VkResult submitCommandBuffers(const VkCommandBuffer *buffers, uint32_t *imageIndex);
|
||||
|
||||
private:
|
||||
void init();
|
||||
void createSwapChain();
|
||||
void createImageViews();
|
||||
void createDepthResources();
|
||||
@@ -69,6 +72,7 @@ class CveSwapChain {
|
||||
VkExtent2D windowExtent;
|
||||
|
||||
VkSwapchainKHR swapChain;
|
||||
std::shared_ptr<CveSwapChain> oldSwapChain;
|
||||
|
||||
std::vector<VkSemaphore> imageAvailableSemaphores;
|
||||
std::vector<VkSemaphore> renderFinishedSemaphores;
|
||||
|
||||
Reference in New Issue
Block a user