Defined in include/cooking/PxCooking.h

physx::PxCooking *PxCreateCooking(physx::PxU32 version, physx::PxFoundation &foundation, const physx::PxCookingParams &params)

Create an instance of the cooking interface.

Note that the foundation object is handled as an application-wide singleton in statically linked executables and a DLL-wide singleton in dynamically linked executables. Therefore, if you are using the runtime SDK in the same executable as cooking, you should pass the Physics’s copy of foundation (acquired with PxPhysics::getFoundation()) to the cooker. This will also ensure correct handling of memory for objects passed from the cooker to the SDK.

To use cooking in standalone mode, create an instance of the Foundation object with PxCreateFoundation. You should pass the same foundation object to all instances of the cooking interface.


  • version[in] The SDK version number

  • foundation[in] The foundation object associated with this instance of the cooking interface.

  • params[in] The parameters for this instance of the cooking interface


true on success.