diff options
| author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-07-25 18:26:14 -0400 |
|---|---|---|
| committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-07-25 18:26:14 -0400 |
| commit | c07f55e605253f2cafbdfba1f7bd267d855d3a5f (patch) | |
| tree | f1720b985981f249484f41bfa75f534867f79db9 /indra/llrender/llimagegl.cpp | |
| parent | ca5bd96bb0d60c795b78c883e91792d4a68ad2c1 (diff) | |
| parent | 825fc273ee5167052d811dc058b1834c86e005da (diff) | |
merging latest viewer-development to mesh merge candidate.
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
| -rw-r--r-- | indra/llrender/llimagegl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 60a5962234..9ca3a23d52 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(); @@ -1426,12 +1428,22 @@ void LLImageGL::deleteDeadTextures() { 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() |
