blob: cb036f178283141a390f21301c64a02dd9047d99 (
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
67
68
|
#ifndef __ASURA_ENGINE_WINDOW_H__
#define __ASURA_ENGINE_WINDOW_H__
#include "../scripting/portable.hpp"
#include "../math/vector2.hpp"
#include "render_state.h"
#include "render_target.h"
namespace AsuraEngine
{
namespace Graphics
{
enum WindowStyle
{
WINDOW_STYLE_FULLSCREEN = 1 << 1,
};
///
/// ڣֶ֧രڡڱ༭Ҫ֧֣runnerֻҪһڡͬĿͻʵִ˽ӿڲֶעᵽlua
///
ASURA_ABSTRACT class Window
: public RenderTarget
{
public:
Window(WindowStyle style);
~Window();
virtual void SetSize(uint width, uint height) = 0;
virtual void SetPosition(int x, int y) = 0;
virtual void SetTitle(const std::string& title) = 0;
virtual void SetWindowStyle(WindowStyle style) = 0;
virtual void Show() = 0;
virtual void Hide() = 0;
///
/// ǿ˫ĴڣҪչʾǰ̨
///
virtual void SwapRenderBuffer() = 0;
virtual void Clear(const Color& col = Color::Black) = 0;
virtual void Clear(const Math::Recti& quad, const Color& col = Color::Black) = 0;
virtual void Draw(const Drawable* texture, const RenderState& state) = 0;
virtual void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state) = 0;
protected:
Math::Vector2i mPosition;
Math::Vector2i mSize;
};
using RenderWindow = Window;
}
}
#endif
|