Window with own structure
This commit is contained in:
28
cve_window.hpp
Normal file
28
cve_window.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#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); };
|
||||
private:
|
||||
void initWindow();
|
||||
|
||||
const int width;
|
||||
const int height;
|
||||
|
||||
std::string windowName;
|
||||
GLFWwindow *window;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user