summaryrefslogtreecommitdiff
path: root/source/libs/asura-lib-core/graphics/render_target.h
blob: afa5c6a28ee56ff85714bad79ab891407fb10373 (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
#ifndef __ASURA_ENGINE_RENDERTARGET_H__
#define __ASURA_ENGINE_RENDERTARGET_H__

#include <asura-lib-utils/math/vector2.hpp>
#include <asura-lib-utils/math/rect.hpp>
#include <asura-lib-utils/scripting/portable.hpp>

#include "texture.h"
#include "color.h"

namespace AsuraEngine
{
	namespace Graphics
	{

		class Drawable;

		///
		/// ɱΪȾĿ࣬
		///     Canvas(RenderTexture) 
		///     Window(RenderWindow)
		///
		class RenderTarget
		{
		public:

			RenderTarget() {};

			virtual ~RenderTarget() {};

			///
			/// ɫcolRT
			///
			virtual void Clear(const Color& col = Color::Black) = 0;

			///
			/// ɫcolղRT
			///
			virtual void Clear(const Math::Recti& quad, const Color& col = Color::Black) = 0;

			///
			/// textureRT
			///
			virtual void Draw(const Drawable* texture, const RenderState& state) = 0;

			///
			/// һtextureRT
			///
			virtual void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state) = 0;

		};

	}
}

#endif