diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2010-11-05 13:30:20 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2010-11-05 13:30:20 -0700 |
commit | 447dc782fd4d490387fd98e9fb41135038512767 (patch) | |
tree | b7875f5dd54d4068d777adbe90a3dd36b99a38eb /indra/newview/lldrawpoolwater.cpp | |
parent | d5d4a065275d1db1093111222f29942ee171f81c (diff) | |
parent | 124a59263184391b0b4ec418c532b7a715e9b5a3 (diff) |
Merge latest from lindenlab/viewer-development
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index ce1b899d55..6126908231 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -532,6 +532,7 @@ void LLDrawPoolWater::shade() glColor4fv(water_color.mV); { + LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0); LLGLDisable cullface(GL_CULL_FACE); for (std::vector<LLFace*>::iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) @@ -548,30 +549,19 @@ void LLDrawPoolWater::shade() sNeedsReflectionUpdate = TRUE; - if (water->getUseTexture()) + if (water->getUseTexture() || !water->getIsEdgePatch()) { sNeedsDistortionUpdate = TRUE; face->renderIndexed(); } + else if (gGLManager.mHasDepthClamp || deferred_render) + { + face->renderIndexed(); + } else - { //smash background faces to far clip plane - if (water->getIsEdgePatch()) - { - if (deferred_render) - { - face->renderIndexed(); - } - else - { - LLGLClampToFarClip far_clip(glh_get_current_projection()); - face->renderIndexed(); - } - } - else - { - sNeedsDistortionUpdate = TRUE; - face->renderIndexed(); - } + { + LLGLSquashToFarClip far_clip(glh_get_current_projection()); + face->renderIndexed(); } } } |