add convex state to mesh key, so a change is detected.
parent
4e4a3e8d22
commit
2e41294da9
|
@ -880,6 +880,11 @@ namespace OpenSim.Framework
|
|||
}
|
||||
|
||||
public ulong GetMeshKey(Vector3 size, float lod)
|
||||
{
|
||||
return GetMeshKey(size, lod, false);
|
||||
}
|
||||
|
||||
public ulong GetMeshKey(Vector3 size, float lod, bool convex)
|
||||
{
|
||||
ulong hash = 5381;
|
||||
|
||||
|
@ -926,6 +931,9 @@ namespace OpenSim.Framework
|
|||
hash = djb2(hash, scaleBytes[i]);
|
||||
}
|
||||
|
||||
if(convex)
|
||||
hash = djb2(hash, 0xa5);
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
|
|
@ -995,7 +995,7 @@ namespace OpenSim.Region.Physics.Meshing
|
|||
|
||||
// If this mesh has been created already, return it instead of creating another copy
|
||||
// For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory
|
||||
key = primShape.GetMeshKey(size, lod);
|
||||
key = primShape.GetMeshKey(size, lod, convex);
|
||||
if (m_uniqueMeshes.TryGetValue(key, out mesh))
|
||||
return mesh;
|
||||
|
||||
|
|
Loading…
Reference in New Issue