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

Function ovr_SubmitFrame2

Revive/REV_CAPI.cpp:919–941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitFrame2(ovrSession session, long long frameIndex, const ovrViewScaleDesc* viewScaleDesc,
920 ovrLayerHeader const * const * layerPtrList, unsigned int layerCount)
921{
922 REV_TRACE(ovr_SubmitFrame);
923 MICROPROFILE_META_CPU("Submit Frame", (int)frameIndex);
924
925 if (!session || !session->Compositor)
926 return ovrError_InvalidSession;
927
928 if (frameIndex == 0)
929 frameIndex = session->FrameIndex;
930
931 // Use our own intermediate compositor to convert the frame to OpenVR.
932 session->Compositor->SetTimingMode(vr::VRCompositorTimingMode_Implicit);
933 ovrResult result = session->Compositor->EndFrame(session, frameIndex, viewScaleDesc, layerPtrList, layerCount);
934 if (OVR_SUCCESS(result))
935 {
936 // Begin the next frame
937 session->Compositor->WaitToBeginFrame(session, frameIndex + 1);
938 session->Compositor->BeginFrame(session, frameIndex + 1);
939 }
940 return result;
941}
942
943typedef struct OVR_ALIGNAS(4) ovrViewScaleDesc1_ {
944 ovrVector3f HmdToEyeOffset[ovrEye_Count]; ///< Translation of each eye.

Callers 2

ovr_SubmitFrameFunction · 0.70
ovr_SubmitFrameFunction · 0.50

Calls 4

SetTimingModeMethod · 0.80
EndFrameMethod · 0.80
WaitToBeginFrameMethod · 0.80
BeginFrameMethod · 0.80

Tested by

no test coverage detected