C Specification
The xrCreateSpatialUpdateSnapshotEXT function is defined as:
// Provided by XR_EXT_spatial_entity
XrResult xrCreateSpatialUpdateSnapshotEXT(
XrSpatialContextEXT spatialContext,
const XrSpatialUpdateSnapshotCreateInfoEXT* createInfo,
XrSpatialSnapshotEXT* snapshot);
Parameters
Description
The application can use xrCreateSpatialUpdateSnapshotEXT to create a snapshot and get the latest component data for specific entities as known by the runtime. Applications can provide the XrSpatialEntityEXT handles and the component types they are interested in when creating the snapshot.
The application can use
XrSpatialUpdateSnapshotCreateInfoEXT::componentTypes to filter
the list of components whose data must be included in the snapshot.
If the application provides a valid list of spatial component types in
XrSpatialUpdateSnapshotCreateInfoEXT::componentTypes, then the
runtime must only include spatial entities in the snapshot that have at
least one of the components provided in
XrSpatialUpdateSnapshotCreateInfoEXT::componentTypes.
Also, the runtime must only include data for those components in the
snapshot.
The runtime must return XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT if
any of the XrSpatialComponentTypeEXT in
XrSpatialUpdateSnapshotCreateInfoEXT::componentTypes are not
enabled for the spatial capabilities passed to
XrSpatialContextCreateInfoEXT::capabilityConfigs when creating
spatialContext.
If the application does not provide a list of spatial component types in
XrSpatialUpdateSnapshotCreateInfoEXT::componentTypes, the
runtime must include all the spatial entities listed in
XrSpatialUpdateSnapshotCreateInfoEXT::entities in the snapshot
and it must include the data for all the enabled components of the
capabilities configured for spatialContext.
The application can create any number of snapshots it wants but must be mindful of the memory being allocated for each new snapshot and must destroy the snapshots once it no longer needs them.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.