diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-10-09 12:30:38 -0700 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-10-09 12:30:38 -0700 |
commit | 38a565f71a54aaa66300a0ab593e366731aac769 (patch) | |
tree | 8e96f9abeecf1b6ef02141cb9021ef2348c1f5aa /indra/newview/llviewerobject.cpp | |
parent | 002a54f7798761e3cc885253c46f4180c02e49c9 (diff) |
Initial pass at getting a list of viewer objects with non-null material IDs.
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 2bc7430e06..212b135a78 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -41,6 +41,7 @@ #include "llframetimer.h" #include "llinventory.h" #include "llinventorydefines.h" +#include "llmaterialid.h" #include "llmaterialtable.h" #include "llmutelist.h" #include "llnamevalue.h" @@ -4267,6 +4268,26 @@ S32 LLViewerObject::setTEGlow(const U8 te, const F32 glow) return retval; } +S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) +{ + S32 retval = 0; + const LLTextureEntry *tep = getTE(te); + if (!tep) + { + llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; + } + else if (pMaterialID != tep->getMaterialID()) + { + retval = LLPrimitive::setTEMaterialID(te, pMaterialID); + setChanged(TEXTURE); + if (mDrawable.notNull() && retval) + { + gPipeline.markTextured(mDrawable); + } + } + return retval; +} + S32 LLViewerObject::setTEScale(const U8 te, const F32 s, const F32 t) { |