XRTraits C++ OpenXR Utilities
|
This example shows a mostly-equivalent scenario to twocall-just-function.cpp, but instead uses the doTwoCallInPlace() function which avoids exceptions and returns the XrResult from the final wrapped call. See that other example for more detail overall.
Because views
is empty, the normal two-call process will take place: A call with 0 capacity will be made first, the vector will be resized (with its elements initialized appropriately). After this capacity check, another call to the wrapped function will be made, now with the current capacity and array, and will hopefully be successful.