Added explicit texture reloading. Accessable in the 'tools' submenus for the agent, avatars, and selected objects.

This commit is contained in:
Shyotl
2012-12-02 17:06:54 -06:00
parent 8b19f82c0b
commit 0554ecae5c
9 changed files with 156 additions and 5 deletions

View File

@@ -1329,6 +1329,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
llassert(mCurrentDiscardLevel >= 0);
discard_level = mCurrentDiscardLevel;
}
discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel);
if (mTexName != 0 && discard_level == mCurrentDiscardLevel)
{
@@ -1586,7 +1587,18 @@ void LLImageGL::destroyGLTexture()
}
}
//force to invalidate the gl texture, most likely a sculpty texture
void LLImageGL::forceToInvalidateGLTexture()
{
if (mTexName != 0)
{
destroyGLTexture();
}
else
{
mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel.
}
}
//----------------------------------------------------------------------------