summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2020-03-06 09:11:44 -0600
committerRunitai Linden <davep@lindenlab.com>2020-03-06 09:11:44 -0600
commitecf8c6f520b02077d5ec575bae83022f59bf73e5 (patch)
tree677e95f130a80084815f1dd0ccbda1ad0638397b
parent7c7d71269f5b47397d14bbe44e341e4ac1d96889 (diff)
parentc1a3797b304f95e4ed025596d611bb2861d322b8 (diff)
Merge branch 'DRTVWR-440' of bitbucket.org:lindenlab/viewer into davep/BUG-228263
-rw-r--r--indra/newview/llface.cpp3
-rw-r--r--indra/newview/llface.h4
-rw-r--r--indra/newview/llviewertexture.cpp5
-rw-r--r--indra/newview/llvosky.cpp4
4 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 174d8e34d1..59269c2115 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 0c5af5b579..c74d4e3fa8 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -218,6 +218,9 @@ public:
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 @@ private:
F32 mImportanceToCamera ;
F32 mBoundingSphereRadius ;
bool mHasMedia ;
+ bool mIsMediaAllowed;
protected:
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index f5f9d0d3cc..a2cec9a613 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 943704c8de..2037aca7e9 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;
}