aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorMelanie2012-03-20 02:48:11 +0000
committerMelanie2012-03-20 02:48:11 +0000
commit5768a151ffca0ac34d14cab59d70dc5223e531db (patch)
tree6b1eedd67fca3ea6c1ad1c9d3e6128e0e07bcea2 /OpenSim/Region/Physics
parentRemove debug output using Console.WriteLine and trim excessive whitespace (diff)
parentRemove pointless ThreadAbortException catching in a test that isn't run anyway. (diff)
downloadopensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.zip
opensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.tar.gz
opensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.tar.bz2
opensim-SC_OLD-5768a151ffca0ac34d14cab59d70dc5223e531db.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLXAssetData.cs
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs26
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 254d578..6f37347 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -842,17 +842,23 @@ namespace OpenSim.Region.Physics.OdePlugin
842 mesh.getIndexListAsPtrToIntArray(out indices, out triStride, out indexCount); // Also fixed, needs release after usage 842 mesh.getIndexListAsPtrToIntArray(out indices, out triStride, out indexCount); // Also fixed, needs release after usage
843 843
844 mesh.releaseSourceMeshData(); // free up the original mesh data to save memory 844 mesh.releaseSourceMeshData(); // free up the original mesh data to save memory
845 if (m_MeshToTriMeshMap.ContainsKey(mesh))
846 {
847 _triMeshData = m_MeshToTriMeshMap[mesh];
848 }
849 else
850 {
851 _triMeshData = d.GeomTriMeshDataCreate();
852 845
853 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride); 846 // We must lock here since m_MeshToTriMeshMap is static and multiple scene threads may call this method at
854 d.GeomTriMeshDataPreprocess(_triMeshData); 847 // the same time.
855 m_MeshToTriMeshMap[mesh] = _triMeshData; 848 lock (m_MeshToTriMeshMap)
849 {
850 if (m_MeshToTriMeshMap.ContainsKey(mesh))
851 {
852 _triMeshData = m_MeshToTriMeshMap[mesh];
853 }
854 else
855 {
856 _triMeshData = d.GeomTriMeshDataCreate();
857
858 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride);
859 d.GeomTriMeshDataPreprocess(_triMeshData);
860 m_MeshToTriMeshMap[mesh] = _triMeshData;
861 }
856 } 862 }
857 863
858// _parent_scene.waitForSpaceUnlock(m_targetSpace); 864// _parent_scene.waitForSpaceUnlock(m_targetSpace);