diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 174d8e34d133d3a11e57cfd9d730447f6850e203..59269c2115447a3aef9c0851dde55562db1de475 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -168,7 +168,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mImportanceToCamera = 0.f ; mBoundingSphereRadius = 0.0f ; - mHasMedia = FALSE ; + mHasMedia = false ; + mIsMediaAllowed = true; } void LLFace::destroy() diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 0c5af5b5793d502e40a2c4c68f1820e38033a3cd..c74d4e3fa843a1f114f5d1df272cad1a1a7b8b46 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -218,6 +218,9 @@ class LLFace : public LLTrace::MemTrackableNonVirtual<LLFace, 16> void setHasMedia(bool has_media) { mHasMedia = has_media ;} BOOL hasMedia() const ; + void setMediaAllowed(bool is_media_allowed) { mIsMediaAllowed = is_media_allowed; } + BOOL isMediaAllowed() const { return mIsMediaAllowed; } + BOOL switchTexture() ; //vertex buffer tracking @@ -293,6 +296,7 @@ class LLFace : public LLTrace::MemTrackableNonVirtual<LLFace, 16> F32 mImportanceToCamera ; F32 mBoundingSphereRadius ; bool mHasMedia ; + bool mIsMediaAllowed; protected: diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f5f9d0d3cc7ea9d6469ea6a1e99915b21abb4b60..a2cec9a6133f676376cc3623b747b12541df5164 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3481,7 +3481,10 @@ BOOL LLViewerMediaTexture::findFaces() U32 end = tex->getNumFaces(ch); for(U32 i = 0; i < end; i++) { - mMediaFaceList.push_back((*face_list)[i]); + if ((*face_list)[i]->isMediaAllowed()) + { + mMediaFaceList.push_back((*face_list)[i]); + } } } } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 943704c8de4075eab09f7f9c229f34e7502f2e57..2037aca7e97d5d2ba5b03e07cfde9c94e412ef95 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -881,6 +881,10 @@ LLDrawable *LLVOSky::createDrawable(LLPipeline *pipeline) mFace[FACE_MOON] = mDrawable->addFace(poolp, nullptr); mFace[FACE_BLOOM] = mDrawable->addFace(poolp, nullptr); + mFace[FACE_SUN]->setMediaAllowed(false); + mFace[FACE_MOON]->setMediaAllowed(false); + mFace[FACE_BLOOM]->setMediaAllowed(false); + return mDrawable; }