diff options
author | Dave Parks <davep@lindenlab.com> | 2010-02-28 16:40:30 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-02-28 16:40:30 -0600 |
commit | b414b5067e3e47da7d9baf490d94534b4c65a8eb (patch) | |
tree | 57a799a7389f682f5430150e4d3d1f39883f0e5c /indra/newview/pipeline.cpp | |
parent | 1ceceecf7501076fa92fa7c9eb5cdf1aa8d5191e (diff) |
Remove some dead code.
Add LH transform to LLVector3
Add DebugShowUploadCost
Make LOD generation on model preview less finnicky.
Remove error level based LOD generation.
Better framing of model before upload.
Better error handling for model uploader.
Remove [COST] argument from model upload menu item.
Remove L$ check from model upload menu item being enabled.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 559ae83182..43b2104135 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -3553,6 +3553,63 @@ void LLPipeline::renderDebug() } } + if (gSavedSettings.getBOOL("DebugShowUploadCost")) + { + std::set<LLUUID> textures; + std::set<LLUUID> sculpts; + std::set<LLUUID> meshes; + + BOOL selected = TRUE; + if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) + { + selected = FALSE; + } + + for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter) + { + LLSpatialGroup* group = *iter; + LLSpatialGroup::OctreeNode* node = group->mOctreeNode; + for (LLSpatialGroup::OctreeNode::element_iter elem = node->getData().begin(); elem != node->getData().end(); ++elem) + { + LLDrawable* drawable = *elem; + LLVOVolume* volume = drawable->getVOVolume(); + if (volume && volume->isSelected() == selected) + { + for (U32 i = 0; i < volume->getNumTEs(); ++i) + { + LLTextureEntry* te = volume->getTE(i); + textures.insert(te->getID()); + } + + if (volume->isSculpted()) + { + LLUUID sculpt_id = volume->getVolume()->getParams().getSculptID(); + if (volume->isMesh()) + { + meshes.insert(sculpt_id); + } + else + { + sculpts.insert(sculpt_id); + } + } + } + } + } + + gPipeline.mDebugTextureUploadCost = textures.size() * 10; + gPipeline.mDebugSculptUploadCost = sculpts.size()*10; + + U32 mesh_cost = 0; + + for (std::set<LLUUID>::iterator iter = meshes.begin(); iter != meshes.end(); ++iter) + { + mesh_cost += gMeshRepo.getResourceCost(*iter)*10; + } + + gPipeline.mDebugMeshUploadCost = mesh_cost; + } + for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) { LLSpatialBridge* bridge = *i; |