blob: 3456d75b873cf68fc1f9e96da7dee8f732cae615 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#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
{
};
///
/// ڣֶ֧രڡڱ༭Ҫ֧֣runnerֻҪһڡ
///
class Window final : public RenderTarget
{
public:
Window();
~Window();
SDL_Window* GetSDLHandle();
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();
private:
///
/// SDL window handle.
///
SDL_Window* mWindowHandle;
Math::Vector2i mPosition;
Math::Vector2i mSize;
};
using RenderWindow = Window;
}
}
#endif
|