diff options
Diffstat (limited to 'Source/modules/asura-core/Graphics/RenderTarget.h')
-rw-r--r-- | Source/modules/asura-core/Graphics/RenderTarget.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Source/modules/asura-core/Graphics/RenderTarget.h b/Source/modules/asura-core/Graphics/RenderTarget.h new file mode 100644 index 0000000..ab09e35 --- /dev/null +++ b/Source/modules/asura-core/Graphics/RenderTarget.h @@ -0,0 +1,52 @@ +#ifndef _ASURA_ENGINE_RENDERTARGET_H_ +#define _ASURA_ENGINE_RENDERTARGET_H_ + +#include <asura-base/Math/Vector2.hpp> +#include <asura-base/Math/Rect.hpp> +#include <asura-base/Scripting/Scripting.h> + +#include "Texture.h" +#include "Color.h" + +namespace_begin(AsuraEngine) +namespace_begin(Graphics) + +/// +/// ɱΪȾĿ࣬ +/// Canvas(RenderTexture) +/// Window(RenderWindow) +/// +class RenderTarget : public AEScripting::Object +{ +public: + + RenderTarget() {}; + + virtual ~RenderTarget() {}; + + /// + /// ɫcolRT + /// + virtual void Clear(const Color& col = Color::Black) = 0; + + /// + /// ɫcolղRT + /// + virtual void Clear(const Math::Recti& quad, const Color& col = Color::Black) = 0; + + /// + /// textureRT + /// + virtual void Draw(const Drawable* texture, const RenderState& state) = 0; + + /// + /// һtextureRT + /// + virtual void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state) = 0; + +}; + +namespace_end +namespace_end + +#endif
\ No newline at end of file |