C Specification

The xrEndFrame function is defined as:

XrResult xrEndFrame(
    XrSession                                   session,
    const XrFrameEndInfo*                       frameEndInfo);

Parameters

Parameter Descriptions

Description

Every call to xrEndFrame must be preceded by a successful call to xrBeginFrame. Failure to do so will result in XR_ERROR_CALL_ORDER_INVALID being returned by xrEndFrame. XrFrameEndInfo may reference swapchains into which the application has rendered for this frame. From each XrSwapchain only one image index is implicitly referenced per frame, the one corresponding to the last call to xrReleaseSwapchainImage. However, a specific swapchain (and by extension a specific swapchain image index) may be referenced in XrFrameEndInfo multiple times. This can be used for example to render a side by side image into a single swapchain image and referencing it twice with differing image rectangles in different layers.

XR_ERROR_LAYER_INVALID will be returned if an unknown or unsupported layer type is passed as one of the XrFrameEndInfo::layers.

XR_ERROR_LAYER_LIMIT_EXCEEDED will be returned if XrFrameEndInfo::layerCount exceeds XrSystemGraphicsProperties::maxLayerCount or if the runtime is unable to composite the specified layers due to resource constraints.

XR_ERROR_SWAPCHAIN_RECT_INVALID will be returned if XrFrameEndInfo::layers contains a composition layer which references pixels outside of the associated swapchain image.

XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED will be returned if XrFrameEndInfo::environmentBlendMode is not supported.

The runtime must return XR_ERROR_SESSION_NOT_RUNNING if session is not in the XR_SESSION_STATE_RUNNING, XR_SESSION_STATE_VISIBLE or XR_SESSION_STATE_FOCUSED XrSessionState.

The runtime must return XR_ERROR_POSE_INVALID if any pose passed in XrFrameEndInfo contains non-unit quaternions.

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

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_CALL_ORDER_INVALID

  • XR_ERROR_LAYER_INVALID

  • XR_ERROR_SWAPCHAIN_RECT_INVALID

  • XR_ERROR_POSE_INVALID

  • XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED

  • XR_ERROR_SESSION_NOT_RUNNING

  • XR_ERROR_LAYER_LIMIT_EXCEEDED

  • XR_ERROR_VALIDATION_FAILURE

See Also

Document Notes

For more information, see the OpenXR Specification at URL

This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.