diff options
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bdab250b49..68637a7ed9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -690,7 +690,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mFullyLoadedInitialized(FALSE), mSupportsAlphaLayers(FALSE), mLoadedCallbacksPaused(FALSE), - mHasPelvisOffset( FALSE ) + mHasPelvisOffset( FALSE ), + mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")) { LLMemType mt(LLMemType::MTYPE_AVATAR); //VTResume(); // VTune @@ -2117,8 +2118,8 @@ void LLVOAvatar::updateMeshData() } else { - if (buff->getRequestedIndices() == num_indices && - buff->getRequestedVerts() == num_vertices) + if (buff->getNumIndices() == num_indices && + buff->getNumVerts() == num_vertices) { terse_update = true; } @@ -2138,11 +2139,19 @@ void LLVOAvatar::updateMeshData() for(S32 k = j ; k < part_index ; k++) { - mMeshLOD[k]->updateFaceData(facep, mAdjustedPixelArea, k == MESH_ID_HAIR, terse_update); + bool rigid = false; + if (k == MESH_ID_EYEBALL_LEFT || + k == MESH_ID_EYEBALL_RIGHT) + { //eyeballs can't have terse updates since they're never rendered with + //the hardware skinning shader + rigid = true; + } + + mMeshLOD[k]->updateFaceData(facep, mAdjustedPixelArea, k == MESH_ID_HAIR, terse_update && !rigid); } stop_glerror(); - buff->setBuffer(0); + buff->flush(); if(!f_num) { @@ -4135,7 +4144,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) LLVertexBuffer* vb = mDrawable->getFace(0)->getVertexBuffer(); if (vb) { - vb->setBuffer(0); + vb->flush(); } } } @@ -5405,18 +5414,6 @@ BOOL LLVOAvatar::loadAvatar() } } - // Uncomment to enable avatar_lad.xml debugging. - std::ofstream file; - file.open("avatar_lad.log"); - for( LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam(); - param; - param = (LLViewerVisualParam*) getNextVisualParam() ) - { - param->getInfo()->toStream(file); - file << std::endl; - } - - file.close(); return TRUE; } @@ -6485,10 +6482,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { - if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) - return TRUE; - else - return mFullyLoaded; + return (mRenderUnloadedAvatar || mFullyLoaded); } bool LLVOAvatar::isTooComplex() const @@ -8335,7 +8329,7 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d void LLVOAvatar::idleUpdateRenderCost() { static const U32 ARC_BODY_PART_COST = 200; - static const U32 ARC_LIMIT = 2048; + static const U32 ARC_LIMIT = 20000; static std::set<LLUUID> all_textures; |