aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authordahlia2009-10-04 20:01:44 -0700
committerdahlia2009-10-04 20:01:44 -0700
commit5c593f3892d3de0bc3dab25c9298a3f31d3d86c1 (patch)
tree2ebfde4a7c2d2ec839bed90bdaa4c4e4ac2ff108 /OpenSim/Region
parentMake the asset connector async Get overload return false if the asset (diff)
downloadopensim-SC-5c593f3892d3de0bc3dab25c9298a3f31d3d86c1.zip
opensim-SC-5c593f3892d3de0bc3dab25c9298a3f31d3d86c1.tar.gz
opensim-SC-5c593f3892d3de0bc3dab25c9298a3f31d3d86c1.tar.bz2
opensim-SC-5c593f3892d3de0bc3dab25c9298a3f31d3d86c1.tar.xz
only cache mesh if meshing was successful
re-enable sculpt mesh caching
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 0e29ccc..1ea08e2 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -498,12 +498,9 @@ namespace OpenSim.Region.Physics.Meshing
498 // If this mesh has been created already, return it instead of creating another copy 498 // If this mesh has been created already, return it instead of creating another copy
499 // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory 499 // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory
500 500
501 if (! primShape.SculptEntry) 501 key = GetMeshKey(primShape, size, lod);
502 { 502 if (m_uniqueMeshes.TryGetValue(key, out mesh))
503 key = GetMeshKey(primShape, size, lod); 503 return mesh;
504 if (m_uniqueMeshes.TryGetValue(key, out mesh))
505 return mesh;
506 }
507 504
508 if (size.X < 0.01f) size.X = 0.01f; 505 if (size.X < 0.01f) size.X = 0.01f;
509 if (size.Y < 0.01f) size.Y = 0.01f; 506 if (size.Y < 0.01f) size.Y = 0.01f;
@@ -525,10 +522,9 @@ namespace OpenSim.Region.Physics.Meshing
525 522
526 // trim the vertex and triangle lists to free up memory 523 // trim the vertex and triangle lists to free up memory
527 mesh.TrimExcess(); 524 mesh.TrimExcess();
528 }
529 525
530 if (!primShape.SculptEntry)
531 m_uniqueMeshes.Add(key, mesh); 526 m_uniqueMeshes.Add(key, mesh);
527 }
532 528
533 return mesh; 529 return mesh;
534 } 530 }