Merge branch 'sunshine' of git://github.com/Shyotl/SingularityViewer

This commit is contained in:
Siana Gearz
2013-02-19 21:12:14 +01:00
72 changed files with 3964 additions and 993 deletions

View File

@@ -4177,15 +4177,15 @@ void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
}
}
S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, const std::string &url )
S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image)
{
const LLUUID& uuid = image->getID();
S32 retval = 0;
if (uuid != getTE(te)->getID() ||
uuid == LLUUID::null)
{
retval = LLPrimitive::setTETexture(te, uuid);
mTEImages[te] = LLViewerTextureManager::getFetchedTextureFromUrl (url, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid);
mTEImages[te] = image;
setChanged(TEXTURE);
if (mDrawable.notNull())
{
@@ -4195,24 +4195,7 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, const std:
return retval;
}
S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost host)
{
S32 retval = 0;
if (uuid != getTE(te)->getID() ||
uuid == LLUUID::null)
{
retval = LLPrimitive::setTETexture(te, uuid);
mTEImages[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
setChanged(TEXTURE);
if (mDrawable.notNull())
{
gPipeline.markTextured(mDrawable);
}
}
return retval;
}
//virtual
void LLViewerObject::changeTEImage(S32 index, LLViewerTexture* new_image)
{
if(index < 0 || index >= getNumTEs())
@@ -4225,7 +4208,9 @@ void LLViewerObject::changeTEImage(S32 index, LLViewerTexture* new_image)
S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)
{
// Invalid host == get from the agent's sim
return setTETextureCore(te, uuid, LLHost::invalid);
LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(
uuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost::invalid);
return setTETextureCore(te,image);
}