summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-13 17:04:59 -0800
committerRider Linden <rider@lindenlab.com>2019-02-13 17:04:59 -0800
commite9777048751c73819e85257a6e7b0d0608fd6c39 (patch)
treec625f4e5c04f0882df16308b38ada6fd4d1e02e4 /indra/llrender
parent98d6d1969be08f16a5d565b544f46c8a13fb4db5 (diff)
parent07d509bce6dc06a7ef8b3a640d622d1ed44ae3cc (diff)
Merge
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;