From 8ee3f7453bf7b0db5c7358e697e91714d825c87d Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 9 Jun 2019 21:12:25 +0800 Subject: *misc --- source/modules/asura-core/graphics/image.h | 34 ++++++------------------------ 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'source/modules/asura-core/graphics/image.h') diff --git a/source/modules/asura-core/graphics/image.h b/source/modules/asura-core/graphics/image.h index 8e3e7d3..d7cd37f 100644 --- a/source/modules/asura-core/graphics/image.h +++ b/source/modules/asura-core/graphics/image.h @@ -24,40 +24,26 @@ namespace AsuraEngine namespace Graphics { - /// - /// Image是图片从内存中载入后,读取进游戏后保存的结果。一个Image在内存、显存中只会保存一 - /// 份,不会产生副本。需要特征化的区别image,如锚点位置,缩放和旋转角度,使用sprite。 - /// 是一个只读类。主要是考虑到editor和engine使用不同的封装。Image只提供渲染时需要的 - /// sampler2D,顶点数据严格来说和Image无关,不应该由Image类提供。在Framework中,真正的 - /// 渲染实体是sprite,sprite提供了顶点数据和仿射变换参数。 - /// - class Image ASURA_FINAL - : public AEScripting::Portable + class Image ASURA_FINAL : public AEScripting::Portable { public: Image(); - ~Image(); - /// - /// 将解析后的图像数据提交到GPU,更新像素信息。用来重新构建image,使用glTexImage2D重 - /// 新提交image的像素数据。 - /// bool Load(AEImage::ImageData* decodeData); bool Load(AEImage::ImageData* decodeData, const AEMath::Vector2i& pos); uint GetWidth(); uint GetHeight(); - /// - /// 创建一个gpu buffer,填充顶点的position数据和UV数据. - /// GPUBuffer* GenGPUBuffer(); private: - //----------------------------------------------------------------------------// + uint32 mWidth, mHeight; + + luaxport: LUAX_DECL_FACTORY(Image, Texture); @@ -69,18 +55,10 @@ namespace AsuraEngine LUAX_DECL_METHOD(_GetPixel); LUAX_DECL_METHOD(_Render); - //----------------------------------------------------------------------------// - - uint32 mWidth, mHeight; - -#if ASURA_EDITOR - -#endif - }; - } -} + } // Graphics +} // AsuraEngine namespace AEGraphics = AsuraEngine::Graphics; -- cgit v1.1-26-g67d0