summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-13 23:58:44 +0000
committerRider Linden <rider@lindenlab.com>2019-02-13 23:58:44 +0000
commit07d509bce6dc06a7ef8b3a640d622d1ed44ae3cc (patch)
tree1d3f6df6406cd8b4a0472ccd24224e3d6dc12325 /indra/llrender
parent5d9915243ba1a93934969e7e203a25c6f4c9f9d1 (diff)
parent65927e0a76aaf8ff4dc268acdb12007265ff3a14 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #276)
SL-10181, SL-10546
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp18
-rw-r--r--indra/llrender/llgl.h1
2 files changed, 13 insertions, 6 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index a55a72c18f..490e1a8c2f 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -2268,6 +2268,17 @@ LLGLUserClipPlane::LLGLUserClipPlane(const LLPlane& p, const glh::matrix4f& mode
}
}
+void LLGLUserClipPlane::disable()
+{
+ if (mApply)
+ {
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ }
+ mApply = false;
+}
+
void LLGLUserClipPlane::setPlane(F32 a, F32 b, F32 c, F32 d)
{
glh::matrix4f& P = mProjection;
@@ -2296,12 +2307,7 @@ void LLGLUserClipPlane::setPlane(F32 a, F32 b, F32 c, F32 d)
LLGLUserClipPlane::~LLGLUserClipPlane()
{
- if (mApply)
- {
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.popMatrix();
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- }
+ disable();
}
LLGLNamePool::LLGLNamePool()
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 96cbf2e3c2..362fda5fb1 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -348,6 +348,7 @@ public:
~LLGLUserClipPlane();
void setPlane(F32 a, F32 b, F32 c, F32 d);
+ void disable();
private:
bool mApply;