Skip to content

Commit

Permalink
Revive: Update to Oculus SDK 1.32
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Dec 20, 2018
1 parent 04c4f1f commit c287bee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Revive/REV_CAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,13 +1217,17 @@ ovr_GetFovStencil(
const ovrFovStencilDesc* fovStencilDesc,
ovrFovStencilMeshBuffer* meshBuffer)
{
// TODO: Implement support for visible rectangle
if (fovStencilDesc->StencilType >= vr::k_eHiddenAreaMesh_Max)
return ovrError_Unsupported;

vr::HiddenAreaMesh_t mesh = vr::VRSystem()->GetHiddenAreaMesh((vr::EVREye)fovStencilDesc->Eye, (vr::EHiddenAreaMeshType)fovStencilDesc->StencilType);

int& i = meshBuffer->UsedVertexCount;
for (i = 0; i < meshBuffer->AllocVertexCount && i < (int)mesh.unTriangleCount; i++)
{
if (fovStencilDesc->StencilFlags & ovrFovStencilFlag_MeshOriginAtBottomLeft)
meshBuffer->VertexBuffer[i] = -REV::Vector2f(mesh.pVertexData[i]);
meshBuffer->VertexBuffer[i] = OVR::Vector2f(mesh.pVertexData[i].v[0], -mesh.pVertexData[i].v[1]);
else
meshBuffer->VertexBuffer[i] = REV::Vector2f(mesh.pVertexData[i]);
}
Expand Down

0 comments on commit c287bee

Please sign in to comment.