blob: c26b0fdec310ede04f4f8fdcf9f7a4fa083ed150 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
#include "../Common/Sizes.hpp"
#include "../Math/Vector.hpp"
#include <GLFW/glfw3.h>
#include "Mouse.hpp"
namespace MC::GFX {
class Window {
public:
Window(const Char* title, U32 width, U32 height);
~Window();
GLFWwindow* get() const;
void on_size_change(void (* callback)(GLFWwindow*, I32, I32));
void attach() const;
void detach() const;
void close();
void start_render();
void poll_events();
Vector<2> mouse_delta();
Bool key(I32 key, I32 type) const;
Bool mouse(I32 key, I32 type) const;
Bool should_close() const;
private:
GLFWwindow* m_window;
Mouse m_mouse;
};
}
|