PxCreateFoundation

Defined in include/foundation/PxFoundation.h

physx::PxFoundation *PxCreateFoundation(physx::PxU32 version, physx::PxAllocatorCallback &allocator, physx::PxErrorCallback &errorCallback)

Creates an instance of the foundation class.

The foundation class is needed to initialize higher level SDKs. There may be only one instance per process. Calling this method after an instance has been created already will result in an error message and NULL will be returned.

See also

PxFoundation

Parameters
  • version – Version number we are expecting (should be PX_PHYSICS_VERSION)

  • allocator – User supplied interface for allocating memory(see PxAllocatorCallback)

  • errorCallback – User supplied interface for reporting errors and displaying messages(see PxErrorCallback)

Returns

Foundation instance on success, NULL if operation failed