Continue Jolt integration
This commit is contained in:
committed by
Jérôme Leclercq
parent
21e08798ce
commit
021801f02e
@@ -40,14 +40,18 @@ namespace Nz
|
||||
JPH::Factory::sInstance = new JPH::Factory;
|
||||
JPH::RegisterTypes();
|
||||
|
||||
m_threadPool = std::make_unique<JPH::JobSystemThreadPool>(JPH::cMaxPhysicsJobs, JPH::cMaxPhysicsBarriers, /* Core::Instance()->GetHardwareInfo().GetCpuThreadCount()*/0);
|
||||
int threadCount = -1; //< system CPU core count
|
||||
#ifdef NAZARA_PLATFORM_WEB
|
||||
threadCount = 0; // no thread on web for now
|
||||
#endif
|
||||
|
||||
m_threadPool = std::make_unique<JPH::JobSystemThreadPool>(JPH::cMaxPhysicsJobs, JPH::cMaxPhysicsBarriers, threadCount);
|
||||
}
|
||||
|
||||
JoltPhysics3D::~JoltPhysics3D()
|
||||
{
|
||||
m_threadPool.reset();
|
||||
// FIXME: Uncomment when next version of Jolt gets released
|
||||
//JPH::UnregisterTypes();
|
||||
JPH::UnregisterTypes();
|
||||
|
||||
delete JPH::Factory::sInstance;
|
||||
JPH::Factory::sInstance = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user