Better organization.
This commit is contained in:
parent
c7b6b87005
commit
45c92db758
8 changed files with 26 additions and 20 deletions
|
@ -1,32 +0,0 @@
|
|||
#ifndef BILLYSHEET_WINDOW_HPP
|
||||
#define BILLYSHEET_WINDOW_HPP
|
||||
|
||||
#include <memory>
|
||||
#include "imgui_impl_opengl3_loader.h"
|
||||
#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;
|
||||
|
||||
[[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
|
Loading…
Add table
Add a link
Reference in a new issue