Migrating From PhysX SDK 5.6 to 5.7#

  • This guide highlights all significant parts of the API that have changed in the last release. An application with a working integration of the older version of PhysX should be able to easily migrate to the newer version by following these pointers.

Generic#

  • The signature for PxArray::pushBack() and PxArray::insert() has changed. They now return a pointer to the new entry instead of a reference, and that pointer can be null when running out-of-memory. Existing code that used the returned value must be updated accordingly.

  • PxBitMapBase now uses the same allocator inheritance pattern as PxArray. As a consequence it is not possible to construct it directly using PX_NEW.

  • PxArray and PxBitMapBase methods that might result in allocation now return bool values to indicate success or failure in case of out-of-memory conditions:

    • PxArray::resize()

    • PxArray::resizeUninitialized()

    • PxArray::shrink()

    • PxArray::reserve()

    • PxArray::assign()

    • PxArray::grow()

    • PxArray::recreate()

    • PxBitMapBase::growAndSet()

    • PxBitMapBase::growAndReset()

    • PxBitMapBase::resizeAndClear()

    • PxBitMapBase::copy()

    • PxBitMapBase::combineInPlace()

    • PxBitMapBase::combine()

  • A new flag PxSceneFlag::eDISABLE_SLEEPING was added. When set, this flag disables all sleeping logic for the scene, treating all objects as awake.

  • PxSceneFlag::eDISABLE_SLEEPING must be raised when using PxSceneFlag::eENABLE_DIRECT_GPU_API. If not set, it will be automatically enabled with a warning.

Vehicles#

With the removal of the old deprecated vehicle API, the vehicle library and the API header folder have been renamed now. The following adjustments will be necessary:

  • The include paths for public vehicle header files have to be changed from vehicle2/… to vehicle/….

  • The vehicle library to link to has changed its name from PhysXVehicle2… to PhysXVehicle…

  • All usage of the namespace vehicle2 has to be removed as this namespace does not exist any longer.