summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llprimitive/llmaterial.cpp14
-rw-r--r--indra/llprimitive/llmaterial.h11
-rw-r--r--indra/newview/lldrawpoolavatar.cpp4
-rw-r--r--indra/newview/llface.cpp36
-rw-r--r--indra/newview/llface.h5
-rw-r--r--indra/newview/llviewertexture.cpp28
-rw-r--r--indra/newview/llviewertexture.h5
-rw-r--r--indra/newview/llvovolume.cpp183
-rw-r--r--indra/newview/llvovolume.h22
-rw-r--r--indra/newview/pipeline.cpp4
10 files changed, 42 insertions, 270 deletions
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index e6d2790a5f..57ceb3e11b 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -106,16 +106,10 @@ LLMaterial::LLMaterial()
, mEnvironmentIntensity(LLMaterial::DEFAULT_ENV_INTENSITY)
, mDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
, mAlphaMaskCutoff(0)
- , mIsDiffuseAlphaInvalid(false)
- , mIsNormalInvalid(false)
- , mIsSpecularInvalid(false)
{
}
LLMaterial::LLMaterial(const LLSD& material_data)
- : mIsDiffuseAlphaInvalid(false)
- , mIsNormalInvalid(false)
- , mIsSpecularInvalid(false)
{
fromLLSD(material_data);
}
@@ -205,17 +199,13 @@ U32 LLMaterial::getShaderMask(U32 alpha_mode)
{
ret = getDiffuseAlphaMode();
}
- if (mIsDiffuseAlphaInvalid && ret != DIFFUSE_ALPHA_MODE_DEFAULT)
- {
- ret = alpha_mode != DIFFUSE_ALPHA_MODE_NONE;
- }
llassert(ret < SHADER_COUNT);
//next bit is whether or not specular map is present
const U32 SPEC_BIT = 0x4;
- if (getSpecularID().notNull() && !mIsSpecularInvalid)
+ if (getSpecularID().notNull())
{
ret |= SPEC_BIT;
}
@@ -224,7 +214,7 @@ U32 LLMaterial::getShaderMask(U32 alpha_mode)
//next bit is whether or not normal map is present
const U32 NORM_BIT = 0x8;
- if (getNormalID().notNull() && !mIsNormalInvalid)
+ if (getNormalID().notNull())
{
ret |= NORM_BIT;
}
diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h
index 2f23a50973..9f52a3f6c1 100644
--- a/indra/llprimitive/llmaterial.h
+++ b/indra/llprimitive/llmaterial.h
@@ -120,13 +120,6 @@ public:
void setAlphaMaskCutoff(U8 cutoff) { mAlphaMaskCutoff = cutoff; }
bool isNull() const;
- bool isDiffuseAlphaInvalid() const { return mIsDiffuseAlphaInvalid; }
- void setDiffuseAlphaInvalid(bool is_invalid) { mIsDiffuseAlphaInvalid = is_invalid; }
- bool isNormalInvalid() const { return mIsNormalInvalid; }
- void setNormalInvalid(bool is_invalid) { mIsNormalInvalid = is_invalid; }
- bool isSpecularInvalid() const { return mIsSpecularInvalid; }
- void setSpecularInvalid(bool is_invalid) { mIsSpecularInvalid = is_invalid; }
-
static const LLMaterial null;
bool operator == (const LLMaterial& rhs) const;
@@ -154,10 +147,6 @@ protected:
U8 mEnvironmentIntensity;
U8 mDiffuseAlphaMode;
U8 mAlphaMaskCutoff;
-
- bool mIsDiffuseAlphaInvalid;
- bool mIsNormalInvalid;
- bool mIsSpecularInvalid;
};
typedef LLPointer<LLMaterial> LLMaterialPtr;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 97dda072e7..8128790eb6 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1818,7 +1818,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
F32 env = mat->getEnvironmentIntensity()/255.f;
- if (mat->getSpecularID().isNull() || mat->isSpecularInvalid())
+ if (mat->getSpecularID().isNull())
{
env = te->getShiny()*0.25f;
col.set(env,env,env,0);
@@ -1831,7 +1831,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
sVertexProgram->uniform4f(LLShaderMgr::SPECULAR_COLOR, col.mV[0], col.mV[1], col.mV[2], spec);
sVertexProgram->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, env);
- if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK && !mat->isDiffuseAlphaInvalid())
+ if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
sVertexProgram->setMinimumAlpha(mat->getAlphaMaskCutoff()/255.f);
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index d502e686c7..c6fff6e57a 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -344,34 +344,6 @@ void LLFace::dirtyTexture()
gPipeline.markTextured(drawablep);
}
-void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture)
-{
- LLDrawable* drawablep = getDrawable();
- if(mVObjp.notNull() && mVObjp->getVolume())
- {
- LLVOVolume *vobj = drawablep->getVOVolume();
- if(vobj && vobj->notifyAboutCreatingTexture(texture))
- {
- gPipeline.markTextured(drawablep);
- gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
- }
- }
-}
-
-void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture)
-{
- LLDrawable* drawablep = getDrawable();
- if(mVObjp.notNull() && mVObjp->getVolume())
- {
- LLVOVolume *vobj = drawablep->getVOVolume();
- if(vobj && vobj->notifyAboutMissingAsset(texture))
- {
- gPipeline.markTextured(drawablep);
- gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
- }
- }
-}
-
void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
{
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
@@ -1084,7 +1056,7 @@ bool LLFace::canRenderAsMask()
}
LLMaterial* mat = te->getMaterialParams();
- if (mat && !mat->isDiffuseAlphaInvalid() && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
{
return false;
}
@@ -1318,14 +1290,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (LLPipeline::sRenderDeferred)
{ //store shiny in alpha if we don't have a specular map
- if (!mat || mat->getSpecularID().isNull() || mat->isSpecularInvalid())
+ if (!mat || mat->getSpecularID().isNull())
{
shiny_in_alpha = true;
}
}
else
{
- if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK || mat->isDiffuseAlphaInvalid())
+ if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
shiny_in_alpha = true;
}
@@ -1811,7 +1783,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
std::vector<LLVector2> bump_tc;
- if (mat && !(mat->getNormalID().isNull() || mat->isNormalInvalid()))
+ if (mat && !mat->getNormalID().isNull())
{ //writing out normal and specular texture coordinates, not bump offsets
do_bump = false;
}
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index ee545acb94..2d88c6fa58 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -230,13 +230,10 @@ public:
static U32 getRiggedDataMask(U32 type);
- void notifyAboutCreatingTexture(LLViewerTexture *texture);
- void notifyAboutMissingAsset(LLViewerTexture *texture);
-
public: //aligned members
LLVector4a mExtents[2];
-private:
+private:
F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
public:
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index e5a1bed48c..840176c1e0 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -669,36 +669,12 @@ S8 LLViewerTexture::getType() const
void LLViewerTexture::cleanup()
{
- notifyAboutMissingAsset();
-
mFaceList[LLRender::DIFFUSE_MAP].clear();
mFaceList[LLRender::NORMAL_MAP].clear();
mFaceList[LLRender::SPECULAR_MAP].clear();
mVolumeList.clear();
}
-void LLViewerTexture::notifyAboutCreatingTexture()
-{
- for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
- {
- for(U32 f = 0; f < mNumFaces[ch]; f++)
- {
- mFaceList[ch][f]->notifyAboutCreatingTexture(this);
- }
- }
-}
-
-void LLViewerTexture::notifyAboutMissingAsset()
-{
- for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
- {
- for(U32 f = 0; f < mNumFaces[ch]; f++)
- {
- mFaceList[ch][f]->notifyAboutMissingAsset(this);
- }
- }
-}
-
// virtual
void LLViewerTexture::dump()
{
@@ -1498,8 +1474,6 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel);
- notifyAboutCreatingTexture();
-
setActive();
if (!needsToSaveRawImage())
@@ -2224,8 +2198,6 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing)
}
if (is_missing)
{
- notifyAboutMissingAsset();
-
if (mUrl.empty())
{
LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index c9dea17f63..9208b4813e 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -175,10 +175,6 @@ protected:
void init(bool firstinit) ;
void reorganizeFaceList() ;
void reorganizeVolumeList() ;
-
- void notifyAboutMissingAsset();
- void notifyAboutCreatingTexture();
-
private:
friend class LLBumpImageList;
friend class LLUIImageList;
@@ -316,7 +312,6 @@ public:
void addToCreateTexture();
-
// ONLY call from LLViewerTextureList
BOOL createTexture(S32 usename = 0);
void destroyTexture() ;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 206d34d7ea..20c54d06d3 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2051,148 +2051,28 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
return res;
}
-bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture)
-{
- // Texture was created, process it and remove from wait list
-
- std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
- if(range.first == range.second) return false;
-
- bool needs_update = false;
-
- for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
- {
- LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
- if (cur_material.isNull())
- {
- continue;
- }
-
- if (LLRender::DIFFUSE_MAP == range_it->second.map
- && GL_RGBA != texture->getPrimaryFormat()
- && cur_material->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_NONE
- && cur_material->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT)
- {
- // We have non 32 bit texture with alpha, it is invalid
-
- cur_material->setDiffuseAlphaInvalid(true);
- needs_update = true;
- }
- }
-
- //clear wait-list
- mWaitingTextureInfo.erase(range.first, range.second);
-
- return needs_update;
-}
-
-bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture)
-{
- // Texture was marked as missing, process it and remove from wait list
-
- std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID());
- if(range.first == range.second) return false;
-
- for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it)
- {
- LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te);
- if (cur_material.isNull())
- {
- continue;
- }
-
- switch (range_it->second.map)
- {
- case LLRender::DIFFUSE_MAP:
- {
- cur_material->setDiffuseAlphaInvalid(true);
- break;
- }
- case LLRender::NORMAL_MAP:
- {
- cur_material->setNormalInvalid(true);
- break;
- }
- case LLRender::SPECULAR_MAP:
- {
- cur_material->setSpecularInvalid(true);
- break;
- }
- default:
- break;
- }
- }
-
- //clear wait-list
- mWaitingTextureInfo.erase(range.first, range.second);
-
- return true;
-}
-
S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)
{
LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams);
if(pMaterialParams)
- { //check all of them according to material settings
-
- LLViewerTexture *img_diffuse = getTEImage(te);
- LLViewerTexture *img_normal = getTENormalMap(te);
- LLViewerTexture *img_specular = getTESpecularMap(te);
+ {
+ LLViewerTexture* image = getTEImage(te);
+ LLGLenum image_format = image ? image->getPrimaryFormat() : GL_RGB;
+ LLMaterialPtr current_material = getTEMaterialParams(te);
- llassert(NULL != img_diffuse);
+ U8 new_diffuse_alpha_mode = pMaterialParams->getDiffuseAlphaMode();
- //diffuse
- if(NULL != img_diffuse)
+ if(new_diffuse_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
{
- if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset())
- {
- // Texture information is missing, wait for it
- mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te)));
- }
- else
- {
- if(img_diffuse->isMissingAsset())
- {
- pMaterial->setDiffuseAlphaInvalid(true);
- }
- else if (GL_RGBA != img_diffuse->getPrimaryFormat()
- && pMaterialParams->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_NONE
- && pMaterialParams->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_DEFAULT)
- {
- pMaterial->setDiffuseAlphaInvalid(true);
- }
- }
+ new_diffuse_alpha_mode = (GL_RGB == image_format || 0 == image_format ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : new_diffuse_alpha_mode);
}
- //normal
- if(LLUUID::null != pMaterialParams->getNormalID())
- {
- if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID())
- {
- pMaterial->setNormalInvalid(true);
- }
- else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat())
- {
- // Texture information is missing, wait for it
- mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te)));
- }
-
- }
-
-
- //specular
- if(LLUUID::null != pMaterialParams->getSpecularID())
- {
- if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID())
- {
- pMaterial->setSpecularInvalid(true);
- }
- else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat())
- {
- // Texture information is missing, wait for it
- mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te)));
- }
+ if(pMaterialParams->getDiffuseAlphaMode() != new_diffuse_alpha_mode) {
+ //create new material
+ pMaterial = new LLMaterial(pMaterialParams->asLLSD());
+ pMaterial->setDiffuseAlphaMode(new_diffuse_alpha_mode);
+ LLMaterialMgr::getInstance()->put(getID(),te,*pMaterial);
}
}
@@ -4485,7 +4365,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
draw_info->mAlphaMaskCutoff = mat->getAlphaMaskCutoff() * (1.f / 255.f);
- draw_info->mDiffuseAlphaMode = mat->isDiffuseAlphaInvalid() ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : mat->getDiffuseAlphaMode();
+ draw_info->mDiffuseAlphaMode = mat->getDiffuseAlphaMode();
draw_info->mNormalMap = facep->getViewerObject()->getTENormalMap(facep->getTEOffset());
}
@@ -4754,14 +4634,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
LLMaterial* mat = te->getMaterialParams().get();
- U8 alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- if (mat && !mat->isDiffuseAlphaInvalid())
- {
- alpha_mode = mat->getDiffuseAlphaMode();
- }
if (mat && LLPipeline::sRenderDeferred)
{
+ U8 alpha_mode = mat->getDiffuseAlphaMode();
+
bool is_alpha = type == LLDrawPool::POOL_ALPHA &&
(alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND ||
te->getColor().mV[3] < 0.999f);
@@ -4781,10 +4658,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
bool fullbright = te->getFullbright();
bool is_alpha = type == LLDrawPool::POOL_ALPHA;
- bool can_be_shiny = alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
- alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
+ U8 mode = mat->getDiffuseAlphaMode();
+ bool can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
+ mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
- if (alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_MASK && te->getColor().mV[3] >= 0.999f)
+ if (mode == LLMaterial::DIFFUSE_ALPHA_MODE_MASK && te->getColor().mV[3] >= 0.999f)
{
pool->addRiggedFace(facep, fullbright ? LLDrawPoolAvatar::RIGGED_FULLBRIGHT : LLDrawPoolAvatar::RIGGED_SIMPLE);
}
@@ -4984,9 +4862,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (LLPipeline::sRenderDeferred && te->getMaterialParams().notNull() && !te->getMaterialID().isNull())
{
LLMaterial* mat = te->getMaterialParams().get();
- if (mat->getNormalID().notNull() && !mat->isNormalInvalid())
+ if (mat->getNormalID().notNull())
{
- if (mat->getSpecularID().notNull() && !mat->isSpecularInvalid())
+ if (mat->getSpecularID().notNull())
{ //has normal and specular maps (needs texcoord1, texcoord2, and tangent)
if (normspec_count < MAX_FACE_COUNT)
{
@@ -5001,7 +4879,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
}
- else if (mat->getSpecularID().notNull() && !mat->isSpecularInvalid())
+ else if (mat->getSpecularID().notNull())
{ //has specular map but no normal map, needs texcoord2
if (spec_count < MAX_FACE_COUNT)
{
@@ -5658,14 +5536,13 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? TRUE : FALSE;
LLMaterial* mat = te->getMaterialParams().get();
- U8 diffuse_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- bool can_be_shiny = true;
+ bool can_be_shiny = true;
if (mat)
{
- diffuse_mode = mat->isDiffuseAlphaInvalid() ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : mat->getDiffuseAlphaMode();
- can_be_shiny = diffuse_mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
- diffuse_mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
+ U8 mode = mat->getDiffuseAlphaMode();
+ can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE ||
+ mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE;
}
bool use_legacy_bump = te->getBumpmap() && (te->getBumpmap() < 18) && (!mat || mat->getNormalID().isNull());
@@ -5681,7 +5558,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
//
if (te->getFullbright())
{
- if (diffuse_mode == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
if (opaque)
{
@@ -5760,7 +5637,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
}
else if (mat)
{
- U8 mode = diffuse_mode;
+ U8 mode = mat->getDiffuseAlphaMode();
if (te->getColor().mV[3] < 0.999f)
{
mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
@@ -5856,7 +5733,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
}
else if (fullbright || bake_sunlight)
{ //fullbright
- if (mat && diffuse_mode == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK);
}
@@ -5878,7 +5755,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac
else
{ //all around simple
llassert(mask & LLVertexBuffer::MAP_NORMAL);
- if (mat && diffuse_mode == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{ //material alpha mask can be respected in non-deferred
registerFace(group, facep, LLRenderPass::PASS_ALPHA_MASK);
}
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index a331908320..b07d416363 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -380,7 +380,7 @@ public:
static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
static F32 sLODFactor; // LOD scale factor
static F32 sDistanceFactor; // LOD distance factor
-
+
static LLPointer<LLObjectMediaDataClient> sObjectMediaClient;
static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient;
@@ -388,26 +388,6 @@ protected:
static S32 sNumLODChanges;
friend class LLVolumeImplFlexible;
-
-public:
- bool notifyAboutCreatingTexture(LLViewerTexture *texture);
- bool notifyAboutMissingAsset(LLViewerTexture *texture);
-
-private:
- struct material_info
- {
- LLRender::eTexIndex map;
- U8 te;
-
- material_info(LLRender::eTexIndex map_, U8 te_)
- : map(map_)
- , te(te_)
- {}
- };
-
- typedef std::multimap<LLUUID, material_info> mmap_UUID_MAP_t;
- mmap_UUID_MAP_t mWaitingTextureInfo;
-
};
#endif // LL_LLVOVOLUME_H
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 138d186e06..d3be5fea1a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1691,7 +1691,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2);
}
- if (alpha && mat && !mat->isDiffuseAlphaInvalid())
+ if (alpha && mat)
{
switch (mat->getDiffuseAlphaMode())
{
@@ -1712,7 +1712,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima
{
return LLDrawPool::POOL_ALPHA;
}
- else if ((te->getBumpmap() || te->getShiny()) && (!mat || mat->getNormalID().isNull() || mat->isNormalInvalid()))
+ else if ((te->getBumpmap() || te->getShiny()) && (!mat || mat->getNormalID().isNull()))
{
return LLDrawPool::POOL_BUMP;
}