aboutsummaryrefslogtreecommitdiffstats
path: root/src/window/Window.hpp
blob: 3c0b708315145ff4a1525cf1d27cf85afe845cf5 (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
#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; }
	void GetWinSize(int &w, int &h)
		{ w = width; h = height; }

	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 */