blob: ac0efd20dc9f3bdae0070ac8656c93098b9b627d (
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
|
#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 close();
void start_frame();
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;
};
}
|