aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 4133107..bfc9df2 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -50,6 +50,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
50 50
51 public string BulletSimVersion = "?"; 51 public string BulletSimVersion = "?";
52 52
53 // The handle to the underlying managed or unmanaged version of Bullet being used.
54 public BulletSimAPITemplate PE;
55
53 public Dictionary<uint, BSPhysObject> PhysObjects; 56 public Dictionary<uint, BSPhysObject> PhysObjects;
54 public BSShapeCollection Shapes; 57 public BSShapeCollection Shapes;
55 58
@@ -187,12 +190,15 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
187 190
188 // Allocate pinned memory to pass parameters. 191 // Allocate pinned memory to pass parameters.
189 UnmanagedParams = new ConfigurationParameters[1]; 192 UnmanagedParams = new ConfigurationParameters[1];
190 m_paramsHandle = GCHandle.Alloc(UnmanagedParams, GCHandleType.Pinned);
191 193
192 // Set default values for physics parameters plus any overrides from the ini file 194 // Set default values for physics parameters plus any overrides from the ini file
193 GetInitialParameterValues(config); 195 GetInitialParameterValues(config);
194 196
195 // allocate more pinned memory close to the above in an attempt to get the memory all together 197 // For the moment, only one version of the interface
198 PE = new BSAPIUnman();
199
200 // Allocate more pinned memory. Do this early to try and get all pinned memory close together.
201 m_paramsHandle = GCHandle.Alloc(UnmanagedParams, GCHandleType.Pinned);
196 m_collisionArray = new CollisionDesc[m_maxCollisionsPerFrame]; 202 m_collisionArray = new CollisionDesc[m_maxCollisionsPerFrame];
197 m_collisionArrayPinnedHandle = GCHandle.Alloc(m_collisionArray, GCHandleType.Pinned); 203 m_collisionArrayPinnedHandle = GCHandle.Alloc(m_collisionArray, GCHandleType.Pinned);
198 m_updateArray = new EntityProperties[m_maxUpdatesPerFrame]; 204 m_updateArray = new EntityProperties[m_maxUpdatesPerFrame];