From 6ed978051668c08f5a957c97570f364dd580c807 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 21 Oct 2022 01:03:18 +0200 Subject: Namespace and Folder refactor --- src/GFX/Window.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/GFX/Window.hpp (limited to 'src/GFX/Window.hpp') diff --git a/src/GFX/Window.hpp b/src/GFX/Window.hpp new file mode 100644 index 0000000..63e8446 --- /dev/null +++ b/src/GFX/Window.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include +#include +#include "../Math/Vector.hpp" +#include "Mouse.hpp" + +namespace MC::GFX { + +class Window { +public: + Window(const char* title, uint32_t width, uint32_t height); + ~Window(); + + GLFWwindow* get(); + + void on_size_change(void (* callback)(GLFWwindow*, int, int)); + + void close(); + void start_frame(); + Vector<2> mouse_delta(); + + bool key(int key, int type); + bool should_close(); +private: + GLFWwindow* m_window; + Mouse m_mouse; +}; + +} \ No newline at end of file -- cgit 1.4.1