C Specification

The xrLoadRenderModelFB function is defined as:

// Provided by XR_FB_render_model
XrResult xrLoadRenderModelFB(
    XrSession                                   session,
    const XrRenderModelLoadInfoFB*              info,
    XrRenderModelBufferFB*                      buffer);

Parameters

Parameter Descriptions

Description

xrLoadRenderModelFB is used to load the GLTF model data using a valid XrRenderModelLoadInfoFB::modelKey. xrLoadRenderModelFB loads the model as a byte buffer containing the GLTF in the binary format (GLB). The GLB data must conform to the glTF 2.0 format defined at https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html. The GLB may contain texture data in a format that requires the use of the KHR_texture_basisu GLTF extension defined at https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_basisu. Therefore, the application should ensure it can handle this extension.

If the device for the requested model is disconnected or does not match the XrRenderModelLoadInfoFB::modelKey provided, xrLoadRenderModelFB must return XR_RENDER_MODEL_UNAVAILABLE_FB as well as an XrRenderModelBufferFB::bufferCountOutput value of 0 indicating that the model was not available.

The xrLoadRenderModelFB function may be slow, therefore applications should call it from a non-time sensitive thread.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

  • XR_RENDER_MODEL_UNAVAILABLE_FB

On failure, this command returns
  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_OUT_OF_MEMORY

  • XR_ERROR_RENDER_MODEL_KEY_INVALID_FB

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 2014-2024, The Khronos Group Inc.