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

Function ovr_SubmitFrame2

ReviveXR/REV_CAPI.cpp:1164–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitFrame2(ovrSession session, long long frameIndex, const ovrViewScaleDesc* viewScaleDesc,
1165 ovrLayerHeader const * const * layerPtrList, unsigned int layerCount)
1166{
1167 REV_TRACE(ovr_SubmitFrame);
1168 MICROPROFILE_META_CPU("Submit Frame", (int)frameIndex);
1169
1170 if (!session)
1171 return ovrError_InvalidSession;
1172
1173 long long currentIndex = (*session->CurrentFrame).frameIndex;
1174 if (frameIndex <= 0)
1175 frameIndex = currentIndex;
1176
1177 // Some older games submit frames redundantly, so we discard old frames in the legacy call
1178 if (frameIndex >= currentIndex)
1179 CHK_OVR(ovr_EndFrame(session, frameIndex, viewScaleDesc, layerPtrList, layerCount));
1180 CHK_OVR(ovr_WaitToBeginFrame(session, frameIndex + 1));
1181 CHK_OVR(ovr_BeginFrame(session, frameIndex + 1));
1182 return frameIndex < currentIndex ? ovrSuccess_NotVisible : ovrSuccess;
1183}
1184
1185typedef struct OVR_ALIGNAS(4) ovrViewScaleDesc1_ {
1186 ovrVector3f HmdToEyeOffset[ovrEye_Count]; ///< Translation of each eye.

Callers 1

ovr_SubmitFrameFunction · 0.70

Calls 3

ovr_EndFrameFunction · 0.70
ovr_WaitToBeginFrameFunction · 0.70
ovr_BeginFrameFunction · 0.70

Tested by

no test coverage detected