diff options
author | Justin Clark-Casey (justincc) | 2009-09-25 19:19:01 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-09-25 19:19:01 +0100 |
commit | 0bdf75637ff67ee443fa5c4d335c76ca594c254a (patch) | |
tree | 52c546b2118101b7bb82ccc7dee273573c8fa0a2 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |
parent | Don't preserve full user profile details within iars for now (diff) | |
parent | More small changes to FlotsamAssetCache as per mcortez' request. (diff) | |
download | opensim-SC_OLD-0bdf75637ff67ee443fa5c4d335c76ca594c254a.zip opensim-SC_OLD-0bdf75637ff67ee443fa5c4d335c76ca594c254a.tar.gz opensim-SC_OLD-0bdf75637ff67ee443fa5c4d335c76ca594c254a.tar.bz2 opensim-SC_OLD-0bdf75637ff67ee443fa5c4d335c76ca594c254a.tar.xz |
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 673ae39..032b5df 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -82,7 +82,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
82 | 82 | ||
83 | // private float m_tensor = 5f; | 83 | // private float m_tensor = 5f; |
84 | private int body_autodisable_frames = 20; | 84 | private int body_autodisable_frames = 20; |
85 | private IMesh primMesh = null; | ||
86 | 85 | ||
87 | 86 | ||
88 | private const CollisionCategories m_default_collisionFlags = (CollisionCategories.Geom | 87 | private const CollisionCategories m_default_collisionFlags = (CollisionCategories.Geom |
@@ -814,14 +813,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
814 | } | 813 | } |
815 | } | 814 | } |
816 | 815 | ||
817 | IMesh oldMesh = primMesh; | 816 | float[] vertexList = mesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory |
817 | int[] indexList = mesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage | ||
818 | 818 | ||
819 | primMesh = mesh; | 819 | mesh.releaseSourceMeshData(); // free up the original mesh data to save memory |
820 | |||
821 | float[] vertexList = primMesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory | ||
822 | int[] indexList = primMesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage | ||
823 | |||
824 | primMesh.releaseSourceMeshData(); // free up the original mesh data to save memory | ||
825 | 820 | ||
826 | int VertexCount = vertexList.GetLength(0)/3; | 821 | int VertexCount = vertexList.GetLength(0)/3; |
827 | int IndexCount = indexList.GetLength(0); | 822 | int IndexCount = indexList.GetLength(0); |
@@ -847,12 +842,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
847 | return; | 842 | return; |
848 | } | 843 | } |
849 | 844 | ||
850 | if (oldMesh != null) | ||
851 | { | ||
852 | oldMesh.releasePinned(); | ||
853 | oldMesh = null; | ||
854 | } | ||
855 | |||
856 | // if (IsPhysical && Body == (IntPtr) 0) | 845 | // if (IsPhysical && Body == (IntPtr) 0) |
857 | // { | 846 | // { |
858 | // Recreate the body | 847 | // Recreate the body |