summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2015-10-16 19:40:52 +0300
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2015-10-16 19:40:52 +0300
commit589b916a65d033579524a6d49ca8e2f106053c84 (patch)
treea3389848927f690da534c257b09d0bd414f6e53e /indra/newview
parent68bd343e72f246efcba568ac2cefebfb9a060687 (diff)
parent6044e89bd985340e394f88ec6cda790401c9dca3 (diff)
MAINT-933 FIXED [PUBLIC]Show Land Owner color overlay only visible where there is water when rendering of Lights and Shadows is active.
MAINT-933 FIXED [PUBLIC]Show Land Owner color overlay only visible where there is water when rendering of Lights and Shadows is active.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/lldrawpoolterrain.cpp49
-rwxr-xr-xindra/newview/lldrawpoolterrain.h4
2 files changed, 35 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!
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 2163d087e1..55f75e2644 100755
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -76,6 +76,7 @@ public:
static S32 sDetailMode;
static F32 sDetailScale; // meters per texture
+
protected:
void renderSimple();
void renderOwnership();
@@ -84,6 +85,9 @@ protected:
void renderFull4TU();
void renderFullShader();
void drawLoop();
+
+private:
+ void hilightParcelOwners();
};
#endif // LL_LLDRAWPOOLSIMPLE_H