Beginning writing gui and window wrapper for GLFW

This commit is contained in:
Pcornat 2022-01-08 21:57:17 +01:00
parent 10cb797084
commit 9dfe0faa56
Signed by: Pcornat
GPG key ID: 2F3932FF46D9ECA0
8 changed files with 141 additions and 4 deletions

25
include/window.hpp Normal file
View file

@ -0,0 +1,25 @@
#ifndef BILLYSHEET_WINDOW_HPP
#define BILLYSHEET_WINDOW_HPP
#include <memory>
#include <GLFW/glfw3.h>
namespace gui {
class Window final {
private:
static void delete_glfw_window(GLFWwindow *glfWwindow) {
glfwDestroyWindow(glfWwindow);
glfwTerminate();
}
std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> wwindow{ nullptr, delete_glfw_window };
public:
Window();
~Window() noexcept = default;
};
}
#endif //BILLYSHEET_WINDOW_HPP