diff options
| author | Anton Novoselov <[email protected]> | 2017-08-01 12:53:38 +0300 |
|---|---|---|
| committer | Anton Novoselov <[email protected]> | 2017-08-01 12:53:38 +0300 |
| commit | 236f03c0b9a4982328ed1201978f7f69d192d9b2 (patch) | |
| tree | e486f2fa39dba203563895541e92c60ed3e25759 /docs/_source/ext_pxserialization.txt | |
| parent | Added screens to welcome page (diff) | |
| download | blast-236f03c0b9a4982328ed1201978f7f69d192d9b2.tar.xz blast-236f03c0b9a4982328ed1201978f7f69d192d9b2.zip | |
Blast 1.1 release (windows / linux)
see docs/release_notes.txt for details
Diffstat (limited to 'docs/_source/ext_pxserialization.txt')
| -rw-r--r-- | docs/_source/ext_pxserialization.txt | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/_source/ext_pxserialization.txt b/docs/_source/ext_pxserialization.txt new file mode 100644 index 0000000..21761fb --- /dev/null +++ b/docs/_source/ext_pxserialization.txt @@ -0,0 +1,48 @@ +/*! \page pageextpxserialization ExtPhysX Serialization (NvBlastExtPxSerialization) + +This extension contains serializers which can be loaded into the ExtSerialization manager defined in \ref pageextserialization. + +To use this extension, you must also load the ExtSerialization extension and create a serialization manager as described in \ref pageextserialization. + +We repeat this here (again, assuming we're in the Nv::Blast namespace): + +\code +ExtSerialization* ser = NvBlastExtSerializationCreate(); +\endcode + +Then, call the function NvBlastExtPxSerializerLoadSet, declared in <b>NvBlastExtPxSerialization.h</b>, passing in your TkFramework (required by ExtPhysX), along with +your physx::PxPhysics and physx::PxCooking pointers: + +\code +TkFramework* framework = ... // We must have created a TkFramework +physx::PxPhysics* physics = ... // and PxPhysics +physx::PxCooking* cooking = ... // and PxCooking + +NvBlastExtPxSerializerLoadSet(*framework, *physics, *cooking *ser); +\endcode + +Now your serialization manager will have the serializers provided by this extension. Currently only ExtPxAsset serializers exist, with object type ID +given by + +<br> +<b>ExtPxObjectTypeID::Asset</b> +<br> + +As with low-level assets, you can serialize using the serialization manager directly: + +\code +const ExtPxAsset* asset = ... // Given pointer to an Nv::Blast::ExtPxAsset + +void* buffer; +uint64_t size = ser->serializeIntoBuffer(buffer, asset, ExtPxObjectTypeID::Asset); +\endcode + +or use the wrapper function defined in <b>NvBlastExtPxSerialization.h</b>: + +/code +void* buffer; +uint64_t size = NvBlastExtSerializationSerializeExtPxAssetIntoBuffer(buffer, *ser, asset); +/endcode + +<br> +*/ |