summary refs log tree commit diff
path: root/src/Window.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-10-01 05:12:50 +0200
committerMel <einebeere@gmail.com>2022-10-01 05:13:05 +0200
commite2234b4afebb266878435d10267e7b162b1fe984 (patch)
treea582ab01a9a95a3dfd199702315d3f43c6b5b046 /src/Window.hpp
downloadmeowcraft-e2234b4afebb266878435d10267e7b162b1fe984.tar.zst
meowcraft-e2234b4afebb266878435d10267e7b162b1fe984.zip
Setup window and GL functions
Diffstat (limited to 'src/Window.hpp')
-rw-r--r--src/Window.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Window.hpp b/src/Window.hpp
new file mode 100644
index 0000000..acd39fe
--- /dev/null
+++ b/src/Window.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <cstdint>
+#include <GLFW/glfw3.h>
+
+namespace MC {
+
+class Window {
+public:
+    Window(const char* title, uint32_t width, uint32_t height);
+    ~Window();
+
+    GLFWwindow* get();
+
+    void close();
+    void start_frame();
+
+    bool key(int key, int type);
+    bool should_close();
+private:
+    GLFWwindow* m_window;
+};
+
+}
\ No newline at end of file