diff options
author | teravus | 2013-08-20 21:09:17 -0500 |
---|---|---|
committer | teravus | 2013-08-20 21:09:17 -0500 |
commit | a6af561660759ef7625d88213b7d43b76e687280 (patch) | |
tree | 0b34e5e2f49888b45a6c8efa4fde40b44971acc2 /OpenSim | |
parent | Fix build break from last commit a3e1b27 on mono 2.4.3 (diff) | |
download | opensim-SC-a6af561660759ef7625d88213b7d43b76e687280.zip opensim-SC-a6af561660759ef7625d88213b7d43b76e687280.tar.gz opensim-SC-a6af561660759ef7625d88213b7d43b76e687280.tar.bz2 opensim-SC-a6af561660759ef7625d88213b7d43b76e687280.tar.xz |
* Fix some threading issues in BulletXNA (the managed bullet library), this should better allow you to run it in multiple region scenarios (but why would you really want to do that?) Source in OpenSimLibs.
* Fixed a null ref during shutdown.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 5 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs | 46 |
2 files changed, 48 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index eb3af42..c9ff4f3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4089,7 +4089,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4089 | // For now, we use the NINJA naming scheme for identifying joints. | 4089 | // For now, we use the NINJA naming scheme for identifying joints. |
4090 | // In the future, we can support other joint specification schemes such as a | 4090 | // In the future, we can support other joint specification schemes such as a |
4091 | // custom checkbox in the viewer GUI. | 4091 | // custom checkbox in the viewer GUI. |
4092 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4092 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4093 | { | 4093 | { |
4094 | return IsHingeJoint() || IsBallJoint(); | 4094 | return IsHingeJoint() || IsBallJoint(); |
4095 | } | 4095 | } |
@@ -4413,7 +4413,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4413 | public void RemoveFromPhysics() | 4413 | public void RemoveFromPhysics() |
4414 | { | 4414 | { |
4415 | ParentGroup.Scene.EventManager.TriggerObjectRemovedFromPhysicalScene(this); | 4415 | ParentGroup.Scene.EventManager.TriggerObjectRemovedFromPhysicalScene(this); |
4416 | ParentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); | 4416 | if (ParentGroup.Scene.PhysicsScene != null) |
4417 | ParentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); | ||
4417 | PhysActor = null; | 4418 | PhysActor = null; |
4418 | } | 4419 | } |
4419 | 4420 | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs index 6db5f5e..2a820be 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs | |||
@@ -1221,6 +1221,50 @@ private sealed class BulletConstraintXNA : BulletConstraint | |||
1221 | //BSParam.TerrainImplementation = 0; | 1221 | //BSParam.TerrainImplementation = 0; |
1222 | world.SetGravity(new IndexedVector3(0,0,p.gravity)); | 1222 | world.SetGravity(new IndexedVector3(0,0,p.gravity)); |
1223 | 1223 | ||
1224 | // Turn off Pooling since globals and pooling are bad for threading. | ||
1225 | BulletGlobals.VoronoiSimplexSolverPool.SetPoolingEnabled(false); | ||
1226 | BulletGlobals.SubSimplexConvexCastPool.SetPoolingEnabled(false); | ||
1227 | BulletGlobals.ManifoldPointPool.SetPoolingEnabled(false); | ||
1228 | BulletGlobals.CastResultPool.SetPoolingEnabled(false); | ||
1229 | BulletGlobals.SphereShapePool.SetPoolingEnabled(false); | ||
1230 | BulletGlobals.DbvtNodePool.SetPoolingEnabled(false); | ||
1231 | BulletGlobals.SingleRayCallbackPool.SetPoolingEnabled(false); | ||
1232 | BulletGlobals.SubSimplexClosestResultPool.SetPoolingEnabled(false); | ||
1233 | BulletGlobals.GjkPairDetectorPool.SetPoolingEnabled(false); | ||
1234 | BulletGlobals.DbvtTreeColliderPool.SetPoolingEnabled(false); | ||
1235 | BulletGlobals.SingleSweepCallbackPool.SetPoolingEnabled(false); | ||
1236 | BulletGlobals.BroadphaseRayTesterPool.SetPoolingEnabled(false); | ||
1237 | BulletGlobals.ClosestNotMeConvexResultCallbackPool.SetPoolingEnabled(false); | ||
1238 | BulletGlobals.GjkEpaPenetrationDepthSolverPool.SetPoolingEnabled(false); | ||
1239 | BulletGlobals.ContinuousConvexCollisionPool.SetPoolingEnabled(false); | ||
1240 | BulletGlobals.DbvtStackDataBlockPool.SetPoolingEnabled(false); | ||
1241 | |||
1242 | BulletGlobals.BoxBoxCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1243 | BulletGlobals.CompoundCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1244 | BulletGlobals.ConvexConcaveCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1245 | BulletGlobals.ConvexConvexAlgorithmPool.SetPoolingEnabled(false); | ||
1246 | BulletGlobals.ConvexPlaneAlgorithmPool.SetPoolingEnabled(false); | ||
1247 | BulletGlobals.SphereBoxCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1248 | BulletGlobals.SphereSphereCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1249 | BulletGlobals.SphereTriangleCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1250 | BulletGlobals.GImpactCollisionAlgorithmPool.SetPoolingEnabled(false); | ||
1251 | BulletGlobals.GjkEpaSolver2MinkowskiDiffPool.SetPoolingEnabled(false); | ||
1252 | BulletGlobals.PersistentManifoldPool.SetPoolingEnabled(false); | ||
1253 | BulletGlobals.ManifoldResultPool.SetPoolingEnabled(false); | ||
1254 | BulletGlobals.GJKPool.SetPoolingEnabled(false); | ||
1255 | BulletGlobals.GIM_ShapeRetrieverPool.SetPoolingEnabled(false); | ||
1256 | BulletGlobals.TriangleShapePool.SetPoolingEnabled(false); | ||
1257 | BulletGlobals.SphereTriangleDetectorPool.SetPoolingEnabled(false); | ||
1258 | BulletGlobals.CompoundLeafCallbackPool.SetPoolingEnabled(false); | ||
1259 | BulletGlobals.GjkConvexCastPool.SetPoolingEnabled(false); | ||
1260 | BulletGlobals.LocalTriangleSphereCastCallbackPool.SetPoolingEnabled(false); | ||
1261 | BulletGlobals.BridgeTriangleRaycastCallbackPool.SetPoolingEnabled(false); | ||
1262 | BulletGlobals.BridgeTriangleConcaveRaycastCallbackPool.SetPoolingEnabled(false); | ||
1263 | BulletGlobals.BridgeTriangleConvexcastCallbackPool.SetPoolingEnabled(false); | ||
1264 | BulletGlobals.MyNodeOverlapCallbackPool.SetPoolingEnabled(false); | ||
1265 | BulletGlobals.ClosestRayResultCallbackPool.SetPoolingEnabled(false); | ||
1266 | BulletGlobals.DebugDrawcallbackPool.SetPoolingEnabled(false); | ||
1267 | |||
1224 | return world; | 1268 | return world; |
1225 | } | 1269 | } |
1226 | //m_constraint.ptr, ConstraintParams.BT_CONSTRAINT_STOP_CFM, cfm, ConstraintParamAxis.AXIS_ALL | 1270 | //m_constraint.ptr, ConstraintParams.BT_CONSTRAINT_STOP_CFM, cfm, ConstraintParamAxis.AXIS_ALL |
@@ -1914,7 +1958,7 @@ private sealed class BulletConstraintXNA : BulletConstraint | |||
1914 | heightMap, scaleFactor, | 1958 | heightMap, scaleFactor, |
1915 | minHeight, maxHeight, upAxis, | 1959 | minHeight, maxHeight, upAxis, |
1916 | false); | 1960 | false); |
1917 | terrainShape.SetMargin(collisionMargin + 0.5f); | 1961 | terrainShape.SetMargin(collisionMargin); |
1918 | terrainShape.SetUseDiamondSubdivision(true); | 1962 | terrainShape.SetUseDiamondSubdivision(true); |
1919 | terrainShape.SetUserPointer(id); | 1963 | terrainShape.SetUserPointer(id); |
1920 | return new BulletShapeXNA(terrainShape, BSPhysicsShapeType.SHAPE_TERRAIN); | 1964 | return new BulletShapeXNA(terrainShape, BSPhysicsShapeType.SHAPE_TERRAIN); |