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

Method CompositorErrorToOvrError

Revive/CompositorBase.cpp:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27MICROPROFILE_DEFINE(PostPresentHandoff, "Compositor", "PostPresentHandoff", 0x00ff00);
28
29ovrResult CompositorBase::CompositorErrorToOvrError(vr::EVRCompositorError error)
30{
31 switch (error)
32 {
33 case vr::VRCompositorError_None: return ovrSuccess;
34 case vr::VRCompositorError_RequestFailed: return ovrError_InvalidOperation;
35 case vr::VRCompositorError_IncompatibleVersion: return ovrError_ServiceVersion;
36 case vr::VRCompositorError_DoNotHaveFocus: return ovrSuccess_NotVisible;
37 case vr::VRCompositorError_InvalidTexture: return ovrError_TextureSwapChainInvalid;
38 case vr::VRCompositorError_IsNotSceneApplication: return ovrSuccess_NotVisible;
39 case vr::VRCompositorError_TextureIsOnWrongDevice: return ovrError_TextureSwapChainInvalid;
40 case vr::VRCompositorError_TextureUsesUnsupportedFormat: return ovrError_TextureSwapChainInvalid;
41 case vr::VRCompositorError_SharedTexturesNotSupported: return ovrError_TextureSwapChainInvalid;
42 case vr::VRCompositorError_IndexOutOfRange: return ovrError_InvalidParameter;
43 case vr::VRCompositorError_AlreadySubmitted: return ovrSuccess_NotVisible;
44 case vr::VRCompositorError_InvalidBounds: return ovrSuccess_BoundaryInvalid;
45 default: return ovrError_RuntimeException;
46 }
47}
48
49CompositorBase::CompositorBase()
50 : m_ChainCount(0)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected