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 meshºÍrender targetÖб»Ê¹Óà + /// 2DÎÆÀí³éÏóÀ࣬ÔÚ2d meshºÍrender targetÖб»Ê¹Óá£TextureµÄäÖȾԵãÔÚ×óÉϽǣ¬ÓÎÏ·ÀïÃæµÄÉϲã»áÒԵѿ¨¶û×ø±êϵΪ±ê×¼¡£ + /// ÔÚEditorÀïÃæ½çÃæºÍ×é¼þÒ²ÊÇÒÔ×óÉϽÇΪԵ㣬ÕâÑùÊÇΪÁË·½±ã¡£ /// class Texture : virtual public Object { + public: + + Texture(); + + virtual ~Texture(); + + GLuint GetGLTextureHandle() const; + + /// + /// äÖȾÕû¸ötextureµ½rtÉÏ£¬ÔµãÔÚ×óÉϽǣ¬ÏòÓÒ£¬ÏòÏÂÑÓÉì + /// + 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; + } } |
