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

Function ovr_GetRenderDesc2

Revive/REV_CAPI.cpp:850–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848}
849
850OVR_PUBLIC_FUNCTION(ovrEyeRenderDesc) ovr_GetRenderDesc2(ovrSession session, ovrEyeType eyeType, ovrFovPort fov)
851{
852 REV_TRACE(ovr_GetRenderDesc);
853
854 // Make a copy so we can adjust a few parameters
855 ovrEyeRenderDesc desc = session->RenderDesc[eyeType];
856
857 // Adjust the descriptor for the supplied field-of-view
858 desc.Fov = fov;
859 float WidthTan = fov.LeftTan + fov.RightTan;
860 float HeightTan = fov.UpTan + fov.DownTan;
861 desc.PixelsPerTanAngleAtCenter = OVR::Vector2f(desc.DistortedViewport.Size.w / WidthTan, desc.DistortedViewport.Size.h / HeightTan);
862
863 return desc;
864}
865
866typedef struct OVR_ALIGNAS(4) ovrEyeRenderDesc1_ {
867 ovrEyeType Eye;

Callers

nothing calls this directly

Calls 1

Vector2fClass · 0.70

Tested by

no test coverage detected