summaryrefslogtreecommitdiff
path: root/Source/modules/asura-core/Window/WindowImplSDL.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/modules/asura-core/Window/WindowImplSDL.h')
-rw-r--r--Source/modules/asura-core/Window/WindowImplSDL.h45
1 files changed, 45 insertions, 0 deletions
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 <SDL2/SDL.h>
+
+#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