summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-11 12:49:05 -0500
committerDave Parks <davep@lindenlab.com>2011-08-11 12:49:05 -0500
commit610764fbfce75f54c95d4b10c2a8f9482a7a7b80 (patch)
tree7bb208e926ad66481d53a0e960c37d7f4aac4d90 /indra/newview/pipeline.cpp
parent17f46868d28876b65adcf24a45e6c19a20f2834c (diff)
SH-2181 Fix for occlusion culling going bonkers when ban lines are present.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 01ff1bb16f..7a26404138 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3340,13 +3340,15 @@ void render_hud_elements()
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
gGL.color4f(1,1,1,1);
- if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+
+ if (LLGLSLShader::sNoFixedFunction)
{
- if (LLGLSLShader::sNoFixedFunction)
- {
- gUIProgram.bind();
- }
+ gUIProgram.bind();
+ }
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+ {
LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
@@ -3360,10 +3362,6 @@ void render_hud_elements()
// Render name tags.
LLHUDObject::renderAll();
- if (LLGLSLShader::sNoFixedFunction)
- {
- gUIProgram.unbind();
- }
}
else if (gForceRenderLandFence)
{
@@ -3374,6 +3372,11 @@ void render_hud_elements()
{
LLHUDText::renderAllHUD();
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
gGL.flush();
}