Files
Cheap-Vulkan-Renderer/cve_window.hpp
2026-02-20 11:30:18 +00:00

32 lines
710 B
C++

#pragma once
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <string>
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<uint32_t>(width), static_cast<uint32_t>(height) }; };
void createWindowSurface(VkInstance instance, VkSurfaceKHR *surface);
private:
void initWindow();
const int width;
const int height;
std::string windowName;
GLFWwindow *window;
};
}