summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r--indra/newview/lldrawpoolwater.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 31c14361b5..c97f92fa6f 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -219,7 +219,7 @@ void LLDrawPoolWater::render(S32 pass)
water_color.setVec(1.f, 1.f, 1.f, 0.5f*(1.f + up_dot));
}
- glColor4fv(water_color.mV);
+ gGL.diffuseColor4fv(water_color.mV);
// Automatically generate texture coords for detail map
glEnable(GL_TEXTURE_GEN_S); //texture unit 1
@@ -275,15 +275,15 @@ void LLDrawPoolWater::render(S32 pass)
gSky.mVOSkyp->getCubeMap()->enable(0);
gSky.mVOSkyp->getCubeMap()->bind();
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
LLMatrix4 camera_mat = LLViewerCamera::getInstance()->getModelview();
LLMatrix4 camera_rot(camera_mat.getMat3());
camera_rot.invert();
- glLoadMatrixf((F32 *)camera_rot.mMatrix);
+ gGL.loadMatrix((F32 *)camera_rot.mMatrix);
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
LLOverrideFaceColor overrid(this, 1.f, 1.f, 1.f, 0.5f*up_dot);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
@@ -310,9 +310,9 @@ void LLDrawPoolWater::render(S32 pass)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}
@@ -383,7 +383,7 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
- glColor3f(1.f, 1.f, 1.f);
+ gGL.diffuseColor3f(1.f, 1.f, 1.f);
for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
@@ -623,8 +623,6 @@ void LLDrawPoolWater::shade()
water_color.mV[3] = 0.9f;
}
- glColor4fv(water_color.mV);
-
{
LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0);
LLGLDisable cullface(GL_CULL_FACE);