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

Function ovr_GetFovTextureSize

Revive/REV_CAPI.cpp:833–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831}
832
833OVR_PUBLIC_FUNCTION(ovrSizei) ovr_GetFovTextureSize(ovrSession session, ovrEyeType eye, ovrFovPort fov, float pixelsPerDisplayPixel)
834{
835 REV_TRACE(ovr_GetFovTextureSize);
836
837 // Get the descriptor for this eye
838 const ovrEyeRenderDesc& desc = session->RenderDesc[eye];
839 ovrSizei size = desc.DistortedViewport.Size;
840
841 // Grow the recommended size to account for the overlapping fov
842 // TODO: Add a setting to ignore pixelsPerDisplayPixel
843 vr::VRTextureBounds_t bounds = CompositorBase::FovPortToTextureBounds(desc.Fov, fov);
844 size.w = int(size.w / (bounds.uMax - bounds.uMin));
845 size.h = int(size.h / (bounds.vMax - bounds.vMin));
846
847 return size;
848}
849
850OVR_PUBLIC_FUNCTION(ovrEyeRenderDesc) ovr_GetRenderDesc2(ovrSession session, ovrEyeType eyeType, ovrFovPort fov)
851{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected