summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.h
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2015-01-07 02:04:03 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2015-01-07 02:04:03 +0200
commitbb3517c24e77e7fdea915a8a57326e10e8261d7c (patch)
tree4f7e91b21d3dd876d063981b0b62319935541d1e /indra/newview/llvovolume.h
parentdbafa3c358f24c9dec0c6e9b5fc92880e6f0e0dd (diff)
MAINT-4773 FIXED Some transparent textures are rendered as white.
This bug fix related also to MAINT-4092. In 4092 sometimes when we don't have information about the texture during the setup the materail (LLVOVolume::setTEMaterialParams()), we should substitute the material with disabled "diffuse alpha mode" (for detail in cases see MAINT-4092 JIRA ticket comment). This bug fix cover the case when after the loading texture we have all information about alpha mode, and in this case we should restore diffuse alpha mode if need. In short: now we always believe that information about the material is valid (LLVOVolume::setTEMaterialParams()). Of course before setup it we check information about texture (if it possible) , if texture is not exist in database or not 32 bit depth (for diffuse) we made changes. But in all other cases (if we can't receive information about texture) we remeber this case in mWaitingTextureInfo multimap. When information about texture will be available we get it in: LLVOVolume::notify AboutCreatingTexture() or Volume::notifyAboutMissingAsset() and again, we recheck it and if need change (substitute) the material parameters. I suppose that this solution is better than was before. If this patch will be accepted , I think that MAINT-4092 should be rechecked again.
Diffstat (limited to 'indra/newview/llvovolume.h')
-rwxr-xr-xindra/newview/llvovolume.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 7503f8c5aa..bbaca316b0 100755
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -372,17 +372,37 @@ private:
// statics
public:
- static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop
+ 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;
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