diff options
author | Dave Parks <davep@lindenlab.com> | 2013-05-30 11:06:16 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-05-30 11:06:16 -0500 |
commit | 4a1b6bdeef3753a65cb11ccbad151560da508e15 (patch) | |
tree | ad5c7a192f2438805ab924f21da5b4664bb2f949 /indra/newview/lldrawpool.cpp | |
parent | 7931cac194944518047dac73a6c01c20aa7b3a18 (diff) | |
parent | ee4c2e837bd9b414997ba75e823ac533fc4b82bc (diff) |
Automated merge with https://bitbucket.org/lindenlab/viewer-development-materials
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rwxr-xr-x | indra/newview/lldrawpool.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index fc5571aa58..04e31e6486 100755 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -48,6 +48,7 @@ #include "llspatialpartition.h" #include "llviewercamera.h" #include "lldrawpoolwlsky.h" +#include "llglslshader.h" S32 LLDrawPool::sNumDrawPools = 0; @@ -65,6 +66,12 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0) case POOL_GRASS: poolp = new LLDrawPoolGrass(); break; + case POOL_ALPHA_MASK: + poolp = new LLDrawPoolAlphaMask(); + break; + case POOL_FULLBRIGHT_ALPHA_MASK: + poolp = new LLDrawPoolFullbrightAlphaMask(); + break; case POOL_FULLBRIGHT: poolp = new LLDrawPoolFullbright(); break; @@ -415,6 +422,27 @@ void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_text } } +void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures) +{ + for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) + { + LLDrawInfo* pparams = *i; + if (pparams) + { + if (LLGLSLShader::sCurBoundShaderPtr) + { + LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff); + } + else + { + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, pparams->mAlphaMaskCutoff); + } + + pushBatch(*pparams, mask, texture, batch_textures); + } + } +} + void LLRenderPass::applyModelMatrix(LLDrawInfo& params) { if (params.mModelMatrix != gGLLastMatrix) |