C Specification

The XrTrackableQrCodeANDROID structure is defined as:

// Provided by XR_ANDROID_trackables_qr_code
typedef struct XrTrackableQrCodeANDROID {
    XrStructureType           type;
    void*                     next;
    XrTrackingStateANDROID    trackingState;
    XrTime                    lastUpdatedTime;
    XrPosef                   centerPose;
    XrExtent2Df               extents;
    uint32_t                  bufferCapacityInput;
    uint32_t                  bufferCountOutput;
    char*                     buffer;
} XrTrackableQrCodeANDROID;

Members

Member Descriptions
  • type is the XrStructureType of this structure.

  • next is NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.

  • trackingState is the XrTrackingStateANDROID of the QR code.

  • lastUpdatedTime is the XrTime of the last update of the QR code. If lastUpdatedTime is changed from the last call, all other fields may have changed.

  • centerPose is the XrPosef of the QR code located in XrTrackableGetInfoANDROID::baseSpace. The QR code lies in the XZ plane with X pointing to the right of the QR code, Z pointing to its bottom and Y coming out of the QR code as the normal.

  • extents is the XrExtent2Df dimensions of the QR code. The boundary of the bounding box is at points: centerPose +/- (extents / 2).

  • bufferCapacityInput is the capability of the buffer, or 0 to retrieve the required capability.

  • bufferCountOutput If the bufferCapacityInput is 0, the runtime will write the required buffer size into bufferCountOutput. Otherwise, it contains the total elements written in buffer. If the QR code data has not been decoded yet, the runtime must set bufferCountOutput to 0.

  • buffer is a pointer to an array of char to write the decoded QR code data. If the application does not care about the decoded QR code data it can pass nullptr and omit the second two-call call. The QR code data is returned as null-terminated UTF-8 string.

  • See the https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#fundamentals-buffer-size-parameters section for a detailed description of retrieving the required buffer size.

Description

Valid Usage (Implicit)

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-2026 The Khronos Group Inc.