Resolve issue with sculpties loading with incorrect discard levels.
This commit is contained in:
@@ -1337,9 +1337,10 @@ void LLViewerFetchedTexture::setForSculpt()
|
||||
static const S32 MAX_INTERVAL = 8 ; //frames
|
||||
|
||||
mForSculpt = TRUE ;
|
||||
if(isForSculptOnly() && !getBoundRecently())
|
||||
if(isForSculptOnly() && hasGLTexture() && !getBoundRecently())
|
||||
{
|
||||
destroyGLTexture() ; //sculpt image does not need gl texture.
|
||||
mTextureState = ACTIVE;
|
||||
}
|
||||
checkCachedRawSculptImage() ;
|
||||
setMaxVirtualSizeResetInterval(MAX_INTERVAL) ;
|
||||
|
||||
@@ -617,7 +617,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
|
||||
}
|
||||
}
|
||||
|
||||
S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture
|
||||
S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture
|
||||
S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ;
|
||||
|
||||
if (texture_discard >= 0 && //texture has some data available
|
||||
@@ -919,7 +919,7 @@ void LLVOVolume::sculpt()
|
||||
S8 sculpt_components = 0;
|
||||
const U8* sculpt_data = NULL;
|
||||
|
||||
S32 discard_level = mSculptTexture->getDiscardLevel();
|
||||
S32 discard_level = mSculptTexture->getCachedRawImageLevel();
|
||||
LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ;
|
||||
|
||||
S32 max_discard = mSculptTexture->getMaxDiscardLevel();
|
||||
|
||||
Reference in New Issue
Block a user