From 5534828032730762f8c1e4daf924b466fffb8be0 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 16 Oct 2018 23:09:18 +0800 Subject: =?UTF-8?q?*=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/Window.h | 78 ++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'src/libjin/Graphics/Window.h') 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 - { - 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 size; - int fps; - - }; - -} // render + namespace graphics + { + + class Window : public Subsystem + { + 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 size; + int fps; + + }; + + } // render } // jin #endif // LIBJIN_MODULES_RENDER -- cgit v1.1-26-g67d0