From 5fa00a67af6364554c05eb3ca0339770fa6da455 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Sat, 24 Apr 2010 20:36:42 +0100 Subject: DEV-39786 (SNOW-572 / SNOW-220 / VWR-14712): GL_COLOR_INDEX8_EXT not defined as GL_EXT_paletted_texture is deprecated. Imported from Snowglobe. --- indra/newview/llvoavatarself.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7473adda1f..63f060b58a 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2238,7 +2238,6 @@ LLGLuint LLVOAvatarSelf::getScratchTexName( LLGLenum format, S32& components, U3 { case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; - case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; case GL_RGB: components = 3; internal_format = GL_RGB8; break; case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; -- cgit v1.2.3 From adc0aba2dd206e76a41298727794ab80754d439b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 11 May 2010 15:08:29 -0400 Subject: EXT-7305 : FIXED : Changed LLWearableDictionary to LLWearableType Refactored LLWearableDictionary to look more like LLAssetType/LLFolderType/etc. in terms of code design. This required a lot of superficial changes across many files. Overall functionality has not changed. --- indra/newview/llvoavatarself.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 63f060b58a..322350d2d9 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -183,7 +183,7 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - if (param->getWearableType() != WT_INVALID) + if (param->getWearableType() != LLWearableType::WT_NONE) { param->setIsDummy(TRUE); } @@ -679,7 +679,7 @@ BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL if (param->getCrossWearable()) { - EWearableType type = (EWearableType)param->getWearableType(); + LLWearableType::EType type = (LLWearableType::EType)param->getWearableType(); U32 size = gAgentWearables.getWearableCount(type); for (U32 count = 0; count < size; ++count) { @@ -707,9 +707,9 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation() gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE); // apply wearable visual params to avatar - for (U32 type = 0; type < WT_COUNT; type++) + for (U32 type = 0; type < LLWearableType::WT_COUNT; type++) { - LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type); + LLWearable *wearable = gAgentWearables.getTopWearable((LLWearableType::EType)type); if (wearable) { wearable->writeToAvatar(); @@ -943,17 +943,17 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) } } -/*virtual*/ BOOL LLVOAvatarSelf::isWearingWearableType(EWearableType type ) const +/*virtual*/ BOOL LLVOAvatarSelf::isWearingWearableType(LLWearableType::EType type ) const { return gAgentWearables.getWearableCount(type) > 0; } //----------------------------------------------------------------------------- -// updatedWearable( EWearableType type ) +// updatedWearable( LLWearableType::EType type ) // forces an update to any baked textures relevant to type. // will force an upload of the resulting bake if the second parameter is TRUE //----------------------------------------------------------------------------- -void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) +void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_result ) { for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin(); baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end(); @@ -974,7 +974,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) type_iter != baked_dict->mWearables.end(); ++type_iter) { - const EWearableType comp_type = *type_iter; + const LLWearableType::EType comp_type = *type_iter; if (comp_type == type) { if (mBakedTextureDatas[index].mTexLayerSet) @@ -1110,7 +1110,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) U32 LLVOAvatarSelf::getNumWearables(LLVOAvatarDefines::ETextureIndex i) const { - EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); + LLWearableType::EType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); return gAgentWearables.getWearableCount(type); } @@ -1238,7 +1238,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) ++local_tex_iter) { const ETextureIndex tex_index = *local_tex_iter; - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { @@ -1270,7 +1270,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons ++local_tex_iter) { const ETextureIndex tex_index = *local_tex_iter; - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { @@ -1293,7 +1293,7 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 BOOL isDefined = TRUE; if (isIndexLocalTexture(type)) { - const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(type); + const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(type); const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); if (index >= wearable_count) { @@ -1435,7 +1435,7 @@ void LLVOAvatarSelf::updateComposites() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { if (mBakedTextureDatas[i].mTexLayerSet - && ((i != BAKED_SKIRT) || isWearingWearableType(WT_SKIRT))) + && ((i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT))) { mBakedTextureDatas[i].mTexLayerSet->updateComposite(); } @@ -1514,7 +1514,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl; return; } - EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type); + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type); if (!gAgentWearables.getWearable(wearable_type,index)) { // no wearable is loaded, cannot set the texture. @@ -1700,10 +1700,10 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() BOOL LLVOAvatarSelf::getIsCloud() { // do we have our body parts? - if (gAgentWearables.getWearableCount(WT_SHAPE) == 0 || - gAgentWearables.getWearableCount(WT_HAIR) == 0 || - gAgentWearables.getWearableCount(WT_EYES) == 0 || - gAgentWearables.getWearableCount(WT_SKIN) == 0) + if (gAgentWearables.getWearableCount(LLWearableType::WT_SHAPE) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_HAIR) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_EYES) == 0 || + gAgentWearables.getWearableCount(LLWearableType::WT_SKIN) == 0) { return TRUE; } @@ -1729,7 +1729,7 @@ BOOL LLVOAvatarSelf::getIsCloud() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - if (i == BAKED_SKIRT && !isWearingWearableType(WT_SKIRT)) + if (i == BAKED_SKIRT && !isWearingWearableType(LLWearableType::WT_SKIRT)) continue; const BakedTextureData& texture_data = mBakedTextureDatas[i]; @@ -1852,7 +1852,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe LLLocalTextureObject* LLVOAvatarSelf::getLocalTextureObject(LLVOAvatarDefines::ETextureIndex i, U32 wearable_index) const { - EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); + LLWearableType::EType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); LLWearable* wearable = gAgentWearables.getWearable(type, wearable_index); if (wearable) { -- cgit v1.2.3 From aebb49520b1919e0ac2bcc7373fc2db031e3b7f0 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 13 May 2010 17:24:54 -0400 Subject: EXT-7305 : FIXED : Changed LLWearableDictionary to LLWearableType Change enum naming to use WT_INVALID=255 instead of WT_NONE=255. Added WT_NONE as -1. --- indra/newview/llvoavatarself.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 322350d2d9..dec2e7efdf 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -183,7 +183,7 @@ void LLVOAvatarSelf::markDead() param; param = (LLViewerVisualParam*) getNextVisualParam()) { - if (param->getWearableType() != LLWearableType::WT_NONE) + if (param->getWearableType() != LLWearableType::WT_INVALID) { param->setIsDummy(TRUE); } -- cgit v1.2.3