diff options
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9d8f98688f..0784f3acdd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -117,10 +117,6 @@ #include "llenvironment.h" -#if LL_WINDOWS -#pragma optimize("", off) -#endif - #ifdef _DEBUG // Debug indices is disabled for now for debug performance - djs 4/24/02 //#define DEBUG_INDICES @@ -9463,12 +9459,14 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) water_clip = -1; } + S32 occlusion = LLPipeline::sUseOcclusion; + + LLPipeline::sUseOcclusion = 0; + if (!LLViewerCamera::getInstance()->cameraUnderWater()) { //generate planar reflection map //disable occlusion culling for reflection map for now - S32 occlusion = LLPipeline::sUseOcclusion; - - LLPipeline::sUseOcclusion = 0; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); glClearColor(0,0,0,0); @@ -9607,8 +9605,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.popMatrix(); mWaterRef.flush(); - set_current_modelview(current); - LLPipeline::sUseOcclusion = occlusion; + set_current_modelview(current); } camera.setOrigin(camera_in.getOrigin()); @@ -9712,6 +9709,8 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate; + LLPipeline::sUseOcclusion = occlusion; + LLPipeline::sUnderWaterRender = false; LLPipeline::sReflectionRender = false; |