From ecd7883521cbde02f4f1a6b23a7b3b601c32dbef Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 29 Jul 2019 09:06:09 +0800 Subject: *misc --- source/modules/asura-core/graphics/texture.h | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (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 7cfddec..e16990c 100644 --- a/source/modules/asura-core/graphics/texture.h +++ b/source/modules/asura-core/graphics/texture.h @@ -16,6 +16,7 @@ namespace AsuraEngine class RenderTarget; + /// UV采样方式 enum WrapMode { WRAP_MODE_REPEAT, @@ -24,38 +25,32 @@ namespace AsuraEngine WRAP_MODE_CLAMPTOBORDER, }; + /// 滤波模式 enum FilterMode { FILTER_MODE_NEAREST, FILTER_MODE_LINEAR, }; - /// /// 图像数据的颜色格式 - /// enum ColorFormat { COLOR_FORMAT_UNKNOWN, - COLOR_FORMAT_RGBA8, ///< RGBA都是8bits int 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里面界面和组件也是以左上角为原点,这样是为了 - /// 方便。 + /// 2D纹理抽象类,在2d mesh和render target中被使用。Texture的渲染原点在左上角,游戏里面的上层会以笛卡尔 + /// 坐标系为标准。在Editor里面界面和组件也是以左上角为原点,这样是为了方便。 /// ASURA_ABSTRACT class Texture : public AEScripting::Object { @@ -74,19 +69,15 @@ namespace AsuraEngine void GetFilterMode(); void GetWrapMode(); - /// /// 如果设置U或V方向filter为 - /// bool IsGenMipmap(); protected: - /// /// 转换color format为texture format。 - /// TextureFormat ConvertColorFormat(const ColorFormat& colorformat); - GLuint mTex; + GLuint mTexID; FilterMode mMinFilter; FilterMode mMagFilter; WrapMode mWrapMode; -- cgit v1.1-26-g67d0