public void Init(EVRApplicationType ApplicationType = EVRApplicationType.VRApplication_Overlay) { //Dummy OpenTK Window GameWindow window = new GameWindow(300, 300); EVRInitError error = EVRInitError.None; OpenVR.Init(ref error, ApplicationType); if (error != EVRInitError.None) { throw new Exception("An error occured while initializing OpenVR!"); } OpenVR.GetGenericInterface(OpenVR.IVRCompositor_Version, ref error); if (error != EVRInitError.None) { throw new Exception("An error occured while initializing Compositor!"); } OpenVR.GetGenericInterface(OpenVR.IVROverlay_Version, ref error); if (error != EVRInitError.None) { throw new Exception("An error occured while initializing Overlay!"); } System.Threading.Thread OverlayThread = new System.Threading.Thread(new System.Threading.ThreadStart(OverlayCycle)); OverlayThread.IsBackground = true; OverlayThread.Start(); }
public VR(EVRApplicationType applicationType, VRConfiguration configuration) { _trackedControllerIndices = new Dictionary <uint, string>(); _trackedControllerIdentifiers = new Dictionary <uint, string>(); _requiredControllers = configuration.ControllerTypes; _applicationType = applicationType; _propertiesToTrack = configuration.PropertiesToTrack; }
public static bool Startup(EVRApplicationType appType = EVRApplicationType.VRApplication_Background) { if (Started) { return(true); } VRSystem = OpenVR.Init(ref LastStartupError, appType); return(Started = (LastStartupError == EVRInitError.None)); }
public static void Init(EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) { EVRInitError peError = EVRInitError.None; OpenVR.Init(ref peError, eApplicationType); if (peError != EVRInitError.None) { throw OpenVRException.Make(peError); } }
public CvrSystemWrapper(EVRApplicationType vrApplicationType = EVRApplicationType.VRApplication_Overlay) { _eventLoopCancellationTokenSource = new CancellationTokenSource(); var evrInitError = new EVRInitError(); _cvrSystem = OpenVR.Init(ref evrInitError, vrApplicationType); if (evrInitError != EVRInitError.None) { throw new Exception(evrInitError.ToString()); } }
/** * Initializes SteamVR in standalone mode without * This mode is intended for overlays that do not use Unity's XR rendering. */ public static void InitializeStandalone(EVRApplicationType applicationType, string pchStartupInfo = "") { var error = EVRInitError.None; OpenVR.Init(ref error, applicationType, pchStartupInfo); if (error != EVRInitError.None) { ReportError(error); } isStandalone = true; Initialize(false); }
public bool Setup(EVRApplicationType applicationType = EVRApplicationType.VRApplication_Scene) { var error = EVRInitError.None; openvr = OpenVR.Init(ref error, applicationType); if (error != EVRInitError.None) { Close(); return(false); } OnOVRConnected?.Invoke(this, new OVRConnectedEventArgs(true)); return(true); }
public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) { OpenVR.VRToken = OpenVR.InitInternal(ref peError, eApplicationType); OpenVR.OpenVRInternal_ModuleContext.Clear(); if (peError != EVRInitError.None) { return(null); } if (!OpenVR.IsInterfaceVersionValid("IVRSystem_011")) { OpenVR.ShutdownInternal(); peError = EVRInitError.Init_InterfaceNotFound; return(null); } return(OpenVR.System); }
/** * Initializes SteamVR in standalone mode without * This mode is intended for overlays that do not use Unity's XR rendering. */ public static void InitializeStandalone(EVRApplicationType applicationType, string pchStartupInfo = "") { var error = EVRInitError.None; OpenVR.Init(ref error, applicationType, pchStartupInfo); if (error != EVRInitError.None) { ReportError(error); } isStandalone = true; Initialize(false); SteamVRManager.isConnected = true; SteamVRManager.I.onSteamVRConnected.Invoke(); }
//OpenVRを初期化する public bool StartOpenVR(EVRApplicationType type = EVRApplicationType.VRApplication_Overlay) { //すでに利用可能な場合は初期化しない(衝突する) if (Init()) { return(true); } //初期化する var openVRError = EVRInitError.None; openvr = OpenVR.Init(ref openVRError, type); if (openVRError != EVRInitError.None) { return(false); } //本ライブラリも初期化 return(Init()); }
} // 0x00000001802466A0-0x00000001802466B0 // Methods internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType); // 0x0000000180EE76F0-0x0000000180EE7780
public static uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType) { return(OpenVRInterop.InitInternal(ref peError, eApplicationType)); }
/** Finds the active installation of vrclient.dll and initializes it */ public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) { VRToken = InitInternal(ref peError, eApplicationType); OpenVRInternal_ModuleContext.Clear(); if (peError != EVRInitError.None) return null; bool bInterfaceValid = IsInterfaceVersionValid(IVRSystem_Version); if (!bInterfaceValid) { ShutdownInternal(); peError = EVRInitError.Init_InterfaceNotFound; return null; } return OpenVR.System; }
public static uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType) { return OpenVRInterop.InitInternal(ref peError, eApplicationType); }
internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType);
} // 0x0000000180246DB0-0x0000000180246DC0 // Methods public static uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType) => default; // 0x0000000180EE76F0-0x0000000180EE7780
internal static extern IntPtr Init(ref EVRInitError peError, EVRApplicationType eApplicationType);
public static uint GetInitToken() => default; // 0x0000000180EE7600-0x0000000180EE7670 public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene /* Metadata: 0x00654C84 */) => default; // 0x0000000180EE7A40-0x0000000180EE7DC0
public static IntPtr Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) { return OpenVRInterop.Init(ref peError, eApplicationType); }
public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene) { OpenVR.VRToken = OpenVR.InitInternal(ref peError, eApplicationType); OpenVR.OpenVRInternal_ModuleContext.Clear(); if (peError != EVRInitError.None) { return null; } if (!OpenVR.IsInterfaceVersionValid("IVRSystem_011")) { OpenVR.ShutdownInternal(); peError = EVRInitError.Init_InterfaceNotFound; return null; } return OpenVR.System; }