MCPcopy Create free account
hub / github.com/LibreVR/Revive / LocateViews

Method LocateViews

ReviveXR/Session.cpp:233–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233ovrResult ovrHmdStruct::LocateViews(XrView out_Views[ovrEye_Count], XrViewStateFlags* out_Flags) const
234{
235 if (!Session)
236 return ovrError_InvalidSession;
237
238 uint32_t numViews;
239 XrViewLocateInfo locateInfo = XR_TYPE(VIEW_LOCATE_INFO);
240 XrViewState viewState = XR_TYPE(VIEW_STATE);
241 locateInfo.space = ViewSpace;
242 locateInfo.viewConfigurationType = XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO;
243 locateInfo.displayTime = AbsTimeToXrTime(Instance, ovr_GetTimeInSeconds());
244 CHK_XR(xrLocateViews(Session, &locateInfo, &viewState, ovrEye_Count, &numViews, out_Views));
245 assert(numViews == ovrEye_Count);
246 if (out_Flags)
247 *out_Flags = viewState.viewStateFlags;
248 return ovrSuccess;
249}
250
251ovrResult ovrHmdStruct::UpdateStencil(ovrEyeType view, XrVisibilityMaskTypeKHR type)
252{

Callers

nothing calls this directly

Calls 2

AbsTimeToXrTimeFunction · 0.85
ovr_GetTimeInSecondsFunction · 0.70

Tested by

no test coverage detected