Beginning writing gui and window wrapper for GLFW
This commit is contained in:
parent
10cb797084
commit
9dfe0faa56
8 changed files with 141 additions and 4 deletions
18
include/gui.hpp
Normal file
18
include/gui.hpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef BILLYSHEET_GUI_HPP
|
||||
#define BILLYSHEET_GUI_HPP
|
||||
|
||||
|
||||
namespace gui {
|
||||
class Gui final {
|
||||
private:
|
||||
|
||||
public:
|
||||
Gui() = delete;
|
||||
|
||||
|
||||
|
||||
~Gui() noexcept;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //BILLYSHEET_GUI_HPP
|
16
include/gui_data.hpp
Normal file
16
include/gui_data.hpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef BILLYSHEET_GUI_DATA_HPP
|
||||
#define BILLYSHEET_GUI_DATA_HPP
|
||||
|
||||
namespace gui {
|
||||
class GuiData final {
|
||||
private:
|
||||
// GLFWwindow *window{ nullptr };
|
||||
|
||||
public:
|
||||
GuiData() = delete;
|
||||
~GuiData() noexcept = default;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //BILLYSHEET_GUI_DATA_HPP
|
25
include/window.hpp
Normal file
25
include/window.hpp
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue