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.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'source/modules/asura-core/graphics/texture.cpp') 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; } -- cgit v1.1-26-g67d0