summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolsky.cpp')
-rw-r--r--indra/newview/lldrawpoolsky.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index efffb2df9e..7f7d9f65c6 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -76,15 +76,16 @@ void LLDrawPoolSky::render(S32 pass)
return;
}
- // use a shader only underwater
+ // don't render sky under water (background just gets cleared to fog color)
if(mVertexShaderLevel > 0 && LLPipeline::sUnderWaterRender)
{
- mShader = &gObjectFullbrightWaterProgram;
- mShader->bind();
+ return;
}
- else if (LLGLSLShader::sNoFixedFunction)
+
+
+ if (LLGLSLShader::sNoFixedFunction)
{ //just use the UI shader (generic single texture no lighting)
- gUIProgram.bind();
+ gOneTextureNoColorProgram.bind();
}
else
{
@@ -111,21 +112,21 @@ void LLDrawPoolSky::render(S32 pass)
LLGLDisable clip(GL_CLIP_PLANE0);
- glPushMatrix();
+ gGL.pushMatrix();
LLVector3 origin = LLViewerCamera::getInstance()->getOrigin();
- glTranslatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+ gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
S32 face_count = (S32)mDrawFace.size();
LLVertexBuffer::unbind();
- glColor4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
for (S32 i = 0; i < llmin(6, face_count); ++i)
{
renderSkyCubeFace(i);
}
- glPopMatrix();
+ gGL.popMatrix();
}
void LLDrawPoolSky::renderSkyCubeFace(U8 side)
@@ -146,7 +147,7 @@ void LLDrawPoolSky::renderSkyCubeFace(U8 side)
LLGLEnable blend(GL_BLEND);
mSkyTex[side].bindTexture(FALSE);
- glColor4f(1, 1, 1, LLSkyTex::getInterpVal()); // lighting is disabled
+ gGL.diffuseColor4f(1, 1, 1, LLSkyTex::getInterpVal()); // lighting is disabled
face.renderIndexed();
}
}