summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-05-17 18:06:24 -0400
committerOz Linden <oz@lindenlab.com>2013-05-17 18:06:24 -0400
commit9ef64494559dce5f7c0afb271b591036054f01ce (patch)
tree4815b3852eaf7c4465958a8c9c03865d3d84317b /indra/newview/llvovolume.cpp
parent4d62a56ff9bc9f2db5d85d5549e6bb7d8a84d04a (diff)
parent2ff880ddb151ee3bb074f507f58f60bdebc458e8 (diff)
merge changes for lastest integrations
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-xindra/newview/llvovolume.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c3c6747e99..d8f1896654 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1973,7 +1973,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)
return res;
}
-void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams, U32 te)
+void LLVOVolume::setTEMaterialParamsCallbackTE(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams, U32 te)
{
LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << " to TE " << te << LL_ENDL;
if (te >= getNumTEs())
@@ -1986,6 +1986,18 @@ void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, co
}
}
+void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams)
+{
+ LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL;
+ for (U8 i = 0; i < getNumTEs(); i++)
+ {
+ if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID)))
+ {
+ setTEMaterialParams(i, pMaterialParams);
+ }
+ }
+}
+
S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
{
S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID);
@@ -1996,7 +2008,11 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL;
if (res)
{
+#if USE_TE_SPECIFIC_REGISTRATION
LLMaterialMgr::instance().getTE(getRegion()->getRegionID(), pMaterialID, te, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2, _3));
+#else
+ LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2));
+#endif
setChanged(TEXTURE);
if (!mDrawable.isNull())
{
@@ -5553,4 +5569,3 @@ void LLHUDPartition::shift(const LLVector4a &offset)
//HUD objects don't shift with region crossing. That would be silly.
}
-