summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2014-07-09 18:02:01 +0300
committerruslantproductengine <ruslantproductengine@lindenlab.com>2014-07-09 18:02:01 +0300
commitc4433e4fc8b35b3403503a9e5062e169c35258f5 (patch)
treee4536d630f58316b6cf3c770bedd4097447dfe61 /indra/newview
parent7ef544a07f6f23c553e94b10931dc14e2a0f26b2 (diff)
MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA_MODE_BLEND, do not render when ALM is enabled
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/lldrawpool.cpp2
-rwxr-xr-xindra/newview/lldrawpool.h2
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp2
-rwxr-xr-xindra/newview/llspatialpartition.cpp2
-rwxr-xr-xindra/newview/llvovolume.cpp17
5 files changed, 18 insertions, 7 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 5b151bdcda..f74164aea6 100755
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -443,7 +443,7 @@ void LLRenderPass::pushMaskBatches(U32 type, U32 mask, BOOL texture, BOOL batch_
}
}
-void LLRenderPass::applyModelMatrix(LLDrawInfo& params)
+void LLRenderPass::applyModelMatrix(const LLDrawInfo& params)
{
if (params.mModelMatrix != gGLLastMatrix)
{
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 3bde0d29be..bc299cc89f 100755
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -168,7 +168,7 @@ public:
BOOL isDead() { return FALSE; }
void resetDrawOrders() { }
- static void applyModelMatrix(LLDrawInfo& params);
+ static void applyModelMatrix(const LLDrawInfo& params);
virtual void pushBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
virtual void pushMaskBatches(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_textures = FALSE);
virtual void pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures = FALSE);
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index 514411aef5..f92320490a 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -96,7 +96,7 @@ void LLDrawPoolMaterials::endDeferredPass(S32 pass)
void LLDrawPoolMaterials::renderDeferred(S32 pass)
{
- U32 type_list[] =
+ static const U32 type_list[] =
{
LLRenderPass::PASS_MATERIAL,
//LLRenderPass::PASS_MATERIAL_ALPHA,
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 0a8257f42b..5e342099d7 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1632,7 +1632,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
{
LLDrawInfo* params = NULL;
- LLColor4 colors[] = {
+ static const LLColor4 colors[] = {
LLColor4::green,
LLColor4::green1,
LLColor4::green2,
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a83e2e020e..c25722b635 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2040,7 +2040,18 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
{
- S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+ S32 res = 0;
+
+ if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode())
+ {
+ LLViewerObject::setTEMaterialID(te, LLMaterialID::null);
+ res = LLViewerObject::setTEMaterialParams(te, nullptr);
+ }
+ else
+ {
+ res = LLViewerObject::setTEMaterialParams(te, pMaterialParams);
+ }
+
LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res
<< ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" )
<< LL_ENDL;
@@ -4328,7 +4339,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
draw_info->mBump = bump;
draw_info->mShiny = shiny;
- float alpha[4] =
+ static const float alpha[4] =
{
0.00f,
0.25f,
@@ -5652,7 +5663,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
if (material_pass)
{
- U32 pass[] =
+ static const U32 pass[] =
{
LLRenderPass::PASS_MATERIAL,
LLRenderPass::PASS_ALPHA, //LLRenderPass::PASS_MATERIAL_ALPHA,