summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-09-25 14:08:58 -0700
committerGraham Linden <graham@lindenlab.com>2013-09-25 14:08:58 -0700
commit05c6d59faa3f604a97df4125b6905c4138763dec (patch)
tree9765d3af02d981754d0ff6c21266fcbb97d94b3e /indra/newview/lldrawpoolalpha.cpp
parentf48581b62523670558f6a9fb01fa012d3dc9d61e (diff)
BUG-3984 fix broken rendering of particles using blend funcs
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-rwxr-xr-xindra/newview/lldrawpoolalpha.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 7741dd66e5..6c5d229dba 100755
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -578,10 +578,15 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
}
}
+ static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_PUSH("Alpha Push Verts");
+ {
+ LLFastTimer t(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);
+ }
// 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.
if (current_shader &&
@@ -616,6 +621,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
}
}
+ gGL.setSceneBlendType(LLRender::BT_ALPHA);
+
LLVertexBuffer::unbind();
if (!light_enabled)