diff options
author | Melanie | 2009-10-05 12:58:52 +0100 |
---|---|---|
committer | Melanie | 2009-10-05 12:58:52 +0100 |
commit | 8d5a40aad03cb0f46aa90a90e3e8d9464041faf7 (patch) | |
tree | 05e5908228936457563e031bbaa1d4a65b9c2544 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |
parent | Fix build break (diff) | |
parent | Eliminate pinned Mesh data on managed heap by using IntPtrs to memory allocat... (diff) | |
download | opensim-SC_OLD-8d5a40aad03cb0f46aa90a90e3e8d9464041faf7.zip opensim-SC_OLD-8d5a40aad03cb0f46aa90a90e3e8d9464041faf7.tar.gz opensim-SC_OLD-8d5a40aad03cb0f46aa90a90e3e8d9464041faf7.tar.bz2 opensim-SC_OLD-8d5a40aad03cb0f46aa90a90e3e8d9464041faf7.tar.xz |
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 12 |
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 | } |