summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-17 00:19:19 -0500
committerDave Parks <davep@lindenlab.com>2011-09-17 00:19:19 -0500
commit4f99ace06944a704e46cc3014607f3a5a4ef246b (patch)
tree187224a72f78f260acd80ab732d49940c7e2afc8 /indra/newview/pipeline.cpp
parent8a1baaea6c0462b645499e8e7b88345e46b92621 (diff)
SH-2243 work in progress -- put back ambient lighting when atmospheric shaders disabled.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index ebad1f77c4..db614388f4 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5057,7 +5057,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
if (!LLGLSLShader::sNoFixedFunction)
{
LLColor4 ambient = gSky.getTotalAmbientColor();
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
+ gGL.setAmbientLightColor(ambient);
}
// Light 0 = Sun or Moon (All objects)
@@ -5285,12 +5285,8 @@ void LLPipeline::enableLights(U32 mask)
mLightMask = mask;
stop_glerror();
- if (!LLGLSLShader::sNoFixedFunction)
- {
- LLColor4 ambient = gSky.getTotalAmbientColor();
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
- }
-
+ LLColor4 ambient = gSky.getTotalAmbientColor();
+ gGL.setAmbientLightColor(ambient);
}
}
@@ -5342,10 +5338,10 @@ void LLPipeline::enableLightsPreview()
if (!LLGLSLShader::sNoFixedFunction)
{
glEnable(GL_LIGHTING);
- LLColor4 ambient = gSavedSettings.getColor4("PreviewAmbientColor");
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
}
+ LLColor4 ambient = gSavedSettings.getColor4("PreviewAmbientColor");
+ gGL.setAmbientLightColor(ambient);
LLColor4 diffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
LLColor4 specular0 = gSavedSettings.getColor4("PreviewSpecular0");
@@ -5403,10 +5399,7 @@ void LLPipeline::enableLightsAvatarEdit(const LLColor4& color)
setupAvatarLights(TRUE);
enableLights(mask);
- if (!LLGLSLShader::sNoFixedFunction)
- {
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,color.mV);
- }
+ gGL.setAmbientLightColor(color);
}
void LLPipeline::enableLightsFullbright(const LLColor4& color)
@@ -5415,10 +5408,7 @@ void LLPipeline::enableLightsFullbright(const LLColor4& color)
U32 mask = 0x1000; // Non-0 mask, set ambient
enableLights(mask);
- if (!LLGLSLShader::sNoFixedFunction)
- {
- glLightModelfv(GL_LIGHT_MODEL_AMBIENT,color.mV);
- }
+ gGL.setAmbientLightColor(color);
}
void LLPipeline::disableLights()