Name String
XR_ANDROID_device_anchor_persistence
Extension Type
Instance extension
Registered Extension Number
458
Revision
1
Extension and Version Dependencies
XR_EXT_uuid and XR_ANDROID_trackables
Last Modified Date
2024-10-10
IP Status
No known IP claims.
Contributors
Nihav Jain, Google
Levana Chen, Google
Spencer Quin, Google
Kenny Vercaemer, Google
Overview
This extension allows the application to persist, retrieve, and unpersist anchors on the current device for the current user, across applications and device sessions.
Inspect system capability
The XrSystemDeviceAnchorPersistencePropertiesANDROID structure is defined as:
typedef struct XrSystemDeviceAnchorPersistencePropertiesANDROID {
XrStructureType type;
void* next;
XrBool32 supportsAnchorPersistence;
} XrSystemDeviceAnchorPersistencePropertiesANDROID;
Member Descriptions
typeis the XrStructureType of this structure.nextisNULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.supportsAnchorPersistenceis anXrBool32indicating if the current system supports anchor persistence for spatial anchors.
An application can inspect whether the system is capable of persisting spatial anchors (see xrCreateAnchorSpaceANDROID) by extending the XrSystemProperties with XrSystemDeviceAnchorPersistencePropertiesANDROID structure when calling xrGetSystemProperties. For the supported trackable anchors, an application can use xrEnumerateSupportedPersistenceAnchorTypesANDROID to query the supported types.
If XR_FALSE is returned for supportsAnchorPersistence, then
XR_ERROR_FEATURE_UNSUPPORTED will be returned from device anchor
persistence functions that operate on a spatial anchor.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to using XrSystemDeviceAnchorPersistencePropertiesANDROID typemust beXR_TYPE_SYSTEM_DEVICE_ANCHOR_PERSISTENCE_PROPERTIES_ANDROIDnextmust beNULLor a valid pointer to the next structure in a structure chain
The xrEnumerateSupportedPersistenceAnchorTypesANDROID function is defined as:
XrResult xrEnumerateSupportedPersistenceAnchorTypesANDROID(
XrInstance instance,
XrSystemId systemId,
uint32_t trackableTypeCapacityInput,
uint32_t* trackableTypeCountOutput,
XrTrackableTypeANDROID* trackableTypes);
Parameter Descriptions
sessionis the XrSession that creates the XrDeviceAnchorPersistenceANDROID.trackableTypeCapacityInputis the capacity of thetrackableTypes, or 0 to retrieve the required capacity.trackableTypeCountOutputis a pointer to the count of the array, or a pointer to the required capacity in the case thattrackableTypeCapacityInputis insufficient.trackableTypesis a pointer to an array of XrTrackableTypeANDROID, but can beNULLiftrackableTypeCapacityInputis0.- See the Buffer Size Parameters section for a detailed
description of retrieving the required
trackableTypessize.
The application can use xrEnumerateSupportedPersistenceAnchorTypesANDROID to check for support of anchor persistence on other XrTrackableTypeANDROID trackables.
If a given
XrTrackableTypeANDROID is not returned in the trackableTypes array, then
XR_ERROR_FEATURE_UNSUPPORTED will be returned from device anchor
persistence functions that operate on an anchor of that type.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrEnumerateSupportedPersistenceAnchorTypesANDROID instancemust be a valid XrInstance handletrackableTypeCountOutputmust be a pointer to auint32_tvalue- If
trackableTypeCapacityInputis not0, trackableTypesmust be a pointer to an array oftrackableTypeCapacityInputXrTrackableTypeANDROID values
Return Codes
XR_SUCCESS
XR_ERROR_SYSTEM_INVALIDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SIZE_INSUFFICIENTXR_ERROR_FUNCTION_UNSUPPORTED
Create a device anchor persistence handle
An XrDeviceAnchorPersistenceANDROID is a handle that represents the resources required to persist and keep track of persisted anchors.
XR_DEFINE_HANDLE(XrDeviceAnchorPersistenceANDROID)
The xrCreateDeviceAnchorPersistenceANDROID function is defined as:
XrResult xrCreateDeviceAnchorPersistenceANDROID(
XrSession session,
const XrDeviceAnchorPersistenceCreateInfoANDROID* createInfo,
XrDeviceAnchorPersistenceANDROID* outHandle);
Parameter Descriptions
sessionis the XrSession that creates the XrDeviceAnchorPersistenceANDROID.createInfois the XrDeviceAnchorPersistenceCreateInfoANDROID containing parameters for the XrDeviceAnchorPersistenceANDROID.outHandleis a pointer to a handle in which the created XrDeviceAnchorPersistenceANDROID is returned.
An application can create an XrDeviceAnchorPersistenceANDROID handle by calling xrCreateDeviceAnchorPersistenceANDROID. The XrDeviceAnchorPersistenceANDROID can be used in subsequent API calls to persist or unpersist anchors. The XrDeviceAnchorPersistenceANDROID handle must be eventually freed using the xrDestroyDeviceAnchorPersistenceANDROID function.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrCreateDeviceAnchorPersistenceANDROID sessionmust be a valid XrSession handlecreateInfomust be a pointer to a valid XrDeviceAnchorPersistenceCreateInfoANDROID structureoutHandlemust be a pointer to an XrDeviceAnchorPersistenceANDROID handle
Return Codes
XR_SUCCESSXR_SESSION_LOSS_PENDING
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SESSION_LOSTXR_ERROR_OUT_OF_MEMORYXR_ERROR_LIMIT_REACHED
The XrDeviceAnchorPersistenceCreateInfoANDROID structure is defined as:
typedef struct XrDeviceAnchorPersistenceCreateInfoANDROID {
XrStructureType type;
void* next;
} XrDeviceAnchorPersistenceCreateInfoANDROID;
Member Descriptions
typeis the XrStructureType of this structure.nextisNULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
The XrDeviceAnchorPersistenceCreateInfoANDROID structure provides creation options for the XrDeviceAnchorPersistenceANDROID when passed to xrCreateDeviceAnchorPersistenceANDROID.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to using XrDeviceAnchorPersistenceCreateInfoANDROID typemust beXR_TYPE_DEVICE_ANCHOR_PERSISTENCE_CREATE_INFO_ANDROIDnextmust beNULLor a valid pointer to the next structure in a structure chain
The xrDestroyDeviceAnchorPersistenceANDROID function is defined as:
XrResult xrDestroyDeviceAnchorPersistenceANDROID(
XrDeviceAnchorPersistenceANDROID handle);
Parameter Descriptions
handleis an XrDeviceAnchorPersistenceANDROID handle previously created byxrCreateDeviceAnchorPersistenceANDROID.
The xrDestroyDeviceAnchorPersistenceANDROID function destroys the device anchor persistence handle.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrDestroyDeviceAnchorPersistenceANDROID handlemust be a valid XrDeviceAnchorPersistenceANDROID handle
Thread Safety
- Access to
handle, and any child handles, must be externally synchronized
Return Codes
XR_SUCCESS
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_HANDLE_INVALID
Persist an anchor
The xrPersistAnchorANDROID function is defined as:
XrResult xrPersistAnchorANDROID(
XrDeviceAnchorPersistenceANDROID handle,
const XrPersistedAnchorSpaceInfoANDROID* persistedInfo,
XrUuidEXT* anchorIdOutput);
Parameter Descriptions
handleis the XrDeviceAnchorPersistenceANDROID.persistedInfois the XrPersistedAnchorSpaceInfoANDROID containing parameters for the anchor persistence.anchorIdOutputis a pointer to an XrUuidEXT in which the UUID of the persisted anchor is returned.
The application can request anchors to be persisted by calling xrPersistAnchorANDROID. The application must not assume a success return value means the anchor is immediately persisted. The application should use xrGetAnchorPersistStateANDROID to check the persist state of the anchor using the returned anchor XrUuidEXT. The application can use xrUnpersistAnchorANDROID to unpersist the anchor.
XR_ERROR_ANCHOR_NOT_TRACKING_ANDROIDwill be returned if the anchor is not being tracked at the time of the call.XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROIDwill be returned if the persisted data is not ready.XR_SUCCESSwill be returned once the anchor has been queued for persistence.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrPersistAnchorANDROID handlemust be a valid XrDeviceAnchorPersistenceANDROID handlepersistedInfomust be a pointer to a valid XrPersistedAnchorSpaceInfoANDROID structureanchorIdOutputmust be a pointer to an XrUuidEXT structure
Return Codes
XR_SUCCESSXR_SESSION_LOSS_PENDING
XR_ERROR_ANCHOR_NOT_TRACKING_ANDROIDXR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SESSION_LOSTXR_ERROR_OUT_OF_MEMORYXR_ERROR_LIMIT_REACHED
The XrPersistedAnchorSpaceInfoANDROID structure is defined as:
typedef struct XrPersistedAnchorSpaceInfoANDROID {
XrStructureType type;
void* next;
XrSpace anchor;
} XrPersistedAnchorSpaceInfoANDROID;
Member Descriptions
typeis the XrStructureType of this structure.nextisNULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.anchoris an anchor XrSpace previously created by xrCreateAnchorSpaceANDROID to persist.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to using XrPersistedAnchorSpaceInfoANDROID typemust beXR_TYPE_PERSISTED_ANCHOR_SPACE_INFO_ANDROIDnextmust beNULLor a valid pointer to the next structure in a structure chainanchormust be a valid XrSpace handle
The xrGetAnchorPersistStateANDROID function is defined as:
XrResult xrGetAnchorPersistStateANDROID(
XrDeviceAnchorPersistenceANDROID handle,
const XrUuidEXT* anchorId,
XrAnchorPersistStateANDROID* persistState);
Parameter Descriptions
handleis the XrDeviceAnchorPersistenceANDROID.anchorIdis the XrUuidEXT of the anchor.persistStateis a pointer to an XrAnchorPersistStateANDROID in which the state of the anchor is returned.XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROIDwill be returned if the anchor XrUuidEXT is not found.XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROIDwill be returned if the persisted data ofanchorIdis not ready.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrGetAnchorPersistStateANDROID handlemust be a valid XrDeviceAnchorPersistenceANDROID handleanchorIdmust be a pointer to a valid XrUuidEXT structurepersistStatemust be a pointer to an XrAnchorPersistStateANDROID value
Return Codes
XR_SUCCESSXR_SESSION_LOSS_PENDING
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SESSION_LOSTXR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROID
The XrAnchorPersistStateANDROID enum is defined as:
typedef enum XrAnchorPersistStateANDROID {
XR_ANCHOR_PERSIST_STATE_PERSIST_NOT_REQUESTED_ANDROID = 0,
XR_ANCHOR_PERSIST_STATE_PERSIST_PENDING_ANDROID = 1,
XR_ANCHOR_PERSIST_STATE_PERSISTED_ANDROID = 2
} XrAnchorPersistStateANDROID;
Enum |
Description |
|
Anchor has not been requested to be persisted by the app. |
|
Anchor has been requested to be persisted but not persisted yet. |
|
Anchor has been successfully persisted by the runtime. |
Create an anchor from persisted data
The xrCreatePersistedAnchorSpaceANDROID function is defined as:
XrResult xrCreatePersistedAnchorSpaceANDROID(
XrDeviceAnchorPersistenceANDROID handle,
const XrPersistedAnchorSpaceCreateInfoANDROID* createInfo,
XrSpace* anchorOutput);
Parameter Descriptions
handleis the XrDeviceAnchorPersistenceANDROID.createInfois the XrPersistedAnchorSpaceCreateInfoANDROID containing parameters for the anchor creation.anchorOutputis a pointer to an XrSpace in which the new anchor space is returned.
The application can create an XrSpace anchor from a
previously persisted anchor by calling
xrCreatePersistedAnchorSpaceANDROID with the same
XrUuidEXT. This is another way of creating anchors as defined
in XR_ANDROID_trackables.
XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROIDwill be returned if the anchor XrUuidEXT is not found.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrCreatePersistedAnchorSpaceANDROID handlemust be a valid XrDeviceAnchorPersistenceANDROID handlecreateInfomust be a pointer to a valid XrPersistedAnchorSpaceCreateInfoANDROID structureanchorOutputmust be a pointer to an XrSpace handle
Return Codes
XR_SUCCESSXR_SESSION_LOSS_PENDING
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SESSION_LOSTXR_ERROR_OUT_OF_MEMORYXR_ERROR_LIMIT_REACHEDXR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROIDXR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID
The XrPersistedAnchorSpaceCreateInfoANDROID structure is defined as:
typedef struct XrPersistedAnchorSpaceCreateInfoANDROID {
XrStructureType type;
void* next;
XrUuidEXT anchorId;
} XrPersistedAnchorSpaceCreateInfoANDROID;
Member Descriptions
typeis the XrStructureType of this structure.nextisNULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.anchorIdis the XrUuidEXT of the persisted anchor to create an anchor XrSpace from.
The XrPersistedAnchorSpaceCreateInfoANDROID structure provides creation options for the anchor when passed to xrCreateDeviceAnchorPersistenceANDROID.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to using XrPersistedAnchorSpaceCreateInfoANDROID typemust beXR_TYPE_PERSISTED_ANCHOR_SPACE_CREATE_INFO_ANDROIDnextmust beNULLor a valid pointer to the next structure in a structure chain
Enumerate persisted anchors
The xrEnumeratePersistedAnchorsANDROID function is defined as:
XrResult xrEnumeratePersistedAnchorsANDROID(
XrDeviceAnchorPersistenceANDROID handle,
uint32_t anchorIdsCapacityInput,
uint32_t* anchorIdsCountOutput,
XrUuidEXT* anchorIds);
Parameter Descriptions
handleis the XrDeviceAnchorPersistenceANDROID.anchorIdsCapacityInputis the capacity of theanchorIdsarray, or 0 to indicate a request to retrieve the required capacity.anchorIdsCountOutputis a pointer to the count ofanchorIdswritten, or a pointer to the required capacity in the case thatanchorIdsCapacityInputis insufficient.anchorIdsis a pointer to an array of XrUuidEXT structures. It can beNULLifanchorIdsCapacityInputis 0.- See the Buffer Size Parameters section for a detailed
description of retrieving the required
anchorIdssize.
The application may enumerate all current persisted anchors by calling
xrEnumeratePersistedAnchorsANDROID. anchorIds will hold the
UUIDs of the persisted anchors up to the capacity of the array. If the capacity
is insufficient, applications have no guarantees about which anchors are
returned.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrEnumeratePersistedAnchorsANDROID handlemust be a valid XrDeviceAnchorPersistenceANDROID handleanchorIdsCountOutputmust be a pointer to auint32_tvalue- If
anchorIdsCapacityInputis not0, anchorIdsmust be a pointer to an array ofanchorIdsCapacityInputXrUuidEXT structures
Return Codes
XR_SUCCESSXR_SESSION_LOSS_PENDING
XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROIDXR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SESSION_LOSTXR_ERROR_SIZE_INSUFFICIENT
Unpersist a persisted anchor
The xrUnpersistAnchorANDROID function is defined as:
XrResult xrUnpersistAnchorANDROID(
XrDeviceAnchorPersistenceANDROID handle,
const XrUuidEXT* anchorId);
Parameter Descriptions
handleis the XrDeviceAnchorPersistenceANDROID.anchorIdis the XrUuidEXT of the anchor to unpersist.
The application may unpersist a persisted anchor by calling xrUnpersistAnchorANDROID and passing the anchor XrUuidEXT of the anchor to unpersist.
XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROIDwill be returned if the persisted data is not ready.XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROIDwill be returned if the anchor XrUuidEXT is not found.
Valid Usage (Implicit)
- The
XR_ANDROID_device_anchor_persistenceextension must be enabled prior to calling xrUnpersistAnchorANDROID handlemust be a valid XrDeviceAnchorPersistenceANDROID handleanchorIdmust be a pointer to a valid XrUuidEXT structure
Return Codes
XR_SUCCESSXR_SESSION_LOSS_PENDING
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_VALIDATION_FAILUREXR_ERROR_RUNTIME_FAILUREXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_SESSION_LOSTXR_ERROR_OUT_OF_MEMORYXR_ERROR_LIMIT_REACHEDXR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROIDXR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID
Example code for anchor persistence
The following example code demonstrates how to inspect system capability, persist, enumerate and unpersist anchors, as well as creating an anchor from persisted anchor XrUuidEXT.
XrSession session; // previously initialized
XrSpace anchor; // previously initialized
// The function pointers are previously initialized using xrGetInstanceProcAddr.
PFN_xrEnumerateSupportedPersistenceAnchorTypesANDROID xrEnumerateSupportedPersistenceAnchorTypesANDROID; // previously initialized
PFN_xrCreateDeviceAnchorPersistenceANDROID xrCreateDeviceAnchorPersistenceANDROID; // previously initialized
PFN_xrDestroyDeviceAnchorPersistenceANDROID xrDestroyDeviceAnchorPersistenceANDROID; // previously initialized
PFN_xrPersistAnchorANDROID xrPersistAnchorANDROID; // previously initialized
PFN_xrGetAnchorPersistStateANDROID xrGetAnchorPersistStateANDROID; // previously initialized
PFN_xrCreatePersistedAnchorSpaceANDROID xrCreatePersistedAnchorSpaceANDROID; // previously initialized
PFN_xrEnumeratePersistedAnchorsANDROID xrEnumeratePersistedAnchorsANDROID; // previously initialized
PFN_xrUnpersistAnchorANDROID xrUnpersistAnchorANDROID; // previously initialized
// Create a device anchor persistence handle
XrDeviceAnchorPersistenceCreateInfoANDROID persistenceHandleCreateInfo;
persistenceHandleCreateInfo.type = XR_TYPE_DEVICE_ANCHOR_PERSISTENCE_CREATE_INFO_ANDROID;
persistenceHandleCreateInfo.next = nullptr;
XrDeviceAnchorPersistenceANDROID persistenceHandle;
CHK_XR(xrCreateDeviceAnchorPersistenceANDROID(session, &persistenceHandleCreateInfo, &persistenceHandle));
/// Persist an anchor
XrPersistedAnchorSpaceInfo anchorSpaceInfo;
anchorSpaceInfo.type = XR_TYPE_PERSISTED_ANCHOR_SPACE_INFO_ANDROID;
anchorSpaceInfo.next = nullptr;
anchorSpaceInfo.anchor = anchor;
XrUuidEXT anchorId;
do {
XrResult result = xrPersistAnchorANDROID(
persistenceHandle, &anchorSpaceInfo, &anchorId);
} while (result == XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID ||
result == XR_ERROR_ANCHOR_NOT_TRACKING_ANDROID);
if (result != XR_SUCCESS) {
// Handle errors
}
// ... Update loop ...
// Poll for anchor persist state to confirm if it was successfully persisted
XrAnchorPersistStateANDROID persistState;
CHK_XR(xrGetAnchorPersistStateANDROID(persistenceHandle, &anchorId, &persistState));
if (persistState == XR_ANCHOR_PERSIST_STATE_PERSISTED_ANDROID) {
// The anchor was persisted successfully
}
// Enumerate all persisted anchors
uint32_t anchorCountOutput = 0;
std::vector<XrUuidEXT> allAnchors;
CHK_XR(xrEnumeratePersistedAnchorsANDROID(
persistenceHandle,
anchorCountOutput,
&anchorCountOutput,
nullptr
));
allAnchors.resize(anchorCountOutput, XR_NULL_HANDLE);
// Fetch the actual anchors in an appropriately resized array.
CHK_XR(xrEnumeratePersistedAnchorsANDROID(
persistenceHandle,
anchorCountOutput,
&anchorCountOutput,
allAnchors.data()
));
// Creating an anchor from a previously persisted anchor using its UUID
XrTime updateTime; // Time used for the current frame's simulation update.
XrUuidEXT anchorId = allAnchors[0];
XrPersistedAnchorSpaceCreateInfo createInfo;
createInfo.type = XR_TYPE_PERSISTED_ANCHOR_CREATE_INFO_ANDROID;
createInfo.next = nullptr;
createInfo.anchorId = anchorId;
XrSpace anchorSpace = XR_NULL_HANDLE;
CHK_XR(xrCreatePersistedAnchorSpaceANDROID(
persistenceHandle,
&createInfo,
&anchorSpace
));
// The anchor was found and retrieved from the local device successfully.
XrSpaceLocation anchorLocation = { XR_TYPE_SPACE_LOCATION };
CHK_XR(xrLocateSpace(anchorSpace, appSpace, updateTime, &anchorLocation));
XrPosef pose = anchorLocation.pose;
// Unpersist the anchor
do {
XrResult result = xrUnpersistAnchorANDROID(persistenceHandle, &anchorId);
} while (result == XR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID);
if (result != XR_SUCCESS) {
// Handle errors
}
// Once app is done with all persistence related tasks
CHK_XR(xrDestroySpace(anchorSpace));
CHK_XR(xrDestroyDeviceAnchorPersistenceANDROID(persistenceHandle));
New Object Types
New Enum Constants
XrObjectType enumeration is extended with:
XR_OBJECT_TYPE_DEVICE_ANCHOR_PERSISTENCE_ANDROID
XrResult enumeration is extended with:
XR_ERROR_ANCHOR_ID_NOT_FOUND_ANDROIDXR_ERROR_ANCHOR_ALREADY_PERSISTED_ANDROIDXR_ERROR_ANCHOR_NOT_TRACKING_ANDROIDXR_ERROR_PERSISTED_DATA_NOT_READY_ANDROID
XrStructureType enumeration is extended with:
XR_TYPE_PERSISTED_ANCHOR_ANDROIDXR_TYPE_PERSISTED_ANCHOR_SPACE_CREATE_INFO_ANDROIDXR_TYPE_PERSISTED_ANCHOR_SPACE_INFO_ANDROIDXR_TYPE_DEVICE_ANCHOR_PERSISTENCE_CREATE_INFO_ANDROID
New Enums
New Structures
- XrDeviceAnchorPersistenceCreateInfoANDROID
- XrPersistedAnchorSpaceCreateInfoANDROID
- XrPersistedAnchorSpaceInfoANDROID
- XrSystemDeviceAnchorPersistencePropertiesANDROID
New Functions
- xrEnumerateSupportedPersistenceAnchorTypesANDROID
- xrCreateDeviceAnchorPersistenceANDROID
- xrDestroyDeviceAnchorPersistenceANDROID
- xrPersistAnchorANDROID
- xrGetAnchorPersistStateANDROID
- xrCreatePersistedAnchorSpaceANDROID
- xrEnumeratePersistedAnchorsANDROID
- xrUnpersistAnchorANDROID
Issues
Version History
- Revision 1, 2024-10-10 (Kenny Vercaemer)
- Initial extension description
OpenXR™ and the OpenXR logo are trademarks owned by The Khronos Group Inc. and are registered as a trademark in China, the European Union, Japan and the United Kingdom.