Added resizing + swap chain recreation

This commit is contained in:
Ano-sys
2025-04-03 23:00:32 +02:00
parent 811b5e0ae6
commit 5944a08abc
3 changed files with 822 additions and 765 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#define DEBUG
#define DEBUG 1
#include <iostream>
#include "vulkan/vulkan_app.hpp"
+817 -764
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -109,6 +109,8 @@ private:
void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex);
void createSyncObjects();
void drawFrame();
void cleanupSwapChain();
void recreateSwapChain();
void initWindow(const char* windowName);
void initVulkan();
void mainLoop();
@@ -121,6 +123,8 @@ public:
const bool enableValidationLayers = false;
#endif
bool framebufferResized = false;
void run(const char* windowName, const uint32_t width = 800, const uint32_t height = 600);
};
} // vapp