diff options
author | chai <chaifix@163.com> | 2019-02-26 08:48:54 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-02-26 08:48:54 +0800 |
commit | 3f457498b9c39d40a16a0ec6328880854f8cf4de (patch) | |
tree | 061ef9974b4da4c472909a65e6ebd10e8156c1b3 /Source/Asura.Engine/Graphics/Texture.h | |
parent | 684f71790401727cc45f4dad1822ddae46305072 (diff) |
*misc
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; + } } |