mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #998 from rextimmy/physx3_cpu_dispatcher_fix
Fixed issue where physx3 cpu dispatcher was created multiple times
This commit is contained in:
commit
e9308e40ed
1 changed files with 18 additions and 15 deletions
|
|
@ -215,7 +215,10 @@ bool Px3World::initWorld( bool isServer, ProcessList *processList )
|
||||||
sceneDesc.userData = this;
|
sceneDesc.userData = this;
|
||||||
if(!sceneDesc.cpuDispatcher)
|
if(!sceneDesc.cpuDispatcher)
|
||||||
{
|
{
|
||||||
|
//Create shared cpu dispatcher
|
||||||
|
if(!smCpuDispatcher)
|
||||||
smCpuDispatcher = physx::PxDefaultCpuDispatcherCreate(PHYSICSMGR->getThreadCount());
|
smCpuDispatcher = physx::PxDefaultCpuDispatcherCreate(PHYSICSMGR->getThreadCount());
|
||||||
|
|
||||||
sceneDesc.cpuDispatcher = smCpuDispatcher;
|
sceneDesc.cpuDispatcher = smCpuDispatcher;
|
||||||
Con::printf("PhysX3 using Cpu: %d workers", smCpuDispatcher->getWorkerCount());
|
Con::printf("PhysX3 using Cpu: %d workers", smCpuDispatcher->getWorkerCount());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue