SH-3228 WIP - always respond to processAppearance for self, convert baked textures to checkerboards
parent
1f234f8593
commit
e4a0dda457
|
|
@ -68,3 +68,6 @@ const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); /
|
|||
const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER
|
||||
|
||||
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
|
||||
|
||||
const LLUUID IMG_CHECKERBOARD_RGBA ("2585a0f3-4163-6dd1-0f34-ad48cb909e25"); // dataserver
|
||||
|
||||
|
|
|
|||
|
|
@ -66,4 +66,5 @@ LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
|
|||
|
||||
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
|
||||
|
||||
LL_COMMON_API extern const LLUUID IMG_CHECKERBOARD_RGBA;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "lldatapacker.h"
|
||||
#include "llsdutil_math.h"
|
||||
#include "llprimtexturelist.h"
|
||||
#include "imageids.h"
|
||||
|
||||
/**
|
||||
* exported constants
|
||||
|
|
@ -1227,12 +1228,12 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name)
|
||||
S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, bool fake_images)
|
||||
{
|
||||
return(unpackTEMessage(mesgsys,block_name,-1));
|
||||
return(unpackTEMessage(mesgsys,block_name,-1,fake_images));
|
||||
}
|
||||
|
||||
S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num)
|
||||
S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num, bool fake_images)
|
||||
{
|
||||
// use a negative block_num to indicate a single-block read (a non-variable block)
|
||||
S32 retval = 0;
|
||||
|
|
@ -1307,7 +1308,15 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam
|
|||
LLColor4U coloru;
|
||||
for (U32 i = 0; i < face_count; i++)
|
||||
{
|
||||
retval |= setTETexture(i, ((LLUUID*)image_data)[i]);
|
||||
LLUUID& req_id = ((LLUUID*)image_data)[i];
|
||||
if (fake_images & (req_id != IMG_DEFAULT) && (req_id != IMG_DEFAULT_AVATAR) && (req_id != IMG_INVISIBLE))
|
||||
{
|
||||
retval |= setTETexture(i, IMG_CHECKERBOARD_RGBA);
|
||||
}
|
||||
else
|
||||
{
|
||||
retval |= setTETexture(i, req_id);
|
||||
}
|
||||
retval |= setTEScale(i, scale_s[i], scale_t[i]);
|
||||
retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF);
|
||||
retval |= setTERotation(i, ((F32)image_rot[i] / TEXTURE_ROTATION_PACK_FACTOR) * F_TWO_PI);
|
||||
|
|
|
|||
|
|
@ -360,8 +360,8 @@ public:
|
|||
S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
|
||||
BOOL packTEMessage(LLMessageSystem *mesgsys) const;
|
||||
BOOL packTEMessage(LLDataPacker &dp) const;
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name);
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, bool fake_images = false);
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num, bool fake_images = false); // Variable num of blocks
|
||||
BOOL unpackTEMessage(LLDataPacker &dp);
|
||||
|
||||
#ifdef CHECK_FOR_FINITE
|
||||
|
|
|
|||
|
|
@ -7283,7 +7283,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
|||
if( isSelf() )
|
||||
{
|
||||
llwarns << avString() << "Received AvatarAppearance for self" << llendl;
|
||||
if( mFirstTEMessageReceived )
|
||||
if( mFirstTEMessageReceived && !LLAppearanceMgr::instance().useServerTextureBaking())
|
||||
{
|
||||
// llinfos << "processAvatarAppearance end " << mID << llendl;
|
||||
return;
|
||||
|
|
@ -7294,7 +7294,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
|
|||
|
||||
// llinfos << "LLVOAvatar::processAvatarAppearance()" << llendl;
|
||||
// dumpAvatarTEs( "PRE processAvatarAppearance()" );
|
||||
unpackTEMessage(mesgsys, _PREHASH_ObjectData);
|
||||
unpackTEMessage(mesgsys, _PREHASH_ObjectData, LLAppearanceMgr::instance().useServerTextureBaking());
|
||||
// dumpAvatarTEs( "POST processAvatarAppearance()" );
|
||||
|
||||
// prevent the overwriting of valid baked textures with invalid baked textures
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
updateMeshTextures();
|
||||
|
||||
// unpack the texture UUIDs to the texture slots
|
||||
retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num);
|
||||
retval = unpackTEMessage(mesgsys, _PREHASH_ObjectData, (S32) block_num);
|
||||
|
||||
// need to trigger a few operations to get the avatar to use the new bakes
|
||||
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
// Unpack texture entry data
|
||||
//
|
||||
|
||||
S32 result = unpackTEMessage(mesgsys, _PREHASH_ObjectData, block_num);
|
||||
S32 result = unpackTEMessage(mesgsys, _PREHASH_ObjectData, (S32) block_num);
|
||||
if (result & teDirtyBits)
|
||||
{
|
||||
updateTEData();
|
||||
|
|
|
|||
Loading…
Reference in New Issue