summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 63abadbcf4..a858c81395 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -105,8 +105,8 @@ S32 cube_channel = -1;
static LLTrace::BlockTimerStatHandle FTM_SHADOW_AVATAR("Avatar Shadow");
-LLDrawPoolAvatar::LLDrawPoolAvatar() :
- LLFacePool(POOL_AVATAR)
+LLDrawPoolAvatar::LLDrawPoolAvatar(U32 type) :
+ LLFacePool(type)
{
}
@@ -135,15 +135,6 @@ BOOL LLDrawPoolAvatar::isDead()
}
return TRUE;
}
-
-//-----------------------------------------------------------------------------
-// instancePool()
-//-----------------------------------------------------------------------------
-LLDrawPool *LLDrawPoolAvatar::instancePool()
-{
- return new LLDrawPoolAvatar();
-}
-
S32 LLDrawPoolAvatar::getVertexShaderLevel() const
{
@@ -1671,6 +1662,10 @@ void LLDrawPoolAvatar::getRiggedGeometry(
{
face->setPoolType(LLDrawPool::POOL_ALPHA);
}
+ else if (type == LLDrawPool::POOL_CONTROL_AV)
+ {
+ face->setPoolType(LLDrawPool::POOL_CONTROL_AV);
+ }
else
{
face->setPoolType(LLDrawPool::POOL_AVATAR);
@@ -2083,8 +2078,8 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix);
buff->setBuffer(data_mask);
buff->drawRange(LLRender::TRIANGLES, start, end, count, offset);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
- gGL.matrixMode(LLRender::MM_MODELVIEW);
}
else
{
@@ -2267,7 +2262,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;
@@ -2289,7 +2284,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;