summary refs log tree commit diff
path: root/src/GFX/Window.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-10-21 01:03:18 +0200
committerMel <einebeere@gmail.com>2022-10-21 01:03:18 +0200
commit6ed978051668c08f5a957c97570f364dd580c807 (patch)
treee3db93c52fcd86e26bc859d46e755290d2a7f40c /src/GFX/Window.hpp
parent0464a83dfaebaa75d6e2d3b7431e84ebd83fccfd (diff)
downloadmeowcraft-6ed978051668c08f5a957c97570f364dd580c807.tar.zst
meowcraft-6ed978051668c08f5a957c97570f364dd580c807.zip
Namespace and Folder refactor
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