C Specification

The xrBeginFrame function is defined as:

XrResult xrBeginFrame(
    XrSession                                   session,
    const XrFrameBeginInfo*                     frameBeginInfo);

Parameters

Parameter Descriptions

Description

xrBeginFrame is called prior to the the start of frame rendering.

The runtime must return the success code XR_FRAME_DISCARDED if a prior xrBeginFrame has been called without an intervening call to xrEndFrame.

The runtime may return the success code XR_SESSION_VISIBILITY_UNAVAILABLE if it determines that the current frame will not be visible. In this case the application may elect to omit rendering work for the frame, but should still call xrEndFrame.

The runtime must consider the frame in-progress and ready for an xrEndFrame call if a success code is returned.

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.

Valid Usage (Implicit)
  • session must be a valid XrSession handle

  • If frameBeginInfo is not NULL, frameBeginInfo must be a pointer to a valid XrFrameBeginInfo structure

Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

  • XR_FRAME_DISCARDED

  • XR_SESSION_VISIBILITY_UNAVAILABLE

On failure, this command returns
  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_SESSION_NOT_RUNNING

  • 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.