diff options
Diffstat (limited to 'src/libjin/Graphics/Window.h')
-rw-r--r-- | src/libjin/Graphics/Window.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/libjin/Graphics/Window.h b/src/libjin/Graphics/Window.h index 301b0b5..3734ee3 100644 --- a/src/libjin/Graphics/Window.h +++ b/src/libjin/Graphics/Window.h @@ -10,45 +10,45 @@ namespace jin { -namespace graphics -{ - - class Window : public Subsystem<Window> - { - public: - struct Setting : SettingBase - { - public: - const char* title; // - bool fullscreen; // ȫ - int width, height; // ڴС - bool vsync; // ֱͬ - int fps; // FPS - bool resizable; // resize - }; - - void setTitle(const char* title); - inline int getW(){ return size.w; } - inline int getH(){ return size.h; } - inline int getFPS(){ return fps; } - void swapBuffers(); - - private: - SINGLETON(Window); - - Window() {}; - - virtual ~Window() {}; - bool initSystem(const SettingBase* setting) override; - void quitSystem() override; - - SDL_Window* wnd; - jin::math::Vector2<unsigned int> size; - int fps; - - }; - -} // render + namespace graphics + { + + class Window : public Subsystem<Window> + { + public: + struct Setting : SettingBase + { + public: + const char* title; // + bool fullscreen; // ȫ + int width, height; // ڴС + bool vsync; // ֱͬ + int fps; // FPS + bool resizable; // resize + }; + + void setTitle(const char* title); + inline int getW(){ return size.w; } + inline int getH(){ return size.h; } + inline int getFPS(){ return fps; } + void swapBuffers(); + + private: + SINGLETON(Window); + + Window() {}; + + virtual ~Window() {}; + bool initSystem(const SettingBase* setting) override; + void quitSystem() override; + + SDL_Window* wnd; + jin::math::Vector2<unsigned int> size; + int fps; + + }; + + } // render } // jin #endif // LIBJIN_MODULES_RENDER |