BillySheet/include/gui/window.hpp
Pcornat b759836989
Always functional.
Design : the controller controls data of the character sheet and also saving and reading data.
2022-01-17 22:00:26 +01:00

34 lines
719 B
C++

#ifndef BILLYSHEET_WINDOW_HPP
#define BILLYSHEET_WINDOW_HPP
#include <GL/glew.h>
#include <GL/gl.h>
#include <GLFW/glfw3.h>
#include <memory>
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;
[[nodiscard]] const std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> &get_window() const { return wwindow; }
[[nodiscard]] bool should_close() const noexcept;
void swap_buffers() const noexcept;
};
}
#endif //BILLYSHEET_WINDOW_HPP