#pragma once #include #define GLFW_INCLUDE_VULKAN #include #include #include #include namespace xe { class Window { public: Window(int w, int h, std::string name); ~Window(); Window(const Window &) = delete; Window &operator=(const Window &); bool shouldClose() { return glfwWindowShouldClose(window); } VkExtent2D getExtent() { return { static_cast(width), static_cast(height)}; } bool wasWindowResized() { return frameBufferResized; } void resetWindowResizedFlag() { frameBufferResized = false; } GLFWwindow *getGLFWwindow() const { return window; } void createWindowSurface(VkInstance instance, VkSurfaceKHR *surface); private: static void framebufferResizeCallback(GLFWwindow *window, int width, int height); void initWindow(); int width; int height; bool frameBufferResized = false; std::string windowName; GLFWwindow *window; }; }