diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-09-09 14:20:19 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-09-09 14:20:19 -0400 |
commit | 8a952e42e97cfb286192aba0fbfc43986912cd29 (patch) | |
tree | 6aa00aad42189239aa81972328e057afc215bf7d /indra/llrender/llimagegl.cpp | |
parent | c47b398b75fcdbb479ad9ad2765014c5fa338df7 (diff) | |
parent | 89b9800579a37fbbdfca7789716a2d012d96cfa5 (diff) |
Removed some spurious newlines that I introduced into CMakeLists.txt.
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 60a5962234..7188b0fa44 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1414,6 +1414,8 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre void LLImageGL::deleteDeadTextures() { + bool reset = false; + while (!sDeadTextureList.empty()) { GLuint tex = sDeadTextureList.front(); @@ -1422,16 +1424,26 @@ void LLImageGL::deleteDeadTextures() { LLTexUnit* tex_unit = gGL.getTexUnit(i); - if (tex_unit->getCurrTexture() == tex) + if (tex_unit && tex_unit->getCurrTexture() == tex) { tex_unit->unbind(tex_unit->getCurrType()); stop_glerror(); + + if (i > 0) + { + reset = true; + } } } glDeleteTextures(1, &tex); stop_glerror(); } + + if (reset) + { + gGL.getTexUnit(0)->activate(); + } } void LLImageGL::destroyGLTexture() @@ -1875,6 +1887,7 @@ BOOL LLImageGL::getMask(const LLVector2 &tc) void LLImageGL::setCategory(S32 category) { +#if 0 //turn this off temporarily because it is not in use now. if(!gAuditTexture) { return ; @@ -1895,6 +1908,7 @@ void LLImageGL::setCategory(S32 category) mCategory = -1 ; } } +#endif } //for debug use |