summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-07-28 17:51:00 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-07-28 17:51:00 -0600
commitf3130b85e6ddbff7b0ce700c52d3eb54d9c98b71 (patch)
tree421b305a13b83c0ca490ee4b12d56e9f35b7d09b
parente16eb4ae4a73125bc4e74fc667aa99110ac77c29 (diff)
fix for SH-2023: Brightness Bump maps don't load when shadows are enabled
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/llvovolume.cpp19
-rw-r--r--indra/newview/llvovolume.h2
3 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index d801f6df18..6f71c54f79 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1073,8 +1073,8 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
if (!src_image->hasCallbacks())
{ //if image has no callbacks but resolutions don't match, trigger raw image loaded callback again
if (src_image->getWidth() != bump->getWidth() ||
- src_image->getHeight() != bump->getHeight() ||
- (LLPipeline::sRenderDeferred && bump->getComponents() != 4))
+ src_image->getHeight() != bump->getHeight())// ||
+ //(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
{
src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL );
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4c137d3394..d8b02fab27 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -704,19 +704,22 @@ BOOL LLVOVolume::isVisible() const
return FALSE ;
}
-void LLVOVolume::updateTextureVirtualSize()
+void LLVOVolume::updateTextureVirtualSize(bool forced)
{
LLFastTimer ftm(FTM_VOLUME_TEXTURES);
// Update the pixel area of all faces
- if(!isVisible())
+ if(!forced)
{
- return ;
- }
+ if(!isVisible())
+ {
+ return ;
+ }
- if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE))
- {
- return;
+ if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE))
+ {
+ return;
+ }
}
static LLCachedControl<bool> dont_load_textures(gSavedSettings,"TextureDisable");
@@ -3995,7 +3998,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
llassert_always(vobj);
- vobj->updateTextureVirtualSize();
+ vobj->updateTextureVirtualSize(true);
vobj->preRebuild();
drawablep->clearState(LLDrawable::HAS_ALPHA);
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index fc00f0c0d0..13565cb27c 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -206,7 +206,7 @@ public:
/*virtual*/ BOOL updateLOD();
void updateRadius();
/*virtual*/ void updateTextures();
- void updateTextureVirtualSize();
+ void updateTextureVirtualSize(bool forced = false);
void updateFaceFlags();
void regenFaces();