summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-03-29 10:28:21 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-03-29 10:28:21 -0700
commita2a777ebe4a72412690ebe68d9510f91b51a978a (patch)
treef942b591a1e2b1813fcc11fa4fd561c1caf36bbe
parentbf9d090045d7baf72f2ba7eadab0adc9d5c8f553 (diff)
SL-19331: When initializing a media prim, set the mipmap state correctly from the beginning
-rw-r--r--indra/newview/llviewermedia.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index b02bfff099..0bd58b8d4d 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1564,7 +1564,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
// connect this media_impl to the media texture, creating it if it doesn't exist.0
// This is necessary because we need to be able to use getMaxVirtualSize() even if the media plugin is not loaded.
- LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture(mTextureId);
+ const BOOL use_mipmaps = FALSE;
+ LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture(mTextureId, use_mipmaps);
if(media_tex)
{
media_tex->setMediaImpl();
@@ -3005,10 +3006,10 @@ LLViewerMediaTexture* LLViewerMediaImpl::updateMediaImage()
}
llassert(!mTextureId.isNull());
- LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture( mTextureId );
+ const BOOL use_mipmaps = FALSE;
+ LLViewerMediaTexture* media_tex = LLViewerTextureManager::getMediaTexture( mTextureId, use_mipmaps );
if ( mNeedsNewTexture
- || media_tex->getUseMipMaps()
|| (media_tex->getWidth() != mMediaSource->getTextureWidth())
|| (media_tex->getHeight() != mMediaSource->getTextureHeight())
|| (mTextureUsedWidth != mMediaSource->getWidth())
@@ -3024,8 +3025,6 @@ LLViewerMediaTexture* LLViewerMediaImpl::updateMediaImage()
// MEDIAOPT: check to see if size actually changed before doing work
media_tex->destroyGLTexture();
- // MEDIAOPT: apparently just calling setUseMipMaps(FALSE) doesn't work?
- media_tex->reinit(FALSE); // probably not needed
// MEDIAOPT: seems insane that we actually have to make an imageraw then
// immediately discard it