summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRunitai <>2009-12-02 11:46:14 -0600
committerRunitai <>2009-12-02 11:46:14 -0600
commit8bd90b49b1b1c9a500381e2c60e0cec02693d292 (patch)
treeb5aef58155576bf64f45174783cd0f7fa348d952 /indra
parentf496c2b164a100836d74909c3e27adcdf98018f0 (diff)
EXT-2737 Fix for terrain/avatars/trees not showing up in water reflection.
Diffstat (limited to 'indra')
-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;