diff options
-rw-r--r-- | indra/llrender/llglslshader.cpp | 13 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index da4658dc03..674d6dcf7e 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -76,11 +76,7 @@ hasAlphaMask(false) LLGLSLShader::LLGLSLShader() : mProgramObject(0), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE) { - for (U32 i = 0; i < LLRender::NUM_MATRIX_MODES; ++i) - { - mMatHash[i] = 0xFFFFFFFF; - } - mLightHash = 0xFFFFFFFF; + } void LLGLSLShader::unload() @@ -116,6 +112,13 @@ void LLGLSLShader::unload() BOOL LLGLSLShader::createShader(vector<string> * attributes, vector<string> * uniforms) { + //reloading, reset matrix hash values + for (U32 i = 0; i < LLRender::NUM_MATRIX_MODES; ++i) + { + mMatHash[i] = 0xFFFFFFFF; + } + mLightHash = 0xFFFFFFFF; + llassert_always(!mShaderFiles.empty()); BOOL success = TRUE; diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 13e7c6094c..613d159901 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1039,7 +1039,6 @@ LLRender::LLRender() mMatIdx[i] = 0; mMatHash[i] = 0; mCurMatHash[i] = 0xFFFFFFFF; - mMatrix[i][0].make_identity(); } mLightHash = 0; @@ -1228,7 +1227,7 @@ void LLRender::syncMatrices() syncLightState(); } } - else + else if (!LLGLSLShader::sNoFixedFunction) { for (U32 i = 0; i < 2; ++i) { |