diff options
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/llviewerobject.h | 1 | ||||
| -rwxr-xr-x | indra/newview/llvoavatar.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llvoavatardefines.cpp | 12 | 
4 files changed, 40 insertions, 8 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index cd300accb7..877e475928 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4141,6 +4141,23 @@ 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, LLViewerTexture::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 retval = 0; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index c8152e1539..b380e9b8ce 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -314,6 +314,7 @@ public:  	/*virtual*/	void	setTE(const U8 te, const LLTextureEntry &texture_entry);  	/*virtual*/ S32		setTETexture(const U8 te, const LLUUID &uuid);  	S32 setTETextureCore(const U8 te, const LLUUID& uuid, LLHost host); +	S32 setTETextureCore(const U8 te, const LLUUID& uuid, const std::string &url );  	/*virtual*/ S32		setTEColor(const U8 te, const LLColor3 &color);  	/*virtual*/ S32		setTEColor(const U8 te, const LLColor4 &color);  	/*virtual*/ S32		setTEScale(const U8 te, const F32 s, const F32 t); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 531d3b4940..d48d79f807 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2370,6 +2370,17 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid)  	// to redirect certain avatar texture requests to different sims.  	if (isIndexBakedTexture((ETextureIndex)te))  	{ +		std::string url = gSavedSettings.getString("AgentAppearanceServiceURL"); +		if (LLAppearanceMgr::instance().useServerTextureBaking() && !url.empty()) +		{ +			const LLVOAvatarDictionary::TextureEntry* texture_entry = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)te); +			if (texture_entry != NULL) +			{ +				url += "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString(); +				return setTETextureCore(te, uuid, url); +			} +		} +  		LLHost target_host = getObjectHost();  		return setTETextureCore(te, uuid, target_host);  	} @@ -4669,7 +4680,10 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel  	//the texture pipeline will stop fetching this texture.  	imagep->resetTextureStats(); -	imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. +	if (!LLAppearanceMgr::instance().useServerTextureBaking()) +	{ +		imagep->setCanUseHTTP(false); //turn off http fetching for baked textures. +	}  	imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL);  	imagep->resetMaxVirtualSizeResetCounter() ; @@ -7294,7 +7308,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )  //	llinfos << "LLVOAvatar::processAvatarAppearance()" << llendl;  //	dumpAvatarTEs( "PRE  processAvatarAppearance()" ); -	unpackTEMessage(mesgsys, _PREHASH_ObjectData, LLAppearanceMgr::instance().useServerTextureBaking()); +	unpackTEMessage(mesgsys, _PREHASH_ObjectData, FALSE);  //	dumpAvatarTEs( "POST processAvatarAppearance()" );  	// prevent the overwriting of valid baked textures with invalid baked textures diff --git a/indra/newview/llvoavatardefines.cpp b/indra/newview/llvoavatardefines.cpp index 1ed4e3b61c..ef96a9e923 100644 --- a/indra/newview/llvoavatardefines.cpp +++ b/indra/newview/llvoavatardefines.cpp @@ -66,12 +66,12 @@ LLVOAvatarDictionary::Textures::Textures()  	addEntry(TEX_UPPER_TATTOO,                new TextureEntry("upper_tattoo",     TRUE,  BAKED_NUM_INDICES, "",     LLWearableType::WT_TATTOO));  	addEntry(TEX_LOWER_TATTOO,                new TextureEntry("lower_tattoo",     TRUE,  BAKED_NUM_INDICES, "",     LLWearableType::WT_TATTOO)); -	addEntry(TEX_HEAD_BAKED,                  new TextureEntry("head-baked",       FALSE, BAKED_HEAD)); -	addEntry(TEX_UPPER_BAKED,                 new TextureEntry("upper-baked",      FALSE, BAKED_UPPER)); -	addEntry(TEX_LOWER_BAKED,                 new TextureEntry("lower-baked",      FALSE, BAKED_LOWER)); -	addEntry(TEX_EYES_BAKED,                  new TextureEntry("eyes-baked",       FALSE, BAKED_EYES)); -	addEntry(TEX_HAIR_BAKED,                  new TextureEntry("hair-baked",       FALSE, BAKED_HAIR)); -	addEntry(TEX_SKIRT_BAKED,                 new TextureEntry("skirt-baked",      FALSE, BAKED_SKIRT)); +	addEntry(TEX_HEAD_BAKED,                  new TextureEntry("head-baked",       FALSE, BAKED_HEAD, "head")); +	addEntry(TEX_UPPER_BAKED,                 new TextureEntry("upper-baked",      FALSE, BAKED_UPPER, "upper")); +	addEntry(TEX_LOWER_BAKED,                 new TextureEntry("lower-baked",      FALSE, BAKED_LOWER, "lower")); +	addEntry(TEX_EYES_BAKED,                  new TextureEntry("eyes-baked",       FALSE, BAKED_EYES, "eyes")); +	addEntry(TEX_HAIR_BAKED,                  new TextureEntry("hair-baked",       FALSE, BAKED_HAIR, "hair")); +	addEntry(TEX_SKIRT_BAKED,                 new TextureEntry("skirt-baked",      FALSE, BAKED_SKIRT, "skirt"));  }  LLVOAvatarDictionary::BakedTextures::BakedTextures()  | 
