summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorprep linden <prep@lindenlab.com>2010-11-19 16:17:26 -0500
committerprep linden <prep@lindenlab.com>2010-11-19 16:17:26 -0500
commit6b0d10975b0ec00b374554ecd3b211e0d966272b (patch)
tree680f653b05fa0a12c8957c5f334e55e864e6af5a /indra
parent292941ac947d0ef07431a3addcfbe72287031cc4 (diff)
parentb5585a2d551190a5445581ced09be5fe906a0b53 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake2
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/settings.xml0
-rwxr-xr-xindra/newview/llfasttimerview.cpp1
-rw-r--r--indra/newview/llfloatertools.cpp35
-rw-r--r--indra/newview/llfloatertools.h1
-rwxr-xr-x[-rw-r--r--]indra/newview/llmeshrepository.cpp58
-rw-r--r--indra/newview/llselectmgr.cpp26
-rw-r--r--indra/newview/llselectmgr.h1
-rwxr-xr-x[-rw-r--r--]indra/newview/llstartup.cpp5
-rw-r--r--indra/newview/llvovolume.cpp59
10 files changed, 87 insertions, 101 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 9081752287..93cdf3422c 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -242,7 +242,7 @@ elseif(LINUX)
libtcmalloc_minimal.so
libtcmalloc_minimal.so.0
libuuid.so.1
- libssl.so.0.9.7
+ libssl.so.0.9.7
)
if (FMOD)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5cc8c34cd5..5cc8c34cd5 100644..100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 027eb09e55..4bcbe665aa 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -1463,7 +1463,6 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
std::ofstream os(output.c_str());
LLSD::Real session_time = current["SessionTime"].asReal();
- //LLSD::Real frame_count = current["FrameCount"].asReal();
os <<
"Label, "
"% Change, "
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index b9b94488cf..920bdef7f6 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -450,7 +450,8 @@ void LLFloaterTools::refresh()
if (sShowObjectCost)
{
std::string prim_cost_string;
- LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost());
+ S32 cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectRenderCost();
+ LLResMgr::getInstance()->getIntegerString(prim_cost_string, cost);
getChild<LLUICtrl>("RenderingCost")->setTextArg("[COUNT]", prim_cost_string);
}
@@ -1000,38 +1001,6 @@ void LLFloaterTools::onClickGridOptions()
//floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE);
}
-S32 LLFloaterTools::calcRenderCost()
-{
- S32 cost = 0;
- LLVOVolume::texture_cost_t textures;
-
- for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin();
- selection_iter != LLSelectMgr::getInstance()->getSelection()->end();
- ++selection_iter)
- {
- LLSelectNode *select_node = *selection_iter;
- if (select_node)
- {
- LLViewerObject *vobj = select_node->getObject();
- if (vobj->getVolume())
- {
- LLVOVolume* volume = (LLVOVolume*) vobj;
-
- cost += volume->getRenderCost(textures);
- for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
- {
- // add the cost of each individual texture in the linkset
- cost += iter->second;
- }
- textures.clear();
- }
- }
- }
-
-
- return cost;
-}
-
// static
void LLFloaterTools::setEditTool(void* tool_pointer)
{
diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h
index 87c3d2ab47..d5595445e0 100644
--- a/indra/newview/llfloatertools.h
+++ b/indra/newview/llfloatertools.h
@@ -114,7 +114,6 @@ private:
static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
static void setObjectType( LLPCode pcode );
void onClickGridOptions();
- S32 calcRenderCost();
public:
LLButton *mBtnFocus;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index f00a8565f7..2f432ba0be 100644..100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -108,36 +108,42 @@ U32 get_volume_memory_size(const LLVolume* volume)
std::string scrub_host_name(std::string http_url)
{ //curl loves to abuse the DNS cache, so scrub host names out of urls where trivial to prevent DNS timeouts
+
+ if (http_url.empty())
+ {
+ return http_url;
+ }
+ // Not safe to scrub amazon paths
+ if (http_url.find("s3.amazonaws.com") != std::string::npos)
+ {
+ return http_url;
+ }
+ std::string::size_type begin_host = http_url.find("://")+3;
+ std::string host_string = http_url.substr(begin_host);
- if (!http_url.empty())
+ std::string::size_type end_host = host_string.find(":");
+ if (end_host == std::string::npos)
{
- std::string::size_type begin_host = http_url.find("://")+3;
- std::string host_string = http_url.substr(begin_host);
-
- std::string::size_type end_host = host_string.find(":");
- if (end_host == std::string::npos)
- {
- end_host = host_string.find("/");
- }
-
- host_string = host_string.substr(0, end_host);
+ end_host = host_string.find("/");
+ }
+
+ host_string = host_string.substr(0, end_host);
+
+ std::string::size_type idx = http_url.find(host_string);
+
+ hostent* ent = gethostbyname(host_string.c_str());
+
+ if (ent && ent->h_length > 0)
+ {
+ U8* addr = (U8*) ent->h_addr_list[0];
- std::string::size_type idx = http_url.find(host_string);
-
- hostent* ent = gethostbyname(host_string.c_str());
-
- if (ent && ent->h_length > 0)
+ std::string ip_string = llformat("%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]);
+ if (!ip_string.empty() && !host_string.empty() && idx != std::string::npos)
{
- U8* addr = (U8*) ent->h_addr_list[0];
-
- std::string ip_string = llformat("%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]);
- if (!ip_string.empty() && !host_string.empty() && idx != std::string::npos)
- {
- http_url.replace(idx, host_string.length(), ip_string);
- }
+ http_url.replace(idx, host_string.length(), ip_string);
}
}
-
+
return http_url;
}
@@ -1409,8 +1415,8 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mUploadObjectAssetCapability = gAgent.getRegion()->getCapability("UploadObjectAsset");
mNewInventoryCapability = gAgent.getRegion()->getCapability("NewFileAgentInventoryVariablePrice");
- mUploadObjectAssetCapability = scrub_host_name(mUploadObjectAssetCapability);
- mNewInventoryCapability = scrub_host_name(mNewInventoryCapability);
+ //mUploadObjectAssetCapability = scrub_host_name(mUploadObjectAssetCapability);
+ //mNewInventoryCapability = scrub_host_name(mNewInventoryCapability);
mOrigin += gAgent.getAtAxis() * scale.magVec();
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 728694117c..305b629cf7 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6335,6 +6335,32 @@ U32 LLObjectSelection::getSelectedObjectTriangleCount()
return count;
}
+S32 LLObjectSelection::getSelectedObjectRenderCost()
+{
+ S32 cost = 0;
+ LLVOVolume::texture_cost_t textures;
+ for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
+ {
+ LLSelectNode* node = *iter;
+ LLVOVolume* object = (LLVOVolume*)node->getObject();
+
+ if (object)
+ {
+ cost += object->getRenderCost(textures);
+ }
+
+ for (LLVOVolume::texture_cost_t::iterator iter = textures.begin(); iter != textures.end(); ++iter)
+ {
+ // add the cost of each individual texture in the linkset
+ cost += iter->second;
+ }
+ textures.clear();
+ }
+
+
+ return cost;
+}
+
//-----------------------------------------------------------------------------
// getTECount()
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index e0f76bd5dd..0cf582062d 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -284,6 +284,7 @@ public:
F32 getSelectedLinksetCost();
F32 getSelectedPhysicsCost();
F32 getSelectedLinksetPhysicsCost();
+ S32 getSelectedObjectRenderCost();
F32 getSelectedObjectStreamingCost();
U32 getSelectedObjectTriangleCount();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 5ee4599200..230dfaea51 100644..100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -3071,6 +3071,11 @@ bool process_login_success_response()
}
// Request the map server url
+ // Non-agni grids have a different default location.
+ if (!LLGridManager::getInstance()->isInProductionGrid())
+ {
+ gSavedSettings.setString("MapServerURL", "http://test.map.secondlife.com.s3.amazonaws.com/");
+ }
std::string map_server_url = response["map-server-url"];
if(!map_server_url.empty())
{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index fe11570cf6..9aebfcba4a 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2940,15 +2940,18 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
U32 flexi = 0;
U32 animtex = 0;
U32 particles = 0;
- U32 scale = 0;
U32 bump = 0;
U32 planar = 0;
U32 cuts = 0;
U32 hollow = 0;
- U32 twist = 0;
U32 circular_profile = 0;
U32 circular_path = 0;
+ // these multipliers are variable and can be floating point
+ F32 scale = 0.f;
+ F32 twist = 0.f;
+
+
const LLDrawable* drawablep = mDrawable;
if (isSculpted())
@@ -2992,7 +2995,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(sculpt_id);
if (texture)
{
- S32 texture_cost = ARC_TEXTURE_COST * (texture->getFullHeight() / 128 + texture->getFullWidth() / 128 + 1);
+ S32 texture_cost = (S32)(ARC_TEXTURE_COST * (texture->getFullHeight() / 128.f + texture->getFullWidth() / 128.f + 1));
textures.insert(texture_cost_t::value_type(sculpt_id, texture_cost));
}
}
@@ -3009,11 +3012,11 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
}
const LLVector3& sc = getScale();
- scale += (U32) sc.mV[0] + (U32) sc.mV[1] + (U32) sc.mV[2];
- if (scale > 4)
+ scale += sc.mV[0] + sc.mV[1] + sc.mV[2];
+ if (scale > 4.f)
{
// scale is a multiplier, cap it at 4.
- scale = 4;
+ scale = 4.f;
}
// add points for cut prims
@@ -3033,19 +3036,15 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
hollow = 1;
}
- // twist - scale by twist extent / 90
- if (volume_params.getTwistBegin() != 0.f)
+ F32 twist_mag = path_params.getTwistBegin() - path_params.getTwistEnd();
+ if (twist_mag < 0)
{
- U32 scale = abs((S32)(volume_params.getTwistBegin() / 90.f) + 1);
- twist += scale;
+ twist_mag *= -1.f;
}
- // twist - scale by twist extent / 90
- if (volume_params.getTwist() != 0.f)
- {
- U32 scale = abs((S32)(volume_params.getTwist() / 90.f) + 1);
- twist += scale;
- }
+ // note magnitude of twist is [-1.f, 1.f]. which translates to [-180, 180] degrees.
+ // scale to degrees / 90 by multiplying by 2.
+ twist = twist_mag * 2.f;
// double cost for circular profiles / sculpties
if (profile_params.getCurveType() == LL_PCODE_PROFILE_CIRCLE ||
@@ -3079,7 +3078,7 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
{
if (textures.find(img->getID()) == textures.end())
{
- S32 texture_cost = ARC_TEXTURE_COST * (img->getFullHeight() / 128 + img->getFullWidth() / 128 + 1);
+ S32 texture_cost = (S32)(ARC_TEXTURE_COST * (img->getFullHeight() / 128.f + img->getFullWidth() / 128.f + 1));
textures.insert(texture_cost_t::value_type(img->getID(), texture_cost));
}
}
@@ -3136,9 +3135,9 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
shame *= hollow * ARC_HOLLOW_MULT;
}
- if (twist)
+ if (twist > 1.f)
{
- shame *= twist;
+ shame = (U32)(shame * twist);
}
if (circular_profile)
@@ -3171,33 +3170,15 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const
shame *= shiny * ARC_SHINY_MULT;
}
- if (scale)
+ if (scale > 1.f)
{
- shame *= scale;
+ shame = (U32)(shame *scale);
}
// add additional costs
shame += particles * ARC_PARTICLE_COST;
- LLViewerObject::const_child_list_t& child_list = getChildren();
- for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end();
- ++iter)
- {
- const LLViewerObject* child_objectp = *iter;
- const LLDrawable* child_drawablep = child_objectp->mDrawable;
- if (child_drawablep)
- {
- const LLVOVolume* child_volumep = child_drawablep->getVOVolume();
- if (child_volumep)
- {
- shame += child_volumep->getRenderCost(textures);
- }
- }
- }
-
return shame;
-
}
F32 LLVOVolume::getStreamingCost()