summary refs log tree commit diff
path: root/src/GFX/Window.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GFX/Window.hpp')
-rw-r--r--src/GFX/Window.hpp30
1 files changed, 30 insertions, 0 deletions
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 <cstdint>
+#include <GLFW/glfw3.h>
+#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