summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-05-17 12:13:54 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-05-17 12:13:54 -0400
commit8f94ff85f9b0318f959f066a138eac03770838cf (patch)
tree7b2885af863ae16281f197c61bbedff4f2895e2c /indra/newview/lldrawpoolbump.cpp
parent2deea74cf6f08376e14e2f7e5333fc6959d2af19 (diff)
parenta2d8f0cb3308fed1cb2c8d5fa8fb74ec4cefa45b (diff)
merging up latest mesh-development to nyx-mesh-development
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 0a642f494b..29b50761d8 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -889,6 +889,11 @@ void LLBumpImageList::destroyGL()
void LLBumpImageList::restoreGL()
{
+ if(!gTextureList.isInitialized())
+ {
+ return ;
+ }
+
LLStandardBumpmap::restoreGL();
// Images will be recreated as they are needed.
}
@@ -1126,7 +1131,9 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
if (iter == entries_list.end() ||
- iter->second.isNull())
+ iter->second.isNull() ||
+ iter->second->getWidth() != src->getWidth() ||
+ iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
{ //make sure an entry exists for this image
LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,1);
raw->clear(0x77, 0x77, 0xFF, 0xFF);