Non-SPU multithreaded collision detection
Posted: Thu May 24, 2012 1:28 pm
Has anyone any experiences/code to share in hacking Bullet to do multithreaded collision detection? I remember reading somewhere that at least one group of people had hacked their own dispatcher together.
(The SPU code gives quite different results to the normal dispatcher particularly when dealing with compounds - GJK seems to be used over box-box, for example.)
Currently naively hacking at btOverlappingPairCache.cpp to make it run the callbacks via a pool of pthreads, but quickly finding that this is not a straightforward exercise not least due to the thread unsafeness of Bullet's memory allocator functions.
Anyone have any tips? We're using 2.79 as a base for our engine. I hear 3.x will have a new threading implementation, but we'd like to hack something simple together for 2.x if possible.
Thanks
Alex
(The SPU code gives quite different results to the normal dispatcher particularly when dealing with compounds - GJK seems to be used over box-box, for example.)
Currently naively hacking at btOverlappingPairCache.cpp to make it run the callbacks via a pool of pthreads, but quickly finding that this is not a straightforward exercise not least due to the thread unsafeness of Bullet's memory allocator functions.
Anyone have any tips? We're using 2.79 as a base for our engine. I hear 3.x will have a new threading implementation, but we'd like to hack something simple together for 2.x if possible.
Thanks
Alex