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