From d1c812f1162e5fdb13c215792725b2591d7428f5 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Fri, 15 Sep 2017 15:41:57 -0500 Subject: PhysX 3.4.1, APEX 1.4.1 Release @22845541 --- PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp') diff --git a/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp b/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp index fe44e8bf..88d0d516 100644 --- a/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp +++ b/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp @@ -35,6 +35,9 @@ #include "PxGpu.h" #include "cudamanager/PxCudaContextManager.h" +#if PX_WINDOWS +#include "../../../Common/src/CmPhysXCommon.h" +#endif #define STRINGIFY(x) #x #define GETSTRING(x) STRINGIFY(x) @@ -130,6 +133,12 @@ namespace physx g_PxCreateCudaContextManager_Func = (PxCreateCudaContextManager_FUNC*)GetProcAddress(s_library, "PxCreateCudaContextManager"); g_PxGetSuggestedCudaDeviceOrdinal_Func = (PxGetSuggestedCudaDeviceOrdinal_FUNC*)GetProcAddress(s_library, "PxGetSuggestedCudaDeviceOrdinal"); } + + // Check for errors + if (s_library == NULL) + Ps::getFoundation().error(PxErrorCode::eINTERNAL_ERROR, __FILE__, __LINE__, "Failed to load PhysXGpu dll!"); + if (g_PxCreatePhysXGpu_Func == NULL || g_PxCreateCudaContextManager_Func == NULL || g_PxGetSuggestedCudaDeviceOrdinal_Func == NULL) + Ps::getFoundation().error(PxErrorCode::eINTERNAL_ERROR, __FILE__, __LINE__, "PhysXGpu dll is incompatible with this version of PhysX!"); } #elif PX_LINUX -- cgit v1.2.3