| 97 | extern PxCreatePhysXGpu_FUNC* g_PxCreatePhysXGpu_Func; |
| 98 | |
| 99 | PxPhysXGpu* PxvGetPhysXGpu(bool createIfNeeded) |
| 100 | { |
| 101 | if (!gPxPhysXGpu && createIfNeeded) |
| 102 | { |
| 103 | #ifdef PX_PHYSX_GPU_STATIC |
| 104 | gPxPhysXGpu = PxCreatePhysXGpu(); |
| 105 | #else |
| 106 | PxLoadPhysxGPUModule(NULL); |
| 107 | if (g_PxCreatePhysXGpu_Func) |
| 108 | { |
| 109 | gPxPhysXGpu = g_PxCreatePhysXGpu_Func(); |
| 110 | } |
| 111 | #endif |
| 112 | } |
| 113 | |
| 114 | return gPxPhysXGpu; |
| 115 | } |
| 116 | } |
| 117 | #endif |
no test coverage detected