35 lines
763 B
C++
35 lines
763 B
C++
|
#pragma once
|
||
|
#include <string>
|
||
|
|
||
|
#define GLFW_INCLUDE_VULKAN
|
||
|
#include <GLFW/glfw3.h>
|
||
|
|
||
|
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<uint32_t>(m_width), static_cast<uint32_t>(m_height)}; }
|
||
|
|
||
|
void createWindowSurface(VkInstance instance, VkSurfaceKHR *surface);
|
||
|
|
||
|
private:
|
||
|
void initWindow();
|
||
|
|
||
|
const int m_width;
|
||
|
const int m_height;
|
||
|
|
||
|
std::string m_windowName;
|
||
|
GLFWwindow *m_window;
|
||
|
};
|
||
|
|
||
|
} // namespace lve
|