#pragma once #include #define GLFW_INCLUDE_VULKAN #include namespace hk { class Window { public: Window(int w, int h, const std::string& name); ~Window(); Window(const Window&) = delete; Window &operator=(const Window&) = delete; bool shouldClose() { return glfwWindowShouldClose(m_window); } VkExtent2D getExtend() { return {static_cast(m_width), static_cast(m_height)}; } bool wasWindowResized() { return m_framebufferResized; } void resetWindowResizedFlag() { m_framebufferResized = false; } void createWindowSurface(VkInstance instance, VkSurfaceKHR *surface); private: static void framebufferResizeCallback(GLFWwindow* window, int width, int height); void initWindow(); int m_width; int m_height; bool m_framebufferResized = false; std::string m_windowName; GLFWwindow *m_window; }; } // namespace lve