-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow.hpp
44 lines (30 loc) · 809 Bytes
/
window.hpp
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
36
37
38
39
40
41
42
43
44
//
// Created by asuka on 09.03.2023.
//
# ifndef SNAKE_WINDOW_HPP
# define SNAKE_WINDOW_HPP
# include <glm/vec2.hpp>
# include <string>
struct GLFWwindow; // GLFW/glfw3.h
namespace snake {
struct DisplayData {
glm::ivec2 size;
std::string title;
};
class KeysInput;
class Window {
friend KeysInput;
public:
explicit Window(const DisplayData& display_data);
~Window();
Window(const Window&) = delete;
Window& operator=(const Window&) = delete;
Window(Window&& other) noexcept;
Window& operator=(Window&& other) noexcept;
[[nodiscard]] bool should_close() const;
void swap_buffers() const;
private:
GLFWwindow* window_ = nullptr;
};
} // snake
# endif // SNAKE_WINDOW_HPP