#pragma once #define GLFW_INCLUDE_VULKAN #include #include namespace cve { class CveWindow { public: CveWindow(int w, int h, std::string name); ~CveWindow(); CveWindow(const CveWindow &) = delete; CveWindow &operator=(const CveWindow &) = delete; bool shouldClose() { return glfwWindowShouldClose(window); }; VkExtent2D getExtent() { return { static_cast(width), static_cast(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(); int width; int height; bool framebufferResized = false; std::string windowName; GLFWwindow *window; }; }