Added resizing + swap chain recreation
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#define DEBUG
|
#define DEBUG 1
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "vulkan/vulkan_app.hpp"
|
#include "vulkan/vulkan_app.hpp"
|
||||||
|
|||||||
+817
-764
File diff suppressed because it is too large
Load Diff
@@ -109,6 +109,8 @@ private:
|
|||||||
void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex);
|
void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex);
|
||||||
void createSyncObjects();
|
void createSyncObjects();
|
||||||
void drawFrame();
|
void drawFrame();
|
||||||
|
void cleanupSwapChain();
|
||||||
|
void recreateSwapChain();
|
||||||
void initWindow(const char* windowName);
|
void initWindow(const char* windowName);
|
||||||
void initVulkan();
|
void initVulkan();
|
||||||
void mainLoop();
|
void mainLoop();
|
||||||
@@ -121,6 +123,8 @@ public:
|
|||||||
const bool enableValidationLayers = false;
|
const bool enableValidationLayers = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool framebufferResized = false;
|
||||||
|
|
||||||
void run(const char* windowName, const uint32_t width = 800, const uint32_t height = 600);
|
void run(const char* windowName, const uint32_t width = 800, const uint32_t height = 600);
|
||||||
};
|
};
|
||||||
} // vapp
|
} // vapp
|
||||||
|
|||||||
Reference in New Issue
Block a user