From d6d2f74fbbf22ba70166a97e15b6c3b39e42ac4d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 1 Jul 2013 16:27:20 -0500 Subject: NORSPEC-290 Shader optimization WIP -- compatibility pass with OpenGL 3.3, slight cleanup. --- indra/llrender/llglslshader.cpp | 18 +----------------- indra/llrender/llrender.cpp | 4 ++-- 2 files changed, 3 insertions(+), 19 deletions(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 52b00f7c15..dfb73de6f3 100755 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1203,23 +1203,7 @@ void LLGLSLShader::uniform1i(const LLStaticHashedString& uniform, GLint v) } } -void LLGLSLShader::uniform2i(const string& uniform, GLint i, GLint j) -{ - GLint location = getUniformLocation(uniform); - - if (location >= 0) - { - std::map::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::uniform2i(const string& uniform, GLint i, GLint j) +void LLGLSLShader::uniform2i(const LLStaticHashedString& uniform, GLint i, GLint j) { GLint location = getUniformLocation(uniform); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index c4585936ee..3393d352de 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -832,8 +832,8 @@ LLLightState::LLLightState(S32 index) : mIndex(index), mEnabled(false), mConstantAtten(1.f), - mLinearAtten(0.f), - mQuadraticAtten(0.f), + mLinearAtten(1.f), + mQuadraticAtten(1.f), mSpotExponent(0.f), mSpotCutoff(180.f) { -- cgit v1.2.3