From 70b82d1981c0de3c7b77670ff8abcfeb26815142 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 12 Mar 2019 00:39:26 +0800 Subject: *misc --- Source/Asura.Engine/Window/Window.h | 74 ------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 Source/Asura.Engine/Window/Window.h (limited to 'Source/Asura.Engine/Window/Window.h') diff --git a/Source/Asura.Engine/Window/Window.h b/Source/Asura.Engine/Window/Window.h deleted file mode 100644 index 71aaf0e..0000000 --- a/Source/Asura.Engine/Window/Window.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __ASURA_ENGINE_WINDOW_H__ -#define __ASURA_ENGINE_WINDOW_H__ - -#include "SDL2/Sdl.h" -#include "Graphics/RenderTarget.h" -#include "Math/Vector2.hpp" - -namespace AsuraEngine -{ - namespace Graphics - { - - enum WindowStyle - { - WINDOW_STYLE_FULLSCREEN = 1 << 1, - }; - - /// - /// 窗口,支持多窗口。在编辑器下需要多个窗口支持,runner只需要一个窗口。 - /// - class Window : public RenderTarget - { - public: - - Window(WindowStyle style); - - ~Window(); - - SDL_Window* GetSDLWindowHandle(); - - void SetSize(uint width, uint height); - - void SetPosition(int x, int y); - - void SetTitle(const std::string& title); - - void SetWindowStyle(WindowStyle style); - - void Show(); - - void Hide(); - - /// - /// 如果是开启双缓冲的窗口,需要交换缓冲区来展示到前台 - /// - void SwapRenderBuffer(); - - void Clear(const Color& col = Color::Black); - - void Clear(const Math::Recti& quad, const Color& col = Color::Black); - - void Draw(const Drawable* texture, const RenderState& state); - - void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state); - - private: - - /// - /// SDL window handle. - /// - SDL_Window* mWindowHandle; - - Math::Vector2i mPosition; - - Math::Vector2i mSize; - - }; - - using RenderWindow = Window; - - } -} - -#endif \ No newline at end of file -- cgit v1.1-26-g67d0