diff options
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 114 |
1 files changed, 78 insertions, 36 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3be166e..cd90c59 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <stdio.h> | 37 | #include <stdio.h> |
38 | #include <ctype.h> | 38 | #include <ctype.h> |
39 | 39 | ||
40 | #include "audioengine.h" | 40 | #include "llaudioengine.h" |
41 | #include "noise.h" | 41 | #include "noise.h" |
42 | 42 | ||
43 | #include "llagent.h" // Get state values from here | 43 | #include "llagent.h" // Get state values from here |
@@ -69,6 +69,7 @@ | |||
69 | #include "lltoolmorph.h" | 69 | #include "lltoolmorph.h" |
70 | #include "llviewercamera.h" | 70 | #include "llviewercamera.h" |
71 | #include "llviewerimagelist.h" | 71 | #include "llviewerimagelist.h" |
72 | #include "llviewermedia.h" | ||
72 | #include "llviewermenu.h" | 73 | #include "llviewermenu.h" |
73 | #include "llviewerobjectlist.h" | 74 | #include "llviewerobjectlist.h" |
74 | #include "llviewerparcelmgr.h" | 75 | #include "llviewerparcelmgr.h" |
@@ -703,6 +704,7 @@ BOOL LLVOAvatar::sDebugInvisible = FALSE; | |||
703 | BOOL LLVOAvatar::sShowAttachmentPoints = FALSE; | 704 | BOOL LLVOAvatar::sShowAttachmentPoints = FALSE; |
704 | BOOL LLVOAvatar::sShowAnimationDebug = FALSE; | 705 | BOOL LLVOAvatar::sShowAnimationDebug = FALSE; |
705 | BOOL LLVOAvatar::sShowFootPlane = FALSE; | 706 | BOOL LLVOAvatar::sShowFootPlane = FALSE; |
707 | BOOL LLVOAvatar::sShowCollisionVolumes = FALSE; | ||
706 | BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; | 708 | BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; |
707 | F32 LLVOAvatar::sLODFactor = 1.f; | 709 | F32 LLVOAvatar::sLODFactor = 1.f; |
708 | BOOL LLVOAvatar::sUseImpostors = FALSE; | 710 | BOOL LLVOAvatar::sUseImpostors = FALSE; |
@@ -739,6 +741,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
739 | mTyping(FALSE), | 741 | mTyping(FALSE), |
740 | mMeshValid(FALSE), | 742 | mMeshValid(FALSE), |
741 | mVisible(FALSE), | 743 | mVisible(FALSE), |
744 | mMeshTexturesDirty(FALSE), | ||
742 | mWindFreq(0.f), | 745 | mWindFreq(0.f), |
743 | mRipplePhase( 0.f ), | 746 | mRipplePhase( 0.f ), |
744 | mBelowWater(FALSE), | 747 | mBelowWater(FALSE), |
@@ -799,7 +802,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
799 | mBakedTextureData[i].mLastTextureIndex = IMG_DEFAULT_AVATAR; | 802 | mBakedTextureData[i].mLastTextureIndex = IMG_DEFAULT_AVATAR; |
800 | mBakedTextureData[i].mTexLayerSet = NULL; | 803 | mBakedTextureData[i].mTexLayerSet = NULL; |
801 | mBakedTextureData[i].mIsLoaded = false; | 804 | mBakedTextureData[i].mIsLoaded = false; |
802 | mBakedTextureData[i].mIsUsed = false; | 805 | //mBakedTextureData[i].mIsUsed = false; // KL SG |
803 | mBakedTextureData[i].mMaskTexName = 0; | 806 | mBakedTextureData[i].mMaskTexName = 0; |
804 | mBakedTextureData[i].mTextureIndex = getTextureIndex((EBakedTextureIndex)i); | 807 | mBakedTextureData[i].mTextureIndex = getTextureIndex((EBakedTextureIndex)i); |
805 | } | 808 | } |
@@ -855,9 +858,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
855 | mRippleTimeLast = 0.f; | 858 | mRippleTimeLast = 0.f; |
856 | 859 | ||
857 | mShadowImagep = gImageList.getImageFromFile("foot_shadow.j2c"); | 860 | mShadowImagep = gImageList.getImageFromFile("foot_shadow.j2c"); |
858 | gGL.getTexUnit(0)->bind(mShadowImagep.get()); | 861 | |
859 | mShadowImagep->setAddressMode(LLTexUnit::TAM_CLAMP); | 862 | // GL NOT ACTIVE HERE |
860 | 863 | //gGL.getTexUnit(0)->bind(mShadowImagep.get()); | |
864 | //mShadowImagep->setAddressMode(LLTexUnit::TAM_CLAMP); | ||
865 | |||
861 | mInAir = FALSE; | 866 | mInAir = FALSE; |
862 | 867 | ||
863 | mStepOnLand = TRUE; | 868 | mStepOnLand = TRUE; |
@@ -1294,7 +1299,7 @@ void LLVOAvatar::resetImpostors() | |||
1294 | // static | 1299 | // static |
1295 | void LLVOAvatar::deleteCachedImages(bool clearAll) | 1300 | void LLVOAvatar::deleteCachedImages(bool clearAll) |
1296 | { | 1301 | { |
1297 | if(gAuditTexture) | 1302 | /* if(gAuditTexture) |
1298 | { | 1303 | { |
1299 | S32 total_tex_size = sScratchTexBytes ; | 1304 | S32 total_tex_size = sScratchTexBytes ; |
1300 | S32 tex_size = SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT ; | 1305 | S32 tex_size = SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT ; |
@@ -1336,7 +1341,7 @@ if(gAuditTexture) | |||
1336 | total_tex_size -= 4 * tex_size ; | 1341 | total_tex_size -= 4 * tex_size ; |
1337 | } | 1342 | } |
1338 | } | 1343 | } |
1339 | 1344 | */ | |
1340 | if (LLTexLayerSet::sHasCaches) | 1345 | if (LLTexLayerSet::sHasCaches) |
1341 | { | 1346 | { |
1342 | lldebugs << "Deleting layer set caches" << llendl; | 1347 | lldebugs << "Deleting layer set caches" << llendl; |
@@ -1861,6 +1866,11 @@ BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info) | |||
1861 | return TRUE; | 1866 | return TRUE; |
1862 | } | 1867 | } |
1863 | 1868 | ||
1869 | LLVOAvatar* LLVOAvatar::asAvatar() // KL SD | ||
1870 | { | ||
1871 | return this; | ||
1872 | } | ||
1873 | |||
1864 | //----------------------------------------------------------------------------- | 1874 | //----------------------------------------------------------------------------- |
1865 | // LLVOAvatar::startDefaultMotions() | 1875 | // LLVOAvatar::startDefaultMotions() |
1866 | //----------------------------------------------------------------------------- | 1876 | //----------------------------------------------------------------------------- |
@@ -1923,7 +1933,7 @@ void LLVOAvatar::buildCharacter() | |||
1923 | LLTimer timer; | 1933 | LLTimer timer; |
1924 | 1934 | ||
1925 | BOOL status = loadAvatar(); | 1935 | BOOL status = loadAvatar(); |
1926 | stop_glerror(); | 1936 | // stop_glerror(); |
1927 | 1937 | ||
1928 | if (gNoRender) | 1938 | if (gNoRender) |
1929 | { | 1939 | { |
@@ -2033,7 +2043,7 @@ void LLVOAvatar::buildCharacter() | |||
2033 | processAnimationStateChanges(); | 2043 | processAnimationStateChanges(); |
2034 | 2044 | ||
2035 | mIsBuilt = TRUE; | 2045 | mIsBuilt = TRUE; |
2036 | stop_glerror(); | 2046 | // stop_glerror(); |
2037 | 2047 | ||
2038 | //------------------------------------------------------------------------- | 2048 | //------------------------------------------------------------------------- |
2039 | // build the attach and detach menus | 2049 | // build the attach and detach menus |
@@ -3844,6 +3854,18 @@ void LLVOAvatar::idleUpdateTractorBeam() | |||
3844 | { | 3854 | { |
3845 | return; | 3855 | return; |
3846 | } | 3856 | } |
3857 | const LLPickInfo& pick = gViewerWindow->getLastPick(); | ||
3858 | |||
3859 | // No beam for media textures | ||
3860 | // TODO: this will change for Media on a Prim | ||
3861 | if(pick.getObject() && pick.mObjectFace >= 0) | ||
3862 | { | ||
3863 | const LLTextureEntry* tep = pick.getObject()->getTE(pick.mObjectFace); | ||
3864 | if (tep && LLViewerMedia::textureHasMedia(tep->getID())) | ||
3865 | { | ||
3866 | return; | ||
3867 | } | ||
3868 | } | ||
3847 | 3869 | ||
3848 | // This is only done for yourself (maybe it should be in the agent?) | 3870 | // This is only done for yourself (maybe it should be in the agent?) |
3849 | if (!needsRenderBeam() || !mIsBuilt) | 3871 | if (!needsRenderBeam() || !mIsBuilt) |
@@ -3954,7 +3976,7 @@ void LLVOAvatar::idleUpdateTractorBeam() | |||
3954 | } | 3976 | } |
3955 | else | 3977 | else |
3956 | { | 3978 | { |
3957 | const LLPickInfo& pick = gViewerWindow->getLastPick(); | 3979 | |
3958 | mBeam->setPositionGlobal(pick.mPosGlobal); | 3980 | mBeam->setPositionGlobal(pick.mPosGlobal); |
3959 | } | 3981 | } |
3960 | 3982 | ||
@@ -5028,7 +5050,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color) | |||
5028 | //------------------------------------------------------------------------ | 5050 | //------------------------------------------------------------------------ |
5029 | // LLVOAvatar::updateTextures() | 5051 | // LLVOAvatar::updateTextures() |
5030 | //------------------------------------------------------------------------ | 5052 | //------------------------------------------------------------------------ |
5031 | void LLVOAvatar::updateTextures() | 5053 | void LLVOAvatar::updateTextures(LLAgent &agent) // KL SD version |
5032 | { | 5054 | { |
5033 | BOOL render_avatar = TRUE; | 5055 | BOOL render_avatar = TRUE; |
5034 | 5056 | ||
@@ -5047,6 +5069,7 @@ void LLVOAvatar::updateTextures() | |||
5047 | } | 5069 | } |
5048 | 5070 | ||
5049 | std::vector<bool> layer_baked; | 5071 | std::vector<bool> layer_baked; |
5072 | // GL NOT ACTIVE HERE - *TODO | ||
5050 | for (U32 i = 0; i < mBakedTextureData.size(); i++) | 5073 | for (U32 i = 0; i < mBakedTextureData.size(); i++) |
5051 | { | 5074 | { |
5052 | layer_baked.push_back(isTextureDefined(mBakedTextureData[i].mTextureIndex)); | 5075 | layer_baked.push_back(isTextureDefined(mBakedTextureData[i].mTextureIndex)); |
@@ -5129,13 +5152,7 @@ void LLVOAvatar::updateTextures() | |||
5129 | if (texture_dict->mIsLocalTexture) | 5152 | if (texture_dict->mIsLocalTexture) |
5130 | { | 5153 | { |
5131 | addLocalTextureStats((ETextureIndex)index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]); | 5154 | addLocalTextureStats((ETextureIndex)index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]); |
5132 | // SNOW-8 : temporary snowglobe1.0 fix for baked textures | ||
5133 | if (render_avatar && !gGLManager.mIsDisabled ) | ||
5134 | { | ||
5135 | // bind the texture so that its boost level won't be slammed | ||
5136 | gGL.getTexUnit(0)->bind(imagep); | ||
5137 | } | 5155 | } |
5138 | } | ||
5139 | else if (texture_dict->mIsBakedTexture) | 5156 | else if (texture_dict->mIsBakedTexture) |
5140 | { | 5157 | { |
5141 | if (layer_baked[baked_index]) | 5158 | if (layer_baked[baked_index]) |
@@ -5381,7 +5398,7 @@ void LLVOAvatar::processAnimationStateChanges() | |||
5381 | } | 5398 | } |
5382 | } | 5399 | } |
5383 | 5400 | ||
5384 | stop_glerror(); | 5401 | //stop_glerror(); |
5385 | } | 5402 | } |
5386 | 5403 | ||
5387 | 5404 | ||
@@ -6366,6 +6383,15 @@ LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline) | |||
6366 | } | 6383 | } |
6367 | 6384 | ||
6368 | 6385 | ||
6386 | void LLVOAvatar::updateGL() | ||
6387 | { | ||
6388 | if (mMeshTexturesDirty) | ||
6389 | { | ||
6390 | updateMeshTextures(); | ||
6391 | mMeshTexturesDirty = FALSE; | ||
6392 | } | ||
6393 | } | ||
6394 | |||
6369 | //----------------------------------------------------------------------------- | 6395 | //----------------------------------------------------------------------------- |
6370 | // updateGeometry() | 6396 | // updateGeometry() |
6371 | //----------------------------------------------------------------------------- | 6397 | //----------------------------------------------------------------------------- |
@@ -7403,12 +7429,20 @@ BOOL LLVOAvatar::bindScratchTexture( LLGLenum format ) | |||
7403 | if( *last_bind_time != LLImageGL::sLastFrameTime ) | 7429 | if( *last_bind_time != LLImageGL::sLastFrameTime ) |
7404 | { | 7430 | { |
7405 | *last_bind_time = LLImageGL::sLastFrameTime; | 7431 | *last_bind_time = LLImageGL::sLastFrameTime; |
7406 | LLImageGL::updateBoundTexMemStatic(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; | 7432 | // #if !LL_RELEASE_FOR_DOWNLOAD |
7433 | // LLImageGL::updateBoundTexMem(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT) ; | ||
7434 | // #else | ||
7435 | LLImageGL::updateBoundTexMem(texture_bytes); | ||
7436 | // #endif | ||
7407 | } | 7437 | } |
7408 | } | 7438 | } |
7409 | else | 7439 | else |
7410 | { | 7440 | { |
7411 | LLImageGL::updateBoundTexMemStatic(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; | 7441 | // #if !LL_RELEASE_FOR_DOWNLOAD |
7442 | // LLImageGL::updateBoundTexMem(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT) ; | ||
7443 | // #else | ||
7444 | LLImageGL::updateBoundTexMem(texture_bytes); | ||
7445 | // #endif | ||
7412 | LLVOAvatar::sScratchTexLastBindTime.addData( format, new F32(LLImageGL::sLastFrameTime) ); | 7446 | LLVOAvatar::sScratchTexLastBindTime.addData( format, new F32(LLImageGL::sLastFrameTime) ); |
7413 | } | 7447 | } |
7414 | 7448 | ||
@@ -7430,7 +7464,7 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes ) | |||
7430 | { | 7464 | { |
7431 | case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; | 7465 | case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; |
7432 | case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; | 7466 | case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; |
7433 | // Deprecated. See http://svn.secondlife.com/trac/linden/changeset/2757 | 7467 | // Support for GL_EXT_paletted_texture is deprecated |
7434 | // case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; | 7468 | // case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; |
7435 | case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; | 7469 | case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; |
7436 | case GL_RGB: components = 3; internal_format = GL_RGB8; break; | 7470 | case GL_RGB: components = 3; internal_format = GL_RGB8; break; |
@@ -7473,11 +7507,11 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes ) | |||
7473 | 7507 | ||
7474 | LLVOAvatar::sScratchTexBytes += *texture_bytes; | 7508 | LLVOAvatar::sScratchTexBytes += *texture_bytes; |
7475 | LLImageGL::sGlobalTextureMemoryInBytes += *texture_bytes; | 7509 | LLImageGL::sGlobalTextureMemoryInBytes += *texture_bytes; |
7476 | 7510 | /* | |
7477 | if(gAuditTexture) | 7511 | if(gAuditTexture) |
7478 | { | 7512 | { |
7479 | LLImageGL::incTextureCounterStatic(SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, components, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; | 7513 | LLImageGL::incTextureCounterStatic(SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, components, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; |
7480 | } | 7514 | }*/ |
7481 | 7515 | ||
7482 | return name; | 7516 | return name; |
7483 | } | 7517 | } |
@@ -7580,6 +7614,7 @@ void LLVOAvatar::updateMeshTextures() | |||
7580 | use_lkg_baked_layer[i] = (!is_layer_baked[i] | 7614 | use_lkg_baked_layer[i] = (!is_layer_baked[i] |
7581 | && (mBakedTextureData[i].mLastTextureIndex != IMG_DEFAULT_AVATAR) | 7615 | && (mBakedTextureData[i].mLastTextureIndex != IMG_DEFAULT_AVATAR) |
7582 | && mBakedTextureData[i].mTexLayerSet | 7616 | && mBakedTextureData[i].mTexLayerSet |
7617 | && mBakedTextureData[i].mTexLayerSet->getComposite() // KL SD | ||
7583 | && !mBakedTextureData[i].mTexLayerSet->getComposite()->isInitialized()); | 7618 | && !mBakedTextureData[i].mTexLayerSet->getComposite()->isInitialized()); |
7584 | if (use_lkg_baked_layer[i]) | 7619 | if (use_lkg_baked_layer[i]) |
7585 | { | 7620 | { |
@@ -7613,7 +7648,7 @@ void LLVOAvatar::updateMeshTextures() | |||
7613 | if (use_lkg_baked_layer[i] && !self_customizing ) | 7648 | if (use_lkg_baked_layer[i] && !self_customizing ) |
7614 | { | 7649 | { |
7615 | LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureData[i].mLastTextureIndex, target_host ); | 7650 | LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureData[i].mLastTextureIndex, target_host ); |
7616 | mBakedTextureData[i].mIsUsed = TRUE; | 7651 | //mBakedTextureData[i].mIsUsed = TRUE; |
7617 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) | 7652 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) |
7618 | { | 7653 | { |
7619 | mBakedTextureData[i].mMeshes[k]->setTexture( baked_img ); | 7654 | mBakedTextureData[i].mMeshes[k]->setTexture( baked_img ); |
@@ -7643,7 +7678,7 @@ void LLVOAvatar::updateMeshTextures() | |||
7643 | { | 7678 | { |
7644 | mBakedTextureData[i].mTexLayerSet->createComposite(); | 7679 | mBakedTextureData[i].mTexLayerSet->createComposite(); |
7645 | mBakedTextureData[i].mTexLayerSet->setUpdatesEnabled( TRUE ); | 7680 | mBakedTextureData[i].mTexLayerSet->setUpdatesEnabled( TRUE ); |
7646 | mBakedTextureData[i].mIsUsed = FALSE; | 7681 | // mBakedTextureData[i].mIsUsed = FALSE; |
7647 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) | 7682 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) |
7648 | { | 7683 | { |
7649 | mBakedTextureData[i].mMeshes[k]->setLayerSet( mBakedTextureData[i].mTexLayerSet ); | 7684 | mBakedTextureData[i].mMeshes[k]->setLayerSet( mBakedTextureData[i].mTexLayerSet ); |
@@ -7664,9 +7699,13 @@ void LLVOAvatar::updateMeshTextures() | |||
7664 | mBakedTextureData[BAKED_HAIR].mMeshes[i]->setTexture( hair_img ); | 7699 | mBakedTextureData[BAKED_HAIR].mMeshes[i]->setTexture( hair_img ); |
7665 | } | 7700 | } |
7666 | mHasBakedHair = FALSE; | 7701 | mHasBakedHair = FALSE; |
7667 | } | 7702 | } |
7668 | else | 7703 | else |
7669 | { | 7704 | { |
7705 | for (U32 i = 0; i < mBakedTextureData[BAKED_HAIR].mMeshes.size(); i++) | ||
7706 | { | ||
7707 | mBakedTextureData[BAKED_HAIR].mMeshes[i]->setColor( 1.f, 1.f, 1.f, 1.f ); | ||
7708 | } | ||
7670 | mHasBakedHair = TRUE; | 7709 | mHasBakedHair = TRUE; |
7671 | } | 7710 | } |
7672 | 7711 | ||
@@ -7798,7 +7837,7 @@ void LLVOAvatar::clearChat() | |||
7798 | S32 LLVOAvatar::getLocalDiscardLevel( ETextureIndex index ) | 7837 | S32 LLVOAvatar::getLocalDiscardLevel( ETextureIndex index ) |
7799 | { | 7838 | { |
7800 | // If the texture is not local, we don't care and treat it as fully loaded | 7839 | // If the texture is not local, we don't care and treat it as fully loaded |
7801 | if (!isIndexLocalTexture(index)) return 0; | 7840 | if (!isIndexLocalTexture(index)) return FALSE; // KL SD version |
7802 | 7841 | ||
7803 | LocalTextureData &local_tex_data = mLocalTextureData[index]; | 7842 | LocalTextureData &local_tex_data = mLocalTextureData[index]; |
7804 | if (index >= 0 | 7843 | if (index >= 0 |
@@ -7940,7 +7979,7 @@ bool LLVOAvatar::hasPendingBakedUploads() | |||
7940 | { | 7979 | { |
7941 | for (U32 i = 0; i < mBakedTextureData.size(); i++) | 7980 | for (U32 i = 0; i < mBakedTextureData.size(); i++) |
7942 | { | 7981 | { |
7943 | bool upload_pending = (mBakedTextureData[i].mTexLayerSet && mBakedTextureData[i].mTexLayerSet->getComposite()->uploadPending()); | 7982 | bool upload_pending = (mBakedTextureData[i].mTexLayerSet && mBakedTextureData[i].mTexLayerSet->getComposite() && mBakedTextureData[i].mTexLayerSet->getComposite()->uploadPending()); |
7944 | if (upload_pending) | 7983 | if (upload_pending) |
7945 | { | 7984 | { |
7946 | return true; | 7985 | return true; |
@@ -8475,7 +8514,8 @@ void LLVOAvatar::onFirstTEMessageReceived() | |||
8475 | } | 8514 | } |
8476 | } | 8515 | } |
8477 | 8516 | ||
8478 | updateMeshTextures(); | 8517 | mMeshTexturesDirty = TRUE; // updateMeshTextures(); |
8518 | gPipeline.markGLRebuild(this); | ||
8479 | } | 8519 | } |
8480 | } | 8520 | } |
8481 | 8521 | ||
@@ -8538,20 +8578,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) | |||
8538 | // (isTextureDefined(TEX_SKIRT_BAKED) ? "SKIRT " : "skirt " ) << (getTEImage(TEX_SKIRT_BAKED)->getID()) << std::endl << | 8578 | // (isTextureDefined(TEX_SKIRT_BAKED) ? "SKIRT " : "skirt " ) << (getTEImage(TEX_SKIRT_BAKED)->getID()) << std::endl << |
8539 | // (isTextureDefined(TEX_HAIR_BAKED) ? "HAIR" : "hair " ) << (getTEImage(TEX_HAIR_BAKED)->getID()) << std::endl << | 8579 | // (isTextureDefined(TEX_HAIR_BAKED) ? "HAIR" : "hair " ) << (getTEImage(TEX_HAIR_BAKED)->getID()) << std::endl << |
8540 | // (isTextureDefined(TEX_EYES_BAKED) ? "EYES" : "eyes" ) << (getTEImage(TEX_EYES_BAKED)->getID()) << llendl ; | 8580 | // (isTextureDefined(TEX_EYES_BAKED) ? "EYES" : "eyes" ) << (getTEImage(TEX_EYES_BAKED)->getID()) << llendl ; |
8541 | 8581 | ||
8542 | if( !mFirstTEMessageReceived ) | 8582 | if( !mFirstTEMessageReceived ) |
8543 | { | 8583 | { |
8544 | onFirstTEMessageReceived(); | 8584 | onFirstTEMessageReceived(); |
8545 | } | 8585 | } |
8546 | 8586 | ||
8547 | setCompositeUpdatesEnabled( FALSE ); | 8587 | setCompositeUpdatesEnabled( FALSE ); |
8588 | mMeshTexturesDirty = TRUE; | ||
8589 | gPipeline.markGLRebuild(this); // KL SD needing work in S19? | ||
8548 | 8590 | ||
8549 | if (!mIsSelf) | 8591 | if (!mIsSelf) |
8550 | { | 8592 | { |
8551 | releaseUnnecessaryTextures(); | 8593 | releaseUnnecessaryTextures(); |
8552 | } | 8594 | } |
8553 | 8595 | ||
8554 | updateMeshTextures(); // enables updates for laysets without baked textures. | 8596 | //updateMeshTextures(); // enables updates for laysets without baked textures. |
8555 | 8597 | ||
8556 | // parse visual params | 8598 | // parse visual params |
8557 | S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam); | 8599 | S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam); |
@@ -8837,7 +8879,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) | |||
8837 | if (id == image_baked->getID()) | 8879 | if (id == image_baked->getID()) |
8838 | { | 8880 | { |
8839 | mBakedTextureData[i].mIsLoaded = true; | 8881 | mBakedTextureData[i].mIsLoaded = true; |
8840 | mBakedTextureData[i].mIsUsed = true; | 8882 | //mBakedTextureData[i].mIsUsed = true; |
8841 | mBakedTextureData[i].mLastTextureIndex = id; | 8883 | mBakedTextureData[i].mLastTextureIndex = id; |
8842 | for (U32 k = 0; k < mBakedTextureData[i].mMeshes.size(); k++) | 8884 | for (U32 k = 0; k < mBakedTextureData[i].mMeshes.size(); k++) |
8843 | { | 8885 | { |
@@ -9746,9 +9788,9 @@ BOOL LLVOAvatar::updateLOD() | |||
9746 | 9788 | ||
9747 | LLFace* facep = mDrawable->getFace(0); | 9789 | LLFace* facep = mDrawable->getFace(0); |
9748 | if (facep->mVertexBuffer.isNull() || | 9790 | if (facep->mVertexBuffer.isNull() || |
9749 | LLVertexBuffer::sEnableVBOs && | 9791 | (LLVertexBuffer::sEnableVBOs && |
9750 | ((facep->mVertexBuffer->getUsage() == GL_STATIC_DRAW ? TRUE : FALSE) != | 9792 | ((facep->mVertexBuffer->getUsage() == GL_STATIC_DRAW ? TRUE : FALSE) != |
9751 | (facep->getPool()->getVertexShaderLevel() > 0 ? TRUE : FALSE))) | 9793 | (facep->getPool()->getVertexShaderLevel() > 0 ? TRUE : FALSE)))) |
9752 | { | 9794 | { |
9753 | mDirtyMesh = TRUE; | 9795 | mDirtyMesh = TRUE; |
9754 | } | 9796 | } |