Multithreading in BulletPhysics / BulletSharp?

1.6k views Asked by At

Could BulletSharp (or BulletPhysics itself, if you don't know about BulletSharp) work in multithreading mode? If so, where could I find appropriate settings? (like on/off multithreading, numOfThreads, ...)

note: BulletSharp is C# wrapper for BulletPhysics.

PS: I know, there is question, but: - there are no comprehensive answer - much water has flown under the bridge since that time - in present-day BulletSharp / BulletPhysics versions I could not find mentioned classes.

Thank you for any information

1

There are 1 answers

0
Andres Traks On BEST ANSWER

Yes, multithreading in Bullet was recently revived. BulletSharp P/Invoke 0.10 added multithreading and the demo shows how to set it up.

Use CollisionDispatcherMultiThreaded, ConstraintSolverPoolMultiThreaded, DiscreteDynamicsWorldMultiThreaded in place of the single threaded classes and set up some available scheduler (OpenMP, PPL or TBB) at Threads.TaskScheduler.

Multithreading will be added to BulletSharp C++/CLI soon if that is what you are using.

Work on the GPU pipeline in Bullet 3 seems to have stopped, so there are currently no plans to support version 3 in BulletSharp.