diff options
| author | chai <chaifix@163.com> | 2019-07-29 09:06:09 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2019-07-29 09:06:09 +0800 |
| commit | ecd7883521cbde02f4f1a6b23a7b3b601c32dbef (patch) | |
| tree | 37d94224896ea6a27777f67d31ec8d71cbfc91f9 /source/modules/asura-core/graphics/texture.cpp | |
| parent | 7894c2971626f9560b4ec77a1ce5a9a64a4f3810 (diff) | |
*misc
Diffstat (limited to 'source/modules/asura-core/graphics/texture.cpp')
| -rw-r--r-- | source/modules/asura-core/graphics/texture.cpp | 14 |
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; } |
