diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-01-05 10:37:00 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-01-05 10:37:00 -0500 |
commit | a7db3b1786e8ac2fc1ee1da306689219ec6aae6a (patch) | |
tree | 47330782030dbf0ad74984a3afb2db13b69ef660 /indra/newview/llvovolume.cpp | |
parent | 3348a1ecc0854f249bf31c9dd65cc926b03c0c40 (diff) | |
parent | 875d36b083582a2c5afdc8f515f203f331269312 (diff) |
merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index fa0f48fce6..471df30bfe 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2905,12 +2905,21 @@ U32 LLVOVolume::getRenderCost(texture_cost_t &textures) const {
// base cost of each prim should be 10 points
static const U32 ARC_PRIM_COST = 10;
-
- // get access to params we'll need at various points
- LLVolumeParams volume_params = getVolume()->getParams();
- LLPathParams path_params = volume_params.getPathParams();
- LLProfileParams profile_params = volume_params.getProfileParams();
+ // Get access to params we'll need at various points.
+ // Skip if this is object doesn't have a volume (e.g. is an avatar).
+ const BOOL has_volume = (getVolume() != NULL);
+ LLVolumeParams volume_params;
+ LLPathParams path_params;
+ LLProfileParams profile_params;
+
+ if (has_volume)
+ {
+ volume_params = getVolume()->getParams();
+ path_params = volume_params.getPathParams();
+ profile_params = volume_params.getProfileParams();
+ }
+
// per-prim costs
static const U32 ARC_INVISI_COST = 1;
static const U32 ARC_PARTICLE_COST = 100;
@@ -4375,12 +4384,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) LLFastTimer t(FTM_VOLUME_GEOM_PARTIAL);
LLDrawable* drawablep = *drawable_iter;
- if (drawablep->isDead() || drawablep->isState(LLDrawable::FORCE_INVISIBLE) )
- {
- continue;
- }
-
- if (drawablep->isState(LLDrawable::REBUILD_ALL))
+ if (!drawablep->isDead() && drawablep->isState(LLDrawable::REBUILD_ALL) )
{
LLVOVolume* vobj = drawablep->getVOVolume();
vobj->preRebuild();
|