11QString OpenXRHelpers::getXrResultAsString(XrResult result, XrInstance instance)
13 QByteArray errorString(XR_MAX_RESULT_STRING_SIZE, 0);
14 xrResultToString(instance, result, errorString.data());
15 errorString.resize(qstrlen(errorString.constData()));
16 return QString::fromUtf8(errorString).trimmed();
21 if (result != XrResult::XR_SUCCESS) {
22 qWarning().noquote().nospace() <<
"OpenXR call failed (" << result <<
"): " << getXrResultAsString(result, instance);
28bool OpenXRHelpers::resolveXrFunction(XrInstance instance,
const char *name, PFN_xrVoidFunction *function)
30 XrResult result = xrGetInstanceProcAddr(instance, name, function);
31 if (!checkXrResult(result, instance)) {
32 qWarning(
"Failed to resolve OpenXR function %s", name);