diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-04-04 12:19:41 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-04-04 12:19:41 +0100 |
commit | 55a1e0ad7c9d2661c266b2e767bfcb2f944e859f (patch) | |
tree | fe3ac90ab853e2f87bd33294976a3fc56e144988 /include/YAGE/window.hpp | |
parent | aa67c8bb56cb750ac83ecbd361439f5ecb5e12d9 (diff) | |
download | YAGE-55a1e0ad7c9d2661c266b2e767bfcb2f944e859f.tar.gz YAGE-55a1e0ad7c9d2661c266b2e767bfcb2f944e859f.zip |
Adding spritebatch class
Diffstat (limited to 'include/YAGE/window.hpp')
-rw-r--r-- | include/YAGE/window.hpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/YAGE/window.hpp b/include/YAGE/window.hpp index 6f3058e9..5f104912 100644 --- a/include/YAGE/window.hpp +++ b/include/YAGE/window.hpp @@ -5,7 +5,11 @@ #include <string> -enum class WindowFlags +namespace yage +{ + +// window flags that can change it's appearance +enum WindowFlags : unsigned { SHOWN=0x1, HIDDEN=0x2, @@ -13,18 +17,26 @@ enum class WindowFlags BORDERLESS=0x8, }; +// window wrapper around SDL_Window pointer class Window { +public: // member variables private: + // window handle SDL_Window *window_=nullptr; - int width_=1280; - int height_=720; -public: +public: // member functions Window(); + // destroys the window handle ~Window(); - void create(const std::string &window_name, int width, int height, WindowFlags flags=WindowFlags::SHOWN); + // create the window, initialize the handle and update the width and height + void create(const std::string &window_name, int width, int height, unsigned flags=WindowFlags::SHOWN); + // swap the buffer + void swapBuffer(); +private: }; + +} // yage #endif |