diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-09-28 22:29:19 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-09-28 22:29:19 +0300 |
commit | 1d458de94934d0d56cef15596d414f155db166a0 (patch) | |
tree | 8c835b12674ca0dab4214496974848c27babd139 /indra/newview/lldrawpoolavatar.cpp | |
parent | e9d50aeb3d1fa6b6251296f792d75cbc480f68fb (diff) | |
parent | bac6652cdcd2d8333df04c3ebd3a6a7b752328b3 (diff) |
Merge branch 'master' into DRTVWR-515-maint
# Conflicts:
# indra/newview/llpanelprimmediacontrols.cpp
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 789a254389..6fc39f213e 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -106,8 +106,8 @@ S32 cube_channel = -1; static LLTrace::BlockTimerStatHandle FTM_SHADOW_AVATAR("Avatar Shadow"); -LLDrawPoolAvatar::LLDrawPoolAvatar() : - LLFacePool(POOL_AVATAR) +LLDrawPoolAvatar::LLDrawPoolAvatar(U32 type) : + LLFacePool(type) { } @@ -136,15 +136,6 @@ BOOL LLDrawPoolAvatar::isDead() } return TRUE; } - -//----------------------------------------------------------------------------- -// instancePool() -//----------------------------------------------------------------------------- -LLDrawPool *LLDrawPoolAvatar::instancePool() -{ - return new LLDrawPoolAvatar(); -} - S32 LLDrawPoolAvatar::getShaderLevel() const { @@ -1741,11 +1732,16 @@ void LLDrawPoolAvatar::getRiggedGeometry( LLVolume* volume, const LLVolumeFace& vol_face) { - face->setGeomIndex(0); - face->setIndicesIndex(0); - - //rigged faces do not batch textures - face->setTextureIndex(255); + face->setGeomIndex(0); + face->setIndicesIndex(0); + + if (face->getTextureIndex() != FACE_DO_NOT_BATCH_TEXTURES) + { + face->setDrawInfo(NULL); + } + + //rigged faces do not batch textures + face->setTextureIndex(FACE_DO_NOT_BATCH_TEXTURES); if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) { @@ -1810,7 +1806,7 @@ void LLDrawPoolAvatar::getRiggedGeometry( } else { - face->setPoolType(LLDrawPool::POOL_AVATAR); + face->setPoolType(mType); // either POOL_AVATAR or POOL_CONTROL_AV } //LL_INFOS() << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << LL_ENDL; @@ -2494,7 +2490,7 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) { llassert (facep->isState(LLFace::RIGGED)); - llassert(getType() == LLDrawPool::POOL_AVATAR); + llassert(getType() == LLDrawPool::POOL_AVATAR || getType() == LLDrawPool::POOL_CONTROL_AV); if (facep->getPool() && facep->getPool() != this) { LL_ERRS() << "adding rigged face that's already in another pool" << LL_ENDL; @@ -2516,7 +2512,7 @@ void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep) { llassert (facep->isState(LLFace::RIGGED)); - llassert(getType() == LLDrawPool::POOL_AVATAR); + llassert(getType() == LLDrawPool::POOL_AVATAR || getType() == LLDrawPool::POOL_CONTROL_AV); if (facep->getPool() != this) { LL_ERRS() << "Tried to remove a rigged face from the wrong pool" << LL_ENDL; |