Space Engineers
openvr_api.cs
Go to the documentation of this file.
1 #if !XB1 // XB1_NOOPENVRWRAPPER
2 //======= Copyright 1996-2014, Valve Corporation, All rights reserved. ========
3 //
4 // Purpose: This file contains C#/managed code bindings for the OpenVR interfaces
5 // This file is auto-generated, do not edit it.
6 //
7 //=============================================================================
8 
9 using System;
10 using System.Runtime.InteropServices;
11 using Valve.VR;
12 using Valve.Interop;
13 
14 namespace Valve.Interop
15 {
16 
18 {
19 
20 
21  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetRecommendedRenderTargetSize")]
22  internal static extern void VR_IVRSystem_GetRecommendedRenderTargetSize(IntPtr instancePtr, ref uint pnWidth, ref uint pnHeight);
23  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetProjectionMatrix")]
24  internal static extern HmdMatrix44_t VR_IVRSystem_GetProjectionMatrix(IntPtr instancePtr, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
25  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetProjectionRaw")]
26  internal static extern void VR_IVRSystem_GetProjectionRaw(IntPtr instancePtr, EVREye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
27  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_ComputeDistortion")]
28  internal static extern DistortionCoordinates_t VR_IVRSystem_ComputeDistortion(IntPtr instancePtr, EVREye eEye, float fU, float fV);
29  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetEyeToHeadTransform")]
30  internal static extern HmdMatrix34_t VR_IVRSystem_GetEyeToHeadTransform(IntPtr instancePtr, EVREye eEye);
31  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetTimeSinceLastVsync")]
32  internal static extern bool VR_IVRSystem_GetTimeSinceLastVsync(IntPtr instancePtr, ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter);
33  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetD3D9AdapterIndex")]
34  internal static extern int VR_IVRSystem_GetD3D9AdapterIndex(IntPtr instancePtr);
35  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetDXGIOutputInfo")]
36  internal static extern void VR_IVRSystem_GetDXGIOutputInfo(IntPtr instancePtr, ref int pnAdapterIndex);
37  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_IsDisplayOnDesktop")]
38  internal static extern bool VR_IVRSystem_IsDisplayOnDesktop(IntPtr instancePtr);
39  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_SetDisplayVisibility")]
40  internal static extern bool VR_IVRSystem_SetDisplayVisibility(IntPtr instancePtr, bool bIsVisibleOnDesktop);
41  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetDeviceToAbsoluteTrackingPose")]
42  internal static extern void VR_IVRSystem_GetDeviceToAbsoluteTrackingPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, [In, Out] TrackedDevicePose_t[] pTrackedDevicePoseArray, uint unTrackedDevicePoseArrayCount);
43  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_ResetSeatedZeroPose")]
44  internal static extern void VR_IVRSystem_ResetSeatedZeroPose(IntPtr instancePtr);
45  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose")]
46  internal static extern HmdMatrix34_t VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(IntPtr instancePtr);
47  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose")]
48  internal static extern HmdMatrix34_t VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(IntPtr instancePtr);
49  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass")]
50  internal static extern uint VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass(IntPtr instancePtr, ETrackedDeviceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex);
51  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetTrackedDeviceActivityLevel")]
52  internal static extern EDeviceActivityLevel VR_IVRSystem_GetTrackedDeviceActivityLevel(IntPtr instancePtr, uint unDeviceId);
53  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_ApplyTransform")]
54  internal static extern void VR_IVRSystem_ApplyTransform(IntPtr instancePtr, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform);
55  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetTrackedDeviceIndexForControllerRole")]
56  internal static extern uint VR_IVRSystem_GetTrackedDeviceIndexForControllerRole(IntPtr instancePtr, ETrackedControllerRole unDeviceType);
57  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetControllerRoleForTrackedDeviceIndex")]
58  internal static extern ETrackedControllerRole VR_IVRSystem_GetControllerRoleForTrackedDeviceIndex(IntPtr instancePtr, uint unDeviceIndex);
59  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetTrackedDeviceClass")]
60  internal static extern ETrackedDeviceClass VR_IVRSystem_GetTrackedDeviceClass(IntPtr instancePtr, uint unDeviceIndex);
61  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_IsTrackedDeviceConnected")]
62  internal static extern bool VR_IVRSystem_IsTrackedDeviceConnected(IntPtr instancePtr, uint unDeviceIndex);
63  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetBoolTrackedDeviceProperty")]
64  internal static extern bool VR_IVRSystem_GetBoolTrackedDeviceProperty(IntPtr instancePtr, uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
65  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetFloatTrackedDeviceProperty")]
66  internal static extern float VR_IVRSystem_GetFloatTrackedDeviceProperty(IntPtr instancePtr, uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
67  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetInt32TrackedDeviceProperty")]
68  internal static extern int VR_IVRSystem_GetInt32TrackedDeviceProperty(IntPtr instancePtr, uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
69  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetUint64TrackedDeviceProperty")]
70  internal static extern ulong VR_IVRSystem_GetUint64TrackedDeviceProperty(IntPtr instancePtr, uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
71  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetMatrix34TrackedDeviceProperty")]
72  internal static extern HmdMatrix34_t VR_IVRSystem_GetMatrix34TrackedDeviceProperty(IntPtr instancePtr, uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
73  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetStringTrackedDeviceProperty")]
74  internal static extern uint VR_IVRSystem_GetStringTrackedDeviceProperty(IntPtr instancePtr, uint unDeviceIndex, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBufferSize, ref ETrackedPropertyError pError);
75  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetPropErrorNameFromEnum")]
76  internal static extern IntPtr VR_IVRSystem_GetPropErrorNameFromEnum(IntPtr instancePtr, ETrackedPropertyError error);
77  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PollNextEvent")]
78  internal static extern bool VR_IVRSystem_PollNextEvent(IntPtr instancePtr, ref VREvent_t pEvent, uint uncbVREvent);
79  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PollNextEventWithPose")]
80  internal static extern bool VR_IVRSystem_PollNextEventWithPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose);
81  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetEventTypeNameFromEnum")]
82  internal static extern IntPtr VR_IVRSystem_GetEventTypeNameFromEnum(IntPtr instancePtr, EVREventType eType);
83  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetHiddenAreaMesh")]
84  internal static extern HiddenAreaMesh_t VR_IVRSystem_GetHiddenAreaMesh(IntPtr instancePtr, EVREye eEye);
85  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetControllerState")]
86  internal static extern bool VR_IVRSystem_GetControllerState(IntPtr instancePtr, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState);
87  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetControllerStateWithPose")]
88  internal static extern bool VR_IVRSystem_GetControllerStateWithPose(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, ref TrackedDevicePose_t pTrackedDevicePose);
89  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_TriggerHapticPulse")]
90  internal static extern void VR_IVRSystem_TriggerHapticPulse(IntPtr instancePtr, uint unControllerDeviceIndex, uint unAxisId, char usDurationMicroSec);
91  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetButtonIdNameFromEnum")]
92  internal static extern IntPtr VR_IVRSystem_GetButtonIdNameFromEnum(IntPtr instancePtr, EVRButtonId eButtonId);
93  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_GetControllerAxisTypeNameFromEnum")]
94  internal static extern IntPtr VR_IVRSystem_GetControllerAxisTypeNameFromEnum(IntPtr instancePtr, EVRControllerAxisType eAxisType);
95  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_CaptureInputFocus")]
96  internal static extern bool VR_IVRSystem_CaptureInputFocus(IntPtr instancePtr);
97  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_ReleaseInputFocus")]
98  internal static extern void VR_IVRSystem_ReleaseInputFocus(IntPtr instancePtr);
99  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_IsInputFocusCapturedByAnotherProcess")]
100  internal static extern bool VR_IVRSystem_IsInputFocusCapturedByAnotherProcess(IntPtr instancePtr);
101  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_DriverDebugRequest")]
102  internal static extern uint VR_IVRSystem_DriverDebugRequest(IntPtr instancePtr, uint unDeviceIndex, string pchRequest, string pchResponseBuffer, uint unResponseBufferSize);
103  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PerformFirmwareUpdate")]
104  internal static extern EVRFirmwareError VR_IVRSystem_PerformFirmwareUpdate(IntPtr instancePtr, uint unDeviceIndex);
105  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_AcknowledgeQuit_Exiting")]
106  internal static extern void VR_IVRSystem_AcknowledgeQuit_Exiting(IntPtr instancePtr);
107  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_AcknowledgeQuit_UserPrompt")]
108  internal static extern void VR_IVRSystem_AcknowledgeQuit_UserPrompt(IntPtr instancePtr);
109  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PerformanceTestEnableCapture")]
110  internal static extern void VR_IVRSystem_PerformanceTestEnableCapture(IntPtr instancePtr, bool bEnable);
111  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSystem_PerformanceTestReportFidelityLevelChange")]
112  internal static extern void VR_IVRSystem_PerformanceTestReportFidelityLevelChange(IntPtr instancePtr, int nFidelityLevel);
113  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRExtendedDisplay_GetWindowBounds")]
114  internal static extern void VR_IVRExtendedDisplay_GetWindowBounds(IntPtr instancePtr, ref int pnX, ref int pnY, ref uint pnWidth, ref uint pnHeight);
115  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRExtendedDisplay_GetEyeOutputViewport")]
116  internal static extern void VR_IVRExtendedDisplay_GetEyeOutputViewport(IntPtr instancePtr, EVREye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
117  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRExtendedDisplay_GetDXGIOutputInfo")]
118  internal static extern void VR_IVRExtendedDisplay_GetDXGIOutputInfo(IntPtr instancePtr, ref int pnAdapterIndex, ref int pnAdapterOutputIndex);
119  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_AddApplicationManifest")]
120  internal static extern EVRApplicationError VR_IVRApplications_AddApplicationManifest(IntPtr instancePtr, string pchApplicationManifestFullPath, bool bTemporary);
121  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_RemoveApplicationManifest")]
122  internal static extern EVRApplicationError VR_IVRApplications_RemoveApplicationManifest(IntPtr instancePtr, string pchApplicationManifestFullPath);
123  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_IsApplicationInstalled")]
124  internal static extern bool VR_IVRApplications_IsApplicationInstalled(IntPtr instancePtr, string pchAppKey);
125  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationCount")]
126  internal static extern uint VR_IVRApplications_GetApplicationCount(IntPtr instancePtr);
127  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationKeyByIndex")]
128  internal static extern EVRApplicationError VR_IVRApplications_GetApplicationKeyByIndex(IntPtr instancePtr, uint unApplicationIndex, string pchAppKeyBuffer, uint unAppKeyBufferLen);
129  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationKeyByProcessId")]
130  internal static extern EVRApplicationError VR_IVRApplications_GetApplicationKeyByProcessId(IntPtr instancePtr, uint unProcessId, string pchAppKeyBuffer, uint unAppKeyBufferLen);
131  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_LaunchApplication")]
132  internal static extern EVRApplicationError VR_IVRApplications_LaunchApplication(IntPtr instancePtr, string pchAppKey);
133  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_LaunchDashboardOverlay")]
134  internal static extern EVRApplicationError VR_IVRApplications_LaunchDashboardOverlay(IntPtr instancePtr, string pchAppKey);
135  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_IdentifyApplication")]
136  internal static extern EVRApplicationError VR_IVRApplications_IdentifyApplication(IntPtr instancePtr, uint unProcessId, string pchAppKey);
137  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationProcessId")]
138  internal static extern uint VR_IVRApplications_GetApplicationProcessId(IntPtr instancePtr, string pchAppKey);
139  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationsErrorNameFromEnum")]
140  internal static extern IntPtr VR_IVRApplications_GetApplicationsErrorNameFromEnum(IntPtr instancePtr, EVRApplicationError error);
141  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationPropertyString")]
142  internal static extern uint VR_IVRApplications_GetApplicationPropertyString(IntPtr instancePtr, string pchAppKey, EVRApplicationProperty eProperty, string pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError);
143  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationPropertyBool")]
144  internal static extern bool VR_IVRApplications_GetApplicationPropertyBool(IntPtr instancePtr, string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
145  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationPropertyUint64")]
146  internal static extern ulong VR_IVRApplications_GetApplicationPropertyUint64(IntPtr instancePtr, string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
147  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_SetApplicationAutoLaunch")]
148  internal static extern EVRApplicationError VR_IVRApplications_SetApplicationAutoLaunch(IntPtr instancePtr, string pchAppKey, bool bAutoLaunch);
149  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationAutoLaunch")]
150  internal static extern bool VR_IVRApplications_GetApplicationAutoLaunch(IntPtr instancePtr, string pchAppKey);
151  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetStartingApplication")]
152  internal static extern EVRApplicationError VR_IVRApplications_GetStartingApplication(IntPtr instancePtr, string pchAppKeyBuffer, uint unAppKeyBufferLen);
153  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetTransitionState")]
154  internal static extern EVRApplicationTransitionState VR_IVRApplications_GetTransitionState(IntPtr instancePtr);
155  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_PerformApplicationPrelaunchCheck")]
156  internal static extern EVRApplicationError VR_IVRApplications_PerformApplicationPrelaunchCheck(IntPtr instancePtr, string pchAppKey);
157  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_GetApplicationsTransitionStateNameFromEnum")]
158  internal static extern IntPtr VR_IVRApplications_GetApplicationsTransitionStateNameFromEnum(IntPtr instancePtr, EVRApplicationTransitionState state);
159  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRApplications_IsQuitUserPromptRequested")]
160  internal static extern bool VR_IVRApplications_IsQuitUserPromptRequested(IntPtr instancePtr);
161  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_GetCalibrationState")]
162  internal static extern ChaperoneCalibrationState VR_IVRChaperone_GetCalibrationState(IntPtr instancePtr);
163  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_GetPlayAreaSize")]
164  internal static extern bool VR_IVRChaperone_GetPlayAreaSize(IntPtr instancePtr, ref float pSizeX, ref float pSizeZ);
165  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_GetPlayAreaRect")]
166  internal static extern bool VR_IVRChaperone_GetPlayAreaRect(IntPtr instancePtr, ref HmdQuad_t rect);
167  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_ReloadInfo")]
168  internal static extern void VR_IVRChaperone_ReloadInfo(IntPtr instancePtr);
169  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_SetSceneColor")]
170  internal static extern void VR_IVRChaperone_SetSceneColor(IntPtr instancePtr, HmdColor_t color);
171  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_GetBoundsColor")]
172  internal static extern void VR_IVRChaperone_GetBoundsColor(IntPtr instancePtr, ref HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutputCameraColor);
173  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_AreBoundsVisible")]
174  internal static extern bool VR_IVRChaperone_AreBoundsVisible(IntPtr instancePtr);
175  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperone_ForceBoundsVisible")]
176  internal static extern void VR_IVRChaperone_ForceBoundsVisible(IntPtr instancePtr, bool bForce);
177  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_CommitWorkingCopy")]
178  internal static extern bool VR_IVRChaperoneSetup_CommitWorkingCopy(IntPtr instancePtr, EChaperoneConfigFile configFile);
179  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_RevertWorkingCopy")]
180  internal static extern void VR_IVRChaperoneSetup_RevertWorkingCopy(IntPtr instancePtr);
181  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetWorkingPlayAreaSize")]
182  internal static extern bool VR_IVRChaperoneSetup_GetWorkingPlayAreaSize(IntPtr instancePtr, ref float pSizeX, ref float pSizeZ);
183  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetWorkingPlayAreaRect")]
184  internal static extern bool VR_IVRChaperoneSetup_GetWorkingPlayAreaRect(IntPtr instancePtr, ref HmdQuad_t rect);
185  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetWorkingCollisionBoundsInfo")]
186  internal static extern bool VR_IVRChaperoneSetup_GetWorkingCollisionBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
187  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLiveCollisionBoundsInfo")]
188  internal static extern bool VR_IVRChaperoneSetup_GetLiveCollisionBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
189  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetWorkingSeatedZeroPoseToRawTrackingPose")]
190  internal static extern bool VR_IVRChaperoneSetup_GetWorkingSeatedZeroPoseToRawTrackingPose(IntPtr instancePtr, ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
191  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetWorkingStandingZeroPoseToRawTrackingPose")]
192  internal static extern bool VR_IVRChaperoneSetup_GetWorkingStandingZeroPoseToRawTrackingPose(IntPtr instancePtr, ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose);
193  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingPlayAreaSize")]
194  internal static extern void VR_IVRChaperoneSetup_SetWorkingPlayAreaSize(IntPtr instancePtr, float sizeX, float sizeZ);
195  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingCollisionBoundsInfo")]
196  internal static extern void VR_IVRChaperoneSetup_SetWorkingCollisionBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount);
197  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingSeatedZeroPoseToRawTrackingPose")]
198  internal static extern void VR_IVRChaperoneSetup_SetWorkingSeatedZeroPoseToRawTrackingPose(IntPtr instancePtr, ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose);
199  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingStandingZeroPoseToRawTrackingPose")]
200  internal static extern void VR_IVRChaperoneSetup_SetWorkingStandingZeroPoseToRawTrackingPose(IntPtr instancePtr, ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose);
201  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_ReloadFromDisk")]
202  internal static extern void VR_IVRChaperoneSetup_ReloadFromDisk(IntPtr instancePtr, EChaperoneConfigFile configFile);
203  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose")]
204  internal static extern bool VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose(IntPtr instancePtr, ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
205  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo")]
206  internal static extern void VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo(IntPtr instancePtr, [In, Out] byte[] pTagsBuffer, uint unTagCount);
207  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo")]
208  internal static extern bool VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(IntPtr instancePtr, [In, Out] byte[] pTagsBuffer, ref uint punTagCount);
209  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo")]
210  internal static extern bool VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount);
211  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo")]
212  internal static extern bool VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(IntPtr instancePtr, [In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
213  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_SetTrackingSpace")]
214  internal static extern void VR_IVRCompositor_SetTrackingSpace(IntPtr instancePtr, ETrackingUniverseOrigin eOrigin);
215  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetTrackingSpace")]
216  internal static extern ETrackingUniverseOrigin VR_IVRCompositor_GetTrackingSpace(IntPtr instancePtr);
217  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_WaitGetPoses")]
218  internal static extern EVRCompositorError VR_IVRCompositor_WaitGetPoses(IntPtr instancePtr, [In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
219  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetLastPoses")]
220  internal static extern EVRCompositorError VR_IVRCompositor_GetLastPoses(IntPtr instancePtr, [In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
221  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_Submit")]
222  internal static extern EVRCompositorError VR_IVRCompositor_Submit(IntPtr instancePtr, EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags);
223  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_ClearLastSubmittedFrame")]
224  internal static extern void VR_IVRCompositor_ClearLastSubmittedFrame(IntPtr instancePtr);
225  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_PostPresentHandoff")]
226  internal static extern void VR_IVRCompositor_PostPresentHandoff(IntPtr instancePtr);
227  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetFrameTiming")]
228  internal static extern bool VR_IVRCompositor_GetFrameTiming(IntPtr instancePtr, ref Compositor_FrameTiming pTiming, uint unFramesAgo);
229  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetFrameTimeRemaining")]
230  internal static extern float VR_IVRCompositor_GetFrameTimeRemaining(IntPtr instancePtr);
231  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_FadeToColor")]
232  internal static extern void VR_IVRCompositor_FadeToColor(IntPtr instancePtr, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
233  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_FadeGrid")]
234  internal static extern void VR_IVRCompositor_FadeGrid(IntPtr instancePtr, float fSeconds, bool bFadeIn);
235  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_SetSkyboxOverride")]
236  internal static extern EVRCompositorError VR_IVRCompositor_SetSkyboxOverride(IntPtr instancePtr, [In, Out] Texture_t[] pTextures, uint unTextureCount);
237  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_ClearSkyboxOverride")]
238  internal static extern void VR_IVRCompositor_ClearSkyboxOverride(IntPtr instancePtr);
239  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CompositorBringToFront")]
240  internal static extern void VR_IVRCompositor_CompositorBringToFront(IntPtr instancePtr);
241  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CompositorGoToBack")]
242  internal static extern void VR_IVRCompositor_CompositorGoToBack(IntPtr instancePtr);
243  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CompositorQuit")]
244  internal static extern void VR_IVRCompositor_CompositorQuit(IntPtr instancePtr);
245  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_IsFullscreen")]
246  internal static extern bool VR_IVRCompositor_IsFullscreen(IntPtr instancePtr);
247  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetCurrentSceneFocusProcess")]
248  internal static extern uint VR_IVRCompositor_GetCurrentSceneFocusProcess(IntPtr instancePtr);
249  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_GetLastFrameRenderer")]
250  internal static extern uint VR_IVRCompositor_GetLastFrameRenderer(IntPtr instancePtr);
251  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CanRenderScene")]
252  internal static extern bool VR_IVRCompositor_CanRenderScene(IntPtr instancePtr);
253  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_ShowMirrorWindow")]
254  internal static extern void VR_IVRCompositor_ShowMirrorWindow(IntPtr instancePtr);
255  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_HideMirrorWindow")]
256  internal static extern void VR_IVRCompositor_HideMirrorWindow(IntPtr instancePtr);
257  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_IsMirrorWindowVisible")]
258  internal static extern bool VR_IVRCompositor_IsMirrorWindowVisible(IntPtr instancePtr);
259  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRCompositor_CompositorDumpImages")]
260  internal static extern void VR_IVRCompositor_CompositorDumpImages(IntPtr instancePtr);
261  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_FindOverlay")]
262  internal static extern EVROverlayError VR_IVROverlay_FindOverlay(IntPtr instancePtr, string pchOverlayKey, ref ulong pOverlayHandle);
263  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_CreateOverlay")]
264  internal static extern EVROverlayError VR_IVROverlay_CreateOverlay(IntPtr instancePtr, string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pOverlayHandle);
265  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_DestroyOverlay")]
266  internal static extern EVROverlayError VR_IVROverlay_DestroyOverlay(IntPtr instancePtr, ulong ulOverlayHandle);
267  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetHighQualityOverlay")]
268  internal static extern EVROverlayError VR_IVROverlay_SetHighQualityOverlay(IntPtr instancePtr, ulong ulOverlayHandle);
269  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetHighQualityOverlay")]
270  internal static extern ulong VR_IVROverlay_GetHighQualityOverlay(IntPtr instancePtr);
271  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayKey")]
272  internal static extern uint VR_IVROverlay_GetOverlayKey(IntPtr instancePtr, ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
273  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayName")]
274  internal static extern uint VR_IVROverlay_GetOverlayName(IntPtr instancePtr, ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
275  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayImageData")]
276  internal static extern EVROverlayError VR_IVROverlay_GetOverlayImageData(IntPtr instancePtr, ulong ulOverlayHandle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight);
277  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayErrorNameFromEnum")]
278  internal static extern IntPtr VR_IVROverlay_GetOverlayErrorNameFromEnum(IntPtr instancePtr, EVROverlayError error);
279  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayFlag")]
280  internal static extern EVROverlayError VR_IVROverlay_SetOverlayFlag(IntPtr instancePtr, ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
281  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayFlag")]
282  internal static extern EVROverlayError VR_IVROverlay_GetOverlayFlag(IntPtr instancePtr, ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled);
283  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayColor")]
284  internal static extern EVROverlayError VR_IVROverlay_SetOverlayColor(IntPtr instancePtr, ulong ulOverlayHandle, float fRed, float fGreen, float fBlue);
285  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayColor")]
286  internal static extern EVROverlayError VR_IVROverlay_GetOverlayColor(IntPtr instancePtr, ulong ulOverlayHandle, ref float pfRed, ref float pfGreen, ref float pfBlue);
287  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayAlpha")]
288  internal static extern EVROverlayError VR_IVROverlay_SetOverlayAlpha(IntPtr instancePtr, ulong ulOverlayHandle, float fAlpha);
289  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayAlpha")]
290  internal static extern EVROverlayError VR_IVROverlay_GetOverlayAlpha(IntPtr instancePtr, ulong ulOverlayHandle, ref float pfAlpha);
291  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayWidthInMeters")]
292  internal static extern EVROverlayError VR_IVROverlay_SetOverlayWidthInMeters(IntPtr instancePtr, ulong ulOverlayHandle, float fWidthInMeters);
293  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayWidthInMeters")]
294  internal static extern EVROverlayError VR_IVROverlay_GetOverlayWidthInMeters(IntPtr instancePtr, ulong ulOverlayHandle, ref float pfWidthInMeters);
295  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayAutoCurveDistanceRangeInMeters")]
296  internal static extern EVROverlayError VR_IVROverlay_SetOverlayAutoCurveDistanceRangeInMeters(IntPtr instancePtr, ulong ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters);
297  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayAutoCurveDistanceRangeInMeters")]
298  internal static extern EVROverlayError VR_IVROverlay_GetOverlayAutoCurveDistanceRangeInMeters(IntPtr instancePtr, ulong ulOverlayHandle, ref float pfMinDistanceInMeters, ref float pfMaxDistanceInMeters);
299  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTextureColorSpace")]
300  internal static extern EVROverlayError VR_IVROverlay_SetOverlayTextureColorSpace(IntPtr instancePtr, ulong ulOverlayHandle, EColorSpace eTextureColorSpace);
301  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTextureColorSpace")]
302  internal static extern EVROverlayError VR_IVROverlay_GetOverlayTextureColorSpace(IntPtr instancePtr, ulong ulOverlayHandle, ref EColorSpace peTextureColorSpace);
303  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTextureBounds")]
304  internal static extern EVROverlayError VR_IVROverlay_SetOverlayTextureBounds(IntPtr instancePtr, ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
305  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTextureBounds")]
306  internal static extern EVROverlayError VR_IVROverlay_GetOverlayTextureBounds(IntPtr instancePtr, ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
307  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTransformType")]
308  internal static extern EVROverlayError VR_IVROverlay_GetOverlayTransformType(IntPtr instancePtr, ulong ulOverlayHandle, ref VROverlayTransformType peTransformType);
309  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTransformAbsolute")]
310  internal static extern EVROverlayError VR_IVROverlay_SetOverlayTransformAbsolute(IntPtr instancePtr, ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
311  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTransformAbsolute")]
312  internal static extern EVROverlayError VR_IVROverlay_GetOverlayTransformAbsolute(IntPtr instancePtr, ulong ulOverlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
313  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTransformTrackedDeviceRelative")]
314  internal static extern EVROverlayError VR_IVROverlay_SetOverlayTransformTrackedDeviceRelative(IntPtr instancePtr, ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
315  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative")]
316  internal static extern EVROverlayError VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative(IntPtr instancePtr, ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
317  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent")]
318  internal static extern EVROverlayError VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent(IntPtr instancePtr, ulong ulOverlayHandle, uint unDeviceIndex, string pchComponentName);
319  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent")]
320  internal static extern EVROverlayError VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent(IntPtr instancePtr, ulong ulOverlayHandle, ref uint punDeviceIndex, string pchComponentName, uint unComponentNameSize);
321  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowOverlay")]
322  internal static extern EVROverlayError VR_IVROverlay_ShowOverlay(IntPtr instancePtr, ulong ulOverlayHandle);
323  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_HideOverlay")]
324  internal static extern EVROverlayError VR_IVROverlay_HideOverlay(IntPtr instancePtr, ulong ulOverlayHandle);
325  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_IsOverlayVisible")]
326  internal static extern bool VR_IVROverlay_IsOverlayVisible(IntPtr instancePtr, ulong ulOverlayHandle);
327  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetTransformForOverlayCoordinates")]
328  internal static extern EVROverlayError VR_IVROverlay_GetTransformForOverlayCoordinates(IntPtr instancePtr, ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform);
329  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_PollNextOverlayEvent")]
330  internal static extern bool VR_IVROverlay_PollNextOverlayEvent(IntPtr instancePtr, ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent);
331  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayInputMethod")]
332  internal static extern EVROverlayError VR_IVROverlay_GetOverlayInputMethod(IntPtr instancePtr, ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod);
333  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayInputMethod")]
334  internal static extern EVROverlayError VR_IVROverlay_SetOverlayInputMethod(IntPtr instancePtr, ulong ulOverlayHandle, VROverlayInputMethod eInputMethod);
335  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetOverlayMouseScale")]
336  internal static extern EVROverlayError VR_IVROverlay_GetOverlayMouseScale(IntPtr instancePtr, ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
337  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayMouseScale")]
338  internal static extern EVROverlayError VR_IVROverlay_SetOverlayMouseScale(IntPtr instancePtr, ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
339  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ComputeOverlayIntersection")]
340  internal static extern bool VR_IVROverlay_ComputeOverlayIntersection(IntPtr instancePtr, ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults);
341  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_HandleControllerOverlayInteractionAsMouse")]
342  internal static extern bool VR_IVROverlay_HandleControllerOverlayInteractionAsMouse(IntPtr instancePtr, ulong ulOverlayHandle, uint unControllerDeviceIndex);
343  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_IsHoverTargetOverlay")]
344  internal static extern bool VR_IVROverlay_IsHoverTargetOverlay(IntPtr instancePtr, ulong ulOverlayHandle);
345  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetGamepadFocusOverlay")]
346  internal static extern ulong VR_IVROverlay_GetGamepadFocusOverlay(IntPtr instancePtr);
347  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetGamepadFocusOverlay")]
348  internal static extern EVROverlayError VR_IVROverlay_SetGamepadFocusOverlay(IntPtr instancePtr, ulong ulNewFocusOverlay);
349  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayNeighbor")]
350  internal static extern EVROverlayError VR_IVROverlay_SetOverlayNeighbor(IntPtr instancePtr, EOverlayDirection eDirection, ulong ulFrom, ulong ulTo);
351  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_MoveGamepadFocusToNeighbor")]
352  internal static extern EVROverlayError VR_IVROverlay_MoveGamepadFocusToNeighbor(IntPtr instancePtr, EOverlayDirection eDirection, ulong ulFrom);
353  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayTexture")]
354  internal static extern EVROverlayError VR_IVROverlay_SetOverlayTexture(IntPtr instancePtr, ulong ulOverlayHandle, ref Texture_t pTexture);
355  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ClearOverlayTexture")]
356  internal static extern EVROverlayError VR_IVROverlay_ClearOverlayTexture(IntPtr instancePtr, ulong ulOverlayHandle);
357  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayRaw")]
358  internal static extern EVROverlayError VR_IVROverlay_SetOverlayRaw(IntPtr instancePtr, ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth);
359  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetOverlayFromFile")]
360  internal static extern EVROverlayError VR_IVROverlay_SetOverlayFromFile(IntPtr instancePtr, ulong ulOverlayHandle, string pchFilePath);
361  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_CreateDashboardOverlay")]
362  internal static extern EVROverlayError VR_IVROverlay_CreateDashboardOverlay(IntPtr instancePtr, string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle);
363  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_IsDashboardVisible")]
364  internal static extern bool VR_IVROverlay_IsDashboardVisible(IntPtr instancePtr);
365  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_IsActiveDashboardOverlay")]
366  internal static extern bool VR_IVROverlay_IsActiveDashboardOverlay(IntPtr instancePtr, ulong ulOverlayHandle);
367  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetDashboardOverlaySceneProcess")]
368  internal static extern EVROverlayError VR_IVROverlay_SetDashboardOverlaySceneProcess(IntPtr instancePtr, ulong ulOverlayHandle, uint unProcessId);
369  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetDashboardOverlaySceneProcess")]
370  internal static extern EVROverlayError VR_IVROverlay_GetDashboardOverlaySceneProcess(IntPtr instancePtr, ulong ulOverlayHandle, ref uint punProcessId);
371  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowDashboard")]
372  internal static extern void VR_IVROverlay_ShowDashboard(IntPtr instancePtr, string pchOverlayToShow);
373  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetPrimaryDashboardDevice")]
374  internal static extern uint VR_IVROverlay_GetPrimaryDashboardDevice(IntPtr instancePtr);
375  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowKeyboard")]
376  internal static extern EVROverlayError VR_IVROverlay_ShowKeyboard(IntPtr instancePtr, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue);
377  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_ShowKeyboardForOverlay")]
378  internal static extern EVROverlayError VR_IVROverlay_ShowKeyboardForOverlay(IntPtr instancePtr, ulong ulOverlayHandle, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue);
379  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_GetKeyboardText")]
380  internal static extern uint VR_IVROverlay_GetKeyboardText(IntPtr instancePtr, System.Text.StringBuilder pchText, uint cchText);
381  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_HideKeyboard")]
382  internal static extern void VR_IVROverlay_HideKeyboard(IntPtr instancePtr);
383  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetKeyboardTransformAbsolute")]
384  internal static extern void VR_IVROverlay_SetKeyboardTransformAbsolute(IntPtr instancePtr, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform);
385  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVROverlay_SetKeyboardPositionForOverlay")]
386  internal static extern void VR_IVROverlay_SetKeyboardPositionForOverlay(IntPtr instancePtr, ulong ulOverlayHandle, HmdRect2_t avoidRect);
387  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_LoadRenderModel_Async")]
388  internal static extern EVRRenderModelError VR_IVRRenderModels_LoadRenderModel_Async(IntPtr instancePtr, string pchRenderModelName, ref IntPtr ppRenderModel);
389  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_FreeRenderModel")]
390  internal static extern void VR_IVRRenderModels_FreeRenderModel(IntPtr instancePtr, IntPtr pRenderModel);
391  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_LoadTexture_Async")]
392  internal static extern EVRRenderModelError VR_IVRRenderModels_LoadTexture_Async(IntPtr instancePtr, int textureId, ref IntPtr ppTexture);
393  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_FreeTexture")]
394  internal static extern void VR_IVRRenderModels_FreeTexture(IntPtr instancePtr, IntPtr pTexture);
395  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_LoadTextureD3D11_Async")]
396  internal static extern EVRRenderModelError VR_IVRRenderModels_LoadTextureD3D11_Async(IntPtr instancePtr, int textureId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D);
397  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_FreeTextureD3D11")]
398  internal static extern void VR_IVRRenderModels_FreeTextureD3D11(IntPtr instancePtr, IntPtr pD3D11Texture2D);
399  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetRenderModelName")]
400  internal static extern uint VR_IVRRenderModels_GetRenderModelName(IntPtr instancePtr, uint unRenderModelIndex, System.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen);
401  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetRenderModelCount")]
402  internal static extern uint VR_IVRRenderModels_GetRenderModelCount(IntPtr instancePtr);
403  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetComponentCount")]
404  internal static extern uint VR_IVRRenderModels_GetComponentCount(IntPtr instancePtr, string pchRenderModelName);
405  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetComponentName")]
406  internal static extern uint VR_IVRRenderModels_GetComponentName(IntPtr instancePtr, string pchRenderModelName, uint unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameLen);
407  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetComponentButtonMask")]
408  internal static extern ulong VR_IVRRenderModels_GetComponentButtonMask(IntPtr instancePtr, string pchRenderModelName, string pchComponentName);
409  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetComponentRenderModelName")]
410  internal static extern uint VR_IVRRenderModels_GetComponentRenderModelName(IntPtr instancePtr, string pchRenderModelName, string pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen);
411  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_GetComponentState")]
412  internal static extern bool VR_IVRRenderModels_GetComponentState(IntPtr instancePtr, string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
413  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRRenderModels_RenderModelHasComponent")]
414  internal static extern bool VR_IVRRenderModels_RenderModelHasComponent(IntPtr instancePtr, string pchRenderModelName, string pchComponentName);
415  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRNotifications_CreateNotification")]
416  internal static extern EVRNotificationError VR_IVRNotifications_CreateNotification(IntPtr instancePtr, ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, string pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId);
417  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRNotifications_RemoveNotification")]
418  internal static extern EVRNotificationError VR_IVRNotifications_RemoveNotification(IntPtr instancePtr, uint notificationId);
419  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetSettingsErrorNameFromEnum")]
420  internal static extern IntPtr VR_IVRSettings_GetSettingsErrorNameFromEnum(IntPtr instancePtr, EVRSettingsError eError);
421  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_Sync")]
422  internal static extern bool VR_IVRSettings_Sync(IntPtr instancePtr, bool bForce, ref EVRSettingsError peError);
423  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetBool")]
424  internal static extern bool VR_IVRSettings_GetBool(IntPtr instancePtr, string pchSection, string pchSettingsKey, bool bDefaultValue, ref EVRSettingsError peError);
425  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetBool")]
426  internal static extern void VR_IVRSettings_SetBool(IntPtr instancePtr, string pchSection, string pchSettingsKey, bool bValue, ref EVRSettingsError peError);
427  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetInt32")]
428  internal static extern int VR_IVRSettings_GetInt32(IntPtr instancePtr, string pchSection, string pchSettingsKey, int nDefaultValue, ref EVRSettingsError peError);
429  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetInt32")]
430  internal static extern void VR_IVRSettings_SetInt32(IntPtr instancePtr, string pchSection, string pchSettingsKey, int nValue, ref EVRSettingsError peError);
431  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetFloat")]
432  internal static extern float VR_IVRSettings_GetFloat(IntPtr instancePtr, string pchSection, string pchSettingsKey, float flDefaultValue, ref EVRSettingsError peError);
433  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetFloat")]
434  internal static extern void VR_IVRSettings_SetFloat(IntPtr instancePtr, string pchSection, string pchSettingsKey, float flValue, ref EVRSettingsError peError);
435  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_GetString")]
436  internal static extern void VR_IVRSettings_GetString(IntPtr instancePtr, string pchSection, string pchSettingsKey, string pchValue, uint unValueLen, string pchDefaultValue, ref EVRSettingsError peError);
437  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_SetString")]
438  internal static extern void VR_IVRSettings_SetString(IntPtr instancePtr, string pchSection, string pchSettingsKey, string pchValue, ref EVRSettingsError peError);
439  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRSettings_RemoveSection")]
440  internal static extern void VR_IVRSettings_RemoveSection(IntPtr instancePtr, string pchSection, ref EVRSettingsError peError);
441  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_HasCamera")]
442  internal static extern bool VR_IVRTrackedCamera_HasCamera(IntPtr instancePtr, uint nDeviceIndex);
443  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraFirmwareDescription")]
444  internal static extern bool VR_IVRTrackedCamera_GetCameraFirmwareDescription(IntPtr instancePtr, uint nDeviceIndex, string pBuffer, uint nBufferLen);
445  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraFrameDimensions")]
446  internal static extern bool VR_IVRTrackedCamera_GetCameraFrameDimensions(IntPtr instancePtr, uint nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat, ref uint pWidth, ref uint pHeight);
447  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_SetCameraVideoStreamFormat")]
448  internal static extern bool VR_IVRTrackedCamera_SetCameraVideoStreamFormat(IntPtr instancePtr, uint nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat);
449  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraVideoStreamFormat")]
450  internal static extern ECameraVideoStreamFormat VR_IVRTrackedCamera_GetCameraVideoStreamFormat(IntPtr instancePtr, uint nDeviceIndex);
451  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_EnableCameraForStreaming")]
452  internal static extern bool VR_IVRTrackedCamera_EnableCameraForStreaming(IntPtr instancePtr, uint nDeviceIndex, bool bEnable);
453  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_StartVideoStream")]
454  internal static extern bool VR_IVRTrackedCamera_StartVideoStream(IntPtr instancePtr, uint nDeviceIndex);
455  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_StopVideoStream")]
456  internal static extern bool VR_IVRTrackedCamera_StopVideoStream(IntPtr instancePtr, uint nDeviceIndex);
457  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_IsVideoStreamActive")]
458  internal static extern bool VR_IVRTrackedCamera_IsVideoStreamActive(IntPtr instancePtr, uint nDeviceIndex, ref bool pbPaused, ref float pflElapsedTime);
459  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetVideoStreamFrame")]
460  internal static extern IntPtr VR_IVRTrackedCamera_GetVideoStreamFrame(IntPtr instancePtr, uint nDeviceIndex);
461  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_ReleaseVideoStreamFrame")]
462  internal static extern bool VR_IVRTrackedCamera_ReleaseVideoStreamFrame(IntPtr instancePtr, uint nDeviceIndex, ref CameraVideoStreamFrame_t pFrameImage);
463  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_SetAutoExposure")]
464  internal static extern bool VR_IVRTrackedCamera_SetAutoExposure(IntPtr instancePtr, uint nDeviceIndex, bool bEnable);
465  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_PauseVideoStream")]
466  internal static extern bool VR_IVRTrackedCamera_PauseVideoStream(IntPtr instancePtr, uint nDeviceIndex);
467  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_ResumeVideoStream")]
468  internal static extern bool VR_IVRTrackedCamera_ResumeVideoStream(IntPtr instancePtr, uint nDeviceIndex);
469  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraDistortion")]
470  internal static extern bool VR_IVRTrackedCamera_GetCameraDistortion(IntPtr instancePtr, uint nDeviceIndex, float flInputU, float flInputV, ref float pflOutputU, ref float pflOutputV);
471  [DllImportAttribute("openvr_api", EntryPoint = "VR_IVRTrackedCamera_GetCameraProjection")]
472  internal static extern bool VR_IVRTrackedCamera_GetCameraProjection(IntPtr instancePtr, uint nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
473 
474 }
475 
476 }
477 
478 namespace Valve.VR
479 {
480 
481 public abstract class IVRSystem
482 {
483  public abstract IntPtr GetIntPtr();
484  public abstract void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnHeight);
485  public abstract HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ,EGraphicsAPIConvention eProjType);
486  public abstract void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom);
487  public abstract DistortionCoordinates_t ComputeDistortion(EVREye eEye,float fU,float fV);
488  public abstract HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye);
489  public abstract bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref ulong pulFrameCounter);
490  public abstract int GetD3D9AdapterIndex();
491  public abstract void GetDXGIOutputInfo(ref int pnAdapterIndex);
492  public abstract bool IsDisplayOnDesktop();
493  public abstract bool SetDisplayVisibility(bool bIsVisibleOnDesktop);
494  public abstract void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray);
495  public abstract void ResetSeatedZeroPose();
496  public abstract HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
497  public abstract HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose();
498  public abstract uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex);
499  public abstract EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId);
500  public abstract void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform);
501  public abstract uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType);
502  public abstract ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex);
503  public abstract ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex);
504  public abstract bool IsTrackedDeviceConnected(uint unDeviceIndex);
505  public abstract bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError);
506  public abstract float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError);
507  public abstract int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError);
508  public abstract ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError);
509  public abstract HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError);
510  public abstract uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError);
511  public abstract string GetPropErrorNameFromEnum(ETrackedPropertyError error);
512  public abstract bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent);
513  public abstract bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose);
514  public abstract string GetEventTypeNameFromEnum(EVREventType eType);
515  public abstract HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye);
516  public abstract bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState);
517  public abstract bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,ref TrackedDevicePose_t pTrackedDevicePose);
518  public abstract void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,char usDurationMicroSec);
519  public abstract string GetButtonIdNameFromEnum(EVRButtonId eButtonId);
520  public abstract string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType);
521  public abstract bool CaptureInputFocus();
522  public abstract void ReleaseInputFocus();
523  public abstract bool IsInputFocusCapturedByAnotherProcess();
524  public abstract uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,string pchResponseBuffer,uint unResponseBufferSize);
525  public abstract EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex);
526  public abstract void AcknowledgeQuit_Exiting();
527  public abstract void AcknowledgeQuit_UserPrompt();
528  public abstract void PerformanceTestEnableCapture(bool bEnable);
529  public abstract void PerformanceTestReportFidelityLevelChange(int nFidelityLevel);
530 }
531 
532 
533 public abstract class IVRExtendedDisplay
534 {
535  public abstract IntPtr GetIntPtr();
536  public abstract void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref uint pnHeight);
537  public abstract void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight);
538  public abstract void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOutputIndex);
539 }
540 
541 
542 public abstract class IVRApplications
543 {
544  public abstract IntPtr GetIntPtr();
545  public abstract EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath,bool bTemporary);
546  public abstract EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath);
547  public abstract bool IsApplicationInstalled(string pchAppKey);
548  public abstract uint GetApplicationCount();
549  public abstract EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex,string pchAppKeyBuffer,uint unAppKeyBufferLen);
550  public abstract EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId,string pchAppKeyBuffer,uint unAppKeyBufferLen);
551  public abstract EVRApplicationError LaunchApplication(string pchAppKey);
552  public abstract EVRApplicationError LaunchDashboardOverlay(string pchAppKey);
553  public abstract EVRApplicationError IdentifyApplication(uint unProcessId,string pchAppKey);
554  public abstract uint GetApplicationProcessId(string pchAppKey);
555  public abstract string GetApplicationsErrorNameFromEnum(EVRApplicationError error);
556  public abstract uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,string pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError);
557  public abstract bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError);
558  public abstract ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError);
559  public abstract EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch);
560  public abstract bool GetApplicationAutoLaunch(string pchAppKey);
561  public abstract EVRApplicationError GetStartingApplication(string pchAppKeyBuffer,uint unAppKeyBufferLen);
562  public abstract EVRApplicationTransitionState GetTransitionState();
563  public abstract EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey);
564  public abstract string GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state);
565  public abstract bool IsQuitUserPromptRequested();
566 }
567 
568 
569 public abstract class IVRChaperone
570 {
571  public abstract IntPtr GetIntPtr();
572  public abstract ChaperoneCalibrationState GetCalibrationState();
573  public abstract bool GetPlayAreaSize(ref float pSizeX,ref float pSizeZ);
574  public abstract bool GetPlayAreaRect(ref HmdQuad_t rect);
575  public abstract void ReloadInfo();
576  public abstract void SetSceneColor(HmdColor_t color);
577  public abstract void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors,float flCollisionBoundsFadeDistance,ref HmdColor_t pOutputCameraColor);
578  public abstract bool AreBoundsVisible();
579  public abstract void ForceBoundsVisible(bool bForce);
580 }
581 
582 
583 public abstract class IVRChaperoneSetup
584 {
585  public abstract IntPtr GetIntPtr();
586  public abstract bool CommitWorkingCopy(EChaperoneConfigFile configFile);
587  public abstract void RevertWorkingCopy();
588  public abstract bool GetWorkingPlayAreaSize(ref float pSizeX,ref float pSizeZ);
589  public abstract bool GetWorkingPlayAreaRect(ref HmdQuad_t rect);
590  public abstract bool GetWorkingCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer);
591  public abstract bool GetLiveCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer);
592  public abstract bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
593  public abstract bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose);
594  public abstract void SetWorkingPlayAreaSize(float sizeX,float sizeZ);
595  public abstract void SetWorkingCollisionBoundsInfo(HmdQuad_t [] pQuadsBuffer);
596  public abstract void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose);
597  public abstract void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose);
598  public abstract void ReloadFromDisk(EChaperoneConfigFile configFile);
599  public abstract bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
600  public abstract void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer);
601  public abstract bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer);
602  public abstract bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer);
603  public abstract bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer);
604 }
605 
606 
607 public abstract class IVRCompositor
608 {
609  public abstract IntPtr GetIntPtr();
610  public abstract void SetTrackingSpace(ETrackingUniverseOrigin eOrigin);
611  public abstract ETrackingUniverseOrigin GetTrackingSpace();
612  public abstract EVRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray);
613  public abstract EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray);
614  public abstract EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags);
615  public abstract void ClearLastSubmittedFrame();
616  public abstract void PostPresentHandoff();
617  public abstract bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo);
618  public abstract float GetFrameTimeRemaining();
619  public abstract void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground);
620  public abstract void FadeGrid(float fSeconds,bool bFadeIn);
621  public abstract EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures);
622  public abstract void ClearSkyboxOverride();
623  public abstract void CompositorBringToFront();
624  public abstract void CompositorGoToBack();
625  public abstract void CompositorQuit();
626  public abstract bool IsFullscreen();
627  public abstract uint GetCurrentSceneFocusProcess();
628  public abstract uint GetLastFrameRenderer();
629  public abstract bool CanRenderScene();
630  public abstract void ShowMirrorWindow();
631  public abstract void HideMirrorWindow();
632  public abstract bool IsMirrorWindowVisible();
633  public abstract void CompositorDumpImages();
634 }
635 
636 
637 public abstract class IVROverlay
638 {
639  public abstract IntPtr GetIntPtr();
640  public abstract EVROverlayError FindOverlay(string pchOverlayKey,ref ulong pOverlayHandle);
641  public abstract EVROverlayError CreateOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pOverlayHandle);
642  public abstract EVROverlayError DestroyOverlay(ulong ulOverlayHandle);
643  public abstract EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle);
644  public abstract ulong GetHighQualityOverlay();
645  public abstract uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError);
646  public abstract uint GetOverlayName(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError);
647  public abstract EVROverlayError GetOverlayImageData(ulong ulOverlayHandle,IntPtr pvBuffer,uint unBufferSize,ref uint punWidth,ref uint punHeight);
648  public abstract string GetOverlayErrorNameFromEnum(EVROverlayError error);
649  public abstract EVROverlayError SetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,bool bEnabled);
650  public abstract EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,ref bool pbEnabled);
651  public abstract EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue);
652  public abstract EVROverlayError GetOverlayColor(ulong ulOverlayHandle,ref float pfRed,ref float pfGreen,ref float pfBlue);
653  public abstract EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle,float fAlpha);
654  public abstract EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle,ref float pfAlpha);
655  public abstract EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,float fWidthInMeters);
656  public abstract EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref float pfWidthInMeters);
657  public abstract EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,float fMinDistanceInMeters,float fMaxDistanceInMeters);
658  public abstract EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,ref float pfMinDistanceInMeters,ref float pfMaxDistanceInMeters);
659  public abstract EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace);
660  public abstract EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle,ref EColorSpace peTextureColorSpace);
661  public abstract EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds);
662  public abstract EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds);
663  public abstract EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref VROverlayTransformType peTransformType);
664  public abstract EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
665  public abstract EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
666  public abstract EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
667  public abstract EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
668  public abstract EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName);
669  public abstract EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,string pchComponentName,uint unComponentNameSize);
670  public abstract EVROverlayError ShowOverlay(ulong ulOverlayHandle);
671  public abstract EVROverlayError HideOverlay(ulong ulOverlayHandle);
672  public abstract bool IsOverlayVisible(ulong ulOverlayHandle);
673  public abstract EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay,ref HmdMatrix34_t pmatTransform);
674  public abstract bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent);
675  public abstract EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod);
676  public abstract EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROverlayInputMethod eInputMethod);
677  public abstract EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale);
678  public abstract EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale);
679  public abstract bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverlayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults);
680  public abstract bool HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHandle,uint unControllerDeviceIndex);
681  public abstract bool IsHoverTargetOverlay(ulong ulOverlayHandle);
682  public abstract ulong GetGamepadFocusOverlay();
683  public abstract EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay);
684  public abstract EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection,ulong ulFrom,ulong ulTo);
685  public abstract EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection,ulong ulFrom);
686  public abstract EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture);
687  public abstract EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle);
688  public abstract EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth);
689  public abstract EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath);
690  public abstract EVROverlayError CreateDashboardOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle);
691  public abstract bool IsDashboardVisible();
692  public abstract bool IsActiveDashboardOverlay(ulong ulOverlayHandle);
693  public abstract EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle,uint unProcessId);
694  public abstract EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle,ref uint punProcessId);
695  public abstract void ShowDashboard(string pchOverlayToShow);
696  public abstract uint GetPrimaryDashboardDevice();
697  public abstract EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue);
698  public abstract EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue);
699  public abstract uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText);
700  public abstract void HideKeyboard();
701  public abstract void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform);
702  public abstract void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2_t avoidRect);
703 }
704 
705 
706 public abstract class IVRRenderModels
707 {
708  public abstract IntPtr GetIntPtr();
709  public abstract EVRRenderModelError LoadRenderModel_Async(string pchRenderModelName,ref IntPtr ppRenderModel);
710  public abstract void FreeRenderModel(IntPtr pRenderModel);
711  public abstract EVRRenderModelError LoadTexture_Async(int textureId,ref IntPtr ppTexture);
712  public abstract void FreeTexture(IntPtr pTexture);
713  public abstract EVRRenderModelError LoadTextureD3D11_Async(int textureId,IntPtr pD3D11Device,ref IntPtr ppD3D11Texture2D);
714  public abstract void FreeTextureD3D11(IntPtr pD3D11Texture2D);
715  public abstract uint GetRenderModelName(uint unRenderModelIndex,System.Text.StringBuilder pchRenderModelName,uint unRenderModelNameLen);
716  public abstract uint GetRenderModelCount();
717  public abstract uint GetComponentCount(string pchRenderModelName);
718  public abstract uint GetComponentName(string pchRenderModelName,uint unComponentIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameLen);
719  public abstract ulong GetComponentButtonMask(string pchRenderModelName,string pchComponentName);
720  public abstract uint GetComponentRenderModelName(string pchRenderModelName,string pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unComponentRenderModelNameLen);
721  public abstract bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState);
722  public abstract bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName);
723 }
724 
725 
726 public abstract class IVRNotifications
727 {
728  public abstract IntPtr GetIntPtr();
729  public abstract EVRNotificationError CreateNotification(ulong ulOverlayHandle,ulong ulUserValue,EVRNotificationType type,string pchText,EVRNotificationStyle style,ref NotificationBitmap_t pImage,ref uint pNotificationId);
730  public abstract EVRNotificationError RemoveNotification(uint notificationId);
731 }
732 
733 
734 public abstract class IVRSettings
735 {
736  public abstract IntPtr GetIntPtr();
737  public abstract string GetSettingsErrorNameFromEnum(EVRSettingsError eError);
738  public abstract bool Sync(bool bForce,ref EVRSettingsError peError);
739  public abstract bool GetBool(string pchSection,string pchSettingsKey,bool bDefaultValue,ref EVRSettingsError peError);
740  public abstract void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError);
741  public abstract int GetInt32(string pchSection,string pchSettingsKey,int nDefaultValue,ref EVRSettingsError peError);
742  public abstract void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref EVRSettingsError peError);
743  public abstract float GetFloat(string pchSection,string pchSettingsKey,float flDefaultValue,ref EVRSettingsError peError);
744  public abstract void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref EVRSettingsError peError);
745  public abstract void GetString(string pchSection,string pchSettingsKey,string pchValue,uint unValueLen,string pchDefaultValue,ref EVRSettingsError peError);
746  public abstract void SetString(string pchSection,string pchSettingsKey,string pchValue,ref EVRSettingsError peError);
747  public abstract void RemoveSection(string pchSection,ref EVRSettingsError peError);
748 }
749 
750 
751 public abstract class IVRTrackedCamera
752 {
753  public abstract IntPtr GetIntPtr();
754  public abstract bool HasCamera(uint nDeviceIndex);
755  public abstract bool GetCameraFirmwareDescription(uint nDeviceIndex,string pBuffer,uint nBufferLen);
756  public abstract bool GetCameraFrameDimensions(uint nDeviceIndex,ECameraVideoStreamFormat nVideoStreamFormat,ref uint pWidth,ref uint pHeight);
757  public abstract bool SetCameraVideoStreamFormat(uint nDeviceIndex,ECameraVideoStreamFormat nVideoStreamFormat);
758  public abstract ECameraVideoStreamFormat GetCameraVideoStreamFormat(uint nDeviceIndex);
759  public abstract bool EnableCameraForStreaming(uint nDeviceIndex,bool bEnable);
760  public abstract bool StartVideoStream(uint nDeviceIndex);
761  public abstract bool StopVideoStream(uint nDeviceIndex);
762  public abstract bool IsVideoStreamActive(uint nDeviceIndex,ref bool pbPaused,ref float pflElapsedTime);
763  public abstract CameraVideoStreamFrame_t GetVideoStreamFrame(uint nDeviceIndex);
764  public abstract bool ReleaseVideoStreamFrame(uint nDeviceIndex,ref CameraVideoStreamFrame_t pFrameImage);
765  public abstract bool SetAutoExposure(uint nDeviceIndex,bool bEnable);
766  public abstract bool PauseVideoStream(uint nDeviceIndex);
767  public abstract bool ResumeVideoStream(uint nDeviceIndex);
768  public abstract bool GetCameraDistortion(uint nDeviceIndex,float flInputU,float flInputV,ref float pflOutputU,ref float pflOutputV);
769  public abstract bool GetCameraProjection(uint nDeviceIndex,float flWidthPixels,float flHeightPixels,float flZNear,float flZFar,ref HmdMatrix44_t pProjection);
770 }
771 
772 
773 public class CVRSystem : IVRSystem
774 {
775  public CVRSystem(IntPtr VRSystem)
776  {
777  m_pVRSystem = VRSystem;
778  }
779  IntPtr m_pVRSystem;
780 
781  public override IntPtr GetIntPtr() { return m_pVRSystem; }
782 
783  private void CheckIfUsable()
784  {
785  if (m_pVRSystem == IntPtr.Zero)
786  {
787  throw new Exception("Steam Pointer not configured");
788  }
789  }
790  public override void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnHeight)
791  {
792  CheckIfUsable();
793  pnWidth = 0;
794  pnHeight = 0;
795  VRNativeEntrypoints.VR_IVRSystem_GetRecommendedRenderTargetSize(m_pVRSystem,ref pnWidth,ref pnHeight);
796  }
797  public override HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ,EGraphicsAPIConvention eProjType)
798  {
799  CheckIfUsable();
800  HmdMatrix44_t result = VRNativeEntrypoints.VR_IVRSystem_GetProjectionMatrix(m_pVRSystem,eEye,fNearZ,fFarZ,eProjType);
801  return result;
802  }
803  public override void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
804  {
805  CheckIfUsable();
806  pfLeft = 0;
807  pfRight = 0;
808  pfTop = 0;
809  pfBottom = 0;
810  VRNativeEntrypoints.VR_IVRSystem_GetProjectionRaw(m_pVRSystem,eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
811  }
812  public override DistortionCoordinates_t ComputeDistortion(EVREye eEye,float fU,float fV)
813  {
814  CheckIfUsable();
815  DistortionCoordinates_t result = VRNativeEntrypoints.VR_IVRSystem_ComputeDistortion(m_pVRSystem,eEye,fU,fV);
816  return result;
817  }
819  {
820  CheckIfUsable();
821  HmdMatrix34_t result = VRNativeEntrypoints.VR_IVRSystem_GetEyeToHeadTransform(m_pVRSystem,eEye);
822  return result;
823  }
824  public override bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref ulong pulFrameCounter)
825  {
826  CheckIfUsable();
827  pfSecondsSinceLastVsync = 0;
828  pulFrameCounter = 0;
829  bool result = VRNativeEntrypoints.VR_IVRSystem_GetTimeSinceLastVsync(m_pVRSystem,ref pfSecondsSinceLastVsync,ref pulFrameCounter);
830  return result;
831  }
832  public override int GetD3D9AdapterIndex()
833  {
834  CheckIfUsable();
835  int result = VRNativeEntrypoints.VR_IVRSystem_GetD3D9AdapterIndex(m_pVRSystem);
836  return result;
837  }
838  public override void GetDXGIOutputInfo(ref int pnAdapterIndex)
839  {
840  CheckIfUsable();
841  pnAdapterIndex = 0;
842  VRNativeEntrypoints.VR_IVRSystem_GetDXGIOutputInfo(m_pVRSystem,ref pnAdapterIndex);
843  }
844  public override bool IsDisplayOnDesktop()
845  {
846  CheckIfUsable();
847  bool result = VRNativeEntrypoints.VR_IVRSystem_IsDisplayOnDesktop(m_pVRSystem);
848  return result;
849  }
850  public override bool SetDisplayVisibility(bool bIsVisibleOnDesktop)
851  {
852  CheckIfUsable();
853  bool result = VRNativeEntrypoints.VR_IVRSystem_SetDisplayVisibility(m_pVRSystem,bIsVisibleOnDesktop);
854  return result;
855  }
856  public override void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray)
857  {
858  CheckIfUsable();
859  VRNativeEntrypoints.VR_IVRSystem_GetDeviceToAbsoluteTrackingPose(m_pVRSystem,eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
860  }
861  public override void ResetSeatedZeroPose()
862  {
863  CheckIfUsable();
864  VRNativeEntrypoints.VR_IVRSystem_ResetSeatedZeroPose(m_pVRSystem);
865  }
867  {
868  CheckIfUsable();
869  HmdMatrix34_t result = VRNativeEntrypoints.VR_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(m_pVRSystem);
870  return result;
871  }
873  {
874  CheckIfUsable();
875  HmdMatrix34_t result = VRNativeEntrypoints.VR_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose(m_pVRSystem);
876  return result;
877  }
878  public override uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex)
879  {
880  CheckIfUsable();
881  uint result = VRNativeEntrypoints.VR_IVRSystem_GetSortedTrackedDeviceIndicesOfClass(m_pVRSystem,eTrackedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Length,unRelativeToTrackedDeviceIndex);
882  return result;
883  }
884  public override EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId)
885  {
886  CheckIfUsable();
887  EDeviceActivityLevel result = VRNativeEntrypoints.VR_IVRSystem_GetTrackedDeviceActivityLevel(m_pVRSystem,unDeviceId);
888  return result;
889  }
890  public override void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform)
891  {
892  CheckIfUsable();
893  VRNativeEntrypoints.VR_IVRSystem_ApplyTransform(m_pVRSystem,ref pOutputPose,ref pTrackedDevicePose,ref pTransform);
894  }
896  {
897  CheckIfUsable();
898  uint result = VRNativeEntrypoints.VR_IVRSystem_GetTrackedDeviceIndexForControllerRole(m_pVRSystem,unDeviceType);
899  return result;
900  }
902  {
903  CheckIfUsable();
904  ETrackedControllerRole result = VRNativeEntrypoints.VR_IVRSystem_GetControllerRoleForTrackedDeviceIndex(m_pVRSystem,unDeviceIndex);
905  return result;
906  }
907  public override ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex)
908  {
909  CheckIfUsable();
910  ETrackedDeviceClass result = VRNativeEntrypoints.VR_IVRSystem_GetTrackedDeviceClass(m_pVRSystem,unDeviceIndex);
911  return result;
912  }
913  public override bool IsTrackedDeviceConnected(uint unDeviceIndex)
914  {
915  CheckIfUsable();
916  bool result = VRNativeEntrypoints.VR_IVRSystem_IsTrackedDeviceConnected(m_pVRSystem,unDeviceIndex);
917  return result;
918  }
919  public override bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
920  {
921  CheckIfUsable();
922  bool result = VRNativeEntrypoints.VR_IVRSystem_GetBoolTrackedDeviceProperty(m_pVRSystem,unDeviceIndex,prop,ref pError);
923  return result;
924  }
925  public override float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
926  {
927  CheckIfUsable();
928  float result = VRNativeEntrypoints.VR_IVRSystem_GetFloatTrackedDeviceProperty(m_pVRSystem,unDeviceIndex,prop,ref pError);
929  return result;
930  }
931  public override int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
932  {
933  CheckIfUsable();
934  int result = VRNativeEntrypoints.VR_IVRSystem_GetInt32TrackedDeviceProperty(m_pVRSystem,unDeviceIndex,prop,ref pError);
935  return result;
936  }
937  public override ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
938  {
939  CheckIfUsable();
940  ulong result = VRNativeEntrypoints.VR_IVRSystem_GetUint64TrackedDeviceProperty(m_pVRSystem,unDeviceIndex,prop,ref pError);
941  return result;
942  }
944  {
945  CheckIfUsable();
946  HmdMatrix34_t result = VRNativeEntrypoints.VR_IVRSystem_GetMatrix34TrackedDeviceProperty(m_pVRSystem,unDeviceIndex,prop,ref pError);
947  return result;
948  }
949  public override uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError)
950  {
951  CheckIfUsable();
952  uint result = VRNativeEntrypoints.VR_IVRSystem_GetStringTrackedDeviceProperty(m_pVRSystem,unDeviceIndex,prop,pchValue,unBufferSize,ref pError);
953  return result;
954  }
955  public override string GetPropErrorNameFromEnum(ETrackedPropertyError error)
956  {
957  CheckIfUsable();
958  IntPtr result = VRNativeEntrypoints.VR_IVRSystem_GetPropErrorNameFromEnum(m_pVRSystem,error);
959  return (string) Marshal.PtrToStructure(result, typeof(string));
960  }
961  public override bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
962  {
963  CheckIfUsable();
964  bool result = VRNativeEntrypoints.VR_IVRSystem_PollNextEvent(m_pVRSystem,ref pEvent,uncbVREvent);
965  return result;
966  }
967  public override bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose)
968  {
969  CheckIfUsable();
970  bool result = VRNativeEntrypoints.VR_IVRSystem_PollNextEventWithPose(m_pVRSystem,eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose);
971  return result;
972  }
973  public override string GetEventTypeNameFromEnum(EVREventType eType)
974  {
975  CheckIfUsable();
976  IntPtr result = VRNativeEntrypoints.VR_IVRSystem_GetEventTypeNameFromEnum(m_pVRSystem,eType);
977  return (string) Marshal.PtrToStructure(result, typeof(string));
978  }
980  {
981  CheckIfUsable();
982  HiddenAreaMesh_t result = VRNativeEntrypoints.VR_IVRSystem_GetHiddenAreaMesh(m_pVRSystem,eEye);
983  return result;
984  }
985  public override bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState)
986  {
987  CheckIfUsable();
988  bool result = VRNativeEntrypoints.VR_IVRSystem_GetControllerState(m_pVRSystem,unControllerDeviceIndex,ref pControllerState);
989  return result;
990  }
991  public override bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,ref TrackedDevicePose_t pTrackedDevicePose)
992  {
993  CheckIfUsable();
994  bool result = VRNativeEntrypoints.VR_IVRSystem_GetControllerStateWithPose(m_pVRSystem,eOrigin,unControllerDeviceIndex,ref pControllerState,ref pTrackedDevicePose);
995  return result;
996  }
997  public override void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,char usDurationMicroSec)
998  {
999  CheckIfUsable();
1000  VRNativeEntrypoints.VR_IVRSystem_TriggerHapticPulse(m_pVRSystem,unControllerDeviceIndex,unAxisId,usDurationMicroSec);
1001  }
1002  public override string GetButtonIdNameFromEnum(EVRButtonId eButtonId)
1003  {
1004  CheckIfUsable();
1005  IntPtr result = VRNativeEntrypoints.VR_IVRSystem_GetButtonIdNameFromEnum(m_pVRSystem,eButtonId);
1006  return (string) Marshal.PtrToStructure(result, typeof(string));
1007  }
1009  {
1010  CheckIfUsable();
1011  IntPtr result = VRNativeEntrypoints.VR_IVRSystem_GetControllerAxisTypeNameFromEnum(m_pVRSystem,eAxisType);
1012  return (string) Marshal.PtrToStructure(result, typeof(string));
1013  }
1014  public override bool CaptureInputFocus()
1015  {
1016  CheckIfUsable();
1017  bool result = VRNativeEntrypoints.VR_IVRSystem_CaptureInputFocus(m_pVRSystem);
1018  return result;
1019  }
1020  public override void ReleaseInputFocus()
1021  {
1022  CheckIfUsable();
1023  VRNativeEntrypoints.VR_IVRSystem_ReleaseInputFocus(m_pVRSystem);
1024  }
1026  {
1027  CheckIfUsable();
1028  bool result = VRNativeEntrypoints.VR_IVRSystem_IsInputFocusCapturedByAnotherProcess(m_pVRSystem);
1029  return result;
1030  }
1031  public override uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,string pchResponseBuffer,uint unResponseBufferSize)
1032  {
1033  CheckIfUsable();
1034  uint result = VRNativeEntrypoints.VR_IVRSystem_DriverDebugRequest(m_pVRSystem,unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize);
1035  return result;
1036  }
1037  public override EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex)
1038  {
1039  CheckIfUsable();
1040  EVRFirmwareError result = VRNativeEntrypoints.VR_IVRSystem_PerformFirmwareUpdate(m_pVRSystem,unDeviceIndex);
1041  return result;
1042  }
1043  public override void AcknowledgeQuit_Exiting()
1044  {
1045  CheckIfUsable();
1046  VRNativeEntrypoints.VR_IVRSystem_AcknowledgeQuit_Exiting(m_pVRSystem);
1047  }
1048  public override void AcknowledgeQuit_UserPrompt()
1049  {
1050  CheckIfUsable();
1051  VRNativeEntrypoints.VR_IVRSystem_AcknowledgeQuit_UserPrompt(m_pVRSystem);
1052  }
1053  public override void PerformanceTestEnableCapture(bool bEnable)
1054  {
1055  CheckIfUsable();
1056  VRNativeEntrypoints.VR_IVRSystem_PerformanceTestEnableCapture(m_pVRSystem,bEnable);
1057  }
1058  public override void PerformanceTestReportFidelityLevelChange(int nFidelityLevel)
1059  {
1060  CheckIfUsable();
1061  VRNativeEntrypoints.VR_IVRSystem_PerformanceTestReportFidelityLevelChange(m_pVRSystem,nFidelityLevel);
1062  }
1063 }
1064 
1065 
1067 {
1068  public CVRExtendedDisplay(IntPtr VRExtendedDisplay)
1069  {
1070  m_pVRExtendedDisplay = VRExtendedDisplay;
1071  }
1072  IntPtr m_pVRExtendedDisplay;
1073 
1074  public override IntPtr GetIntPtr() { return m_pVRExtendedDisplay; }
1075 
1076  private void CheckIfUsable()
1077  {
1078  if (m_pVRExtendedDisplay == IntPtr.Zero)
1079  {
1080  throw new Exception("Steam Pointer not configured");
1081  }
1082  }
1083  public override void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref uint pnHeight)
1084  {
1085  CheckIfUsable();
1086  pnX = 0;
1087  pnY = 0;
1088  pnWidth = 0;
1089  pnHeight = 0;
1090  VRNativeEntrypoints.VR_IVRExtendedDisplay_GetWindowBounds(m_pVRExtendedDisplay,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
1091  }
1092  public override void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight)
1093  {
1094  CheckIfUsable();
1095  pnX = 0;
1096  pnY = 0;
1097  pnWidth = 0;
1098  pnHeight = 0;
1099  VRNativeEntrypoints.VR_IVRExtendedDisplay_GetEyeOutputViewport(m_pVRExtendedDisplay,eEye,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
1100  }
1101  public override void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOutputIndex)
1102  {
1103  CheckIfUsable();
1104  pnAdapterIndex = 0;
1105  pnAdapterOutputIndex = 0;
1106  VRNativeEntrypoints.VR_IVRExtendedDisplay_GetDXGIOutputInfo(m_pVRExtendedDisplay,ref pnAdapterIndex,ref pnAdapterOutputIndex);
1107  }
1108 }
1109 
1110 
1112 {
1113  public CVRApplications(IntPtr VRApplications)
1114  {
1115  m_pVRApplications = VRApplications;
1116  }
1117  IntPtr m_pVRApplications;
1118 
1119  public override IntPtr GetIntPtr() { return m_pVRApplications; }
1120 
1121  private void CheckIfUsable()
1122  {
1123  if (m_pVRApplications == IntPtr.Zero)
1124  {
1125  throw new Exception("Steam Pointer not configured");
1126  }
1127  }
1128  public override EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath,bool bTemporary)
1129  {
1130  CheckIfUsable();
1131  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_AddApplicationManifest(m_pVRApplications,pchApplicationManifestFullPath,bTemporary);
1132  return result;
1133  }
1134  public override EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath)
1135  {
1136  CheckIfUsable();
1137  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_RemoveApplicationManifest(m_pVRApplications,pchApplicationManifestFullPath);
1138  return result;
1139  }
1140  public override bool IsApplicationInstalled(string pchAppKey)
1141  {
1142  CheckIfUsable();
1143  bool result = VRNativeEntrypoints.VR_IVRApplications_IsApplicationInstalled(m_pVRApplications,pchAppKey);
1144  return result;
1145  }
1146  public override uint GetApplicationCount()
1147  {
1148  CheckIfUsable();
1149  uint result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationCount(m_pVRApplications);
1150  return result;
1151  }
1152  public override EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex,string pchAppKeyBuffer,uint unAppKeyBufferLen)
1153  {
1154  CheckIfUsable();
1155  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationKeyByIndex(m_pVRApplications,unApplicationIndex,pchAppKeyBuffer,unAppKeyBufferLen);
1156  return result;
1157  }
1158  public override EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId,string pchAppKeyBuffer,uint unAppKeyBufferLen)
1159  {
1160  CheckIfUsable();
1161  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationKeyByProcessId(m_pVRApplications,unProcessId,pchAppKeyBuffer,unAppKeyBufferLen);
1162  return result;
1163  }
1164  public override EVRApplicationError LaunchApplication(string pchAppKey)
1165  {
1166  CheckIfUsable();
1167  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_LaunchApplication(m_pVRApplications,pchAppKey);
1168  return result;
1169  }
1170  public override EVRApplicationError LaunchDashboardOverlay(string pchAppKey)
1171  {
1172  CheckIfUsable();
1173  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_LaunchDashboardOverlay(m_pVRApplications,pchAppKey);
1174  return result;
1175  }
1176  public override EVRApplicationError IdentifyApplication(uint unProcessId,string pchAppKey)
1177  {
1178  CheckIfUsable();
1179  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_IdentifyApplication(m_pVRApplications,unProcessId,pchAppKey);
1180  return result;
1181  }
1182  public override uint GetApplicationProcessId(string pchAppKey)
1183  {
1184  CheckIfUsable();
1185  uint result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationProcessId(m_pVRApplications,pchAppKey);
1186  return result;
1187  }
1189  {
1190  CheckIfUsable();
1191  IntPtr result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationsErrorNameFromEnum(m_pVRApplications,error);
1192  return (string) Marshal.PtrToStructure(result, typeof(string));
1193  }
1194  public override uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,string pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError)
1195  {
1196  CheckIfUsable();
1197  uint result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationPropertyString(m_pVRApplications,pchAppKey,eProperty,pchPropertyValueBuffer,unPropertyValueBufferLen,ref peError);
1198  return result;
1199  }
1200  public override bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
1201  {
1202  CheckIfUsable();
1203  bool result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationPropertyBool(m_pVRApplications,pchAppKey,eProperty,ref peError);
1204  return result;
1205  }
1206  public override ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
1207  {
1208  CheckIfUsable();
1209  ulong result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationPropertyUint64(m_pVRApplications,pchAppKey,eProperty,ref peError);
1210  return result;
1211  }
1212  public override EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch)
1213  {
1214  CheckIfUsable();
1215  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_SetApplicationAutoLaunch(m_pVRApplications,pchAppKey,bAutoLaunch);
1216  return result;
1217  }
1218  public override bool GetApplicationAutoLaunch(string pchAppKey)
1219  {
1220  CheckIfUsable();
1221  bool result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationAutoLaunch(m_pVRApplications,pchAppKey);
1222  return result;
1223  }
1224  public override EVRApplicationError GetStartingApplication(string pchAppKeyBuffer,uint unAppKeyBufferLen)
1225  {
1226  CheckIfUsable();
1227  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_GetStartingApplication(m_pVRApplications,pchAppKeyBuffer,unAppKeyBufferLen);
1228  return result;
1229  }
1231  {
1232  CheckIfUsable();
1233  EVRApplicationTransitionState result = VRNativeEntrypoints.VR_IVRApplications_GetTransitionState(m_pVRApplications);
1234  return result;
1235  }
1236  public override EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey)
1237  {
1238  CheckIfUsable();
1239  EVRApplicationError result = VRNativeEntrypoints.VR_IVRApplications_PerformApplicationPrelaunchCheck(m_pVRApplications,pchAppKey);
1240  return result;
1241  }
1243  {
1244  CheckIfUsable();
1245  IntPtr result = VRNativeEntrypoints.VR_IVRApplications_GetApplicationsTransitionStateNameFromEnum(m_pVRApplications,state);
1246  return (string) Marshal.PtrToStructure(result, typeof(string));
1247  }
1248  public override bool IsQuitUserPromptRequested()
1249  {
1250  CheckIfUsable();
1251  bool result = VRNativeEntrypoints.VR_IVRApplications_IsQuitUserPromptRequested(m_pVRApplications);
1252  return result;
1253  }
1254 }
1255 
1256 
1258 {
1259  public CVRChaperone(IntPtr VRChaperone)
1260  {
1261  m_pVRChaperone = VRChaperone;
1262  }
1263  IntPtr m_pVRChaperone;
1264 
1265  public override IntPtr GetIntPtr() { return m_pVRChaperone; }
1266 
1267  private void CheckIfUsable()
1268  {
1269  if (m_pVRChaperone == IntPtr.Zero)
1270  {
1271  throw new Exception("Steam Pointer not configured");
1272  }
1273  }
1275  {
1276  CheckIfUsable();
1277  ChaperoneCalibrationState result = VRNativeEntrypoints.VR_IVRChaperone_GetCalibrationState(m_pVRChaperone);
1278  return result;
1279  }
1280  public override bool GetPlayAreaSize(ref float pSizeX,ref float pSizeZ)
1281  {
1282  CheckIfUsable();
1283  pSizeX = 0;
1284  pSizeZ = 0;
1285  bool result = VRNativeEntrypoints.VR_IVRChaperone_GetPlayAreaSize(m_pVRChaperone,ref pSizeX,ref pSizeZ);
1286  return result;
1287  }
1288  public override bool GetPlayAreaRect(ref HmdQuad_t rect)
1289  {
1290  CheckIfUsable();
1291  bool result = VRNativeEntrypoints.VR_IVRChaperone_GetPlayAreaRect(m_pVRChaperone,ref rect);
1292  return result;
1293  }
1294  public override void ReloadInfo()
1295  {
1296  CheckIfUsable();
1297  VRNativeEntrypoints.VR_IVRChaperone_ReloadInfo(m_pVRChaperone);
1298  }
1299  public override void SetSceneColor(HmdColor_t color)
1300  {
1301  CheckIfUsable();
1302  VRNativeEntrypoints.VR_IVRChaperone_SetSceneColor(m_pVRChaperone,color);
1303  }
1304  public override void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors,float flCollisionBoundsFadeDistance,ref HmdColor_t pOutputCameraColor)
1305  {
1306  CheckIfUsable();
1307  VRNativeEntrypoints.VR_IVRChaperone_GetBoundsColor(m_pVRChaperone,ref pOutputColorArray,nNumOutputColors,flCollisionBoundsFadeDistance,ref pOutputCameraColor);
1308  }
1309  public override bool AreBoundsVisible()
1310  {
1311  CheckIfUsable();
1312  bool result = VRNativeEntrypoints.VR_IVRChaperone_AreBoundsVisible(m_pVRChaperone);
1313  return result;
1314  }
1315  public override void ForceBoundsVisible(bool bForce)
1316  {
1317  CheckIfUsable();
1318  VRNativeEntrypoints.VR_IVRChaperone_ForceBoundsVisible(m_pVRChaperone,bForce);
1319  }
1320 }
1321 
1322 
1324 {
1325  public CVRChaperoneSetup(IntPtr VRChaperoneSetup)
1326  {
1327  m_pVRChaperoneSetup = VRChaperoneSetup;
1328  }
1329  IntPtr m_pVRChaperoneSetup;
1330 
1331  public override IntPtr GetIntPtr() { return m_pVRChaperoneSetup; }
1332 
1333  private void CheckIfUsable()
1334  {
1335  if (m_pVRChaperoneSetup == IntPtr.Zero)
1336  {
1337  throw new Exception("Steam Pointer not configured");
1338  }
1339  }
1340  public override bool CommitWorkingCopy(EChaperoneConfigFile configFile)
1341  {
1342  CheckIfUsable();
1343  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_CommitWorkingCopy(m_pVRChaperoneSetup,configFile);
1344  return result;
1345  }
1346  public override void RevertWorkingCopy()
1347  {
1348  CheckIfUsable();
1349  VRNativeEntrypoints.VR_IVRChaperoneSetup_RevertWorkingCopy(m_pVRChaperoneSetup);
1350  }
1351  public override bool GetWorkingPlayAreaSize(ref float pSizeX,ref float pSizeZ)
1352  {
1353  CheckIfUsable();
1354  pSizeX = 0;
1355  pSizeZ = 0;
1356  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetWorkingPlayAreaSize(m_pVRChaperoneSetup,ref pSizeX,ref pSizeZ);
1357  return result;
1358  }
1359  public override bool GetWorkingPlayAreaRect(ref HmdQuad_t rect)
1360  {
1361  CheckIfUsable();
1362  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetWorkingPlayAreaRect(m_pVRChaperoneSetup,ref rect);
1363  return result;
1364  }
1365  public override bool GetWorkingCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
1366  {
1367  CheckIfUsable();
1368  uint punQuadsCount = 0;
1369  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetWorkingCollisionBoundsInfo(m_pVRChaperoneSetup,null,ref punQuadsCount);
1370  pQuadsBuffer= new HmdQuad_t[punQuadsCount];
1371  result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetWorkingCollisionBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,ref punQuadsCount);
1372  return result;
1373  }
1374  public override bool GetLiveCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
1375  {
1376  CheckIfUsable();
1377  uint punQuadsCount = 0;
1378  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveCollisionBoundsInfo(m_pVRChaperoneSetup,null,ref punQuadsCount);
1379  pQuadsBuffer= new HmdQuad_t[punQuadsCount];
1380  result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveCollisionBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,ref punQuadsCount);
1381  return result;
1382  }
1383  public override bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
1384  {
1385  CheckIfUsable();
1386  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetWorkingSeatedZeroPoseToRawTrackingPose(m_pVRChaperoneSetup,ref pmatSeatedZeroPoseToRawTrackingPose);
1387  return result;
1388  }
1389  public override bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose)
1390  {
1391  CheckIfUsable();
1392  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetWorkingStandingZeroPoseToRawTrackingPose(m_pVRChaperoneSetup,ref pmatStandingZeroPoseToRawTrackingPose);
1393  return result;
1394  }
1395  public override void SetWorkingPlayAreaSize(float sizeX,float sizeZ)
1396  {
1397  CheckIfUsable();
1398  VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingPlayAreaSize(m_pVRChaperoneSetup,sizeX,sizeZ);
1399  }
1400  public override void SetWorkingCollisionBoundsInfo(HmdQuad_t [] pQuadsBuffer)
1401  {
1402  CheckIfUsable();
1403  VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingCollisionBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,(uint) pQuadsBuffer.Length);
1404  }
1405  public override void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose)
1406  {
1407  CheckIfUsable();
1408  VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingSeatedZeroPoseToRawTrackingPose(m_pVRChaperoneSetup,ref pMatSeatedZeroPoseToRawTrackingPose);
1409  }
1410  public override void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose)
1411  {
1412  CheckIfUsable();
1413  VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingStandingZeroPoseToRawTrackingPose(m_pVRChaperoneSetup,ref pMatStandingZeroPoseToRawTrackingPose);
1414  }
1415  public override void ReloadFromDisk(EChaperoneConfigFile configFile)
1416  {
1417  CheckIfUsable();
1418  VRNativeEntrypoints.VR_IVRChaperoneSetup_ReloadFromDisk(m_pVRChaperoneSetup,configFile);
1419  }
1420  public override bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
1421  {
1422  CheckIfUsable();
1423  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveSeatedZeroPoseToRawTrackingPose(m_pVRChaperoneSetup,ref pmatSeatedZeroPoseToRawTrackingPose);
1424  return result;
1425  }
1426  public override void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer)
1427  {
1428  CheckIfUsable();
1429  VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingCollisionBoundsTagsInfo(m_pVRChaperoneSetup,pTagsBuffer,(uint) pTagsBuffer.Length);
1430  }
1431  public override bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer)
1432  {
1433  CheckIfUsable();
1434  uint punTagCount = 0;
1435  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(m_pVRChaperoneSetup,null,ref punTagCount);
1436  pTagsBuffer= new byte[punTagCount];
1437  result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLiveCollisionBoundsTagsInfo(m_pVRChaperoneSetup,pTagsBuffer,ref punTagCount);
1438  return result;
1439  }
1440  public override bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer)
1441  {
1442  CheckIfUsable();
1443  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_SetWorkingPhysicalBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,(uint) pQuadsBuffer.Length);
1444  return result;
1445  }
1446  public override bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
1447  {
1448  CheckIfUsable();
1449  uint punQuadsCount = 0;
1450  bool result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(m_pVRChaperoneSetup,null,ref punQuadsCount);
1451  pQuadsBuffer= new HmdQuad_t[punQuadsCount];
1452  result = VRNativeEntrypoints.VR_IVRChaperoneSetup_GetLivePhysicalBoundsInfo(m_pVRChaperoneSetup,pQuadsBuffer,ref punQuadsCount);
1453  return result;
1454  }
1455 }
1456 
1457 
1459 {
1460  public CVRCompositor(IntPtr VRCompositor)
1461  {
1462  m_pVRCompositor = VRCompositor;
1463  }
1464  IntPtr m_pVRCompositor;
1465 
1466  public override IntPtr GetIntPtr() { return m_pVRCompositor; }
1467 
1468  private void CheckIfUsable()
1469  {
1470  if (m_pVRCompositor == IntPtr.Zero)
1471  {
1472  throw new Exception("Steam Pointer not configured");
1473  }
1474  }
1475  public override void SetTrackingSpace(ETrackingUniverseOrigin eOrigin)
1476  {
1477  CheckIfUsable();
1478  VRNativeEntrypoints.VR_IVRCompositor_SetTrackingSpace(m_pVRCompositor,eOrigin);
1479  }
1481  {
1482  CheckIfUsable();
1483  ETrackingUniverseOrigin result = VRNativeEntrypoints.VR_IVRCompositor_GetTrackingSpace(m_pVRCompositor);
1484  return result;
1485  }
1486  public override EVRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
1487  {
1488  CheckIfUsable();
1489  EVRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_WaitGetPoses(m_pVRCompositor,pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
1490  return result;
1491  }
1492  public override EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
1493  {
1494  CheckIfUsable();
1495  EVRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_GetLastPoses(m_pVRCompositor,pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
1496  return result;
1497  }
1498  public override EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags)
1499  {
1500  CheckIfUsable();
1501  EVRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_Submit(m_pVRCompositor,eEye,ref pTexture,ref pBounds,nSubmitFlags);
1502  return result;
1503  }
1504  public override void ClearLastSubmittedFrame()
1505  {
1506  CheckIfUsable();
1507  VRNativeEntrypoints.VR_IVRCompositor_ClearLastSubmittedFrame(m_pVRCompositor);
1508  }
1509  public override void PostPresentHandoff()
1510  {
1511  CheckIfUsable();
1512  VRNativeEntrypoints.VR_IVRCompositor_PostPresentHandoff(m_pVRCompositor);
1513  }
1514  public override bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo)
1515  {
1516  CheckIfUsable();
1517  bool result = VRNativeEntrypoints.VR_IVRCompositor_GetFrameTiming(m_pVRCompositor,ref pTiming,unFramesAgo);
1518  return result;
1519  }
1520  public override float GetFrameTimeRemaining()
1521  {
1522  CheckIfUsable();
1523  float result = VRNativeEntrypoints.VR_IVRCompositor_GetFrameTimeRemaining(m_pVRCompositor);
1524  return result;
1525  }
1526  public override void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground)
1527  {
1528  CheckIfUsable();
1529  VRNativeEntrypoints.VR_IVRCompositor_FadeToColor(m_pVRCompositor,fSeconds,fRed,fGreen,fBlue,fAlpha,bBackground);
1530  }
1531  public override void FadeGrid(float fSeconds,bool bFadeIn)
1532  {
1533  CheckIfUsable();
1534  VRNativeEntrypoints.VR_IVRCompositor_FadeGrid(m_pVRCompositor,fSeconds,bFadeIn);
1535  }
1536  public override EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures)
1537  {
1538  CheckIfUsable();
1539  EVRCompositorError result = VRNativeEntrypoints.VR_IVRCompositor_SetSkyboxOverride(m_pVRCompositor,pTextures,(uint) pTextures.Length);
1540  return result;
1541  }
1542  public override void ClearSkyboxOverride()
1543  {
1544  CheckIfUsable();
1545  VRNativeEntrypoints.VR_IVRCompositor_ClearSkyboxOverride(m_pVRCompositor);
1546  }
1547  public override void CompositorBringToFront()
1548  {
1549  CheckIfUsable();
1550  VRNativeEntrypoints.VR_IVRCompositor_CompositorBringToFront(m_pVRCompositor);
1551  }
1552  public override void CompositorGoToBack()
1553  {
1554  CheckIfUsable();
1555  VRNativeEntrypoints.VR_IVRCompositor_CompositorGoToBack(m_pVRCompositor);
1556  }
1557  public override void CompositorQuit()
1558  {
1559  CheckIfUsable();
1560  VRNativeEntrypoints.VR_IVRCompositor_CompositorQuit(m_pVRCompositor);
1561  }
1562  public override bool IsFullscreen()
1563  {
1564  CheckIfUsable();
1565  bool result = VRNativeEntrypoints.VR_IVRCompositor_IsFullscreen(m_pVRCompositor);
1566  return result;
1567  }
1568  public override uint GetCurrentSceneFocusProcess()
1569  {
1570  CheckIfUsable();
1571  uint result = VRNativeEntrypoints.VR_IVRCompositor_GetCurrentSceneFocusProcess(m_pVRCompositor);
1572  return result;
1573  }
1574  public override uint GetLastFrameRenderer()
1575  {
1576  CheckIfUsable();
1577  uint result = VRNativeEntrypoints.VR_IVRCompositor_GetLastFrameRenderer(m_pVRCompositor);
1578  return result;
1579  }
1580  public override bool CanRenderScene()
1581  {
1582  CheckIfUsable();
1583  bool result = VRNativeEntrypoints.VR_IVRCompositor_CanRenderScene(m_pVRCompositor);
1584  return result;
1585  }
1586  public override void ShowMirrorWindow()
1587  {
1588  CheckIfUsable();
1589  VRNativeEntrypoints.VR_IVRCompositor_ShowMirrorWindow(m_pVRCompositor);
1590  }
1591  public override void HideMirrorWindow()
1592  {
1593  CheckIfUsable();
1594  VRNativeEntrypoints.VR_IVRCompositor_HideMirrorWindow(m_pVRCompositor);
1595  }
1596  public override bool IsMirrorWindowVisible()
1597  {
1598  CheckIfUsable();
1599  bool result = VRNativeEntrypoints.VR_IVRCompositor_IsMirrorWindowVisible(m_pVRCompositor);
1600  return result;
1601  }
1602  public override void CompositorDumpImages()
1603  {
1604  CheckIfUsable();
1605  VRNativeEntrypoints.VR_IVRCompositor_CompositorDumpImages(m_pVRCompositor);
1606  }
1607 }
1608 
1609 
1610 public class CVROverlay : IVROverlay
1611 {
1612  public CVROverlay(IntPtr VROverlay)
1613  {
1614  m_pVROverlay = VROverlay;
1615  }
1616  IntPtr m_pVROverlay;
1617 
1618  public override IntPtr GetIntPtr() { return m_pVROverlay; }
1619 
1620  private void CheckIfUsable()
1621  {
1622  if (m_pVROverlay == IntPtr.Zero)
1623  {
1624  throw new Exception("Steam Pointer not configured");
1625  }
1626  }
1627  public override EVROverlayError FindOverlay(string pchOverlayKey,ref ulong pOverlayHandle)
1628  {
1629  CheckIfUsable();
1630  pOverlayHandle = 0;
1631  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_FindOverlay(m_pVROverlay,pchOverlayKey,ref pOverlayHandle);
1632  return result;
1633  }
1634  public override EVROverlayError CreateOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pOverlayHandle)
1635  {
1636  CheckIfUsable();
1637  pOverlayHandle = 0;
1638  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_CreateOverlay(m_pVROverlay,pchOverlayKey,pchOverlayFriendlyName,ref pOverlayHandle);
1639  return result;
1640  }
1641  public override EVROverlayError DestroyOverlay(ulong ulOverlayHandle)
1642  {
1643  CheckIfUsable();
1644  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_DestroyOverlay(m_pVROverlay,ulOverlayHandle);
1645  return result;
1646  }
1647  public override EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle)
1648  {
1649  CheckIfUsable();
1650  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetHighQualityOverlay(m_pVROverlay,ulOverlayHandle);
1651  return result;
1652  }
1653  public override ulong GetHighQualityOverlay()
1654  {
1655  CheckIfUsable();
1656  ulong result = VRNativeEntrypoints.VR_IVROverlay_GetHighQualityOverlay(m_pVROverlay);
1657  return result;
1658  }
1659  public override uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError)
1660  {
1661  CheckIfUsable();
1662  uint result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayKey(m_pVROverlay,ulOverlayHandle,pchValue,unBufferSize,ref pError);
1663  return result;
1664  }
1665  public override uint GetOverlayName(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError)
1666  {
1667  CheckIfUsable();
1668  uint result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayName(m_pVROverlay,ulOverlayHandle,pchValue,unBufferSize,ref pError);
1669  return result;
1670  }
1671  public override EVROverlayError GetOverlayImageData(ulong ulOverlayHandle,IntPtr pvBuffer,uint unBufferSize,ref uint punWidth,ref uint punHeight)
1672  {
1673  CheckIfUsable();
1674  punWidth = 0;
1675  punHeight = 0;
1676  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayImageData(m_pVROverlay,ulOverlayHandle,pvBuffer,unBufferSize,ref punWidth,ref punHeight);
1677  return result;
1678  }
1679  public override string GetOverlayErrorNameFromEnum(EVROverlayError error)
1680  {
1681  CheckIfUsable();
1682  IntPtr result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayErrorNameFromEnum(m_pVROverlay,error);
1683  return (string) Marshal.PtrToStructure(result, typeof(string));
1684  }
1685  public override EVROverlayError SetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,bool bEnabled)
1686  {
1687  CheckIfUsable();
1688  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayFlag(m_pVROverlay,ulOverlayHandle,eOverlayFlag,bEnabled);
1689  return result;
1690  }
1691  public override EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,ref bool pbEnabled)
1692  {
1693  CheckIfUsable();
1694  pbEnabled = false;
1695  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayFlag(m_pVROverlay,ulOverlayHandle,eOverlayFlag,ref pbEnabled);
1696  return result;
1697  }
1698  public override EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue)
1699  {
1700  CheckIfUsable();
1701  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayColor(m_pVROverlay,ulOverlayHandle,fRed,fGreen,fBlue);
1702  return result;
1703  }
1704  public override EVROverlayError GetOverlayColor(ulong ulOverlayHandle,ref float pfRed,ref float pfGreen,ref float pfBlue)
1705  {
1706  CheckIfUsable();
1707  pfRed = 0;
1708  pfGreen = 0;
1709  pfBlue = 0;
1710  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayColor(m_pVROverlay,ulOverlayHandle,ref pfRed,ref pfGreen,ref pfBlue);
1711  return result;
1712  }
1713  public override EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle,float fAlpha)
1714  {
1715  CheckIfUsable();
1716  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayAlpha(m_pVROverlay,ulOverlayHandle,fAlpha);
1717  return result;
1718  }
1719  public override EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle,ref float pfAlpha)
1720  {
1721  CheckIfUsable();
1722  pfAlpha = 0;
1723  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayAlpha(m_pVROverlay,ulOverlayHandle,ref pfAlpha);
1724  return result;
1725  }
1726  public override EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,float fWidthInMeters)
1727  {
1728  CheckIfUsable();
1729  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayWidthInMeters(m_pVROverlay,ulOverlayHandle,fWidthInMeters);
1730  return result;
1731  }
1732  public override EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref float pfWidthInMeters)
1733  {
1734  CheckIfUsable();
1735  pfWidthInMeters = 0;
1736  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayWidthInMeters(m_pVROverlay,ulOverlayHandle,ref pfWidthInMeters);
1737  return result;
1738  }
1739  public override EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,float fMinDistanceInMeters,float fMaxDistanceInMeters)
1740  {
1741  CheckIfUsable();
1742  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayAutoCurveDistanceRangeInMeters(m_pVROverlay,ulOverlayHandle,fMinDistanceInMeters,fMaxDistanceInMeters);
1743  return result;
1744  }
1745  public override EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,ref float pfMinDistanceInMeters,ref float pfMaxDistanceInMeters)
1746  {
1747  CheckIfUsable();
1748  pfMinDistanceInMeters = 0;
1749  pfMaxDistanceInMeters = 0;
1750  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayAutoCurveDistanceRangeInMeters(m_pVROverlay,ulOverlayHandle,ref pfMinDistanceInMeters,ref pfMaxDistanceInMeters);
1751  return result;
1752  }
1753  public override EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace)
1754  {
1755  CheckIfUsable();
1756  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTextureColorSpace(m_pVROverlay,ulOverlayHandle,eTextureColorSpace);
1757  return result;
1758  }
1759  public override EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle,ref EColorSpace peTextureColorSpace)
1760  {
1761  CheckIfUsable();
1762  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTextureColorSpace(m_pVROverlay,ulOverlayHandle,ref peTextureColorSpace);
1763  return result;
1764  }
1765  public override EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds)
1766  {
1767  CheckIfUsable();
1768  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTextureBounds(m_pVROverlay,ulOverlayHandle,ref pOverlayTextureBounds);
1769  return result;
1770  }
1771  public override EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds)
1772  {
1773  CheckIfUsable();
1774  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTextureBounds(m_pVROverlay,ulOverlayHandle,ref pOverlayTextureBounds);
1775  return result;
1776  }
1777  public override EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref VROverlayTransformType peTransformType)
1778  {
1779  CheckIfUsable();
1780  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTransformType(m_pVROverlay,ulOverlayHandle,ref peTransformType);
1781  return result;
1782  }
1783  public override EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
1784  {
1785  CheckIfUsable();
1786  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTransformAbsolute(m_pVROverlay,ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform);
1787  return result;
1788  }
1789  public override EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
1790  {
1791  CheckIfUsable();
1792  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTransformAbsolute(m_pVROverlay,ulOverlayHandle,ref peTrackingOrigin,ref pmatTrackingOriginToOverlayTransform);
1793  return result;
1794  }
1795  public override EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
1796  {
1797  CheckIfUsable();
1798  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTransformTrackedDeviceRelative(m_pVROverlay,ulOverlayHandle,unTrackedDevice,ref pmatTrackedDeviceToOverlayTransform);
1799  return result;
1800  }
1801  public override EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
1802  {
1803  CheckIfUsable();
1804  punTrackedDevice = 0;
1805  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTransformTrackedDeviceRelative(m_pVROverlay,ulOverlayHandle,ref punTrackedDevice,ref pmatTrackedDeviceToOverlayTransform);
1806  return result;
1807  }
1808  public override EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName)
1809  {
1810  CheckIfUsable();
1811  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTransformTrackedDeviceComponent(m_pVROverlay,ulOverlayHandle,unDeviceIndex,pchComponentName);
1812  return result;
1813  }
1814  public override EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,string pchComponentName,uint unComponentNameSize)
1815  {
1816  CheckIfUsable();
1817  punDeviceIndex = 0;
1818  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayTransformTrackedDeviceComponent(m_pVROverlay,ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSize);
1819  return result;
1820  }
1821  public override EVROverlayError ShowOverlay(ulong ulOverlayHandle)
1822  {
1823  CheckIfUsable();
1824  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_ShowOverlay(m_pVROverlay,ulOverlayHandle);
1825  return result;
1826  }
1827  public override EVROverlayError HideOverlay(ulong ulOverlayHandle)
1828  {
1829  CheckIfUsable();
1830  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_HideOverlay(m_pVROverlay,ulOverlayHandle);
1831  return result;
1832  }
1833  public override bool IsOverlayVisible(ulong ulOverlayHandle)
1834  {
1835  CheckIfUsable();
1836  bool result = VRNativeEntrypoints.VR_IVROverlay_IsOverlayVisible(m_pVROverlay,ulOverlayHandle);
1837  return result;
1838  }
1839  public override EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay,ref HmdMatrix34_t pmatTransform)
1840  {
1841  CheckIfUsable();
1842  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetTransformForOverlayCoordinates(m_pVROverlay,ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform);
1843  return result;
1844  }
1845  public override bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
1846  {
1847  CheckIfUsable();
1848  bool result = VRNativeEntrypoints.VR_IVROverlay_PollNextOverlayEvent(m_pVROverlay,ulOverlayHandle,ref pEvent,uncbVREvent);
1849  return result;
1850  }
1851  public override EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod)
1852  {
1853  CheckIfUsable();
1854  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayInputMethod(m_pVROverlay,ulOverlayHandle,ref peInputMethod);
1855  return result;
1856  }
1857  public override EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROverlayInputMethod eInputMethod)
1858  {
1859  CheckIfUsable();
1860  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayInputMethod(m_pVROverlay,ulOverlayHandle,eInputMethod);
1861  return result;
1862  }
1863  public override EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale)
1864  {
1865  CheckIfUsable();
1866  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetOverlayMouseScale(m_pVROverlay,ulOverlayHandle,ref pvecMouseScale);
1867  return result;
1868  }
1869  public override EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale)
1870  {
1871  CheckIfUsable();
1872  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayMouseScale(m_pVROverlay,ulOverlayHandle,ref pvecMouseScale);
1873  return result;
1874  }
1875  public override bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverlayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults)
1876  {
1877  CheckIfUsable();
1878  bool result = VRNativeEntrypoints.VR_IVROverlay_ComputeOverlayIntersection(m_pVROverlay,ulOverlayHandle,ref pParams,ref pResults);
1879  return result;
1880  }
1881  public override bool HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHandle,uint unControllerDeviceIndex)
1882  {
1883  CheckIfUsable();
1884  bool result = VRNativeEntrypoints.VR_IVROverlay_HandleControllerOverlayInteractionAsMouse(m_pVROverlay,ulOverlayHandle,unControllerDeviceIndex);
1885  return result;
1886  }
1887  public override bool IsHoverTargetOverlay(ulong ulOverlayHandle)
1888  {
1889  CheckIfUsable();
1890  bool result = VRNativeEntrypoints.VR_IVROverlay_IsHoverTargetOverlay(m_pVROverlay,ulOverlayHandle);
1891  return result;
1892  }
1893  public override ulong GetGamepadFocusOverlay()
1894  {
1895  CheckIfUsable();
1896  ulong result = VRNativeEntrypoints.VR_IVROverlay_GetGamepadFocusOverlay(m_pVROverlay);
1897  return result;
1898  }
1899  public override EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay)
1900  {
1901  CheckIfUsable();
1902  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetGamepadFocusOverlay(m_pVROverlay,ulNewFocusOverlay);
1903  return result;
1904  }
1905  public override EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection,ulong ulFrom,ulong ulTo)
1906  {
1907  CheckIfUsable();
1908  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayNeighbor(m_pVROverlay,eDirection,ulFrom,ulTo);
1909  return result;
1910  }
1911  public override EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection,ulong ulFrom)
1912  {
1913  CheckIfUsable();
1914  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_MoveGamepadFocusToNeighbor(m_pVROverlay,eDirection,ulFrom);
1915  return result;
1916  }
1917  public override EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture)
1918  {
1919  CheckIfUsable();
1920  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayTexture(m_pVROverlay,ulOverlayHandle,ref pTexture);
1921  return result;
1922  }
1923  public override EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle)
1924  {
1925  CheckIfUsable();
1926  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_ClearOverlayTexture(m_pVROverlay,ulOverlayHandle);
1927  return result;
1928  }
1929  public override EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth)
1930  {
1931  CheckIfUsable();
1932  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayRaw(m_pVROverlay,ulOverlayHandle,pvBuffer,unWidth,unHeight,unDepth);
1933  return result;
1934  }
1935  public override EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath)
1936  {
1937  CheckIfUsable();
1938  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetOverlayFromFile(m_pVROverlay,ulOverlayHandle,pchFilePath);
1939  return result;
1940  }
1941  public override EVROverlayError CreateDashboardOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle)
1942  {
1943  CheckIfUsable();
1944  pMainHandle = 0;
1945  pThumbnailHandle = 0;
1946  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_CreateDashboardOverlay(m_pVROverlay,pchOverlayKey,pchOverlayFriendlyName,ref pMainHandle,ref pThumbnailHandle);
1947  return result;
1948  }
1949  public override bool IsDashboardVisible()
1950  {
1951  CheckIfUsable();
1952  bool result = VRNativeEntrypoints.VR_IVROverlay_IsDashboardVisible(m_pVROverlay);
1953  return result;
1954  }
1955  public override bool IsActiveDashboardOverlay(ulong ulOverlayHandle)
1956  {
1957  CheckIfUsable();
1958  bool result = VRNativeEntrypoints.VR_IVROverlay_IsActiveDashboardOverlay(m_pVROverlay,ulOverlayHandle);
1959  return result;
1960  }
1961  public override EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle,uint unProcessId)
1962  {
1963  CheckIfUsable();
1964  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_SetDashboardOverlaySceneProcess(m_pVROverlay,ulOverlayHandle,unProcessId);
1965  return result;
1966  }
1967  public override EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle,ref uint punProcessId)
1968  {
1969  CheckIfUsable();
1970  punProcessId = 0;
1971  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_GetDashboardOverlaySceneProcess(m_pVROverlay,ulOverlayHandle,ref punProcessId);
1972  return result;
1973  }
1974  public override void ShowDashboard(string pchOverlayToShow)
1975  {
1976  CheckIfUsable();
1977  VRNativeEntrypoints.VR_IVROverlay_ShowDashboard(m_pVROverlay,pchOverlayToShow);
1978  }
1979  public override uint GetPrimaryDashboardDevice()
1980  {
1981  CheckIfUsable();
1982  uint result = VRNativeEntrypoints.VR_IVROverlay_GetPrimaryDashboardDevice(m_pVROverlay);
1983  return result;
1984  }
1985  public override EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue)
1986  {
1987  CheckIfUsable();
1988  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_ShowKeyboard(m_pVROverlay,eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue);
1989  return result;
1990  }
1991  public override EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue)
1992  {
1993  CheckIfUsable();
1994  EVROverlayError result = VRNativeEntrypoints.VR_IVROverlay_ShowKeyboardForOverlay(m_pVROverlay,ulOverlayHandle,eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue);
1995  return result;
1996  }
1997  public override uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText)
1998  {
1999  CheckIfUsable();
2000  uint result = VRNativeEntrypoints.VR_IVROverlay_GetKeyboardText(m_pVROverlay,pchText,cchText);
2001  return result;
2002  }
2003  public override void HideKeyboard()
2004  {
2005  CheckIfUsable();
2006  VRNativeEntrypoints.VR_IVROverlay_HideKeyboard(m_pVROverlay);
2007  }
2008  public override void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform)
2009  {
2010  CheckIfUsable();
2011  VRNativeEntrypoints.VR_IVROverlay_SetKeyboardTransformAbsolute(m_pVROverlay,eTrackingOrigin,ref pmatTrackingOriginToKeyboardTransform);
2012  }
2013  public override void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2_t avoidRect)
2014  {
2015  CheckIfUsable();
2016  VRNativeEntrypoints.VR_IVROverlay_SetKeyboardPositionForOverlay(m_pVROverlay,ulOverlayHandle,avoidRect);
2017  }
2018 }
2019 
2020 
2022 {
2023  public CVRRenderModels(IntPtr VRRenderModels)
2024  {
2025  m_pVRRenderModels = VRRenderModels;
2026  }
2027  IntPtr m_pVRRenderModels;
2028 
2029  public override IntPtr GetIntPtr() { return m_pVRRenderModels; }
2030 
2031  private void CheckIfUsable()
2032  {
2033  if (m_pVRRenderModels == IntPtr.Zero)
2034  {
2035  throw new Exception("Steam Pointer not configured");
2036  }
2037  }
2038  public override EVRRenderModelError LoadRenderModel_Async(string pchRenderModelName,ref IntPtr ppRenderModel)
2039  {
2040  CheckIfUsable();
2041  EVRRenderModelError result = VRNativeEntrypoints.VR_IVRRenderModels_LoadRenderModel_Async(m_pVRRenderModels,pchRenderModelName,ref ppRenderModel);
2042  return result;
2043  }
2044  public override void FreeRenderModel(IntPtr pRenderModel)
2045  {
2046  CheckIfUsable();
2047  VRNativeEntrypoints.VR_IVRRenderModels_FreeRenderModel(m_pVRRenderModels,pRenderModel);
2048  }
2049  public override EVRRenderModelError LoadTexture_Async(int textureId,ref IntPtr ppTexture)
2050  {
2051  CheckIfUsable();
2052  EVRRenderModelError result = VRNativeEntrypoints.VR_IVRRenderModels_LoadTexture_Async(m_pVRRenderModels,textureId,ref ppTexture);
2053  return result;
2054  }
2055  public override void FreeTexture(IntPtr pTexture)
2056  {
2057  CheckIfUsable();
2058  VRNativeEntrypoints.VR_IVRRenderModels_FreeTexture(m_pVRRenderModels,pTexture);
2059  }
2060  public override EVRRenderModelError LoadTextureD3D11_Async(int textureId,IntPtr pD3D11Device,ref IntPtr ppD3D11Texture2D)
2061  {
2062  CheckIfUsable();
2063  EVRRenderModelError result = VRNativeEntrypoints.VR_IVRRenderModels_LoadTextureD3D11_Async(m_pVRRenderModels,textureId,pD3D11Device,ref ppD3D11Texture2D);
2064  return result;
2065  }
2066  public override void FreeTextureD3D11(IntPtr pD3D11Texture2D)
2067  {
2068  CheckIfUsable();
2069  VRNativeEntrypoints.VR_IVRRenderModels_FreeTextureD3D11(m_pVRRenderModels,pD3D11Texture2D);
2070  }
2071  public override uint GetRenderModelName(uint unRenderModelIndex,System.Text.StringBuilder pchRenderModelName,uint unRenderModelNameLen)
2072  {
2073  CheckIfUsable();
2074  uint result = VRNativeEntrypoints.VR_IVRRenderModels_GetRenderModelName(m_pVRRenderModels,unRenderModelIndex,pchRenderModelName,unRenderModelNameLen);
2075  return result;
2076  }
2077  public override uint GetRenderModelCount()
2078  {
2079  CheckIfUsable();
2080  uint result = VRNativeEntrypoints.VR_IVRRenderModels_GetRenderModelCount(m_pVRRenderModels);
2081  return result;
2082  }
2083  public override uint GetComponentCount(string pchRenderModelName)
2084  {
2085  CheckIfUsable();
2086  uint result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentCount(m_pVRRenderModels,pchRenderModelName);
2087  return result;
2088  }
2089  public override uint GetComponentName(string pchRenderModelName,uint unComponentIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameLen)
2090  {
2091  CheckIfUsable();
2092  uint result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentName(m_pVRRenderModels,pchRenderModelName,unComponentIndex,pchComponentName,unComponentNameLen);
2093  return result;
2094  }
2095  public override ulong GetComponentButtonMask(string pchRenderModelName,string pchComponentName)
2096  {
2097  CheckIfUsable();
2098  ulong result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentButtonMask(m_pVRRenderModels,pchRenderModelName,pchComponentName);
2099  return result;
2100  }
2101  public override uint GetComponentRenderModelName(string pchRenderModelName,string pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unComponentRenderModelNameLen)
2102  {
2103  CheckIfUsable();
2104  uint result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentRenderModelName(m_pVRRenderModels,pchRenderModelName,pchComponentName,pchComponentRenderModelName,unComponentRenderModelNameLen);
2105  return result;
2106  }
2107  public override bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
2108  {
2109  CheckIfUsable();
2110  bool result = VRNativeEntrypoints.VR_IVRRenderModels_GetComponentState(m_pVRRenderModels,pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState);
2111  return result;
2112  }
2113  public override bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName)
2114  {
2115  CheckIfUsable();
2116  bool result = VRNativeEntrypoints.VR_IVRRenderModels_RenderModelHasComponent(m_pVRRenderModels,pchRenderModelName,pchComponentName);
2117  return result;
2118  }
2119 }
2120 
2121 
2123 {
2124  public CVRNotifications(IntPtr VRNotifications)
2125  {
2126  m_pVRNotifications = VRNotifications;
2127  }
2128  IntPtr m_pVRNotifications;
2129 
2130  public override IntPtr GetIntPtr() { return m_pVRNotifications; }
2131 
2132  private void CheckIfUsable()
2133  {
2134  if (m_pVRNotifications == IntPtr.Zero)
2135  {
2136  throw new Exception("Steam Pointer not configured");
2137  }
2138  }
2139  public override EVRNotificationError CreateNotification(ulong ulOverlayHandle,ulong ulUserValue,EVRNotificationType type,string pchText,EVRNotificationStyle style,ref NotificationBitmap_t pImage,ref uint pNotificationId)
2140  {
2141  CheckIfUsable();
2142  pNotificationId = 0;
2143  EVRNotificationError result = VRNativeEntrypoints.VR_IVRNotifications_CreateNotification(m_pVRNotifications,ulOverlayHandle,ulUserValue,type,pchText,style,ref pImage,ref pNotificationId);
2144  return result;
2145  }
2146  public override EVRNotificationError RemoveNotification(uint notificationId)
2147  {
2148  CheckIfUsable();
2149  EVRNotificationError result = VRNativeEntrypoints.VR_IVRNotifications_RemoveNotification(m_pVRNotifications,notificationId);
2150  return result;
2151  }
2152 }
2153 
2154 
2155 public class CVRSettings : IVRSettings
2156 {
2157  public CVRSettings(IntPtr VRSettings)
2158  {
2159  m_pVRSettings = VRSettings;
2160  }
2161  IntPtr m_pVRSettings;
2162 
2163  public override IntPtr GetIntPtr() { return m_pVRSettings; }
2164 
2165  private void CheckIfUsable()
2166  {
2167  if (m_pVRSettings == IntPtr.Zero)
2168  {
2169  throw new Exception("Steam Pointer not configured");
2170  }
2171  }
2172  public override string GetSettingsErrorNameFromEnum(EVRSettingsError eError)
2173  {
2174  CheckIfUsable();
2175  IntPtr result = VRNativeEntrypoints.VR_IVRSettings_GetSettingsErrorNameFromEnum(m_pVRSettings,eError);
2176  return (string) Marshal.PtrToStructure(result, typeof(string));
2177  }
2178  public override bool Sync(bool bForce,ref EVRSettingsError peError)
2179  {
2180  CheckIfUsable();
2181  bool result = VRNativeEntrypoints.VR_IVRSettings_Sync(m_pVRSettings,bForce,ref peError);
2182  return result;
2183  }
2184  public override bool GetBool(string pchSection,string pchSettingsKey,bool bDefaultValue,ref EVRSettingsError peError)
2185  {
2186  CheckIfUsable();
2187  bool result = VRNativeEntrypoints.VR_IVRSettings_GetBool(m_pVRSettings,pchSection,pchSettingsKey,bDefaultValue,ref peError);
2188  return result;
2189  }
2190  public override void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError)
2191  {
2192  CheckIfUsable();
2193  VRNativeEntrypoints.VR_IVRSettings_SetBool(m_pVRSettings,pchSection,pchSettingsKey,bValue,ref peError);
2194  }
2195  public override int GetInt32(string pchSection,string pchSettingsKey,int nDefaultValue,ref EVRSettingsError peError)
2196  {
2197  CheckIfUsable();
2198  int result = VRNativeEntrypoints.VR_IVRSettings_GetInt32(m_pVRSettings,pchSection,pchSettingsKey,nDefaultValue,ref peError);
2199  return result;
2200  }
2201  public override void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref EVRSettingsError peError)
2202  {
2203  CheckIfUsable();
2204  VRNativeEntrypoints.VR_IVRSettings_SetInt32(m_pVRSettings,pchSection,pchSettingsKey,nValue,ref peError);
2205  }
2206  public override float GetFloat(string pchSection,string pchSettingsKey,float flDefaultValue,ref EVRSettingsError peError)
2207  {
2208  CheckIfUsable();
2209  float result = VRNativeEntrypoints.VR_IVRSettings_GetFloat(m_pVRSettings,pchSection,pchSettingsKey,flDefaultValue,ref peError);
2210  return result;
2211  }
2212  public override void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref EVRSettingsError peError)
2213  {
2214  CheckIfUsable();
2215  VRNativeEntrypoints.VR_IVRSettings_SetFloat(m_pVRSettings,pchSection,pchSettingsKey,flValue,ref peError);
2216  }
2217  public override void GetString(string pchSection,string pchSettingsKey,string pchValue,uint unValueLen,string pchDefaultValue,ref EVRSettingsError peError)
2218  {
2219  CheckIfUsable();
2220  VRNativeEntrypoints.VR_IVRSettings_GetString(m_pVRSettings,pchSection,pchSettingsKey,pchValue,unValueLen,pchDefaultValue,ref peError);
2221  }
2222  public override void SetString(string pchSection,string pchSettingsKey,string pchValue,ref EVRSettingsError peError)
2223  {
2224  CheckIfUsable();
2225  VRNativeEntrypoints.VR_IVRSettings_SetString(m_pVRSettings,pchSection,pchSettingsKey,pchValue,ref peError);
2226  }
2227  public override void RemoveSection(string pchSection,ref EVRSettingsError peError)
2228  {
2229  CheckIfUsable();
2230  VRNativeEntrypoints.VR_IVRSettings_RemoveSection(m_pVRSettings,pchSection,ref peError);
2231  }
2232 }
2233 
2234 
2236 {
2237  public CVRTrackedCamera(IntPtr VRTrackedCamera)
2238  {
2239  m_pVRTrackedCamera = VRTrackedCamera;
2240  }
2241  IntPtr m_pVRTrackedCamera;
2242 
2243  public override IntPtr GetIntPtr() { return m_pVRTrackedCamera; }
2244 
2245  private void CheckIfUsable()
2246  {
2247  if (m_pVRTrackedCamera == IntPtr.Zero)
2248  {
2249  throw new Exception("Steam Pointer not configured");
2250  }
2251  }
2252  public override bool HasCamera(uint nDeviceIndex)
2253  {
2254  CheckIfUsable();
2255  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_HasCamera(m_pVRTrackedCamera,nDeviceIndex);
2256  return result;
2257  }
2258  public override bool GetCameraFirmwareDescription(uint nDeviceIndex,string pBuffer,uint nBufferLen)
2259  {
2260  CheckIfUsable();
2261  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetCameraFirmwareDescription(m_pVRTrackedCamera,nDeviceIndex,pBuffer,nBufferLen);
2262  return result;
2263  }
2264  public override bool GetCameraFrameDimensions(uint nDeviceIndex,ECameraVideoStreamFormat nVideoStreamFormat,ref uint pWidth,ref uint pHeight)
2265  {
2266  CheckIfUsable();
2267  pWidth = 0;
2268  pHeight = 0;
2269  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetCameraFrameDimensions(m_pVRTrackedCamera,nDeviceIndex,nVideoStreamFormat,ref pWidth,ref pHeight);
2270  return result;
2271  }
2272  public override bool SetCameraVideoStreamFormat(uint nDeviceIndex,ECameraVideoStreamFormat nVideoStreamFormat)
2273  {
2274  CheckIfUsable();
2275  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_SetCameraVideoStreamFormat(m_pVRTrackedCamera,nDeviceIndex,nVideoStreamFormat);
2276  return result;
2277  }
2278  public override ECameraVideoStreamFormat GetCameraVideoStreamFormat(uint nDeviceIndex)
2279  {
2280  CheckIfUsable();
2281  ECameraVideoStreamFormat result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetCameraVideoStreamFormat(m_pVRTrackedCamera,nDeviceIndex);
2282  return result;
2283  }
2284  public override bool EnableCameraForStreaming(uint nDeviceIndex,bool bEnable)
2285  {
2286  CheckIfUsable();
2287  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_EnableCameraForStreaming(m_pVRTrackedCamera,nDeviceIndex,bEnable);
2288  return result;
2289  }
2290  public override bool StartVideoStream(uint nDeviceIndex)
2291  {
2292  CheckIfUsable();
2293  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_StartVideoStream(m_pVRTrackedCamera,nDeviceIndex);
2294  return result;
2295  }
2296  public override bool StopVideoStream(uint nDeviceIndex)
2297  {
2298  CheckIfUsable();
2299  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_StopVideoStream(m_pVRTrackedCamera,nDeviceIndex);
2300  return result;
2301  }
2302  public override bool IsVideoStreamActive(uint nDeviceIndex,ref bool pbPaused,ref float pflElapsedTime)
2303  {
2304  CheckIfUsable();
2305  pbPaused = false;
2306  pflElapsedTime = 0;
2307  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_IsVideoStreamActive(m_pVRTrackedCamera,nDeviceIndex,ref pbPaused,ref pflElapsedTime);
2308  return result;
2309  }
2310  public override CameraVideoStreamFrame_t GetVideoStreamFrame(uint nDeviceIndex)
2311  {
2312  CheckIfUsable();
2313  IntPtr result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetVideoStreamFrame(m_pVRTrackedCamera,nDeviceIndex);
2314  return (CameraVideoStreamFrame_t) Marshal.PtrToStructure(result, typeof(CameraVideoStreamFrame_t));
2315  }
2316  public override bool ReleaseVideoStreamFrame(uint nDeviceIndex,ref CameraVideoStreamFrame_t pFrameImage)
2317  {
2318  CheckIfUsable();
2319  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_ReleaseVideoStreamFrame(m_pVRTrackedCamera,nDeviceIndex,ref pFrameImage);
2320  return result;
2321  }
2322  public override bool SetAutoExposure(uint nDeviceIndex,bool bEnable)
2323  {
2324  CheckIfUsable();
2325  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_SetAutoExposure(m_pVRTrackedCamera,nDeviceIndex,bEnable);
2326  return result;
2327  }
2328  public override bool PauseVideoStream(uint nDeviceIndex)
2329  {
2330  CheckIfUsable();
2331  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_PauseVideoStream(m_pVRTrackedCamera,nDeviceIndex);
2332  return result;
2333  }
2334  public override bool ResumeVideoStream(uint nDeviceIndex)
2335  {
2336  CheckIfUsable();
2337  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_ResumeVideoStream(m_pVRTrackedCamera,nDeviceIndex);
2338  return result;
2339  }
2340  public override bool GetCameraDistortion(uint nDeviceIndex,float flInputU,float flInputV,ref float pflOutputU,ref float pflOutputV)
2341  {
2342  CheckIfUsable();
2343  pflOutputU = 0;
2344  pflOutputV = 0;
2345  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetCameraDistortion(m_pVRTrackedCamera,nDeviceIndex,flInputU,flInputV,ref pflOutputU,ref pflOutputV);
2346  return result;
2347  }
2348  public override bool GetCameraProjection(uint nDeviceIndex,float flWidthPixels,float flHeightPixels,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
2349  {
2350  CheckIfUsable();
2351  bool result = VRNativeEntrypoints.VR_IVRTrackedCamera_GetCameraProjection(m_pVRTrackedCamera,nDeviceIndex,flWidthPixels,flHeightPixels,flZNear,flZFar,ref pProjection);
2352  return result;
2353  }
2354 }
2355 
2356 
2357 public class OpenVRInterop
2358 {
2359  [DllImportAttribute("openvr_api", EntryPoint = "VR_Init")]
2360  internal static extern IntPtr Init(ref EVRInitError peError, EVRApplicationType eApplicationType);
2361  [DllImportAttribute("openvr_api", EntryPoint = "VR_Shutdown")]
2362  internal static extern void Shutdown();
2363  [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface")]
2364  internal static extern IntPtr GetGenericInterface([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion, ref EVRInitError peError);
2365  [DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent")]
2366  internal static extern bool IsHmdPresent();
2367  [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError")]
2368  internal static extern IntPtr GetStringForHmdError(EVRInitError error);
2369  [DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled")]
2370  internal static extern bool VR_IsRuntimeInstalled();
2371 }
2372 
2373 
2374 public enum EVREye
2375 {
2376  Eye_Left = 0,
2377  Eye_Right = 1,
2378 }
2380 {
2381  API_DirectX = 0,
2382  API_OpenGL = 1,
2383 }
2384 public enum EColorSpace
2385 {
2386  Auto = 0,
2387  Gamma = 1,
2388  Linear = 2,
2389 }
2390 public enum ETrackingResult
2391 {
2392  Uninitialized = 1,
2393  Calibrating_InProgress = 100,
2394  Calibrating_OutOfRange = 101,
2395  Running_OK = 200,
2396  Running_OutOfRange = 201,
2397 }
2399 {
2400  Invalid = 0,
2401  HMD = 1,
2402  Controller = 2,
2403  TrackingReference = 4,
2404  Other = 1000,
2405 }
2407 {
2408  Invalid = 0,
2409  LeftHand = 1,
2410  RightHand = 2,
2411 }
2413 {
2417 }
2419 {
2421  Prop_ModelNumber_String = 1001,
2422  Prop_SerialNumber_String = 1002,
2424  Prop_WillDriftInYaw_Bool = 1004,
2439  Prop_FPGAVersion_Uint64 = 1019,
2440  Prop_VRCVersion_Uint64 = 1020,
2441  Prop_RadioVersion_Uint64 = 1021,
2449  Prop_DeviceClass_Int32 = 1029,
2450  Prop_HasCamera_Bool = 1030,
2454  Prop_UserIpdMeters_Float = 2003,
2458  Prop_IsOnDesktop_Bool = 2007,
2459  Prop_DisplayMCType_Int32 = 2008,
2462  Prop_EdidVendorID_Int32 = 2011,
2466  Prop_EdidProductID_Int32 = 2015,
2468  Prop_DisplayGCType_Int32 = 2017,
2486  Prop_Axis0Type_Int32 = 3002,
2487  Prop_Axis1Type_Int32 = 3003,
2488  Prop_Axis2Type_Int32 = 3004,
2489  Prop_Axis3Type_Int32 = 3005,
2490  Prop_Axis4Type_Int32 = 3006,
2497  Prop_ModeLabel_String = 4006,
2500 }
2502 {
2503  TrackedProp_Success = 0,
2513 }
2514 public enum EVRSubmitFlags
2515 {
2516  Submit_Default = 0,
2519 }
2520 public enum EVRState
2521 {
2522  Undefined = -1,
2523  Off = 0,
2524  Searching = 1,
2525  Searching_Alert = 2,
2526  Ready = 3,
2527  Ready_Alert = 4,
2528  NotReady = 5,
2529 }
2530 public enum EVREventType
2531 {
2532  VREvent_None = 0,
2538  VREvent_IpdChanged = 105,
2542  VREvent_ButtonPress = 200,
2543  VREvent_ButtonUnpress = 201,
2544  VREvent_ButtonTouch = 202,
2545  VREvent_ButtonUntouch = 203,
2546  VREvent_MouseMove = 300,
2548  VREvent_MouseButtonUp = 302,
2549  VREvent_FocusEnter = 303,
2550  VREvent_FocusLeave = 304,
2551  VREvent_Scroll = 305,
2552  VREvent_TouchPadMove = 306,
2555  VREvent_SceneFocusLost = 402,
2559  VREvent_OverlayShown = 500,
2560  VREvent_OverlayHidden = 501,
2565  VREvent_ResetDashboard = 506,
2566  VREvent_RenderToast = 507,
2567  VREvent_ImageLoaded = 508,
2568  VREvent_ShowKeyboard = 509,
2569  VREvent_HideKeyboard = 510,
2576  VREvent_Quit = 700,
2577  VREvent_ProcessQuit = 701,
2586  VREvent_StatusUpdate = 900,
2587  VREvent_MCImageUpdated = 1000,
2590  VREvent_KeyboardClosed = 1200,
2606 }
2608 {
2614 }
2615 public enum EVRButtonId
2616 {
2617  k_EButton_System = 0,
2619  k_EButton_Grip = 2,
2620  k_EButton_DPad_Left = 3,
2621  k_EButton_DPad_Up = 4,
2623  k_EButton_DPad_Down = 6,
2624  k_EButton_A = 7,
2625  k_EButton_Axis0 = 32,
2626  k_EButton_Axis1 = 33,
2627  k_EButton_Axis2 = 34,
2628  k_EButton_Axis3 = 35,
2629  k_EButton_Axis4 = 36,
2633  k_EButton_Max = 64,
2634 }
2635 public enum EVRMouseButton
2636 {
2637  Left = 1,
2638  Right = 2,
2639  Middle = 4,
2640 }
2642 {
2647 }
2649 {
2652 }
2654 {
2661 }
2662 public enum EVROverlayError
2663 {
2664  None = 0,
2665  UnknownOverlay = 10,
2666  InvalidHandle = 11,
2667  PermissionDenied = 12,
2668  OverlayLimitExceeded = 13,
2669  WrongVisibilityType = 14,
2670  KeyTooLong = 15,
2671  NameTooLong = 16,
2672  KeyInUse = 17,
2673  WrongTransformType = 18,
2674  InvalidTrackedDevice = 19,
2675  InvalidParameter = 20,
2677  ArrayTooSmall = 22,
2678  RequestFailed = 23,
2679  InvalidTexture = 24,
2680  UnableToLoadFile = 25,
2682  NoNeighbor = 27,
2683 }
2685 {
2686  VRApplication_Other = 0,
2687  VRApplication_Scene = 1,
2691 }
2692 public enum EVRFirmwareError
2693 {
2694  None = 0,
2695  Success = 1,
2696  Fail = 2,
2697 }
2699 {
2700  OK = 0,
2701  InvalidNotificationId = 100,
2702  NotificationQueueFull = 101,
2703  InvalidOverlayHandle = 102,
2704 }
2705 public enum EVRInitError
2706 {
2707  None = 0,
2708  Unknown = 1,
2712  Init_FileNotFound = 103,
2713  Init_FactoryNotFound = 104,
2714  Init_InterfaceNotFound = 105,
2715  Init_InvalidInterface = 106,
2717  Init_HmdNotFound = 108,
2718  Init_NotInitialized = 109,
2720  Init_NoConfigPath = 111,
2721  Init_NoLogPath = 112,
2723  Init_AppInfoInitFailed = 114,
2724  Init_Retry = 115,
2728  Init_ShuttingDown = 119,
2729  Init_TooManyObjects = 120,
2733  Driver_Failed = 200,
2734  Driver_Unknown = 201,
2735  Driver_HmdUnknown = 202,
2736  Driver_NotLoaded = 203,
2738  Driver_HmdInUse = 205,
2739  Driver_NotCalibrated = 206,
2742  IPC_ServerInitFailed = 300,
2743  IPC_ConnectFailed = 301,
2746  IPC_MutexInitFailed = 304,
2747  IPC_Failed = 305,
2763 }
2765 {
2766  None = 0,
2767  AppKeyAlreadyExists = 100,
2768  NoManifest = 101,
2769  NoApplication = 102,
2770  InvalidIndex = 103,
2771  UnknownApplication = 104,
2772  IPCFailed = 105,
2774  InvalidManifest = 107,
2775  InvalidApplication = 108,
2776  LaunchFailed = 109,
2778  LaunchInProgress = 111,
2779  OldApplicationQuitting = 112,
2780  TransitionAborted = 113,
2781  BufferTooSmall = 200,
2782  PropertyNotSet = 201,
2783  UnknownProperty = 202,
2784 }
2786 {
2787  Name_String = 0,
2788  LaunchType_String = 11,
2790  BinaryPath_String = 13,
2791  Arguments_String = 14,
2792  URL_String = 15,
2793  Description_String = 50,
2794  NewsURL_String = 51,
2795  ImagePath_String = 52,
2796  Source_String = 53,
2798  LastLaunchTime_Uint64 = 70,
2799 }
2801 {
2806 }
2808 {
2809  OK = 1,
2810  Warning = 100,
2814  Error = 200,
2817  Error_PlayAreaInvalid = 203,
2819 }
2821 {
2822  Live = 1,
2823  Temp = 2,
2824 }
2826 {
2827  None = 0,
2828  IncompatibleVersion = 100,
2829  DoNotHaveFocus = 101,
2830  InvalidTexture = 102,
2831  IsNotSceneApplication = 103,
2832  TextureIsOnWrongDevice = 104,
2835 }
2837 {
2838  None = 0,
2839  Mouse = 1,
2840 }
2842 {
2847 }
2848 public enum VROverlayFlags
2849 {
2850  None = 0,
2851  Curved = 1,
2852  RGSS4X = 2,
2853  NoDashboardTab = 3,
2855  ShowGamepadFocus = 5,
2856  SendVRScrollEvents = 6,
2858 }
2860 {
2864 }
2866 {
2869 }
2871 {
2872  Up = 0,
2873  Down = 1,
2874  Left = 2,
2875  Right = 3,
2876  Count = 4,
2877 }
2879 {
2880  None = 0,
2881  Loading = 100,
2882  NotSupported = 200,
2883  InvalidArg = 300,
2884  InvalidModel = 301,
2885  NoShapes = 302,
2886  MultipleShapes = 303,
2887  TooManyIndices = 304,
2888  MultipleTextures = 305,
2889  InvalidTexture = 400,
2890 }
2892 {
2893  IsStatic = 1,
2894  IsVisible = 2,
2895  IsTouched = 4,
2896  IsPressed = 8,
2897  IsScrolled = 16,
2898 }
2900 {
2901  Transient = 0,
2902  Persistent = 1,
2903 }
2905 {
2906  None = 0,
2907  Application = 100,
2908  Contact_Disabled = 200,
2909  Contact_Enabled = 201,
2910  Contact_Active = 202,
2911 }
2912 public enum EVRSettingsError
2913 {
2914  None = 0,
2915  IPCFailed = 1,
2916  WriteFailed = 2,
2917  ReadFailed = 3,
2918 }
2920 {
2921  CVS_FORMAT_UNKNOWN = 0,
2922  CVS_FORMAT_RAW10 = 1,
2923  CVS_FORMAT_NV12 = 2,
2924  CVS_FORMAT_RGB24 = 3,
2925  CVS_MAX_FORMATS = 4,
2926 }
2927 
2928 [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t
2929 {
2930  [FieldOffset(0)] public VREvent_Reserved_t reserved;
2931  [FieldOffset(0)] public VREvent_Controller_t controller;
2932  [FieldOffset(0)] public VREvent_Mouse_t mouse;
2933  [FieldOffset(0)] public VREvent_Scroll_t scroll;
2934  [FieldOffset(0)] public VREvent_Process_t process;
2935  [FieldOffset(0)] public VREvent_Notification_t notification;
2936  [FieldOffset(0)] public VREvent_Overlay_t overlay;
2937  [FieldOffset(0)] public VREvent_Status_t status;
2938  [FieldOffset(0)] public VREvent_Keyboard_t keyboard;
2939 }
2940 
2941 [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t
2942 {
2943  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.R4)]
2944  public float[] m; //float[3][4]
2945 }
2946 [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t
2947 {
2948  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.R4)]
2949  public float[] m; //float[4][4]
2950 }
2951 [StructLayout(LayoutKind.Sequential)] public struct HmdVector3_t
2952 {
2953  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.R4)]
2954  public float[] v; //float[3]
2955 }
2956 [StructLayout(LayoutKind.Sequential)] public struct HmdVector4_t
2957 {
2958  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.R4)]
2959  public float[] v; //float[4]
2960 }
2961 [StructLayout(LayoutKind.Sequential)] public struct HmdVector3d_t
2962 {
2963  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.R8)]
2964  public double[] v; //double[3]
2965 }
2966 [StructLayout(LayoutKind.Sequential)] public struct HmdVector2_t
2967 {
2968  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
2969  public float[] v; //float[2]
2970 }
2971 [StructLayout(LayoutKind.Sequential)] public struct HmdQuaternion_t
2972 {
2973  public double w;
2974  public double x;
2975  public double y;
2976  public double z;
2977 }
2978 [StructLayout(LayoutKind.Sequential)] public struct HmdColor_t
2979 {
2980  public float r;
2981  public float g;
2982  public float b;
2983  public float a;
2984 }
2985 [StructLayout(LayoutKind.Sequential)] public struct HmdQuad_t
2986 {
2987  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.Struct)]
2988  public HmdVector3_t[] vCorners; //HmdVector3_t[4]
2989 }
2990 [StructLayout(LayoutKind.Sequential)] public struct HmdRect2_t
2991 {
2994 }
2995 [StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t
2996 {
2997  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
2998  public float[] rfRed; //float[2]
2999  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
3000  public float[] rfGreen; //float[2]
3001  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
3002  public float[] rfBlue; //float[2]
3003 }
3004 [StructLayout(LayoutKind.Sequential)] public struct Texture_t
3005 {
3006  public IntPtr handle; // void *
3009 }
3010 [StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
3011 {
3016  [MarshalAs(UnmanagedType.I1)]
3017  public bool bPoseIsValid;
3018  [MarshalAs(UnmanagedType.I1)]
3019  public bool bDeviceIsConnected;
3020 }
3021 [StructLayout(LayoutKind.Sequential)] public struct VRTextureBounds_t
3022 {
3023  public float uMin;
3024  public float vMin;
3025  public float uMax;
3026  public float vMax;
3027 }
3028 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Controller_t
3029 {
3030  public uint button;
3031 }
3032 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Mouse_t
3033 {
3034  public float x;
3035  public float y;
3036  public uint button;
3037 }
3038 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t
3039 {
3040  public float xdelta;
3041  public float ydelta;
3042  public uint repeatCount;
3043 }
3044 [StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t
3045 {
3046  [MarshalAs(UnmanagedType.I1)]
3047  public bool bFingerDown;
3048  public float flSecondsFingerDown;
3049  public float fValueXFirst;
3050  public float fValueYFirst;
3051  public float fValueXRaw;
3052  public float fValueYRaw;
3053 }
3054 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Notification_t
3055 {
3056  public ulong ulUserValue;
3057  public uint notificationId;
3058 }
3059 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Process_t
3060 {
3061  public uint pid;
3062  public uint oldPid;
3063  [MarshalAs(UnmanagedType.I1)]
3064  public bool bForced;
3065 }
3066 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t
3067 {
3068  public ulong overlayHandle;
3069 }
3070 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t
3071 {
3072  public uint statusState;
3073 }
3074 [StructLayout(LayoutKind.Sequential)] unsafe public struct VREvent_Keyboard_t
3075 {
3076  public fixed char cNewInput[8]; //public string cNewInput; //char[8]
3077  public ulong uUserValue;
3078 }
3079 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Ipd_t
3080 {
3081  public float ipdMeters;
3082 }
3083 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Chaperone_t
3084 {
3085  public ulong m_nPreviousUniverse;
3086  public ulong m_nCurrentUniverse;
3087 }
3088 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Reserved_t
3089 {
3090  public ulong reserved0;
3091  public ulong reserved1;
3092 }
3093 [StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t
3094 {
3095  public uint m_nFidelityLevel;
3096 }
3097 [StructLayout(LayoutKind.Sequential)] public struct VREvent_t
3098 {
3099  public uint eventType;
3100  public uint trackedDeviceIndex;
3101  public float eventAgeSeconds;
3103 }
3104 [StructLayout(LayoutKind.Sequential)] public struct HiddenAreaMesh_t
3105 {
3106  public IntPtr pVertexData; // const struct vr::HmdVector2_t *
3107  public uint unTriangleCount;
3108 }
3109 [StructLayout(LayoutKind.Sequential)] public struct VRControllerAxis_t
3110 {
3111  public float x;
3112  public float y;
3113 }
3114 [StructLayout(LayoutKind.Sequential)] public struct VRControllerState_t
3115 {
3116  public uint unPacketNum;
3117  public ulong ulButtonPressed;
3118  public ulong ulButtonTouched;
3119  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.Struct)]
3120  public VRControllerAxis_t[] rAxis; //VRControllerAxis_t[5]
3121 }
3122 [StructLayout(LayoutKind.Sequential)] public struct Compositor_OverlaySettings
3123 {
3124  public uint size;
3125  [MarshalAs(UnmanagedType.I1)]
3126  public bool curved;
3127  [MarshalAs(UnmanagedType.I1)]
3128  public bool antialias;
3129  public float scale;
3130  public float distance;
3131  public float alpha;
3132  public float uOffset;
3133  public float vOffset;
3134  public float uScale;
3135  public float vScale;
3136  public float gridDivs;
3137  public float gridWidth;
3138  public float gridScale;
3140 }
3141 [StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming
3142 {
3143  public uint m_nSize;
3144  public uint m_nFrameIndex;
3145  public uint m_nNumFramePresents;
3146  public uint m_nNumDroppedFrames;
3148  public float m_flSceneRenderGpuMs;
3149  public float m_flTotalRenderGpuMs;
3154  public float m_flPresentCallCpuMs;
3156  public float m_flSubmitFrameMs;
3158  public float m_flNewPosesReadyMs;
3159  public float m_flNewFrameReadyMs;
3164  public int m_nFidelityLevel;
3165 }
3166 [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t
3167 {
3171 }
3172 [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionResults_t
3173 {
3177  public float fDistance;
3178 }
3179 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t
3180 {
3183  public uint uProperties;
3184 }
3185 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_Vertex_t
3186 {
3189  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
3190  public float[] rfTextureCoord; //float[2]
3191 }
3192 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_TextureMap_t
3193 {
3194  public char unWidth;
3195  public char unHeight;
3196  public IntPtr rubTextureMapData; // const uint8_t *
3197 }
3198 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_t
3199 {
3200  public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t *
3201  public uint unVertexCount;
3202  public IntPtr rIndexData; // const uint16_t *
3203  public uint unTriangleCount;
3204  public int diffuseTextureId;
3205 }
3206 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_ControllerMode_State_t
3207 {
3208  [MarshalAs(UnmanagedType.I1)]
3209  public bool bScrollWheelVisible;
3210 }
3211 [StructLayout(LayoutKind.Sequential)] public struct NotificationBitmap_t
3212 {
3213  public IntPtr bytes; // void *
3214  public int width;
3215  public int height;
3216  public int depth;
3217 }
3218 [StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrame_t
3219 {
3221  public uint m_nWidth;
3222  public uint m_nHeight;
3223  public uint m_nImageDataSize;
3224  public uint m_nFrameSequence;
3227  public uint m_nSyncCounter;
3228  public uint m_nExposureTime;
3229  public uint m_nBufferIndex;
3230  public uint m_nBufferCount;
3231  public double m_flFrameElapsedTime;
3232  public double m_flFrameCaptureTime;
3233  public ulong m_nFrameCaptureTicks;
3234  [MarshalAs(UnmanagedType.I1)]
3235  public bool m_bPoseIsValid;
3237  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.R4)]
3238  public float[] m_Pad; //float[4]
3239  public IntPtr m_pImageData; // void *
3240 }
3241 
3242 public class OpenVR
3243 {
3244  public static IntPtr Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene)
3245  {
3246  return OpenVRInterop.Init(ref peError, eApplicationType);
3247  }
3248 
3249  public static void Shutdown()
3250  {
3251  OpenVRInterop.Shutdown();
3252  }
3253 
3254  public static IntPtr GetGenericInterface(string pchInterfaceVersion, ref EVRInitError peError)
3255  {
3256  return OpenVRInterop.GetGenericInterface(pchInterfaceVersion, ref peError);
3257  }
3258 
3259  public static bool IsHmdPresent()
3260  {
3261  return OpenVRInterop.IsHmdPresent();
3262  }
3263 
3264  public static string GetStringForHmdError(EVRInitError error)
3265  {
3266  return Marshal.PtrToStringAnsi(OpenVRInterop.GetStringForHmdError(error));
3267  }
3268 
3269  public const uint k_unTrackingStringSize = 32;
3270  public const uint k_unMaxDriverDebugResponseSize = 32768;
3271  public const uint k_unTrackedDeviceIndex_Hmd = 0;
3272  public const uint k_unMaxTrackedDeviceCount = 16;
3273  public const uint k_unTrackedDeviceIndexInvalid = 4294967295;
3274  public const uint k_unMaxPropertyStringSize = 32768;
3275  public const uint k_unControllerStateAxisCount = 5;
3276  public const ulong k_ulOverlayHandleInvalid = 0;
3277  public const string IVRSystem_Version = "IVRSystem_011";
3278  public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
3279  public const uint k_unMaxApplicationKeyLength = 128;
3280  public const string IVRApplications_Version = "IVRApplications_003";
3281  public const string IVRChaperone_Version = "IVRChaperone_003";
3282  public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
3283  public const string IVRCompositor_Version = "IVRCompositor_011";
3284  public const uint k_unVROverlayMaxKeyLength = 128;
3285  public const uint k_unVROverlayMaxNameLength = 128;
3286  public const uint k_unMaxOverlayCount = 32;
3287  public const string IVROverlay_Version = "IVROverlay_010";
3288  public const string k_pch_Controller_Component_GDC2015 = "gdc2015";
3289  public const string k_pch_Controller_Component_Base = "base";
3290  public const string k_pch_Controller_Component_Tip = "tip";
3291  public const string k_pch_Controller_Component_HandGrip = "handgrip";
3292  public const string k_pch_Controller_Component_Status = "status";
3293  public const string IVRRenderModels_Version = "IVRRenderModels_004";
3294  public const uint k_unNotificationTextMaxSize = 256;
3295  public const string IVRNotifications_Version = "IVRNotifications_002";
3296  public const uint k_unMaxSettingsKeyLength = 128;
3297  public const string k_pch_SteamVR_Section = "steamvr";
3298  public const string k_pch_SteamVR_RequireHmd_String = "requireHmd";
3299  public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
3300  public const string k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
3301  public const string k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
3302  public const string k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
3303  public const string k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
3304  public const string k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
3305  public const string k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
3306  public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel";
3307  public const string k_pch_SteamVR_IPD_Float = "ipd";
3308  public const string k_pch_SteamVR_Background_String = "background";
3309  public const string k_pch_SteamVR_GridColor_String = "gridColor";
3310  public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
3311  public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
3312  public const string k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
3313  public const string k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
3314  public const string k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout";
3315  public const string k_pch_SteamVR_AutomaticDirectModeEnabled_Bool = "automaticDirectModeEnabled";
3316  public const string k_pch_SteamVR_RequestDirectModeEnabled_Bool = "requestDirectModeEnabled";
3317  public const string k_pch_SteamVR_RequestDirectModeDisabled_Bool = "requestDirectModeDisabled";
3318  public const string k_pch_Lighthouse_Section = "driver_lighthouse";
3319  public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
3320  public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
3321  public const string k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
3322  public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
3323  public const string k_pch_Lighthouse_LighthouseName_String = "lighthousename";
3324  public const string k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
3325  public const string k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
3326  public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
3327  public const string k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
3328  public const string k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
3329  public const string k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
3330  public const string k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
3331  public const string k_pch_Null_Section = "driver_null";
3332  public const string k_pch_Null_EnableNullDriver_Bool = "enable";
3333  public const string k_pch_Null_SerialNumber_String = "serialNumber";
3334  public const string k_pch_Null_ModelNumber_String = "modelNumber";
3335  public const string k_pch_Null_WindowX_Int32 = "windowX";
3336  public const string k_pch_Null_WindowY_Int32 = "windowY";
3337  public const string k_pch_Null_WindowWidth_Int32 = "windowWidth";
3338  public const string k_pch_Null_WindowHeight_Int32 = "windowHeight";
3339  public const string k_pch_Null_RenderWidth_Int32 = "renderWidth";
3340  public const string k_pch_Null_RenderHeight_Int32 = "renderHeight";
3341  public const string k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
3342  public const string k_pch_Null_DisplayFrequency_Float = "displayFrequency";
3343  public const string k_pch_UserInterface_Section = "userinterface";
3344  public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
3345  public const string k_pch_Notifications_Section = "notifications";
3346  public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
3347  public const string k_pch_Keyboard_Section = "keyboard";
3348  public const string k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
3349  public const string k_pch_Perf_Section = "perfcheck";
3350  public const string k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
3351  public const string k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
3352  public const string k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
3353  public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
3354  public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
3355  public const string k_pch_Camera_Section = "camera";
3356  public const string IVRSettings_Version = "IVRSettings_001";
3357  public const string IVRTrackedCamera_Version = "IVRTrackedCamera_001";
3358 }
3359 
3360 
3361 
3362 public class Unity
3363 {
3364  public const int k_nRenderEventID_WaitGetPoses = 201510020;
3365  public const int k_nRenderEventID_SubmitL = 201510021;
3366  public const int k_nRenderEventID_SubmitR = 201510022;
3367  public const int k_nRenderEventID_Flush = 201510023;
3368  public const int k_nRenderEventID_PostPresentHandoff = 201510024;
3369 
3370  [DllImport("openvr_api", EntryPoint="UnityHooks_GetRenderEventFunc")]
3371  public static extern IntPtr GetRenderEventFunc();
3372 
3373  [DllImport("openvr_api", EntryPoint="UnityHooks_SetSubmitParams")]
3374  public static extern void SetSubmitParams(VRTextureBounds_t boundsL, VRTextureBounds_t boundsR, EVRSubmitFlags nSubmitFlags);
3375 
3376  [DllImport("openvr_api", EntryPoint="UnityHooks_SetColorSpace")]
3377  public static extern void SetColorSpace(EColorSpace eColorSpace);
3378 
3379  [DllImport("openvr_api", EntryPoint="UnityHooks_EventWriteString")]
3380  public static extern void EventWriteString([In, MarshalAs(UnmanagedType.LPWStr)] string sEvent);
3381 }
3382 
3383 
3384 }
3385 
3386 #endif // !XB1
EVRNotificationType
Definition: openvr_api.cs:2899
override bool GetApplicationAutoLaunch(string pchAppKey)
Definition: openvr_api.cs:1218
override ETrackingUniverseOrigin GetTrackingSpace()
Definition: openvr_api.cs:1480
ECameraVideoStreamFormat
Definition: openvr_api.cs:2919
override string GetButtonIdNameFromEnum(EVRButtonId eButtonId)
Definition: openvr_api.cs:1002
override bool GetCameraFirmwareDescription(uint nDeviceIndex, string pBuffer, uint nBufferLen)
Definition: openvr_api.cs:2258
override uint GetStringTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBufferSize, ref ETrackedPropertyError pError)
Definition: openvr_api.cs:949
override bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, ref TrackedDevicePose_t pTrackedDevicePose)
Definition: openvr_api.cs:991
override void HideKeyboard()
Definition: openvr_api.cs:2003
override ulong GetApplicationPropertyUint64(string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError)
Definition: openvr_api.cs:1206
EGraphicsAPIConvention
Definition: openvr_api.cs:2379
override EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle, ref float pfWidthInMeters)
Definition: openvr_api.cs:1732
override bool GetLivePhysicalBoundsInfo(out HmdQuad_t[] pQuadsBuffer)
Definition: openvr_api.cs:1446
static bool IsHmdPresent()
Definition: openvr_api.cs:3259
override bool IsApplicationInstalled(string pchAppKey)
Definition: openvr_api.cs:1140
override void SetWorkingCollisionBoundsTagsInfo(byte[] pTagsBuffer)
Definition: openvr_api.cs:1426
VRControllerAxis_t[] rAxis
Definition: openvr_api.cs:3120
override bool GetApplicationPropertyBool(string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError)
Definition: openvr_api.cs:1200
VROverlayTransformType
Definition: openvr_api.cs:2841
override CameraVideoStreamFrame_t GetVideoStreamFrame(uint nDeviceIndex)
Definition: openvr_api.cs:2310
override uint GetKeyboardText(System.Text.StringBuilder pchText, uint cchText)
Definition: openvr_api.cs:1997
override uint GetComponentName(string pchRenderModelName, uint unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameLen)
Definition: openvr_api.cs:2089
override bool GetFrameTiming(ref Compositor_FrameTiming pTiming, uint unFramesAgo)
Definition: openvr_api.cs:1514
EVRNotificationStyle
Definition: openvr_api.cs:2904
override float GetFrameTimeRemaining()
Definition: openvr_api.cs:1520
override EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId)
Definition: openvr_api.cs:884
EGraphicsAPIConvention eType
Definition: openvr_api.cs:3007
override bool GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState)
Definition: openvr_api.cs:985
override bool IsInputFocusCapturedByAnotherProcess()
Definition: openvr_api.cs:1025
override HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError)
Definition: openvr_api.cs:943
override string GetPropErrorNameFromEnum(ETrackedPropertyError error)
Definition: openvr_api.cs:955
override EVROverlayError DestroyOverlay(ulong ulOverlayHandle)
Definition: openvr_api.cs:1641
override EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle, float fAlpha)
Definition: openvr_api.cs:1713
override HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose()
Definition: openvr_api.cs:872
override IntPtr GetIntPtr()
Definition: openvr_api.cs:1119
override bool SetCameraVideoStreamFormat(uint nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat)
Definition: openvr_api.cs:2272
override bool Sync(bool bForce, ref EVRSettingsError peError)
Definition: openvr_api.cs:2178
override HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose()
Definition: openvr_api.cs:866
CVRCompositor(IntPtr VRCompositor)
Definition: openvr_api.cs:1460
override EVRRenderModelError LoadRenderModel_Async(string pchRenderModelName, ref IntPtr ppRenderModel)
Definition: openvr_api.cs:2038
override bool SetWorkingPhysicalBoundsInfo(HmdQuad_t[] pQuadsBuffer)
Definition: openvr_api.cs:1440
override IntPtr GetIntPtr()
Definition: openvr_api.cs:2029
override void CompositorBringToFront()
Definition: openvr_api.cs:1547
override ChaperoneCalibrationState GetCalibrationState()
Definition: openvr_api.cs:1274
override string GetOverlayErrorNameFromEnum(EVROverlayError error)
Definition: openvr_api.cs:1679
override void SetString(string pchSection, string pchSettingsKey, string pchValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2222
override EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle, ref EColorSpace peTextureColorSpace)
Definition: openvr_api.cs:1759
override void PerformanceTestEnableCapture(bool bEnable)
Definition: openvr_api.cs:1053
override bool GetCameraFrameDimensions(uint nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat, ref uint pWidth, ref uint pHeight)
Definition: openvr_api.cs:2264
override EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale)
Definition: openvr_api.cs:1863
override string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType)
Definition: openvr_api.cs:1008
override IntPtr GetIntPtr()
Definition: openvr_api.cs:1265
override void GetEyeOutputViewport(EVREye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight)
Definition: openvr_api.cs:1092
override EVROverlayError SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth)
Definition: openvr_api.cs:1929
override EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle, uint unProcessId)
Definition: openvr_api.cs:1961
override EVRCompositorError GetLastPoses(TrackedDevicePose_t[] pRenderPoseArray, TrackedDevicePose_t[] pGamePoseArray)
Definition: openvr_api.cs:1492
override EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath)
Definition: openvr_api.cs:1134
override EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod)
Definition: openvr_api.cs:1851
override bool GetLiveCollisionBoundsInfo(out HmdQuad_t[] pQuadsBuffer)
Definition: openvr_api.cs:1374
VREvent_Process_t process
Definition: openvr_api.cs:2934
override EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex, string pchAppKeyBuffer, uint unAppKeyBufferLen)
Definition: openvr_api.cs:1152
override ulong GetComponentButtonMask(string pchRenderModelName, string pchComponentName)
Definition: openvr_api.cs:2095
override uint GetOverlayName(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError)
Definition: openvr_api.cs:1665
EVRNotificationError
Definition: openvr_api.cs:2698
override uint GetComponentCount(string pchRenderModelName)
Definition: openvr_api.cs:2083
CVRTrackedCamera(IntPtr VRTrackedCamera)
Definition: openvr_api.cs:2237
override void FadeGrid(float fSeconds, bool bFadeIn)
Definition: openvr_api.cs:1531
override bool GetLiveCollisionBoundsTagsInfo(out byte[] pTagsBuffer)
Definition: openvr_api.cs:1431
override void AcknowledgeQuit_Exiting()
Definition: openvr_api.cs:1043
using System
override void CompositorDumpImages()
Definition: openvr_api.cs:1602
EVRApplicationType
Definition: openvr_api.cs:2684
override EVROverlayError CreateOverlay(string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pOverlayHandle)
Definition: openvr_api.cs:1634
override bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter)
Definition: openvr_api.cs:824
override EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle, ref VROverlayTransformType peTransformType)
Definition: openvr_api.cs:1777
override bool GetBool(string pchSection, string pchSettingsKey, bool bDefaultValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2184
EVRControllerAxisType
Definition: openvr_api.cs:2641
override uint GetApplicationCount()
Definition: openvr_api.cs:1146
override uint GetCurrentSceneFocusProcess()
Definition: openvr_api.cs:1568
override DistortionCoordinates_t ComputeDistortion(EVREye eEye, float fU, float fV)
Definition: openvr_api.cs:812
override uint GetComponentRenderModelName(string pchRenderModelName, string pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen)
Definition: openvr_api.cs:2101
override EVROverlayError SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled)
Definition: openvr_api.cs:1685
override EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale)
Definition: openvr_api.cs:1869
override EVRRenderModelError LoadTextureD3D11_Async(int textureId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D)
Definition: openvr_api.cs:2060
HmdVector2_t vBottomRight
Definition: openvr_api.cs:2993
static IntPtr Init(ref EVRInitError peError, EVRApplicationType eApplicationType=EVRApplicationType.VRApplication_Scene)
Definition: openvr_api.cs:3244
override uint GetLastFrameRenderer()
Definition: openvr_api.cs:1574
override IntPtr GetIntPtr()
Definition: openvr_api.cs:1466
override void SetSceneColor(HmdColor_t color)
Definition: openvr_api.cs:1299
override bool GetCameraDistortion(uint nDeviceIndex, float flInputU, float flInputV, ref float pflOutputU, ref float pflOutputV)
Definition: openvr_api.cs:2340
override bool EnableCameraForStreaming(uint nDeviceIndex, bool bEnable)
Definition: openvr_api.cs:2284
override void ClearSkyboxOverride()
Definition: openvr_api.cs:1542
override void PerformanceTestReportFidelityLevelChange(int nFidelityLevel)
Definition: openvr_api.cs:1058
EVRControllerEventOutputType
Definition: openvr_api.cs:2648
ECameraVideoStreamFormat m_nStreamFormat
Definition: openvr_api.cs:3220
override void GetProjectionRaw(EVREye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom)
Definition: openvr_api.cs:803
VREvent_Reserved_t reserved
Definition: openvr_api.cs:2930
override bool IsVideoStreamActive(uint nDeviceIndex, ref bool pbPaused, ref float pflElapsedTime)
Definition: openvr_api.cs:2302
override bool IsTrackedDeviceConnected(uint unDeviceIndex)
Definition: openvr_api.cs:913
VREvent_Status_t status
Definition: openvr_api.cs:2937
override EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex)
Definition: openvr_api.cs:1037
override bool ResumeVideoStream(uint nDeviceIndex)
Definition: openvr_api.cs:2334
override EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds)
Definition: openvr_api.cs:1765
EVRRenderModelError
Definition: openvr_api.cs:2878
ETrackedPropertyError
Definition: openvr_api.cs:2501
override bool SetAutoExposure(uint nDeviceIndex, bool bEnable)
Definition: openvr_api.cs:2322
override HmdMatrix44_t GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType)
Definition: openvr_api.cs:797
override bool HasCamera(uint nDeviceIndex)
Definition: openvr_api.cs:2252
override EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds)
Definition: openvr_api.cs:1771
override EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection, ulong ulFrom, ulong ulTo)
Definition: openvr_api.cs:1905
override void ShowDashboard(string pchOverlayToShow)
Definition: openvr_api.cs:1974
override void FreeTextureD3D11(IntPtr pD3D11Texture2D)
Definition: openvr_api.cs:2066
override EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle, VROverlayInputMethod eInputMethod)
Definition: openvr_api.cs:1857
VREvent_Mouse_t mouse
Definition: openvr_api.cs:2932
VREvent_Notification_t notification
Definition: openvr_api.cs:2935
override IntPtr GetIntPtr()
Definition: openvr_api.cs:1618
ETrackingUniverseOrigin
Definition: openvr_api.cs:2412
override EVRNotificationError CreateNotification(ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, string pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId)
Definition: openvr_api.cs:2139
CVRChaperoneSetup(IntPtr VRChaperoneSetup)
Definition: openvr_api.cs:1325
override IntPtr GetIntPtr()
Definition: openvr_api.cs:1074
override void ReloadFromDisk(EChaperoneConfigFile configFile)
Definition: openvr_api.cs:1415
EVRApplicationTransitionState
Definition: openvr_api.cs:2800
override void SetInt32(string pchSection, string pchSettingsKey, int nValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2201
override EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
Definition: openvr_api.cs:1801
override void GetWindowBounds(ref int pnX, ref int pnY, ref uint pnWidth, ref uint pnHeight)
Definition: openvr_api.cs:1083
override EVROverlayError HideOverlay(ulong ulOverlayHandle)
Definition: openvr_api.cs:1827
override bool GetWorkingCollisionBoundsInfo(out HmdQuad_t[] pQuadsBuffer)
Definition: openvr_api.cs:1365
override void ShowMirrorWindow()
Definition: openvr_api.cs:1586
override void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform)
Definition: openvr_api.cs:2008
override EVRCompositorError SetSkyboxOverride(Texture_t[] pTextures)
Definition: openvr_api.cs:1536
override string GetSettingsErrorNameFromEnum(EVRSettingsError eError)
Definition: openvr_api.cs:2172
VROverlayInputMethod
Definition: openvr_api.cs:2836
override bool IsDisplayOnDesktop()
Definition: openvr_api.cs:844
HmdVector3_t[] vCorners
Definition: openvr_api.cs:2988
override void ForceBoundsVisible(bool bForce)
Definition: openvr_api.cs:1315
ECollisionBoundsStyle
Definition: openvr_api.cs:2653
override EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace)
Definition: openvr_api.cs:1753
override EVRNotificationError RemoveNotification(uint notificationId)
Definition: openvr_api.cs:2146
override EVROverlayError CreateDashboardOverlay(string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle)
Definition: openvr_api.cs:1941
override EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay)
Definition: openvr_api.cs:1899
override ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex)
Definition: openvr_api.cs:901
override bool GetCameraProjection(uint nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, ref HmdMatrix44_t pProjection)
Definition: openvr_api.cs:2348
override uint GetApplicationProcessId(string pchAppKey)
Definition: openvr_api.cs:1182
VREvent_Controller_t controller
Definition: openvr_api.cs:2931
override bool IsMirrorWindowVisible()
Definition: openvr_api.cs:1596
override void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose)
Definition: openvr_api.cs:1410
override bool GetWorkingPlayAreaRect(ref HmdQuad_t rect)
Definition: openvr_api.cs:1359
override void RevertWorkingCopy()
Definition: openvr_api.cs:1346
override void SetKeyboardPositionForOverlay(ulong ulOverlayHandle, HmdRect2_t avoidRect)
Definition: openvr_api.cs:2013
override void PostPresentHandoff()
Definition: openvr_api.cs:1509
override float GetFloat(string pchSection, string pchSettingsKey, float flDefaultValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2206
override EVRApplicationError GetStartingApplication(string pchAppKeyBuffer, uint unAppKeyBufferLen)
Definition: openvr_api.cs:1224
override uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType)
Definition: openvr_api.cs:895
override EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle, float fWidthInMeters)
Definition: openvr_api.cs:1726
override int GetD3D9AdapterIndex()
Definition: openvr_api.cs:832
override bool IsFullscreen()
Definition: openvr_api.cs:1562
override EVROverlayError ShowKeyboard(int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue)
Definition: openvr_api.cs:1985
CVRRenderModels(IntPtr VRRenderModels)
Definition: openvr_api.cs:2023
override uint GetRenderModelName(uint unRenderModelIndex, System.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen)
Definition: openvr_api.cs:2071
override ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex)
Definition: openvr_api.cs:907
override void ReleaseInputFocus()
Definition: openvr_api.cs:1020
override bool IsActiveDashboardOverlay(ulong ulOverlayHandle)
Definition: openvr_api.cs:1955
override EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, ref uint punDeviceIndex, string pchComponentName, uint unComponentNameSize)
Definition: openvr_api.cs:1814
override bool CanRenderScene()
Definition: openvr_api.cs:1580
override IntPtr GetIntPtr()
Definition: openvr_api.cs:2163
override void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t[] pTrackedDevicePoseArray)
Definition: openvr_api.cs:856
override HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye)
Definition: openvr_api.cs:818
override uint GetPrimaryDashboardDevice()
Definition: openvr_api.cs:1979
override EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
Definition: openvr_api.cs:1789
override bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose)
Definition: openvr_api.cs:967
override bool PollNextEvent(ref VREvent_t pEvent, uint uncbVREvent)
Definition: openvr_api.cs:961
CVRNotifications(IntPtr VRNotifications)
Definition: openvr_api.cs:2124
ETrackingResult eTrackingResult
Definition: openvr_api.cs:3015
CVRExtendedDisplay(IntPtr VRExtendedDisplay)
Definition: openvr_api.cs:1068
override void SetWorkingPlayAreaSize(float sizeX, float sizeZ)
Definition: openvr_api.cs:1395
override bool SetDisplayVisibility(bool bIsVisibleOnDesktop)
Definition: openvr_api.cs:850
override bool ComputeOverlayIntersection(ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults)
Definition: openvr_api.cs:1875
override void AcknowledgeQuit_UserPrompt()
Definition: openvr_api.cs:1048
override IntPtr GetIntPtr()
Definition: openvr_api.cs:2243
override EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath, bool bTemporary)
Definition: openvr_api.cs:1128
override void ApplyTransform(ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform)
Definition: openvr_api.cs:890
override void HideMirrorWindow()
Definition: openvr_api.cs:1591
EChaperoneConfigFile
Definition: openvr_api.cs:2820
override EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle, string pchFilePath)
Definition: openvr_api.cs:1935
HmdMatrix34_t mDeviceToAbsoluteTracking
Definition: openvr_api.cs:3012
override EVRCompositorError Submit(EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags)
Definition: openvr_api.cs:1498
VREvent_Keyboard_t keyboard
Definition: openvr_api.cs:2938
override void FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground)
Definition: openvr_api.cs:1526
override EVRRenderModelError LoadTexture_Async(int textureId, ref IntPtr ppTexture)
Definition: openvr_api.cs:2049
override void GetBoundsColor(ref HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutputCameraColor)
Definition: openvr_api.cs:1304
override EVROverlayError SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue)
Definition: openvr_api.cs:1698
override bool IsQuitUserPromptRequested()
Definition: openvr_api.cs:1248
EGamepadTextInputLineMode
Definition: openvr_api.cs:2865
override uint GetRenderModelCount()
Definition: openvr_api.cs:2077
override uint GetOverlayKey(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError)
Definition: openvr_api.cs:1659
override void GetRecommendedRenderTargetSize(ref uint pnWidth, ref uint pnHeight)
Definition: openvr_api.cs:790
override void CompositorGoToBack()
Definition: openvr_api.cs:1552
override uint GetApplicationPropertyString(string pchAppKey, EVRApplicationProperty eProperty, string pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError)
Definition: openvr_api.cs:1194
override EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, uint unDeviceIndex, string pchComponentName)
Definition: openvr_api.cs:1808
override void SetFloat(string pchSection, string pchSettingsKey, float flValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2212
override void FreeTexture(IntPtr pTexture)
Definition: openvr_api.cs:2055
override EVROverlayError ShowOverlay(ulong ulOverlayHandle)
Definition: openvr_api.cs:1821
override EVRApplicationError SetApplicationAutoLaunch(string pchAppKey, bool bAutoLaunch)
Definition: openvr_api.cs:1212
override int GetInt32(string pchSection, string pchSettingsKey, int nDefaultValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2195
override bool GetBoolTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError)
Definition: openvr_api.cs:919
override string GetEventTypeNameFromEnum(EVREventType eType)
Definition: openvr_api.cs:973
override bool StartVideoStream(uint nDeviceIndex)
Definition: openvr_api.cs:2290
TrackedDevicePose_t m_HmdPose
Definition: openvr_api.cs:3163
override bool HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHandle, uint unControllerDeviceIndex)
Definition: openvr_api.cs:1881
override void ResetSeatedZeroPose()
Definition: openvr_api.cs:861
override EVROverlayError FindOverlay(string pchOverlayKey, ref ulong pOverlayHandle)
Definition: openvr_api.cs:1627
override ulong GetHighQualityOverlay()
Definition: openvr_api.cs:1653
override EVRCompositorError WaitGetPoses(TrackedDevicePose_t[] pRenderPoseArray, TrackedDevicePose_t[] pGamePoseArray)
Definition: openvr_api.cs:1486
override bool IsOverlayVisible(ulong ulOverlayHandle)
Definition: openvr_api.cs:1833
override IntPtr GetIntPtr()
Definition: openvr_api.cs:2130
override bool CaptureInputFocus()
Definition: openvr_api.cs:1014
HmdMatrix34_t m_matDeviceToAbsoluteTracking
Definition: openvr_api.cs:3236
override void CompositorQuit()
Definition: openvr_api.cs:1557
override EVRApplicationTransitionState GetTransitionState()
Definition: openvr_api.cs:1230
override bool GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState)
Definition: openvr_api.cs:2107
override bool CommitWorkingCopy(EChaperoneConfigFile configFile)
Definition: openvr_api.cs:1340
override bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose)
Definition: openvr_api.cs:1389
override ECameraVideoStreamFormat GetCameraVideoStreamFormat(uint nDeviceIndex)
Definition: openvr_api.cs:2278
ETrackingUniverseOrigin eOrigin
Definition: openvr_api.cs:3170
override bool GetPlayAreaSize(ref float pSizeX, ref float pSizeZ)
Definition: openvr_api.cs:1280
override EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection, ulong ulFrom)
Definition: openvr_api.cs:1911
override ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError)
Definition: openvr_api.cs:937
CVROverlay(IntPtr VROverlay)
Definition: openvr_api.cs:1612
EGamepadTextInputMode
Definition: openvr_api.cs:2859
override EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, ref float pfMinDistanceInMeters, ref float pfMaxDistanceInMeters)
Definition: openvr_api.cs:1745
override bool GetWorkingPlayAreaSize(ref float pSizeX, ref float pSizeZ)
Definition: openvr_api.cs:1351
override bool RenderModelHasComponent(string pchRenderModelName, string pchComponentName)
Definition: openvr_api.cs:2113
override EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey)
Definition: openvr_api.cs:1236
override EVROverlayError GetOverlayColor(ulong ulOverlayHandle, ref float pfRed, ref float pfGreen, ref float pfBlue)
Definition: openvr_api.cs:1704
override void TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, char usDurationMicroSec)
Definition: openvr_api.cs:997
override void SetWorkingCollisionBoundsInfo(HmdQuad_t[] pQuadsBuffer)
Definition: openvr_api.cs:1400
VREvent_Scroll_t scroll
Definition: openvr_api.cs:2933
override void GetDXGIOutputInfo(ref int pnAdapterIndex, ref int pnAdapterOutputIndex)
Definition: openvr_api.cs:1101
ChaperoneCalibrationState
Definition: openvr_api.cs:2807
override uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass, uint[] punTrackedDeviceIndexArray, uint unRelativeToTrackedDeviceIndex)
Definition: openvr_api.cs:878
override EVROverlayError GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled)
Definition: openvr_api.cs:1691
override bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
Definition: openvr_api.cs:1383
override bool IsDashboardVisible()
Definition: openvr_api.cs:1949
EVRComponentProperty
Definition: openvr_api.cs:2891
override bool IsHoverTargetOverlay(ulong ulOverlayHandle)
Definition: openvr_api.cs:1887
override bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
Definition: openvr_api.cs:1420
override bool GetPlayAreaRect(ref HmdQuad_t rect)
Definition: openvr_api.cs:1288
EColorSpace eColorSpace
Definition: openvr_api.cs:3008
CVRSettings(IntPtr VRSettings)
Definition: openvr_api.cs:2157
override bool StopVideoStream(uint nDeviceIndex)
Definition: openvr_api.cs:2296
override int GetInt32TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError)
Definition: openvr_api.cs:931
override EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle, ref uint punProcessId)
Definition: openvr_api.cs:1967
static string GetStringForHmdError(EVRInitError error)
Definition: openvr_api.cs:3264
CVRApplications(IntPtr VRApplications)
Definition: openvr_api.cs:1113
override EVRApplicationError LaunchApplication(string pchAppKey)
Definition: openvr_api.cs:1164
override void ReloadInfo()
Definition: openvr_api.cs:1294
override string GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state)
Definition: openvr_api.cs:1242
ETrackedDeviceClass
Definition: openvr_api.cs:2398
override EVROverlayError SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture)
Definition: openvr_api.cs:1917
VREvent_Overlay_t overlay
Definition: openvr_api.cs:2936
override ulong GetGamepadFocusOverlay()
Definition: openvr_api.cs:1893
override EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle)
Definition: openvr_api.cs:1647
ETrackedDeviceProperty
Definition: openvr_api.cs:2418
override EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters)
Definition: openvr_api.cs:1739
CVRSystem(IntPtr VRSystem)
Definition: openvr_api.cs:775
override IntPtr GetIntPtr()
Definition: openvr_api.cs:1331
EVRApplicationError
Definition: openvr_api.cs:2764
override void GetDXGIOutputInfo(ref int pnAdapterIndex)
Definition: openvr_api.cs:838
static void Shutdown()
Definition: openvr_api.cs:3249
override void GetString(string pchSection, string pchSettingsKey, string pchValue, uint unValueLen, string pchDefaultValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2217
override EVRApplicationError LaunchDashboardOverlay(string pchAppKey)
Definition: openvr_api.cs:1170
override bool PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent)
Definition: openvr_api.cs:1845
override void SetBool(string pchSection, string pchSettingsKey, bool bValue, ref EVRSettingsError peError)
Definition: openvr_api.cs:2190
override EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform)
Definition: openvr_api.cs:1839
override bool ReleaseVideoStreamFrame(uint nDeviceIndex, ref CameraVideoStreamFrame_t pFrameImage)
Definition: openvr_api.cs:2316
override void ClearLastSubmittedFrame()
Definition: openvr_api.cs:1504
EVRCompositorError
Definition: openvr_api.cs:2825
EDeviceActivityLevel
Definition: openvr_api.cs:2607
CVRChaperone(IntPtr VRChaperone)
Definition: openvr_api.cs:1259
static IntPtr GetGenericInterface(string pchInterfaceVersion, ref EVRInitError peError)
Definition: openvr_api.cs:3254
override EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue)
Definition: openvr_api.cs:1991
override EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle)
Definition: openvr_api.cs:1923
EVRApplicationProperty
Definition: openvr_api.cs:2785
override EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId, string pchAppKeyBuffer, uint unAppKeyBufferLen)
Definition: openvr_api.cs:1158
override void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose)
Definition: openvr_api.cs:1405
override IntPtr GetIntPtr()
Definition: openvr_api.cs:781
override HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye)
Definition: openvr_api.cs:979
override float GetFloatTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError)
Definition: openvr_api.cs:925
override uint DriverDebugRequest(uint unDeviceIndex, string pchRequest, string pchResponseBuffer, uint unResponseBufferSize)
Definition: openvr_api.cs:1031
override void SetTrackingSpace(ETrackingUniverseOrigin eOrigin)
Definition: openvr_api.cs:1475
VREvent_Data_t data
Definition: openvr_api.cs:3102
override bool AreBoundsVisible()
Definition: openvr_api.cs:1309
override EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
Definition: openvr_api.cs:1795
HmdVector2_t vTopLeft
Definition: openvr_api.cs:2992
ETrackedControllerRole
Definition: openvr_api.cs:2406
override EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle, ref float pfAlpha)
Definition: openvr_api.cs:1719
override string GetApplicationsErrorNameFromEnum(EVRApplicationError error)
Definition: openvr_api.cs:1188
override void RemoveSection(string pchSection, ref EVRSettingsError peError)
Definition: openvr_api.cs:2227
override EVROverlayError GetOverlayImageData(ulong ulOverlayHandle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight)
Definition: openvr_api.cs:1671
override bool PauseVideoStream(uint nDeviceIndex)
Definition: openvr_api.cs:2328
override EVRApplicationError IdentifyApplication(uint unProcessId, string pchAppKey)
Definition: openvr_api.cs:1176
override EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
Definition: openvr_api.cs:1783
override void FreeRenderModel(IntPtr pRenderModel)
Definition: openvr_api.cs:2044