aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-05 17:38:27 -0700
committerJohn Hurliman2009-10-05 17:38:27 -0700
commit7ddb6fbced5f2a98aa0201e354987ebc32adf7d2 (patch)
tree903b87112e7f851218e7b3d41c681f1b8f512af2 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs
parentBeginning work on the new LLUDP implementation (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-7ddb6fbced5f2a98aa0201e354987ebc32adf7d2.zip
opensim-SC_OLD-7ddb6fbced5f2a98aa0201e354987ebc32adf7d2.tar.gz
opensim-SC_OLD-7ddb6fbced5f2a98aa0201e354987ebc32adf7d2.tar.bz2
opensim-SC_OLD-7ddb6fbced5f2a98aa0201e354987ebc32adf7d2.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into htb-throttle
Diffstat (limited to '')
-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 }