diff options
Diffstat (limited to 'Source/Asura.Engine/Graphics/Texture.h')
-rw-r--r-- | Source/Asura.Engine/Graphics/Texture.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/Source/Asura.Engine/Graphics/Texture.h b/Source/Asura.Engine/Graphics/Texture.h index 06461ce..e5b713c 100644 --- a/Source/Asura.Engine/Graphics/Texture.h +++ b/Source/Asura.Engine/Graphics/Texture.h @@ -1,8 +1,10 @@ #ifndef __ASURA_ENGINE_TEXTURE_H__ #define __ASURA_ENGINE_TEXTURE_H__ +#include "Math/Rect.h" +#include "Scripting/Luax.hpp" #include "Object.h" -#include "Luax/luax.h" +#include "GL.h" namespace AsuraEngine { @@ -10,13 +12,40 @@ namespace AsuraEngine { /// - /// 2D࣬2d meshrender targetбʹ + /// 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; + } } |