Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
commit
0e3231c17f
|
|
@ -293,6 +293,8 @@ void LLViewerTextureManager::init()
|
|||
}
|
||||
}
|
||||
imagep->createGLTexture(0, image_raw);
|
||||
//cache the raw image
|
||||
imagep->setCachedRawImage(0, image_raw) ;
|
||||
image_raw = NULL;
|
||||
#else
|
||||
LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLViewerTexture::BOOST_UI);
|
||||
|
|
@ -799,12 +801,18 @@ BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* image
|
|||
{
|
||||
mFullWidth = mGLTexturep->getCurrentWidth() ;
|
||||
mFullHeight = mGLTexturep->getCurrentHeight() ;
|
||||
mComponents = mGLTexturep->getComponents() ;
|
||||
mComponents = mGLTexturep->getComponents() ;
|
||||
}
|
||||
|
||||
return ret ;
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLViewerTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
|
||||
{
|
||||
//nothing here.
|
||||
}
|
||||
|
||||
void LLViewerTexture::setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes)
|
||||
{
|
||||
llassert(mGLTexturep.notNull()) ;
|
||||
|
|
@ -2354,6 +2362,18 @@ void LLViewerFetchedTexture::switchToCachedImage()
|
|||
}
|
||||
}
|
||||
|
||||
//cache the imageraw forcefully.
|
||||
//virtual
|
||||
void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw)
|
||||
{
|
||||
if(imageraw != mRawImage.get())
|
||||
{
|
||||
mCachedRawImage = imageraw ;
|
||||
mCachedRawDiscardLevel = discard_level ;
|
||||
mCachedRawImageReady = TRUE ;
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerFetchedTexture::setCachedRawImage()
|
||||
{
|
||||
if(mRawImage == mCachedRawImage)
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ public:
|
|||
LLGLuint getTexName() const ;
|
||||
BOOL createGLTexture() ;
|
||||
BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0, BOOL to_create = TRUE, S32 category = LLViewerTexture::OTHER);
|
||||
virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
|
||||
|
||||
void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
|
||||
void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
|
||||
|
|
@ -423,6 +424,7 @@ public:
|
|||
|
||||
LLImageRaw* reloadRawImage(S8 discard_level) ;
|
||||
void destroyRawImage();
|
||||
/*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ;
|
||||
|
||||
const std::string& getUrl() const {return mUrl;}
|
||||
//---------------
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,8 @@ void LLVOVolume::sculpt()
|
|||
|
||||
if(!raw_image)
|
||||
{
|
||||
llassert(discard_level < 0) ;
|
||||
|
||||
sculpt_width = 0;
|
||||
sculpt_height = 0;
|
||||
sculpt_data = NULL ;
|
||||
|
|
@ -1040,7 +1042,6 @@ void LLVOVolume::sculpt()
|
|||
if (volume != this && volume->getVolume() == getVolume())
|
||||
{
|
||||
gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE);
|
||||
volume->mSculptChanged = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue