blob: 966925cafa31c078aa3ccbfd1f89efb7fb9381de (
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 <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() const;
void on_size_change(void (* callback)(GLFWwindow*, int, int));
void close();
void start_frame();
Vector<2> mouse_delta();
bool key(int key, int type) const;
bool mouse(int key, int type) const;
bool should_close() const;
private:
GLFWwindow* m_window;
Mouse m_mouse;
};
}
|