summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-06-01 01:18:47 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-06-01 01:18:47 +0300
commit9437d1511e2c4b73a58abc823b1ca2a29a8a4d04 (patch)
treee6b24dafcbf54d6145a44784ed4defdbbd3335c8 /indra/newview/lldrawpoolalpha.cpp
parentfadb6c7c65f4d531f513d5d896ca25b9bb22b48f (diff)
parent40d4e8b2e6d25a625c7a5ef5dd3e94321d18ce82 (diff)
merge from viewer-release
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 06f8b483b2..b0d48abb14 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -47,6 +47,7 @@
#include "llviewerregion.h"
#include "lldrawpoolwater.h"
#include "llspatialpartition.h"
+#include "llglcommonfunc.h"
BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE;
@@ -586,11 +587,14 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
{
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_PUSH);
- gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor);
- params.mVertexBuffer->setBuffer(mask & ~(params.mFullbright ? (LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2) : 0));
-
- params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
- gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
+
+ LLGLEnableFunc stencil_test(GL_STENCIL_TEST, params.mSelected, &LLGLCommonFunc::selected_stencil_test);
+
+ gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor);
+ params.mVertexBuffer->setBuffer(mask & ~(params.mFullbright ? (LLVertexBuffer::MAP_TANGENT | LLVertexBuffer::MAP_TEXCOORD1 | LLVertexBuffer::MAP_TEXCOORD2) : 0));
+
+ params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+ gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
}
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls could be expensive, but glow must be drawn Z-sorted with alpha.
@@ -600,7 +604,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
{
// install glow-accumulating blend mode
gGL.blendFunc(LLRender::BF_ZERO, LLRender::BF_ONE, // don't touch color
- LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
+ LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
emissive_shader->bind();