diff options
author | Dave Parks <davep@lindenlab.com> | 2012-04-13 15:47:44 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-04-13 15:47:44 -0500 |
commit | 1de63bec5089e64b1bf6bc7eaad95d5210f0fd05 (patch) | |
tree | fe61fc339ad33aada710c65864686953df0eb471 /indra/llrender/llrender.cpp | |
parent | 6a0eaab160474ea747a33aea107fc3a400bece07 (diff) |
MAINT-861 Fix for crash on exit due to bad matrix mode
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r-- | indra/llrender/llrender.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index b0ddacbb05..51f45ca91e 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -416,12 +416,14 @@ void LLTexUnit::unbind(eTextureType type) if (mIndex < 0) return; + //always flush and activate for consistency + // some code paths assume unbind always flushes and sets the active texture + gGL.flush(); + activate(); + // Disabled caching of binding state. if (mCurrTexType == type) { - gGL.flush(); - - activate(); mCurrTexture = 0; if (LLGLSLShader::sNoFixedFunction && type == LLTexUnit::TT_TEXTURE) { |