summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-21 11:00:47 -0700
committerRichard Linden <none@none>2013-06-21 11:00:47 -0700
commit090fa057b5ff17170d846473a2bc9ebc315c99d3 (patch)
tree781dff230ab8d1fc651e453cdd568df5aff8487a /indra/newview/lldrawpool.cpp
parent5de2f0a8970244866dc8b511caa3c8626955264f (diff)
parenta2a6bf20d71f923e9a5e43f71213fffbfea5a2a6 (diff)
merge
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rwxr-xr-xindra/newview/lldrawpool.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 94dd927d26..04e31e6486 100755
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -35,6 +35,7 @@
#include "lldrawpoolalpha.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolbump.h"
+#include "lldrawpoolmaterials.h"
#include "lldrawpoolground.h"
#include "lldrawpoolsimple.h"
#include "lldrawpoolsky.h"
@@ -47,6 +48,7 @@
#include "llspatialpartition.h"
#include "llviewercamera.h"
#include "lldrawpoolwlsky.h"
+#include "llglslshader.h"
S32 LLDrawPool::sNumDrawPools = 0;
@@ -64,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;
@@ -98,6 +106,9 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0)
case POOL_BUMP:
poolp = new LLDrawPoolBump();
break;
+ case POOL_MATERIALS:
+ poolp = new LLDrawPoolMaterials();
+ break;
case POOL_WL_SKY:
poolp = new LLDrawPoolWLSky();
break;
@@ -411,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)