Dynamic window resizing

This commit is contained in:
2026-02-20 21:25:33 +00:00
parent e4124c0aaf
commit 11783743de
9 changed files with 143 additions and 60 deletions

View File

@@ -16,13 +16,17 @@ class CveWindow {
bool shouldClose() { return glfwWindowShouldClose(window); };
VkExtent2D getExtent() { return { static_cast<uint32_t>(width), static_cast<uint32_t>(height) }; };
bool wasWindowResized() { return framebufferResized; };
void resetWindowResizedFlag() { framebufferResized = false; };
void createWindowSurface(VkInstance instance, VkSurfaceKHR *surface);
private:
static void framebufferResizedCallback(GLFWwindow *window, int width, int height);
void initWindow();
const int width;
const int height;
int width;
int height;
bool framebufferResized = false;
std::string windowName;
GLFWwindow *window;