summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolterrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolterrain.cpp')
-rwxr-xr-xindra/newview/lldrawpoolterrain.cpp49
1 files changed, 31 insertions, 18 deletions
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 33ce3d0111..33675bd261 100755
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -220,24 +220,7 @@ void LLDrawPoolTerrain::render(S32 pass)
// Special-case for land ownership feedback
if (gSavedSettings.getBOOL("ShowParcelOwners"))
{
- if (mVertexShaderLevel > 1)
- { //use fullbright shader for highlighting
- LLGLSLShader* old_shader = sShader;
- sShader->unbind();
- sShader = &gHighlightProgram;
- sShader->bind();
- gGL.diffuseColor4f(1,1,1,1);
- LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
- glPolygonOffset(-1.0f, -1.0f);
- renderOwnership();
- sShader = old_shader;
- sShader->bind();
- }
- else
- {
- gPipeline.disableLights();
- renderOwnership();
- }
+ hilightParcelOwners();
}
}
@@ -265,7 +248,15 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass)
{
return;
}
+
renderFullShader();
+
+ // Special-case for land ownership feedback
+ if (gSavedSettings.getBOOL("ShowParcelOwners"))
+ {
+ hilightParcelOwners();
+ }
+
}
void LLDrawPoolTerrain::beginShadowPass(S32 pass)
@@ -454,6 +445,28 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.matrixMode(LLRender::MM_MODELVIEW);
}
+void LLDrawPoolTerrain::hilightParcelOwners()
+{
+ if (mVertexShaderLevel > 1)
+ { //use fullbright shader for highlighting
+ LLGLSLShader* old_shader = sShader;
+ sShader->unbind();
+ sShader = &gHighlightProgram;
+ sShader->bind();
+ gGL.diffuseColor4f(1, 1, 1, 1);
+ LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(-1.0f, -1.0f);
+ renderOwnership();
+ sShader = old_shader;
+ sShader->bind();
+ }
+ else
+ {
+ gPipeline.disableLights();
+ renderOwnership();
+ }
+}
+
void LLDrawPoolTerrain::renderFull4TU()
{
// Hack! Get the region that this draw pool is rendering from!