summaryrefslogtreecommitdiff
path: root/Source/Asura.Engine/Graphics/Texture.h
blob: e5b713c2148100c19f0089d7b6ddca1046343d66 (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
#ifndef __ASURA_ENGINE_TEXTURE_H__
#define __ASURA_ENGINE_TEXTURE_H__

#include "Math/Rect.h"
#include "Scripting/Luax.hpp"
#include "Object.h"
#include "GL.h"

namespace AsuraEngine
{
	namespace Graphics
	{

		///
		/// 2D࣬2d meshrender targetбʹáTextureȾԭϽǣϷϲԵѿϵΪ׼
		/// EditorҲϽΪԭ㣬Ϊ˷㡣
		///
		class Texture : virtual public Object
		{
		public:

			Texture();

			virtual ~Texture();

			GLuint GetGLTextureHandle() const;

			///
			/// ȾtexturertϣԭϽǣң
			///
			virtual void Render(int x, int y, int sx, int sy, int ox, int oy, int r) = 0;

			/// 
			/// ȾtextureһֵrtϣԭϽǣң졣
			/// 
			virtual void Render(const Math::Rect& quad, int x, int y, int sx, int sy, int ox, int oy, int r) = 0;

		protected: 

			///
			/// OpenGL texture handle
			///
			GLuint mTextureHandle;

		};

		using Renderable = Texture;

	}
}

#endif