diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-05 22:44:04 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-05 22:44:04 +0100 |
commit | 2a2046fd074ffd8df8503e4a7197fd74e006f296 (patch) | |
tree | 3021be5d3e799221ec260408a806f76aab87a862 /indra/llprimitive | |
parent | f8b9af0216f98a37b4474219b68cad42eaafeb73 (diff) | |
parent | 40d4e8b2e6d25a625c7a5ef5dd3e94321d18ce82 (diff) |
merge
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/llmaterialid.cpp | 5 | ||||
-rw-r--r-- | indra/llprimitive/llmaterialid.h | 1 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.cpp | 10 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.h | 5 |
4 files changed, 21 insertions, 0 deletions
diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp index 820f62c43c..f88a607c4f 100644 --- a/indra/llprimitive/llmaterialid.cpp +++ b/indra/llprimitive/llmaterialid.cpp @@ -61,6 +61,11 @@ LLMaterialID::LLMaterialID(const LLMaterialID& pOtherMaterialID) copyFromOtherMaterialID(pOtherMaterialID); } +LLMaterialID::LLMaterialID(const LLUUID& lluid) +{ + set(lluid.mData); +} + LLMaterialID::~LLMaterialID() { } diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h index b4c82d3b7b..ee663f8f99 100644 --- a/indra/llprimitive/llmaterialid.h +++ b/indra/llprimitive/llmaterialid.h @@ -40,6 +40,7 @@ public: LLMaterialID(const LLSD::Binary& pMaterialID); LLMaterialID(const void* pMemory); LLMaterialID(const LLMaterialID& pOtherMaterialID); + LLMaterialID(const LLUUID& lluid); ~LLMaterialID(); bool operator == (const LLMaterialID& pOtherMaterialID) const; diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index c847cf653f..c69c059880 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -732,6 +732,16 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume) { + if (NO_LOD == detail) + { + // build the new object + setChanged(GEOMETRY); + sVolumeManager->unrefVolume(mVolumep); + mVolumep = new LLVolume(volume_params, 1, TRUE, TRUE); + setNumTEs(mVolumep->getNumFaces()); + return FALSE; + } + LLVolume *volumep; if (unique_volume) { diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 9216c04229..c138c2ac2b 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -511,6 +511,11 @@ protected: public: static LLVolumeMgr* sVolumeManager; + + enum + { + NO_LOD = -1 + }; }; inline BOOL LLPrimitive::isAvatar() const |