diff options
author | chai <chaifix@163.com> | 2019-03-01 08:50:34 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-01 08:50:34 +0800 |
commit | 64d9d7b3eb7cece81da8b2cb56eb0f50d87a5964 (patch) | |
tree | 12bde99e5415f77f60f8873a66d09bfd3b84ec48 /Source/Asura.Engine/Graphics/Texture.h | |
parent | e28a7d48d032fe7fd4c8789e95fbc659873a0adc (diff) |
*misc
Diffstat (limited to 'Source/Asura.Engine/Graphics/Texture.h')
-rw-r--r-- | Source/Asura.Engine/Graphics/Texture.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/Source/Asura.Engine/Graphics/Texture.h b/Source/Asura.Engine/Graphics/Texture.h index e5b713c..c1411fc 100644 --- a/Source/Asura.Engine/Graphics/Texture.h +++ b/Source/Asura.Engine/Graphics/Texture.h @@ -1,9 +1,10 @@ #ifndef __ASURA_ENGINE_TEXTURE_H__ #define __ASURA_ENGINE_TEXTURE_H__ -#include "Math/Rect.h" +#include "Math/Rect.hpp" +#include "Math/Vector2.hpp" #include "Scripting/Luax.hpp" -#include "Object.h" +#include "RenderState.h" #include "GL.h" namespace AsuraEngine @@ -11,6 +12,8 @@ namespace AsuraEngine namespace Graphics { + class RenderTarget; + /// /// 2D࣬2d meshrender targetбʹáTextureȾԭϽǣϷϲԵѿϵΪ /// EditorҲϽΪԭ㣬Ϊ˷㡣 @@ -28,12 +31,22 @@ namespace AsuraEngine /// /// ȾtexturertϣԭϽǣң /// - virtual void Render(int x, int y, int sx, int sy, int ox, int oy, int r) = 0; + virtual void Render(const RenderTarget* rt, const RenderState& state) = 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; + virtual void Render(const RenderTarget* rt, const Math::Rectf& quad, const RenderState& state) = 0; + + /// + /// ù˷ʽ + /// + void SetSmooth(bool smooth); + + /// + /// ظʽ + /// + void SetRepeated(); protected: @@ -44,7 +57,7 @@ namespace AsuraEngine }; - using Renderable = Texture; + using Drawable = Texture; } } |