summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/texture.h')
-rw-r--r--source/modules/asura-core/graphics/texture.h19
1 files changed, 5 insertions, 14 deletions
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, ///< RGBA8bits int
COLOR_FORMAT_RGBA32F, ///< RGBA32bits float
};
- ///
/// ʽGPUڲCPUⲿʽ
- ///
struct TextureFormat
{
GLenum internalformat; ///< GPUڲʽ
-
GLenum externalformat; ///< CPUⲿʽ
GLenum type; ///< ⲿʽÿchannelֵ
};
///
- /// 2D࣬2d meshrender targetбʹáTextureȾԭϽǣϷ
- /// ϲԵѿϵΪ׼EditorҲϽΪԭ㣬Ϊ
- /// 㡣
+ /// 2D࣬2d meshrender targetбʹáTextureȾԭϽǣϷϲԵѿ
+ /// ϵΪ׼EditorҲϽΪԭ㣬Ϊ˷㡣
///
ASURA_ABSTRACT class Texture : public AEScripting::Object
{
@@ -74,19 +69,15 @@ namespace AsuraEngine
void GetFilterMode();
void GetWrapMode();
- ///
/// UVfilterΪ
- ///
bool IsGenMipmap();
protected:
- ///
/// תcolor formatΪtexture format
- ///
TextureFormat ConvertColorFormat(const ColorFormat& colorformat);
- GLuint mTex;
+ GLuint mTexID;
FilterMode mMinFilter;
FilterMode mMagFilter;
WrapMode mWrapMode;