C Specification
The xrCreateRenderModelAssetEXT function is defined as:
// Provided by XR_EXT_render_model
XrResult xrCreateRenderModelAssetEXT(
XrSession session,
const XrRenderModelAssetCreateInfoEXT* createInfo,
XrRenderModelAssetEXT* asset);
Parameters
Description
An application can create an XrRenderModelAssetEXT handle using the
xrCreateRenderModelAssetEXT function.
The application must only call xrCreateRenderModelAssetEXT with a
UUID specified by parameter createInfo member
XrRenderModelAssetCreateInfoEXT::cacheId that has been retrieved
by calling xrGetRenderModelPropertiesEXT on a render model associated
with the current session.
If the application passes a UUID not retrieved in this way (for example,
passing a UUID received from a previous session), the runtime must return
XR_ERROR_RENDER_MODEL_ASSET_UNAVAILABLE_EXT.
This implies that the runtime must track which UUIDs it has returned to the
application in a given session to validate the input to this function.
If this function returns successfully, the runtime must have the asset data
and node names in memory for immediate return to the application in a
subsequent use of xrGetRenderModelAssetDataEXT.
The runtime may return XR_ERROR_RENDER_MODEL_ASSET_UNAVAILABLE_EXT if
the asset data has become unavailable for external reasons after the
creation of the relevant XrRenderModelEXT.
A valid asset handle enables the application to retrieve the data for the
glTF asset of the render model and the names of animatable nodes.
For a valid XrRenderModelPropertiesEXT::cacheId, the runtime
must return the same glTF asset data, even between different sessions, if
the cache ID is returned from both sessions.
Therefore, the application may rely on the
XrRenderModelPropertiesEXT::cacheId to cache the glTF asset data
and the processed derived data from the asset, as well as the names of
animatable nodes, for reuse across sessions.
An application may choose to use the UUID as a key to cache data associated
with the asset, but is not the asset data itself, however it is invalid to
call xrCreateRenderModelAssetEXT using a cached UUID before it is
available from the current session.
An application must not use a cached UUID to retrieve asset data from the
runtime without ensuring it is retrievable from the current session (and
identifying the semantic use of the model) by calling
xrGetRenderModelPropertiesEXT.
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.