summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llmath/llvolume.cpp3
-rw-r--r--indra/llprimitive/llprimitive.cpp8
-rw-r--r--indra/newview/llvovolume.cpp2
-rw-r--r--indra/newview/pipeline.cpp2
4 files changed, 12 insertions, 3 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index ddd1b4b3db..33a8d33ce1 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1692,9 +1692,10 @@ LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL ge
mLODScaleBias.setVec(1,1,1);
+ generate();
+
if (mParams.getSculptID().isNull() && params.getSculptType() == LL_SCULPT_TYPE_NONE)
{
- generate();
createVolumeFaces();
}
}
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 52265e7ad5..340f60ed1a 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -744,7 +744,10 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
return TRUE;
}
-#if 0
+#if 0
+ // #if 0'd out by davep
+ // this is a lot of cruft to set texture entry values that just stay the same for LOD switch
+ // or immediately get overridden by an object update message, also crashes occasionally
U32 old_face_mask = mVolumep->mFaceMask;
S32 face_bit = 0;
@@ -943,6 +946,9 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai
}
}
#else
+ // build the new object
+ sVolumeManager->unrefVolume(mVolumep);
+ mVolumep = volumep;
setNumTEs(mVolumep->getNumFaces());
#endif
return TRUE;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 78fd371087..7666009a62 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -919,7 +919,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &params, const S32 detail, bool
{
//mesh is not loaded, request pipeline load this mesh
LLUUID asset_id = volume_params.getSculptID();
- gPipeline.loadMesh(this, asset_id);
+ gPipeline.loadMesh(this, asset_id, detail);
}
else
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 4ac95fa939..3554ceb7f0 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8949,6 +8949,7 @@ void LLPipeline::loadMesh(LLVOVolume* vobj, LLUUID mesh_id, S32 detail)
group->derefLOD(lod);
return;
}
+ group->derefLOD(lod);
}
//no lower LOD is a available, is a higher lod available?
@@ -8961,6 +8962,7 @@ void LLPipeline::loadMesh(LLVOVolume* vobj, LLUUID mesh_id, S32 detail)
group->derefLOD(lod);
return;
}
+ group->derefLOD(lod);
}
}
}