diff options
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rwxr-xr-x | indra/llrender/llglslshader.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 2803f256df..52b00f7c15 100755 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -622,6 +622,7 @@ void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString> * LLStaticHashedString hashedName(name); mUniformNameMap[location] = name; mUniformMap[hashedName] = location; + LL_DEBUGS("ShaderLoading") << "Uniform " << name << " is at location " << location << LL_ENDL; //find the index of this uniform @@ -1218,6 +1219,22 @@ void LLGLSLShader::uniform2i(const string& uniform, GLint i, GLint j) } } +void LLGLSLShader::uniform2i(const string& uniform, GLint i, GLint j) +{ + GLint location = getUniformLocation(uniform); + + if (location >= 0) + { + std::map<GLint, LLVector4>::iterator iter = mValue.find(location); + LLVector4 vec(i,j,0.f,0.f); + if (iter == mValue.end() || shouldChange(iter->second,vec)) + { + glUniform2iARB(location, i, j); + mValue[location] = vec; + } + } +} + void LLGLSLShader::uniform1f(const LLStaticHashedString& uniform, GLfloat v) { |