summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 5f5b76d425..f0d59d0eaf 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1114,6 +1114,7 @@ void LLRender::syncLightState()
shader->uniform3fv("light_direction", 8, direction[0].mV);
shader->uniform3fv("light_attenuation", 8, attenuation[0].mV);
shader->uniform3fv("light_diffuse", 8, diffuse[0].mV);
+ shader->uniform4fv("light_ambient", 1, mAmbientLightColor.mV);
}
}
@@ -1638,6 +1639,19 @@ LLLightState* LLRender::getLight(U32 index)
return NULL;
}
+void LLRender::setAmbientLightColor(const LLColor4& color)
+{
+ if (color != mAmbientLightColor)
+ {
+ ++mLightHash;
+ mAmbientLightColor = color;
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glLightModelfv(GL_LIGHT_MODEL_AMBIENT, color.mV);
+ }
+ }
+}
+
bool LLRender::verifyTexUnitActive(U32 unitToVerify)
{
if (mCurrTextureUnitIndex == unitToVerify)