summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/window/window_impl_sdl.h
blob: 20f5c958b15880d9e5380b89632dc604761e4c9f (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
#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_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