Пример #1
0
FOSVRInputDevice::~FOSVRInputDevice()
{
    FScopeLock lock(contextMutex);

    IModularFeatures::Get().UnregisterModularFeature(GetModularFeatureName(), this);

    if (context)
    {
        if (leftHand)
        {
            osvrClientFreeInterface(context, leftHand);
        }
        if (rightHand)
        {
            osvrClientFreeInterface(context, rightHand);
        }
        for (auto iface : interfaces)
        {
            if (iface.Value)
            {
                osvrClientFreeInterface(context, iface.Value);
            }
        }
    }
}
Пример #2
0
/**
* Destructor.
***/
OSVR_Tracker::~OSVR_Tracker()
{
	if (m_psOSVR_ClientInterface)
		osvrClientFreeInterface(m_psOSVR_ClientContext, m_psOSVR_ClientInterface);
	if (m_psOSVR_ClientContext)
		osvrClientShutdown(m_psOSVR_ClientContext);
}
Пример #3
0
void OSVRInterface::Shutdown()
{
#if OSVR_ENABLED

	DeregisterCallbacks();

	if (OSVRClientInterface != nullptr)
	{
		OSVR_ReturnCode ReturnCode = osvrClientFreeInterface(OSVRClientContext, OSVRClientInterface);
		check(ReturnCode == OSVR_RETURN_SUCCESS);

		OSVRClientInterface = nullptr;
	}

#endif // OSVR_ENABLED
}