aboutsummaryrefslogtreecommitdiffstats
path: root/src/window/Window.hpp
blob: 4457898f0a160d60cd447b6cbb72286d69f3808b (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
#ifndef ENGINE_WINDOW_H
#define ENGINE_WINDOW_H

class GLFWwindow;

class Window {
	GLFWwindow *win;
	int width, height;

	Window(GLFWwindow *a_win, int a_w, int a_h) : win(a_win),
		width(a_w), height(a_h) { }
public:
	~Window() { }
	GLFWwindow *GetWin() { return win; }

	static Window *Initialize(int width, int height, const char *title);

	void Resize(int w, int h);
	void MakeContextCurrent();
	int GetCursorMode();
	void ToggleCursorMode();
	bool IsShouldClose();
	void SetShouldClose(int flag);
	void SwapBuffers();
};

#endif /* ENGINE_WINDOW_H */