summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/texture.cpp')
-rw-r--r--source/modules/asura-core/graphics/texture.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/modules/asura-core/graphics/texture.cpp b/source/modules/asura-core/graphics/texture.cpp
index 3438334..240a5f8 100644
--- a/source/modules/asura-core/graphics/texture.cpp
+++ b/source/modules/asura-core/graphics/texture.cpp
@@ -8,24 +8,20 @@ namespace AsuraEngine
{
Texture::Texture()
- : mTex(0)
+ : mTexID(0)
{
- // Fix: ҪʱԴ
- //glGenTextures(1, &mTex);
- //if(mTex == 0)
- // throw Exception("Cannot create texture.");
}
Texture::~Texture()
{
// ͷԴ
- if(mTex != 0)
- glDeleteTextures(1, &mTex);
+ if(mTexID != 0)
+ glDeleteTextures(1, &mTexID);
}
GLuint Texture::GetGLTexture() const
{
- return mTex;
+ return mTexID;
}
TextureFormat Texture::ConvertColorFormat(const ColorFormat& colorformat)
@@ -44,7 +40,7 @@ namespace AsuraEngine
t.type = GL_FLOAT;
break;
default:
- ASSERT(false); // cant reach here
+ ASSERT(false);
}
return t;
}