#pragma once #include #define GLFW_INCLUDE_VULKAN #include #include #include #include namespace xe { class XeWindow { public: XeWindow(int w, int h, std::string name); ~XeWindow(); XeWindow(const XeWindow &) = delete; XeWindow &operator=(const XeWindow &); 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; }; }