summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/canvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/canvas.h')
-rw-r--r--source/modules/asura-core/graphics/canvas.h77
1 files changed, 38 insertions, 39 deletions
diff --git a/source/modules/asura-core/graphics/canvas.h b/source/modules/asura-core/graphics/canvas.h
index 332e973..bbd098a 100644
--- a/source/modules/asura-core/graphics/canvas.h
+++ b/source/modules/asura-core/graphics/canvas.h
@@ -11,64 +11,63 @@
#include "render_target.h"
#include "render_state.h"
-namespace AsuraEngine
-{
- namespace Graphics
- {
+namespace_begin(AsuraEngine)
+namespace_begin(Graphics)
+
- ///
- /// CanvasҲԳΪrender textureҲΪtextureȾ
- ///
- class Canvas ASURA_FINAL
- : public Scripting::Portable<Canvas, RenderTarget>
- {
- public:
+///
+/// CanvasҲԳΪrender textureҲΪtextureȾ
+///
+class Canvas ASURA_FINAL
+ : public Scripting::Portable<Canvas, RenderTarget>
+{
+public:
- Canvas();
+ Canvas();
- ~Canvas();
+ ~Canvas();
- ///
- /// render textureĴС
- ///
- void SetSize(uint w, uint h) ASURA_THROW(Exception);
+ ///
+ /// render textureĴС
+ ///
+ void SetSize(uint w, uint h) ASURA_THROW(Exception);
- void Clear(const Color& col = Color::Black) override;
+ void Clear(const Color& col = Color::Black) override;
/*
- void Clear(const Math::Recti& quad, const Color& col = Color::Black) override;
+ void Clear(const Math::Recti& quad, const Color& col = Color::Black) override;
*/
- void Render(const RenderTarget* rt, const Math::Vector2i& pos, const Math::Vector2i& scale, const Math::Vector2i& center, float rot);
+ void Render(const RenderTarget* rt, const Math::Vector2i& pos, const Math::Vector2i& scale, const Math::Vector2i& center, float rot);
- void Render(const RenderTarget* rt, const Math::Rectf& quad, const Math::Vector2i& pos, const Math::Vector2i& scale, const Math::Vector2i& center, float rot);
+ void Render(const RenderTarget* rt, const Math::Rectf& quad, const Math::Vector2i& pos, const Math::Vector2i& scale, const Math::Vector2i& center, float rot);
- void Draw(const Drawable* texture, const RenderState& state);
+ void Draw(const Drawable* texture, const RenderState& state);
- void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state);
+ void Draw(const Drawable* texture, const Math::Recti& quad, const RenderState& state);
- private:
+private:
- GLuint m_FBO;
+ GLuint m_FBO;
- GLuint m_TexID;
+ GLuint m_TexID;
- uint m_Width, m_Height;
+ uint m_Width, m_Height;
- luaxport:
+luaxport:
- LUAX_DECL_FACTORY(Canvas, RenderTarget);
+ LUAX_DECL_FACTORY(Canvas, RenderTarget);
- LUAX_DECL_METHOD(_SetSize);
- LUAX_DECL_METHOD(_Bind);
- LUAX_DECL_METHOD(_Unbind);
+ LUAX_DECL_METHOD(_SetSize);
+ LUAX_DECL_METHOD(_Bind);
+ LUAX_DECL_METHOD(_Unbind);
- };
+};
- ///
- /// CanvasΪRenderTexture
- ///
- typedef Canvas RenderTexture;
+///
+/// CanvasΪRenderTexture
+///
+typedef Canvas RenderTexture;
- }
-}
+} // Graphics
+} // AsuraEngine
#endif \ No newline at end of file