From d61c455a4775f966b44cc47804b9e0f160d3d332 Mon Sep 17 00:00:00 2001 From: bgaldrikian Date: Tue, 10 Nov 2020 20:53:31 -0800 Subject: Merge request #17 PhysX4 compatibility Other changes for linux and UE4CrossCompileLinux, and all packaging to work --- samples/SampleBase/physx/PhysXController.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'samples/SampleBase/physx/PhysXController.cpp') diff --git a/samples/SampleBase/physx/PhysXController.cpp b/samples/SampleBase/physx/PhysXController.cpp index cc9ade0..1f91d1d 100755 --- a/samples/SampleBase/physx/PhysXController.cpp +++ b/samples/SampleBase/physx/PhysXController.cpp @@ -52,7 +52,6 @@ #include "PxRigidDynamic.h" #include "PxRigidStatic.h" #include "PxMaterial.h" -#include "PxFoundationVersion.h" #include "PxMath.h" #include @@ -110,7 +109,7 @@ void PhysXController::onTerminate() void PhysXController::initPhysX() { - m_foundation = PxCreateFoundation(PX_FOUNDATION_VERSION, NvBlastGetPxAllocatorCallback(), NvBlastGetPxErrorCallback()); + m_foundation = PxCreateFoundation(PX_PHYSICS_VERSION, NvBlastGetPxAllocatorCallback(), NvBlastGetPxErrorCallback()); m_pvd = PxCreatePvd(*m_foundation); @@ -139,11 +138,11 @@ void PhysXController::initPhysX() sceneDesc.gravity = PxVec3(0.0f, -9.81f, 0.0f); m_dispatcher = PxDefaultCpuDispatcherCreate(4); sceneDesc.cpuDispatcher = m_dispatcher; - sceneDesc.gpuDispatcher = m_cudaContext != NULL ? m_cudaContext->getGpuDispatcher() : NULL; + sceneDesc.cudaContextManager = m_cudaContext; sceneDesc.filterShader = m_filterShader; sceneDesc.flags |= PxSceneFlag::eENABLE_STABILIZATION; sceneDesc.flags |= PxSceneFlag::eENABLE_PCM; - if (sceneDesc.gpuDispatcher == nullptr) + if (sceneDesc.cudaContextManager == nullptr) { m_gpuPhysicsAvailable = false; m_useGPUPhysics = false; -- cgit v1.2.3