summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/window/window_impl_sdl.h
blob: de4cafbdb4cd950e44314c246ea49e4eb3a595c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __ASURA_WINDOW_SDL_H_
#define __ASURA_WINDOW_SDL_H_

#include "../core_config.h"

#if ASURA_WINDOW_SDL

#include <SDL2/SDL.h>

#include "window.h"

namespace AsuraEngine
{
	namespace 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* mWnd;
			SDL_GLContext mGLContext;

		};

	}
}

#endif // ASURA_WINDOW_SDL

#endif