summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-30 18:23:31 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-30 18:23:31 -0500
commitc24c974cc6a7df3a1df7f7a24ad52275430b18dd (patch)
tree454409ec209f2685f859029ba88e6fdef3bb1064 /indra/newview/llviewerobject.cpp
parent3a7e3eacb86989c936cd6960cfa7434f3b8232fc (diff)
SH-3800 WIP - logic to detect baked textures being sought in the wrong place, avoid querying textures for which we have no authoritative data where they live
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerobject.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 15560be9ba..c4b370a4b4 100644..100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4034,32 +4034,15 @@ void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
}
}
-
-S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, const std::string &url )
-{
- 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);
- setChanged(TEXTURE);
- if (mDrawable.notNull())
- {
- gPipeline.markTextured(mDrawable);
- }
- }
- return retval;
-}
-
-S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost host)
+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::getFetchedTexture(uuid, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
+ mTEImages[te] = image;
setChanged(TEXTURE);
if (mDrawable.notNull())
{
@@ -4082,7 +4065,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);
}