diff options
author | Armin Weatherwax | 2010-09-07 13:41:02 +0200 |
---|---|---|
committer | Armin Weatherwax | 2010-09-23 15:42:40 +0200 |
commit | 087e15e89930d51c3964329befb273ae3b2d330d (patch) | |
tree | 684c49a772b0097ed88a25660e1fd3dd10b264cc /linden/indra/newview/llvoavatar.cpp | |
parent | Robin Cornelius: fixes for building plugins on Linux 64bit (diff) | |
download | meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.zip meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.gz meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.bz2 meta-impy-087e15e89930d51c3964329befb273ae3b2d330d.tar.xz |
port of LL renderpipeline/Kirstens S19 pipeline for bridging to Viewer 2 texture system
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 98 |
1 files changed, 64 insertions, 34 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 14b8d3e..3b62c63 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -704,6 +704,7 @@ BOOL LLVOAvatar::sDebugInvisible = FALSE; | |||
704 | BOOL LLVOAvatar::sShowAttachmentPoints = FALSE; | 704 | BOOL LLVOAvatar::sShowAttachmentPoints = FALSE; |
705 | BOOL LLVOAvatar::sShowAnimationDebug = FALSE; | 705 | BOOL LLVOAvatar::sShowAnimationDebug = FALSE; |
706 | BOOL LLVOAvatar::sShowFootPlane = FALSE; | 706 | BOOL LLVOAvatar::sShowFootPlane = FALSE; |
707 | BOOL LLVOAvatar::sShowCollisionVolumes = FALSE; | ||
707 | BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; | 708 | BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; |
708 | F32 LLVOAvatar::sLODFactor = 1.f; | 709 | F32 LLVOAvatar::sLODFactor = 1.f; |
709 | BOOL LLVOAvatar::sUseImpostors = FALSE; | 710 | BOOL LLVOAvatar::sUseImpostors = FALSE; |
@@ -740,6 +741,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
740 | mTyping(FALSE), | 741 | mTyping(FALSE), |
741 | mMeshValid(FALSE), | 742 | mMeshValid(FALSE), |
742 | mVisible(FALSE), | 743 | mVisible(FALSE), |
744 | mMeshTexturesDirty(FALSE), | ||
743 | mWindFreq(0.f), | 745 | mWindFreq(0.f), |
744 | mRipplePhase( 0.f ), | 746 | mRipplePhase( 0.f ), |
745 | mBelowWater(FALSE), | 747 | mBelowWater(FALSE), |
@@ -800,7 +802,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
800 | mBakedTextureData[i].mLastTextureIndex = IMG_DEFAULT_AVATAR; | 802 | mBakedTextureData[i].mLastTextureIndex = IMG_DEFAULT_AVATAR; |
801 | mBakedTextureData[i].mTexLayerSet = NULL; | 803 | mBakedTextureData[i].mTexLayerSet = NULL; |
802 | mBakedTextureData[i].mIsLoaded = false; | 804 | mBakedTextureData[i].mIsLoaded = false; |
803 | mBakedTextureData[i].mIsUsed = false; | 805 | //mBakedTextureData[i].mIsUsed = false; // KL SG |
804 | mBakedTextureData[i].mMaskTexName = 0; | 806 | mBakedTextureData[i].mMaskTexName = 0; |
805 | mBakedTextureData[i].mTextureIndex = getTextureIndex((EBakedTextureIndex)i); | 807 | mBakedTextureData[i].mTextureIndex = getTextureIndex((EBakedTextureIndex)i); |
806 | } | 808 | } |
@@ -856,9 +858,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
856 | mRippleTimeLast = 0.f; | 858 | mRippleTimeLast = 0.f; |
857 | 859 | ||
858 | mShadowImagep = gImageList.getImageFromFile("foot_shadow.j2c"); | 860 | mShadowImagep = gImageList.getImageFromFile("foot_shadow.j2c"); |
859 | gGL.getTexUnit(0)->bind(mShadowImagep.get()); | 861 | |
860 | mShadowImagep->setAddressMode(LLTexUnit::TAM_CLAMP); | 862 | // GL NOT ACTIVE HERE |
861 | 863 | //gGL.getTexUnit(0)->bind(mShadowImagep.get()); | |
864 | //mShadowImagep->setAddressMode(LLTexUnit::TAM_CLAMP); | ||
865 | |||
862 | mInAir = FALSE; | 866 | mInAir = FALSE; |
863 | 867 | ||
864 | mStepOnLand = TRUE; | 868 | mStepOnLand = TRUE; |
@@ -1295,7 +1299,7 @@ void LLVOAvatar::resetImpostors() | |||
1295 | // static | 1299 | // static |
1296 | void LLVOAvatar::deleteCachedImages(bool clearAll) | 1300 | void LLVOAvatar::deleteCachedImages(bool clearAll) |
1297 | { | 1301 | { |
1298 | if(gAuditTexture) | 1302 | /* if(gAuditTexture) |
1299 | { | 1303 | { |
1300 | S32 total_tex_size = sScratchTexBytes ; | 1304 | S32 total_tex_size = sScratchTexBytes ; |
1301 | S32 tex_size = SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT ; | 1305 | S32 tex_size = SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT ; |
@@ -1337,7 +1341,7 @@ if(gAuditTexture) | |||
1337 | total_tex_size -= 4 * tex_size ; | 1341 | total_tex_size -= 4 * tex_size ; |
1338 | } | 1342 | } |
1339 | } | 1343 | } |
1340 | 1344 | */ | |
1341 | if (LLTexLayerSet::sHasCaches) | 1345 | if (LLTexLayerSet::sHasCaches) |
1342 | { | 1346 | { |
1343 | lldebugs << "Deleting layer set caches" << llendl; | 1347 | lldebugs << "Deleting layer set caches" << llendl; |
@@ -1862,6 +1866,11 @@ BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info) | |||
1862 | return TRUE; | 1866 | return TRUE; |
1863 | } | 1867 | } |
1864 | 1868 | ||
1869 | LLVOAvatar* LLVOAvatar::asAvatar() // KL SD | ||
1870 | { | ||
1871 | return this; | ||
1872 | } | ||
1873 | |||
1865 | //----------------------------------------------------------------------------- | 1874 | //----------------------------------------------------------------------------- |
1866 | // LLVOAvatar::startDefaultMotions() | 1875 | // LLVOAvatar::startDefaultMotions() |
1867 | //----------------------------------------------------------------------------- | 1876 | //----------------------------------------------------------------------------- |
@@ -1924,7 +1933,7 @@ void LLVOAvatar::buildCharacter() | |||
1924 | LLTimer timer; | 1933 | LLTimer timer; |
1925 | 1934 | ||
1926 | BOOL status = loadAvatar(); | 1935 | BOOL status = loadAvatar(); |
1927 | stop_glerror(); | 1936 | // stop_glerror(); |
1928 | 1937 | ||
1929 | if (gNoRender) | 1938 | if (gNoRender) |
1930 | { | 1939 | { |
@@ -2034,7 +2043,7 @@ void LLVOAvatar::buildCharacter() | |||
2034 | processAnimationStateChanges(); | 2043 | processAnimationStateChanges(); |
2035 | 2044 | ||
2036 | mIsBuilt = TRUE; | 2045 | mIsBuilt = TRUE; |
2037 | stop_glerror(); | 2046 | // stop_glerror(); |
2038 | 2047 | ||
2039 | //------------------------------------------------------------------------- | 2048 | //------------------------------------------------------------------------- |
2040 | // build the attach and detach menus | 2049 | // build the attach and detach menus |
@@ -5022,7 +5031,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color) | |||
5022 | //------------------------------------------------------------------------ | 5031 | //------------------------------------------------------------------------ |
5023 | // LLVOAvatar::updateTextures() | 5032 | // LLVOAvatar::updateTextures() |
5024 | //------------------------------------------------------------------------ | 5033 | //------------------------------------------------------------------------ |
5025 | void LLVOAvatar::updateTextures() | 5034 | void LLVOAvatar::updateTextures(LLAgent &agent) // KL SD version |
5026 | { | 5035 | { |
5027 | BOOL render_avatar = TRUE; | 5036 | BOOL render_avatar = TRUE; |
5028 | 5037 | ||
@@ -5041,6 +5050,7 @@ void LLVOAvatar::updateTextures() | |||
5041 | } | 5050 | } |
5042 | 5051 | ||
5043 | std::vector<bool> layer_baked; | 5052 | std::vector<bool> layer_baked; |
5053 | // GL NOT ACTIVE HERE - *TODO | ||
5044 | for (U32 i = 0; i < mBakedTextureData.size(); i++) | 5054 | for (U32 i = 0; i < mBakedTextureData.size(); i++) |
5045 | { | 5055 | { |
5046 | layer_baked.push_back(isTextureDefined(mBakedTextureData[i].mTextureIndex)); | 5056 | layer_baked.push_back(isTextureDefined(mBakedTextureData[i].mTextureIndex)); |
@@ -5123,12 +5133,6 @@ void LLVOAvatar::updateTextures() | |||
5123 | if (texture_dict->mIsLocalTexture) | 5133 | if (texture_dict->mIsLocalTexture) |
5124 | { | 5134 | { |
5125 | addLocalTextureStats((ETextureIndex)index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]); | 5135 | addLocalTextureStats((ETextureIndex)index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]); |
5126 | // SNOW-8 : temporary snowglobe1.0 fix for baked textures | ||
5127 | if (render_avatar && !gGLManager.mIsDisabled ) | ||
5128 | { | ||
5129 | // bind the texture so that its boost level won't be slammed | ||
5130 | gGL.getTexUnit(0)->bind(imagep); | ||
5131 | } | ||
5132 | } | 5136 | } |
5133 | else if (texture_dict->mIsBakedTexture) | 5137 | else if (texture_dict->mIsBakedTexture) |
5134 | { | 5138 | { |
@@ -5375,7 +5379,7 @@ void LLVOAvatar::processAnimationStateChanges() | |||
5375 | } | 5379 | } |
5376 | } | 5380 | } |
5377 | 5381 | ||
5378 | stop_glerror(); | 5382 | //stop_glerror(); |
5379 | } | 5383 | } |
5380 | 5384 | ||
5381 | 5385 | ||
@@ -6360,6 +6364,15 @@ LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline) | |||
6360 | } | 6364 | } |
6361 | 6365 | ||
6362 | 6366 | ||
6367 | void LLVOAvatar::updateGL() | ||
6368 | { | ||
6369 | if (mMeshTexturesDirty) | ||
6370 | { | ||
6371 | updateMeshTextures(); | ||
6372 | mMeshTexturesDirty = FALSE; | ||
6373 | } | ||
6374 | } | ||
6375 | |||
6363 | //----------------------------------------------------------------------------- | 6376 | //----------------------------------------------------------------------------- |
6364 | // updateGeometry() | 6377 | // updateGeometry() |
6365 | //----------------------------------------------------------------------------- | 6378 | //----------------------------------------------------------------------------- |
@@ -7396,12 +7409,20 @@ BOOL LLVOAvatar::bindScratchTexture( LLGLenum format ) | |||
7396 | if( *last_bind_time != LLImageGL::sLastFrameTime ) | 7409 | if( *last_bind_time != LLImageGL::sLastFrameTime ) |
7397 | { | 7410 | { |
7398 | *last_bind_time = LLImageGL::sLastFrameTime; | 7411 | *last_bind_time = LLImageGL::sLastFrameTime; |
7399 | LLImageGL::updateBoundTexMemStatic(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; | 7412 | // #if !LL_RELEASE_FOR_DOWNLOAD |
7413 | // LLImageGL::updateBoundTexMem(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT) ; | ||
7414 | // #else | ||
7415 | LLImageGL::updateBoundTexMem(texture_bytes); | ||
7416 | // #endif | ||
7400 | } | 7417 | } |
7401 | } | 7418 | } |
7402 | else | 7419 | else |
7403 | { | 7420 | { |
7404 | LLImageGL::updateBoundTexMemStatic(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; | 7421 | // #if !LL_RELEASE_FOR_DOWNLOAD |
7422 | // LLImageGL::updateBoundTexMem(texture_bytes, SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT) ; | ||
7423 | // #else | ||
7424 | LLImageGL::updateBoundTexMem(texture_bytes); | ||
7425 | // #endif | ||
7405 | LLVOAvatar::sScratchTexLastBindTime.addData( format, new F32(LLImageGL::sLastFrameTime) ); | 7426 | LLVOAvatar::sScratchTexLastBindTime.addData( format, new F32(LLImageGL::sLastFrameTime) ); |
7406 | } | 7427 | } |
7407 | 7428 | ||
@@ -7423,7 +7444,8 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes ) | |||
7423 | { | 7444 | { |
7424 | case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; | 7445 | case GL_LUMINANCE: components = 1; internal_format = GL_LUMINANCE8; break; |
7425 | case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; | 7446 | case GL_ALPHA: components = 1; internal_format = GL_ALPHA8; break; |
7426 | case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; | 7447 | // Support for GL_EXT_paletted_texture is deprecated |
7448 | // case GL_COLOR_INDEX: components = 1; internal_format = GL_COLOR_INDEX8_EXT; break; | ||
7427 | case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; | 7449 | case GL_LUMINANCE_ALPHA: components = 2; internal_format = GL_LUMINANCE8_ALPHA8; break; |
7428 | case GL_RGB: components = 3; internal_format = GL_RGB8; break; | 7450 | case GL_RGB: components = 3; internal_format = GL_RGB8; break; |
7429 | case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; | 7451 | case GL_RGBA: components = 4; internal_format = GL_RGBA8; break; |
@@ -7465,11 +7487,11 @@ LLGLuint LLVOAvatar::getScratchTexName( LLGLenum format, U32* texture_bytes ) | |||
7465 | 7487 | ||
7466 | LLVOAvatar::sScratchTexBytes += *texture_bytes; | 7488 | LLVOAvatar::sScratchTexBytes += *texture_bytes; |
7467 | LLImageGL::sGlobalTextureMemoryInBytes += *texture_bytes; | 7489 | LLImageGL::sGlobalTextureMemoryInBytes += *texture_bytes; |
7468 | 7490 | /* | |
7469 | if(gAuditTexture) | 7491 | if(gAuditTexture) |
7470 | { | 7492 | { |
7471 | LLImageGL::incTextureCounterStatic(SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, components, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; | 7493 | LLImageGL::incTextureCounterStatic(SCRATCH_TEX_WIDTH * SCRATCH_TEX_HEIGHT, components, LLViewerImageBoostLevel::AVATAR_SCRATCH_TEX) ; |
7472 | } | 7494 | }*/ |
7473 | 7495 | ||
7474 | return name; | 7496 | return name; |
7475 | } | 7497 | } |
@@ -7572,6 +7594,7 @@ void LLVOAvatar::updateMeshTextures() | |||
7572 | use_lkg_baked_layer[i] = (!is_layer_baked[i] | 7594 | use_lkg_baked_layer[i] = (!is_layer_baked[i] |
7573 | && (mBakedTextureData[i].mLastTextureIndex != IMG_DEFAULT_AVATAR) | 7595 | && (mBakedTextureData[i].mLastTextureIndex != IMG_DEFAULT_AVATAR) |
7574 | && mBakedTextureData[i].mTexLayerSet | 7596 | && mBakedTextureData[i].mTexLayerSet |
7597 | && mBakedTextureData[i].mTexLayerSet->getComposite() // KL SD | ||
7575 | && !mBakedTextureData[i].mTexLayerSet->getComposite()->isInitialized()); | 7598 | && !mBakedTextureData[i].mTexLayerSet->getComposite()->isInitialized()); |
7576 | if (use_lkg_baked_layer[i]) | 7599 | if (use_lkg_baked_layer[i]) |
7577 | { | 7600 | { |
@@ -7605,7 +7628,7 @@ void LLVOAvatar::updateMeshTextures() | |||
7605 | if (use_lkg_baked_layer[i] && !self_customizing ) | 7628 | if (use_lkg_baked_layer[i] && !self_customizing ) |
7606 | { | 7629 | { |
7607 | LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureData[i].mLastTextureIndex, target_host ); | 7630 | LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureData[i].mLastTextureIndex, target_host ); |
7608 | mBakedTextureData[i].mIsUsed = TRUE; | 7631 | //mBakedTextureData[i].mIsUsed = TRUE; |
7609 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) | 7632 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) |
7610 | { | 7633 | { |
7611 | mBakedTextureData[i].mMeshes[k]->setTexture( baked_img ); | 7634 | mBakedTextureData[i].mMeshes[k]->setTexture( baked_img ); |
@@ -7635,7 +7658,7 @@ void LLVOAvatar::updateMeshTextures() | |||
7635 | { | 7658 | { |
7636 | mBakedTextureData[i].mTexLayerSet->createComposite(); | 7659 | mBakedTextureData[i].mTexLayerSet->createComposite(); |
7637 | mBakedTextureData[i].mTexLayerSet->setUpdatesEnabled( TRUE ); | 7660 | mBakedTextureData[i].mTexLayerSet->setUpdatesEnabled( TRUE ); |
7638 | mBakedTextureData[i].mIsUsed = FALSE; | 7661 | // mBakedTextureData[i].mIsUsed = FALSE; |
7639 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) | 7662 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) |
7640 | { | 7663 | { |
7641 | mBakedTextureData[i].mMeshes[k]->setLayerSet( mBakedTextureData[i].mTexLayerSet ); | 7664 | mBakedTextureData[i].mMeshes[k]->setLayerSet( mBakedTextureData[i].mTexLayerSet ); |
@@ -7656,9 +7679,13 @@ void LLVOAvatar::updateMeshTextures() | |||
7656 | mBakedTextureData[BAKED_HAIR].mMeshes[i]->setTexture( hair_img ); | 7679 | mBakedTextureData[BAKED_HAIR].mMeshes[i]->setTexture( hair_img ); |
7657 | } | 7680 | } |
7658 | mHasBakedHair = FALSE; | 7681 | mHasBakedHair = FALSE; |
7659 | } | 7682 | } |
7660 | else | 7683 | else |
7661 | { | 7684 | { |
7685 | for (U32 i = 0; i < mBakedTextureData[BAKED_HAIR].mMeshes.size(); i++) | ||
7686 | { | ||
7687 | mBakedTextureData[BAKED_HAIR].mMeshes[i]->setColor( 1.f, 1.f, 1.f, 1.f ); | ||
7688 | } | ||
7662 | mHasBakedHair = TRUE; | 7689 | mHasBakedHair = TRUE; |
7663 | } | 7690 | } |
7664 | 7691 | ||
@@ -7790,7 +7817,7 @@ void LLVOAvatar::clearChat() | |||
7790 | S32 LLVOAvatar::getLocalDiscardLevel( ETextureIndex index ) | 7817 | S32 LLVOAvatar::getLocalDiscardLevel( ETextureIndex index ) |
7791 | { | 7818 | { |
7792 | // If the texture is not local, we don't care and treat it as fully loaded | 7819 | // If the texture is not local, we don't care and treat it as fully loaded |
7793 | if (!isIndexLocalTexture(index)) return 0; | 7820 | if (!isIndexLocalTexture(index)) return FALSE; // KL SD version |
7794 | 7821 | ||
7795 | LocalTextureData &local_tex_data = mLocalTextureData[index]; | 7822 | LocalTextureData &local_tex_data = mLocalTextureData[index]; |
7796 | if (index >= 0 | 7823 | if (index >= 0 |
@@ -7932,7 +7959,7 @@ bool LLVOAvatar::hasPendingBakedUploads() | |||
7932 | { | 7959 | { |
7933 | for (U32 i = 0; i < mBakedTextureData.size(); i++) | 7960 | for (U32 i = 0; i < mBakedTextureData.size(); i++) |
7934 | { | 7961 | { |
7935 | bool upload_pending = (mBakedTextureData[i].mTexLayerSet && mBakedTextureData[i].mTexLayerSet->getComposite()->uploadPending()); | 7962 | bool upload_pending = (mBakedTextureData[i].mTexLayerSet && mBakedTextureData[i].mTexLayerSet->getComposite() && mBakedTextureData[i].mTexLayerSet->getComposite()->uploadPending()); |
7936 | if (upload_pending) | 7963 | if (upload_pending) |
7937 | { | 7964 | { |
7938 | return true; | 7965 | return true; |
@@ -8467,7 +8494,8 @@ void LLVOAvatar::onFirstTEMessageReceived() | |||
8467 | } | 8494 | } |
8468 | } | 8495 | } |
8469 | 8496 | ||
8470 | updateMeshTextures(); | 8497 | mMeshTexturesDirty = TRUE; // updateMeshTextures(); |
8498 | gPipeline.markGLRebuild(this); | ||
8471 | } | 8499 | } |
8472 | } | 8500 | } |
8473 | 8501 | ||
@@ -8530,20 +8558,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) | |||
8530 | // (isTextureDefined(TEX_SKIRT_BAKED) ? "SKIRT " : "skirt " ) << (getTEImage(TEX_SKIRT_BAKED)->getID()) << std::endl << | 8558 | // (isTextureDefined(TEX_SKIRT_BAKED) ? "SKIRT " : "skirt " ) << (getTEImage(TEX_SKIRT_BAKED)->getID()) << std::endl << |
8531 | // (isTextureDefined(TEX_HAIR_BAKED) ? "HAIR" : "hair " ) << (getTEImage(TEX_HAIR_BAKED)->getID()) << std::endl << | 8559 | // (isTextureDefined(TEX_HAIR_BAKED) ? "HAIR" : "hair " ) << (getTEImage(TEX_HAIR_BAKED)->getID()) << std::endl << |
8532 | // (isTextureDefined(TEX_EYES_BAKED) ? "EYES" : "eyes" ) << (getTEImage(TEX_EYES_BAKED)->getID()) << llendl ; | 8560 | // (isTextureDefined(TEX_EYES_BAKED) ? "EYES" : "eyes" ) << (getTEImage(TEX_EYES_BAKED)->getID()) << llendl ; |
8533 | 8561 | ||
8534 | if( !mFirstTEMessageReceived ) | 8562 | if( !mFirstTEMessageReceived ) |
8535 | { | 8563 | { |
8536 | onFirstTEMessageReceived(); | 8564 | onFirstTEMessageReceived(); |
8537 | } | 8565 | } |
8538 | 8566 | ||
8539 | setCompositeUpdatesEnabled( FALSE ); | 8567 | setCompositeUpdatesEnabled( FALSE ); |
8568 | mMeshTexturesDirty = TRUE; | ||
8569 | gPipeline.markGLRebuild(this); // KL SD needing work in S19? | ||
8540 | 8570 | ||
8541 | if (!mIsSelf) | 8571 | if (!mIsSelf) |
8542 | { | 8572 | { |
8543 | releaseUnnecessaryTextures(); | 8573 | releaseUnnecessaryTextures(); |
8544 | } | 8574 | } |
8545 | 8575 | ||
8546 | updateMeshTextures(); // enables updates for laysets without baked textures. | 8576 | //updateMeshTextures(); // enables updates for laysets without baked textures. |
8547 | 8577 | ||
8548 | // parse visual params | 8578 | // parse visual params |
8549 | S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam); | 8579 | S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam); |
@@ -8829,7 +8859,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) | |||
8829 | if (id == image_baked->getID()) | 8859 | if (id == image_baked->getID()) |
8830 | { | 8860 | { |
8831 | mBakedTextureData[i].mIsLoaded = true; | 8861 | mBakedTextureData[i].mIsLoaded = true; |
8832 | mBakedTextureData[i].mIsUsed = true; | 8862 | //mBakedTextureData[i].mIsUsed = true; |
8833 | mBakedTextureData[i].mLastTextureIndex = id; | 8863 | mBakedTextureData[i].mLastTextureIndex = id; |
8834 | for (U32 k = 0; k < mBakedTextureData[i].mMeshes.size(); k++) | 8864 | for (U32 k = 0; k < mBakedTextureData[i].mMeshes.size(); k++) |
8835 | { | 8865 | { |
@@ -9738,9 +9768,9 @@ BOOL LLVOAvatar::updateLOD() | |||
9738 | 9768 | ||
9739 | LLFace* facep = mDrawable->getFace(0); | 9769 | LLFace* facep = mDrawable->getFace(0); |
9740 | if (facep->mVertexBuffer.isNull() || | 9770 | if (facep->mVertexBuffer.isNull() || |
9741 | LLVertexBuffer::sEnableVBOs && | 9771 | (LLVertexBuffer::sEnableVBOs && |
9742 | ((facep->mVertexBuffer->getUsage() == GL_STATIC_DRAW ? TRUE : FALSE) != | 9772 | ((facep->mVertexBuffer->getUsage() == GL_STATIC_DRAW ? TRUE : FALSE) != |
9743 | (facep->getPool()->getVertexShaderLevel() > 0 ? TRUE : FALSE))) | 9773 | (facep->getPool()->getVertexShaderLevel() > 0 ? TRUE : FALSE)))) |
9744 | { | 9774 | { |
9745 | mDirtyMesh = TRUE; | 9775 | mDirtyMesh = TRUE; |
9746 | } | 9776 | } |