bool checkMinSpecImpl() { // If OpenVR isn't supported, we have no min spec, so pass if (!openVrSupported()) { return true; } // If we have at least MIN_CORES_SPEC cores, pass auto coreCount = QThread::idealThreadCount(); if (coreCount >= MIN_CORES_SPEC) { return true; } // Even if we have too few cores... if the compositor is using async reprojection, pass auto system = acquireOpenVrSystem(); auto compositor = vr::VRCompositor(); if (system && compositor) { vr::Compositor_FrameTiming timing; memset(&timing, 0, sizeof(timing)); timing.m_nSize = sizeof(vr::Compositor_FrameTiming); compositor->GetFrameTiming(&timing); releaseOpenVrSystem(); if (timing.m_nReprojectionFlags & VRCompositor_ReprojectionAsync) { return true; } } // We're using OpenVR and we don't have enough cores... showMinSpecWarning(); return false; }
void OpenVrDisplayPlugin::internalDeactivate() { Parent::internalDeactivate(); _container->setIsOptionChecked(StandingHMDSensorMode, false); if (_system) { releaseOpenVrSystem(); _system = nullptr; } _compositor = nullptr; }
void OpenVrDisplayPlugin::deactivate() { _container->setIsOptionChecked(StandingHMDSensorMode, false); if (_hmd) { releaseOpenVrSystem(); _hmd = nullptr; } _compositor = nullptr; WindowOpenGLDisplayPlugin::deactivate(); }
bool OpenVrDisplayPlugin::isSupported() const { auto hmd = acquireOpenVrSystem(); bool success = nullptr != hmd; releaseOpenVrSystem(); return success; }