diff options
| author | Mel <einebeere@gmail.com> | 2022-10-21 01:03:18 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-10-21 01:03:18 +0200 |
| commit | 6ed978051668c08f5a957c97570f364dd580c807 (patch) | |
| tree | e3db93c52fcd86e26bc859d46e755290d2a7f40c /src/GFX/Window.hpp | |
| parent | 0464a83dfaebaa75d6e2d3b7431e84ebd83fccfd (diff) | |
| download | meowcraft-6ed978051668c08f5a957c97570f364dd580c807.tar.zst meowcraft-6ed978051668c08f5a957c97570f364dd580c807.zip | |
Namespace and Folder refactor
Diffstat (limited to 'src/GFX/Window.hpp')
| -rw-r--r-- | src/GFX/Window.hpp | 30 |
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 |
