From 250e30d73f09e9da2b5a81d0fbae63744ae12a73 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Apr 2019 08:47:15 +0800 Subject: *misc --- source/modules/asura-core/graphics/texture.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/modules/asura-core/graphics/texture.h') diff --git a/source/modules/asura-core/graphics/texture.h b/source/modules/asura-core/graphics/texture.h index 02d3407..f19f3a7 100644 --- a/source/modules/asura-core/graphics/texture.h +++ b/source/modules/asura-core/graphics/texture.h @@ -41,6 +41,17 @@ namespace AsuraEngine COLOR_FORMAT_RGBA32F, ///< RGBA都是32bits float }; + /// + /// 纹理格式,GPU内部和CPU外部格式 + /// + struct TextureFormat + { + GLenum internalformat; // GPU内部格式 + + GLenum externalformat; // CPU外部格式 + GLenum type; // 外部格式每个channel数值类型 + }; + /// /// 2D纹理抽象类,在2d mesh和render target中被使用。Texture的渲染原点在左上角,游戏里 /// 面的上层会以笛卡尔坐标系为标准。在Editor里面界面和组件也是以左上角为原点,这样是为了 @@ -94,6 +105,13 @@ namespace AsuraEngine //----------------------------------------------------------------------------// + /// + /// 转换color format为texture format。 + /// + TextureFormat ConvertColorFormat(const ColorFormat& colorformat); + + //----------------------------------------------------------------------------// + GLuint mTex; FilterMode mMinFilter; -- cgit v1.1-26-g67d0