diff options
author | Joursoir <chat@joursoir.net> | 2021-03-26 15:32:22 +0000 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2021-03-26 15:32:22 +0000 |
commit | aee5bf7802f112111961faa824deb6f97ef80203 (patch) | |
tree | 97f264dff7e3f2fca508800ba0960523e84f8c7f /src/window/Window.hpp | |
parent | 533abb2b643a0f8e1d41e0d570e08e3df5339f80 (diff) | |
download | space-simulator-aee5bf7802f112111961faa824deb6f97ef80203.tar.gz space-simulator-aee5bf7802f112111961faa824deb6f97ef80203.tar.bz2 space-simulator-aee5bf7802f112111961faa824deb6f97ef80203.zip |
add window subsystem
Diffstat (limited to 'src/window/Window.hpp')
-rw-r--r-- | src/window/Window.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/window/Window.hpp b/src/window/Window.hpp new file mode 100644 index 0000000..fe3b054 --- /dev/null +++ b/src/window/Window.hpp @@ -0,0 +1,26 @@ +#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(); + void SetCursorMode(int mode); + bool IsShouldClose(); + void SetShouldClose(int flag); + void SwapBuffers(); +}; + +#endif /* ENGINE_WINDOW_H */ |