MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / COpenVRContext

Class COpenVRContext

headers/openvr.h:5802–6068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5800 }
5801
5802 class COpenVRContext
5803 {
5804 public:
5805 COpenVRContext() { Clear(); }
5806 void Clear();
5807
5808 inline void CheckClear()
5809 {
5810 if ( VRToken() != VR_GetInitToken() )
5811 {
5812 Clear();
5813 VRToken() = VR_GetInitToken();
5814 }
5815 }
5816
5817 IVRSystem *VRSystem()
5818 {
5819 CheckClear();
5820 if ( m_pVRSystem == nullptr )
5821 {
5822 EVRInitError eError;
5823 m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError );
5824 }
5825 return m_pVRSystem;
5826 }
5827 IVRChaperone *VRChaperone()
5828 {
5829 CheckClear();
5830 if ( m_pVRChaperone == nullptr )
5831 {
5832 EVRInitError eError;
5833 m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError );
5834 }
5835 return m_pVRChaperone;
5836 }
5837
5838 IVRChaperoneSetup *VRChaperoneSetup()
5839 {
5840 CheckClear();
5841 if ( m_pVRChaperoneSetup == nullptr )
5842 {
5843 EVRInitError eError;
5844 m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError );
5845 }
5846 return m_pVRChaperoneSetup;
5847 }
5848
5849 IVRCompositor *VRCompositor()
5850 {
5851 CheckClear();
5852 if ( m_pVRCompositor == nullptr )
5853 {
5854 EVRInitError eError;
5855 m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError );
5856 }
5857 return m_pVRCompositor;
5858 }
5859

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected