summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2009-12-04 20:47:17 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2009-12-04 20:47:17 +0200
commit67ff38b51b59766ff7bc0af1e541b54ac067ea70 (patch)
treed204b5b656911187d12b08b8ed77a873f9758b4d /indra/newview/pipeline.cpp
parentc28fd45839b0a1924c80bc289a90e4756e677472 (diff)
parentae6911d094bcfaa730fd77f3c55c9ea5fa02b229 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 21b297c4ee..282eddf380 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7189,6 +7189,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
glClearColor(0,0,0,0);
mWaterRef.bindTarget();
+ gGL.setColorMask(true, true);
+ mWaterRef.clear();
+ gGL.setColorMask(true, false);
+
mWaterRef.getViewport(gGLViewport);
stop_glerror();
@@ -7221,6 +7225,21 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
U32 ref_mask = 0;
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
+ //initial sky pass (no user clip plane)
+ { //mask out everything but the sky
+ U32 tmp = mRenderTypeMask;
+ mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
+ (1 << LLPipeline::RENDER_TYPE_WL_SKY));
+ static LLCullResult result;
+ updateCull(camera, result);
+ stateSort(camera, result);
+ mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
+ (1 << LLPipeline::RENDER_TYPE_CLOUDS) |
+ (1 << LLPipeline::RENDER_TYPE_WL_SKY));
+ renderGeom(camera, TRUE);
+ mRenderTypeMask = tmp;
+ }
+
U32 mask = mRenderTypeMask;
mRenderTypeMask &= ~((1<<LLPipeline::RENDER_TYPE_WATER) |
(1<<LLPipeline::RENDER_TYPE_GROUND) |
@@ -7248,10 +7267,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLGLDisable cull(GL_CULL_FACE);
updateCull(camera, ref_result, 1);
stateSort(camera, ref_result);
- gGL.setColorMask(true, true);
- mWaterRef.clear();
- gGL.setColorMask(true, false);
-
}
else
{
@@ -7264,22 +7279,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
mRenderTypeMask = mask;
}
- //initial sky pass (no user clip plane)
- { //mask out everything but the sky
- U32 tmp = mRenderTypeMask;
- mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
- (1 << LLPipeline::RENDER_TYPE_WL_SKY));
- static LLCullResult result;
- updateCull(camera, result);
- stateSort(camera, result);
- mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) |
- (1 << LLPipeline::RENDER_TYPE_CLOUDS) |
- (1 << LLPipeline::RENDER_TYPE_WL_SKY));
- renderGeom(camera, TRUE);
- mRenderTypeMask = tmp;
- }
-
-
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
mRenderTypeMask = ref_mask;