From 0c391fdbce5a079cf03e483eb6174dd47806163d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Aug 2019 21:08:47 +0800 Subject: *misc --- Source/modules/asura-core/Window/WindowImplSDL.h | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Source/modules/asura-core/Window/WindowImplSDL.h (limited to 'Source/modules/asura-core/Window/WindowImplSDL.h') diff --git a/Source/modules/asura-core/Window/WindowImplSDL.h b/Source/modules/asura-core/Window/WindowImplSDL.h new file mode 100644 index 0000000..5971351 --- /dev/null +++ b/Source/modules/asura-core/Window/WindowImplSDL.h @@ -0,0 +1,45 @@ +#ifndef _ASURA_WINDOW_SDL_H_ +#define _ASURA_WINDOW_SDL_H_ + +#include "../CoreConfig.h" + +#if ASURA_WINDOW_SDL + +#include + +#include "Window.h" + +namespace_begin(AsuraEngine) +namespace_begin(Window) + +class WindowImplSDL ASURA_FINAL : public WindowImpl +{ +public: + + WindowImplSDL(); + ~WindowImplSDL(); + + bool Init(const WindowConfig& config); + + void SetSize(uint width, uint height) override; + void SetPosition(int x, int y) override; + void SetTitils(const std::string& title) override; + + void Show() override; + void Hide() override; + + void SwapRenderBuffer() override; + +private: + + SDL_Window* m_Wnd; + SDL_GLContext m_GLContext; + +}; + +namespace_end +namespace_end + +#endif // ASURA_WINDOW_SDL + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0