summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-20 02:06:08 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-20 02:06:08 +0300
commitc50f96b49215b4279192ffc3eb336a3465a00756 (patch)
treeda923846a177ea97882dd0ba07b9235a5f0e7b8b /indra/newview/lldrawpoolavatar.cpp
parentd3de134da047460c68ffd7cc732e592049a1e83d (diff)
parentb25a22a2c113a1e95f2cd5d45bb5b80a756c4a80 (diff)
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--[-rwxr-xr-x]indra/newview/lldrawpoolavatar.cpp37
1 files changed, 25 insertions, 12 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 8bbc529244..4c16c542d6 100755..100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -50,6 +50,7 @@
#include "llrendersphere.h"
#include "llviewerpartsim.h"
#include "llviewercontrol.h" // for gSavedSettings
+#include "llviewertexturelist.h"
static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
@@ -63,6 +64,7 @@ BOOL LLDrawPoolAvatar::sSkipTransparent = FALSE;
S32 LLDrawPoolAvatar::sDiffuseChannel = 0;
F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f;
+LLUUID gBlackSquareID;
static bool is_deferred_render = false;
static bool is_post_deferred_render = false;
@@ -472,7 +474,9 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
}
BOOL impostor = avatarp->isImpostor();
- if (impostor)
+ if (impostor
+ && LLVOAvatar::AV_DO_NOT_RENDER != avatarp->getVisualMuteSettings()
+ && LLVOAvatar::AV_ALWAYS_RENDER != avatarp->getVisualMuteSettings())
{
return;
}
@@ -1246,7 +1250,9 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
BOOL impostor = avatarp->isImpostor() && !single_avatar;
- if (impostor && pass != 0)
+ if (( avatarp->isInMuteList()
+ || impostor
+ || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()) ) && pass != 0)
{ //don't draw anything but the impostor for impostored avatars
return;
}
@@ -1263,7 +1269,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
LLVOAvatar::sNumVisibleAvatars++;
}
- if (impostor)
+ if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()))
{
if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
{
@@ -1276,18 +1282,11 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
avatarp->mImpostor.bindTexture(1, specular_channel);
}
}
- avatarp->renderImpostor(LLColor4U(255,255,255,255), sDiffuseChannel);
+ avatarp->renderImpostor(avatarp->getMutedAVColor(), sDiffuseChannel);
}
return;
}
- llassert(LLPipeline::sImpostorRender || !avatarp->isVisuallyMuted());
-
- /*if (single_avatar && avatarp->mSpecialRenderMode >= 1) // 1=anim preview, 2=image preview, 3=morph view
- {
- gPipeline.enableLightsAvatarEdit(LLColor4(.5f, .5f, .5f, 1.f));
- }*/
-
if (pass == 1)
{
// render rigid meshes (eyeballs) first
@@ -1811,7 +1810,21 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
//order is important here LLRender::DIFFUSE_MAP should be last, becouse it change
//(gGL).mCurrTextureUnitIndex
- gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP));
+ LLViewerTexture* specular = NULL;
+ if (LLPipeline::sImpostorRender)
+ {
+ specular = LLViewerTextureManager::findFetchedTexture(gBlackSquareID, TEX_LIST_STANDARD);
+ llassert(NULL != specular);
+ }
+ else
+ {
+ specular = face->getTexture(LLRender::SPECULAR_MAP);
+ }
+ if (specular)
+ {
+ gGL.getTexUnit(specular_channel)->bind(specular);
+ }
+
gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP));
gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true);