From b3fbb12f155ae1acc6b4d258d1c383d5d8e47964 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 6 Jun 2011 19:12:52 -0500 Subject: SH-1589 Fix for some meshes showing up in non mesh enabled regions. --- indra/newview/lldrawpoolavatar.cpp | 10 +--------- indra/newview/llmeshrepository.cpp | 11 ++--------- indra/newview/llviewerregion.cpp | 12 ++++++++++++ indra/newview/llviewerregion.h | 3 +++ indra/newview/llvovolume.cpp | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 870aec4eff..9f790d03fe 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -459,14 +459,6 @@ S32 LLDrawPoolAvatar::getNumPasses() { return 10; } - if (LLPipeline::sImpostorRender) - { - return 1; - } - else - { - return 3; - } } @@ -1419,7 +1411,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { - if (avatar->isSelf() && !gAgent.needsRenderAvatar()) + if (avatar->isSelf() && !gAgent.needsRenderAvatar() || !gMeshRepo.meshRezEnabled()) { return; } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index ff9f0e1663..bfaddf9cde 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2379,7 +2379,6 @@ void LLMeshRepository::notifyLoadedMeshes() if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived()) { region_name = gAgent.getRegion()->getName(); - mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh"); } } @@ -3725,10 +3724,7 @@ bool LLMeshRepository::meshUploadEnabled() LLViewerParcelMgr::getInstance()->allowAgentBuild() && region) { - LLSD sim_features; - region->getSimulatorFeatures(sim_features); - return (sim_features.has("MeshUploadEnabled") && - sim_features["MeshUploadEnabled"].asBoolean()); + return region->meshUploadEnabled(); } return false; } @@ -3739,10 +3735,7 @@ bool LLMeshRepository::meshRezEnabled() if(gSavedSettings.getBOOL("MeshEnabled") && region) { - LLSD sim_features; - region->getSimulatorFeatures(sim_features); - return (sim_features.has("MeshRezEnabled") && - sim_features["MeshRezEnabled"].asBoolean()); + return region->meshRezEnabled(); } return false; } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 80207d6568..a370e83410 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1716,4 +1716,16 @@ std::string LLViewerRegion::getDescription() const return stringize(*this); } +bool LLViewerRegion::meshUploadEnabled() const +{ + return (mSimulatorFeatures.has("MeshUploadEnabled") && + mSimulatorFeatures["MeshUploadEnabled"].asBoolean()); +} + +bool LLViewerRegion::meshRezEnabled() const +{ + return (mSimulatorFeatures.has("MeshRezEnabled") && + mSimulatorFeatures["MeshRezEnabled"].asBoolean()); +} + diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index d936277231..3811b989e7 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -276,6 +276,9 @@ public: void getInfo(LLSD& info); + bool meshRezEnabled() const; + bool meshUploadEnabled() const; + void getSimulatorFeatures(LLSD& info); void setSimulatorFeatures(const LLSD& info); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 39e555f781..d978167f50 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3983,7 +3983,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) LLVOVolume* vobj = drawablep->getVOVolume(); - if (vobj->getVolume() && vobj->getVolume()->isTetrahedron()) + if (vobj->getVolume() && vobj->getVolume()->isTetrahedron() || (vobj->isMesh() && !gMeshRepo.meshRezEnabled())) { continue; } -- cgit v1.2.3