Function ovr_sys::ovr_GetPerfStats
source · pub unsafe extern "C" fn ovr_GetPerfStats(
session: ovrSession,
outStats: *mut ovrPerfStats
) -> ovrResult
Expand description
Retrieves performance stats for the VR app as well as the SDK compositor.
This function will return stats for the VR app that is currently visible in the HMD regardless of what VR app is actually calling this function.
If the VR app is trying to make sure the stats returned belong to the same application,
the caller can compare the VisibleProcessId
with their own process ID. Normally this will
be the case if the caller is only calling ovr_GetPerfStats
when ovr_GetSessionStatus
has
IsVisible flag set to be true.
If the VR app calling ovr_GetPerfStats
is actually the one visible in the HMD,
then new perf stats will only be populated after a new call to ovr_SubmitFrame
.
That means subsequent calls to ovr_GetPerfStats
after the first one without calling
ovr_SubmitFrame
will receive a FrameStatsCount
of zero.
If the VR app is not visible, or was initially marked as ovrInit_Invisible
, then each call
to ovr_GetPerfStats
will immediately fetch new perf stats from the compositor without
a need for the ovr_SubmitFrame
call.
in session
Specifies an ovrSession
previously returned by ovr_Create
.
out outStats
Contains the performance stats for the application and SDK compositor
Returns an ovrResult
for which OVR_SUCCESS(result)
is false upon error and true
upon success.
see ovrPerfStats
, ovrPerfStatsPerCompositorFrame
, ovr_ResetPerfStats