aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-11-20 11:35:52 -0600
committerSheikh Dawood Abdul Ajees <[email protected]>2017-11-20 11:35:52 -0600
commit3cc1861221d761b7f0301b9b61de4e1aa18c09f4 (patch)
treea51eb808016e1710a4bbd537000a493250602944 /PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp
parentPhysX 3.4.1, APEX 1.4.1 Release @22845541 (diff)
downloadphysx-3.4-3cc1861221d761b7f0301b9b61de4e1aa18c09f4.tar.xz
physx-3.4-3cc1861221d761b7f0301b9b61de4e1aa18c09f4.zip
PhysX 3.4.1, APEX 1.4.1 Release @23131702
Diffstat (limited to 'PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp')
-rw-r--r--PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp b/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp
index 88d0d516..0ed04ce4 100644
--- a/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp
+++ b/PhysX_3.4/Source/PhysX/src/gpu/PxPhysXGpuModuleLoader.cpp
@@ -35,9 +35,12 @@
#include "PxGpu.h"
#include "cudamanager/PxCudaContextManager.h"
-#if PX_WINDOWS
-#include "../../../Common/src/CmPhysXCommon.h"
-#endif
+
+namespace physx
+{
+ // alias shared foundation to something usable
+ namespace Ps = shdfnd;
+}
#define STRINGIFY(x) #x
#define GETSTRING(x) STRINGIFY(x)
@@ -165,6 +168,12 @@ namespace physx
*reinterpret_cast<void**>(&g_PxCreateCudaContextManager_Func) = dlsym(s_library, "PxCreateCudaContextManager");
*reinterpret_cast<void**>(&g_PxGetSuggestedCudaDeviceOrdinal_Func) = dlsym(s_library, "PxGetSuggestedCudaDeviceOrdinal");
}
+
+ // Check for errors
+ if (s_library == NULL)
+ Ps::getFoundation().error(PxErrorCode::eINTERNAL_ERROR, __FILE__, __LINE__, "Failed to load PhysXGpu so!");
+ if (g_PxCreatePhysXGpu_Func == NULL || g_PxCreateCudaContextManager_Func == NULL || g_PxGetSuggestedCudaDeviceOrdinal_Func == NULL)
+ Ps::getFoundation().error(PxErrorCode::eINTERNAL_ERROR, __FILE__, __LINE__, "PhysXGpu so is incompatible with this version of PhysX!");
}
#endif // PX_LINUX