diff options
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 37a62da17c..b027a24017 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -84,6 +84,9 @@ LLShaderFeatures::LLShaderFeatures() , hasObjectSkinning(false) , hasAtmospherics(false) , hasGamma(false) + , hasSrgb(false) + , encodesNormal(false) + , decodesNormal(false) , mIndexedTextureChannels(0) , disableTextureIndex(false) , hasAlphaMask(false) @@ -542,11 +545,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri mAttribute.clear(); U32 numAttributes = (attributes == NULL) ? 0 : attributes->size(); -#if LL_RELEASE_WITH_DEBUG_INFO - mAttribute.resize(LLShaderMgr::instance()->mReservedAttribs.size() + numAttributes, { -1, NULL }); -#else mAttribute.resize(LLShaderMgr::instance()->mReservedAttribs.size() + numAttributes, -1); -#endif if (res) { //read back channel locations @@ -560,11 +559,7 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString> * attri S32 index = glGetAttribLocationARB(mProgramObject, (const GLcharARB *)name); if (index != -1) { -#if LL_RELEASE_WITH_DEBUG_INFO - mAttribute[i] = { index, name }; -#else mAttribute[i] = index; -#endif mAttributeMask |= 1 << i; LL_DEBUGS("ShaderLoading") << "Attribute " << name << " assigned to channel " << index << LL_ENDL; } @@ -664,7 +659,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * mUniformMap[hashedName] = location; LL_DEBUGS("ShaderLoading") << "Uniform " << name << " is at location " << location << LL_ENDL; - + //find the index of this uniform for (S32 i = 0; i < (S32) LLShaderMgr::instance()->mReservedUniforms.size(); i++) { @@ -688,7 +683,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * std::pair<uniforms_index_t::iterator, bool> result; S32 index = i + LLShaderMgr::instance()->mReservedUniforms.size(); - if ((*uniforms)[i].String() == name) + if ((*uniforms)[i] == hashedName) { result = mUniform.insert(uniforms_index_t::value_type(index, location)); if (result.second) @@ -1231,7 +1226,6 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c if (mProgramObject) { GLint location = getLocationForIndex(index); - if (location >= 0) { glUniformMatrix4fvARB(location, count, transpose, v); |