diff options
| author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-04-08 15:58:11 -0400 |
|---|---|---|
| committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2011-04-08 15:58:11 -0400 |
| commit | 2deea74cf6f08376e14e2f7e5333fc6959d2af19 (patch) | |
| tree | 80429812cfb4f88a151627830dceb4a8f2e278dd /indra/llrender/llgl.cpp | |
| parent | 534ac19ed5a6abe68ea654a5444b7e486f8ce06a (diff) | |
| parent | 8807496ed78b36658f488d901842852d63f73cb9 (diff) | |
merging mesh-development into nyx's mesh development
Diffstat (limited to 'indra/llrender/llgl.cpp')
| -rw-r--r-- | indra/llrender/llgl.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index d5f0b81830..b508705759 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1858,12 +1858,17 @@ void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor } } -LLGLUserClipPlane::LLGLUserClipPlane(const LLPlane& p, const glh::matrix4f& modelview, const glh::matrix4f& projection) +LLGLUserClipPlane::LLGLUserClipPlane(const LLPlane& p, const glh::matrix4f& modelview, const glh::matrix4f& projection, bool apply) { - mModelview = modelview; - mProjection = projection; + mApply = apply; - setPlane(p[0], p[1], p[2], p[3]); + if (mApply) + { + mModelview = modelview; + mProjection = projection; + + setPlane(p[0], p[1], p[2], p[3]); + } } void LLGLUserClipPlane::setPlane(F32 a, F32 b, F32 c, F32 d) @@ -1894,9 +1899,12 @@ void LLGLUserClipPlane::setPlane(F32 a, F32 b, F32 c, F32 d) LLGLUserClipPlane::~LLGLUserClipPlane() { - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); + if (mApply) + { + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + } } LLGLNamePool::LLGLNamePool() |
