BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / VR / ThirdParty / openvr_api.cs

openvr_api.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
openvr_api.cs 246.6 KiB Download Raw
1//======= Copyright (c) Valve Corporation, All rights reserved. ===============
2//
3// Purpose: This file contains C#/managed code bindings for the OpenVR interfaces
4// This file is auto-generated, do not edit it.
5//
6//=============================================================================
7
8using System;
9using System.Runtime.InteropServices;
10
11namespace OVR.OpenVR
12{
13
14[StructLayout(LayoutKind.Sequential)]
15public struct IVRSystem
16{
17 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
18 internal delegate void _GetRecommendedRenderTargetSize(ref uint pnWidth, ref uint pnHeight);
19 [MarshalAs(UnmanagedType.FunctionPtr)]
20 internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize;
21
22 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
23 internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ);
24 [MarshalAs(UnmanagedType.FunctionPtr)]
25 internal _GetProjectionMatrix GetProjectionMatrix;
26
27 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
28 internal delegate void _GetProjectionRaw(EVREye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
29 [MarshalAs(UnmanagedType.FunctionPtr)]
30 internal _GetProjectionRaw GetProjectionRaw;
31
32 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
33 internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float fV, ref DistortionCoordinates_t pDistortionCoordinates);
34 [MarshalAs(UnmanagedType.FunctionPtr)]
35 internal _ComputeDistortion ComputeDistortion;
36
37 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
38 internal delegate HmdMatrix34_t _GetEyeToHeadTransform(EVREye eEye);
39 [MarshalAs(UnmanagedType.FunctionPtr)]
40 internal _GetEyeToHeadTransform GetEyeToHeadTransform;
41
42 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
43 internal delegate bool _GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter);
44 [MarshalAs(UnmanagedType.FunctionPtr)]
45 internal _GetTimeSinceLastVsync GetTimeSinceLastVsync;
46
47 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
48 internal delegate int _GetD3D9AdapterIndex();
49 [MarshalAs(UnmanagedType.FunctionPtr)]
50 internal _GetD3D9AdapterIndex GetD3D9AdapterIndex;
51
52 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
53 internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex);
54 [MarshalAs(UnmanagedType.FunctionPtr)]
55 internal _GetDXGIOutputInfo GetDXGIOutputInfo;
56
57 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
58 internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType, IntPtr pInstance);
59 [MarshalAs(UnmanagedType.FunctionPtr)]
60 internal _GetOutputDevice GetOutputDevice;
61
62 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
63 internal delegate bool _IsDisplayOnDesktop();
64 [MarshalAs(UnmanagedType.FunctionPtr)]
65 internal _IsDisplayOnDesktop IsDisplayOnDesktop;
66
67 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
68 internal delegate bool _SetDisplayVisibility(bool bIsVisibleOnDesktop);
69 [MarshalAs(UnmanagedType.FunctionPtr)]
70 internal _SetDisplayVisibility SetDisplayVisibility;
71
72 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
73 internal delegate void _GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, [In, Out] TrackedDevicePose_t[] pTrackedDevicePoseArray, uint unTrackedDevicePoseArrayCount);
74 [MarshalAs(UnmanagedType.FunctionPtr)]
75 internal _GetDeviceToAbsoluteTrackingPose GetDeviceToAbsoluteTrackingPose;
76
77 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
78 internal delegate void _ResetSeatedZeroPose();
79 [MarshalAs(UnmanagedType.FunctionPtr)]
80 internal _ResetSeatedZeroPose ResetSeatedZeroPose;
81
82 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
83 internal delegate HmdMatrix34_t _GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
84 [MarshalAs(UnmanagedType.FunctionPtr)]
85 internal _GetSeatedZeroPoseToStandingAbsoluteTrackingPose GetSeatedZeroPoseToStandingAbsoluteTrackingPose;
86
87 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
88 internal delegate HmdMatrix34_t _GetRawZeroPoseToStandingAbsoluteTrackingPose();
89 [MarshalAs(UnmanagedType.FunctionPtr)]
90 internal _GetRawZeroPoseToStandingAbsoluteTrackingPose GetRawZeroPoseToStandingAbsoluteTrackingPose;
91
92 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
93 internal delegate uint _GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex);
94 [MarshalAs(UnmanagedType.FunctionPtr)]
95 internal _GetSortedTrackedDeviceIndicesOfClass GetSortedTrackedDeviceIndicesOfClass;
96
97 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
98 internal delegate EDeviceActivityLevel _GetTrackedDeviceActivityLevel(uint unDeviceId);
99 [MarshalAs(UnmanagedType.FunctionPtr)]
100 internal _GetTrackedDeviceActivityLevel GetTrackedDeviceActivityLevel;
101
102 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
103 internal delegate void _ApplyTransform(ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform);
104 [MarshalAs(UnmanagedType.FunctionPtr)]
105 internal _ApplyTransform ApplyTransform;
106
107 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
108 internal delegate uint _GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType);
109 [MarshalAs(UnmanagedType.FunctionPtr)]
110 internal _GetTrackedDeviceIndexForControllerRole GetTrackedDeviceIndexForControllerRole;
111
112 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
113 internal delegate ETrackedControllerRole _GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex);
114 [MarshalAs(UnmanagedType.FunctionPtr)]
115 internal _GetControllerRoleForTrackedDeviceIndex GetControllerRoleForTrackedDeviceIndex;
116
117 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
118 internal delegate ETrackedDeviceClass _GetTrackedDeviceClass(uint unDeviceIndex);
119 [MarshalAs(UnmanagedType.FunctionPtr)]
120 internal _GetTrackedDeviceClass GetTrackedDeviceClass;
121
122 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
123 internal delegate bool _IsTrackedDeviceConnected(uint unDeviceIndex);
124 [MarshalAs(UnmanagedType.FunctionPtr)]
125 internal _IsTrackedDeviceConnected IsTrackedDeviceConnected;
126
127 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
128 internal delegate bool _GetBoolTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
129 [MarshalAs(UnmanagedType.FunctionPtr)]
130 internal _GetBoolTrackedDeviceProperty GetBoolTrackedDeviceProperty;
131
132 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
133 internal delegate float _GetFloatTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
134 [MarshalAs(UnmanagedType.FunctionPtr)]
135 internal _GetFloatTrackedDeviceProperty GetFloatTrackedDeviceProperty;
136
137 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
138 internal delegate int _GetInt32TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
139 [MarshalAs(UnmanagedType.FunctionPtr)]
140 internal _GetInt32TrackedDeviceProperty GetInt32TrackedDeviceProperty;
141
142 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
143 internal delegate ulong _GetUint64TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
144 [MarshalAs(UnmanagedType.FunctionPtr)]
145 internal _GetUint64TrackedDeviceProperty GetUint64TrackedDeviceProperty;
146
147 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
148 internal delegate HmdMatrix34_t _GetMatrix34TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
149 [MarshalAs(UnmanagedType.FunctionPtr)]
150 internal _GetMatrix34TrackedDeviceProperty GetMatrix34TrackedDeviceProperty;
151
152 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
153 internal delegate uint _GetArrayTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, uint propType, IntPtr pBuffer, uint unBufferSize, ref ETrackedPropertyError pError);
154 [MarshalAs(UnmanagedType.FunctionPtr)]
155 internal _GetArrayTrackedDeviceProperty GetArrayTrackedDeviceProperty;
156
157 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
158 internal delegate uint _GetStringTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBufferSize, ref ETrackedPropertyError pError);
159 [MarshalAs(UnmanagedType.FunctionPtr)]
160 internal _GetStringTrackedDeviceProperty GetStringTrackedDeviceProperty;
161
162 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
163 internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError error);
164 [MarshalAs(UnmanagedType.FunctionPtr)]
165 internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum;
166
167 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
168 internal delegate bool _PollNextEvent(ref VREvent_t pEvent, uint uncbVREvent);
169 [MarshalAs(UnmanagedType.FunctionPtr)]
170 internal _PollNextEvent PollNextEvent;
171
172 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
173 internal delegate bool _PollNextEventWithPose(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose);
174 [MarshalAs(UnmanagedType.FunctionPtr)]
175 internal _PollNextEventWithPose PollNextEventWithPose;
176
177 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
178 internal delegate IntPtr _GetEventTypeNameFromEnum(EVREventType eType);
179 [MarshalAs(UnmanagedType.FunctionPtr)]
180 internal _GetEventTypeNameFromEnum GetEventTypeNameFromEnum;
181
182 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
183 internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye, EHiddenAreaMeshType type);
184 [MarshalAs(UnmanagedType.FunctionPtr)]
185 internal _GetHiddenAreaMesh GetHiddenAreaMesh;
186
187 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
188 internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize);
189 [MarshalAs(UnmanagedType.FunctionPtr)]
190 internal _GetControllerState GetControllerState;
191
192 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
193 internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose);
194 [MarshalAs(UnmanagedType.FunctionPtr)]
195 internal _GetControllerStateWithPose GetControllerStateWithPose;
196
197 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
198 internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, ushort usDurationMicroSec);
199 [MarshalAs(UnmanagedType.FunctionPtr)]
200 internal _TriggerHapticPulse TriggerHapticPulse;
201
202 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
203 internal delegate IntPtr _GetButtonIdNameFromEnum(EVRButtonId eButtonId);
204 [MarshalAs(UnmanagedType.FunctionPtr)]
205 internal _GetButtonIdNameFromEnum GetButtonIdNameFromEnum;
206
207 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
208 internal delegate IntPtr _GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType);
209 [MarshalAs(UnmanagedType.FunctionPtr)]
210 internal _GetControllerAxisTypeNameFromEnum GetControllerAxisTypeNameFromEnum;
211
212 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
213 internal delegate bool _IsInputAvailable();
214 [MarshalAs(UnmanagedType.FunctionPtr)]
215 internal _IsInputAvailable IsInputAvailable;
216
217 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
218 internal delegate bool _IsSteamVRDrawingControllers();
219 [MarshalAs(UnmanagedType.FunctionPtr)]
220 internal _IsSteamVRDrawingControllers IsSteamVRDrawingControllers;
221
222 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
223 internal delegate bool _ShouldApplicationPause();
224 [MarshalAs(UnmanagedType.FunctionPtr)]
225 internal _ShouldApplicationPause ShouldApplicationPause;
226
227 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
228 internal delegate bool _ShouldApplicationReduceRenderingWork();
229 [MarshalAs(UnmanagedType.FunctionPtr)]
230 internal _ShouldApplicationReduceRenderingWork ShouldApplicationReduceRenderingWork;
231
232 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
233 internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize);
234 [MarshalAs(UnmanagedType.FunctionPtr)]
235 internal _DriverDebugRequest DriverDebugRequest;
236
237 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
238 internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceIndex);
239 [MarshalAs(UnmanagedType.FunctionPtr)]
240 internal _PerformFirmwareUpdate PerformFirmwareUpdate;
241
242 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
243 internal delegate void _AcknowledgeQuit_Exiting();
244 [MarshalAs(UnmanagedType.FunctionPtr)]
245 internal _AcknowledgeQuit_Exiting AcknowledgeQuit_Exiting;
246
247 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
248 internal delegate void _AcknowledgeQuit_UserPrompt();
249 [MarshalAs(UnmanagedType.FunctionPtr)]
250 internal _AcknowledgeQuit_UserPrompt AcknowledgeQuit_UserPrompt;
251
252}
253
254[StructLayout(LayoutKind.Sequential)]
255public struct IVRExtendedDisplay
256{
257 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
258 internal delegate void _GetWindowBounds(ref int pnX, ref int pnY, ref uint pnWidth, ref uint pnHeight);
259 [MarshalAs(UnmanagedType.FunctionPtr)]
260 internal _GetWindowBounds GetWindowBounds;
261
262 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
263 internal delegate void _GetEyeOutputViewport(EVREye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
264 [MarshalAs(UnmanagedType.FunctionPtr)]
265 internal _GetEyeOutputViewport GetEyeOutputViewport;
266
267 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
268 internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex, ref int pnAdapterOutputIndex);
269 [MarshalAs(UnmanagedType.FunctionPtr)]
270 internal _GetDXGIOutputInfo GetDXGIOutputInfo;
271
272}
273
274[StructLayout(LayoutKind.Sequential)]
275public struct IVRTrackedCamera
276{
277 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
278 internal delegate IntPtr _GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError);
279 [MarshalAs(UnmanagedType.FunctionPtr)]
280 internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum;
281
282 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
283 internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, ref bool pHasCamera);
284 [MarshalAs(UnmanagedType.FunctionPtr)]
285 internal _HasCamera HasCamera;
286
287 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
288 internal delegate EVRTrackedCameraError _GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize);
289 [MarshalAs(UnmanagedType.FunctionPtr)]
290 internal _GetCameraFrameSize GetCameraFrameSize;
291
292 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
293 internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
294 [MarshalAs(UnmanagedType.FunctionPtr)]
295 internal _GetCameraIntrinsics GetCameraIntrinsics;
296
297 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
298 internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
299 [MarshalAs(UnmanagedType.FunctionPtr)]
300 internal _GetCameraProjection GetCameraProjection;
301
302 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
303 internal delegate EVRTrackedCameraError _AcquireVideoStreamingService(uint nDeviceIndex, ref ulong pHandle);
304 [MarshalAs(UnmanagedType.FunctionPtr)]
305 internal _AcquireVideoStreamingService AcquireVideoStreamingService;
306
307 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
308 internal delegate EVRTrackedCameraError _ReleaseVideoStreamingService(ulong hTrackedCamera);
309 [MarshalAs(UnmanagedType.FunctionPtr)]
310 internal _ReleaseVideoStreamingService ReleaseVideoStreamingService;
311
312 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
313 internal delegate EVRTrackedCameraError _GetVideoStreamFrameBuffer(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
314 [MarshalAs(UnmanagedType.FunctionPtr)]
315 internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer;
316
317 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
318 internal delegate EVRTrackedCameraError _GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight);
319 [MarshalAs(UnmanagedType.FunctionPtr)]
320 internal _GetVideoStreamTextureSize GetVideoStreamTextureSize;
321
322 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
323 internal delegate EVRTrackedCameraError _GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
324 [MarshalAs(UnmanagedType.FunctionPtr)]
325 internal _GetVideoStreamTextureD3D11 GetVideoStreamTextureD3D11;
326
327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
328 internal delegate EVRTrackedCameraError _GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
329 [MarshalAs(UnmanagedType.FunctionPtr)]
330 internal _GetVideoStreamTextureGL GetVideoStreamTextureGL;
331
332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
333 internal delegate EVRTrackedCameraError _ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId);
334 [MarshalAs(UnmanagedType.FunctionPtr)]
335 internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL;
336
337}
338
339[StructLayout(LayoutKind.Sequential)]
340public struct IVRApplications
341{
342 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
343 internal delegate EVRApplicationError _AddApplicationManifest(string pchApplicationManifestFullPath, bool bTemporary);
344 [MarshalAs(UnmanagedType.FunctionPtr)]
345 internal _AddApplicationManifest AddApplicationManifest;
346
347 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
348 internal delegate EVRApplicationError _RemoveApplicationManifest(string pchApplicationManifestFullPath);
349 [MarshalAs(UnmanagedType.FunctionPtr)]
350 internal _RemoveApplicationManifest RemoveApplicationManifest;
351
352 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
353 internal delegate bool _IsApplicationInstalled(string pchAppKey);
354 [MarshalAs(UnmanagedType.FunctionPtr)]
355 internal _IsApplicationInstalled IsApplicationInstalled;
356
357 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
358 internal delegate uint _GetApplicationCount();
359 [MarshalAs(UnmanagedType.FunctionPtr)]
360 internal _GetApplicationCount GetApplicationCount;
361
362 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
363 internal delegate EVRApplicationError _GetApplicationKeyByIndex(uint unApplicationIndex, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
364 [MarshalAs(UnmanagedType.FunctionPtr)]
365 internal _GetApplicationKeyByIndex GetApplicationKeyByIndex;
366
367 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
368 internal delegate EVRApplicationError _GetApplicationKeyByProcessId(uint unProcessId, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
369 [MarshalAs(UnmanagedType.FunctionPtr)]
370 internal _GetApplicationKeyByProcessId GetApplicationKeyByProcessId;
371
372 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
373 internal delegate EVRApplicationError _LaunchApplication(string pchAppKey);
374 [MarshalAs(UnmanagedType.FunctionPtr)]
375 internal _LaunchApplication LaunchApplication;
376
377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
378 internal delegate EVRApplicationError _LaunchTemplateApplication(string pchTemplateAppKey, string pchNewAppKey, [In, Out] AppOverrideKeys_t[] pKeys, uint unKeys);
379 [MarshalAs(UnmanagedType.FunctionPtr)]
380 internal _LaunchTemplateApplication LaunchTemplateApplication;
381
382 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
383 internal delegate EVRApplicationError _LaunchApplicationFromMimeType(string pchMimeType, string pchArgs);
384 [MarshalAs(UnmanagedType.FunctionPtr)]
385 internal _LaunchApplicationFromMimeType LaunchApplicationFromMimeType;
386
387 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
388 internal delegate EVRApplicationError _LaunchDashboardOverlay(string pchAppKey);
389 [MarshalAs(UnmanagedType.FunctionPtr)]
390 internal _LaunchDashboardOverlay LaunchDashboardOverlay;
391
392 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
393 internal delegate bool _CancelApplicationLaunch(string pchAppKey);
394 [MarshalAs(UnmanagedType.FunctionPtr)]
395 internal _CancelApplicationLaunch CancelApplicationLaunch;
396
397 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
398 internal delegate EVRApplicationError _IdentifyApplication(uint unProcessId, string pchAppKey);
399 [MarshalAs(UnmanagedType.FunctionPtr)]
400 internal _IdentifyApplication IdentifyApplication;
401
402 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
403 internal delegate uint _GetApplicationProcessId(string pchAppKey);
404 [MarshalAs(UnmanagedType.FunctionPtr)]
405 internal _GetApplicationProcessId GetApplicationProcessId;
406
407 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
408 internal delegate IntPtr _GetApplicationsErrorNameFromEnum(EVRApplicationError error);
409 [MarshalAs(UnmanagedType.FunctionPtr)]
410 internal _GetApplicationsErrorNameFromEnum GetApplicationsErrorNameFromEnum;
411
412 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
413 internal delegate uint _GetApplicationPropertyString(string pchAppKey, EVRApplicationProperty eProperty, System.Text.StringBuilder pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError);
414 [MarshalAs(UnmanagedType.FunctionPtr)]
415 internal _GetApplicationPropertyString GetApplicationPropertyString;
416
417 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
418 internal delegate bool _GetApplicationPropertyBool(string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
419 [MarshalAs(UnmanagedType.FunctionPtr)]
420 internal _GetApplicationPropertyBool GetApplicationPropertyBool;
421
422 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
423 internal delegate ulong _GetApplicationPropertyUint64(string pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
424 [MarshalAs(UnmanagedType.FunctionPtr)]
425 internal _GetApplicationPropertyUint64 GetApplicationPropertyUint64;
426
427 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
428 internal delegate EVRApplicationError _SetApplicationAutoLaunch(string pchAppKey, bool bAutoLaunch);
429 [MarshalAs(UnmanagedType.FunctionPtr)]
430 internal _SetApplicationAutoLaunch SetApplicationAutoLaunch;
431
432 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
433 internal delegate bool _GetApplicationAutoLaunch(string pchAppKey);
434 [MarshalAs(UnmanagedType.FunctionPtr)]
435 internal _GetApplicationAutoLaunch GetApplicationAutoLaunch;
436
437 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
438 internal delegate EVRApplicationError _SetDefaultApplicationForMimeType(string pchAppKey, string pchMimeType);
439 [MarshalAs(UnmanagedType.FunctionPtr)]
440 internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeType;
441
442 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
443 internal delegate bool _GetDefaultApplicationForMimeType(string pchMimeType, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
444 [MarshalAs(UnmanagedType.FunctionPtr)]
445 internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeType;
446
447 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
448 internal delegate bool _GetApplicationSupportedMimeTypes(string pchAppKey, System.Text.StringBuilder pchMimeTypesBuffer, uint unMimeTypesBuffer);
449 [MarshalAs(UnmanagedType.FunctionPtr)]
450 internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTypes;
451
452 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
453 internal delegate uint _GetApplicationsThatSupportMimeType(string pchMimeType, System.Text.StringBuilder pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer);
454 [MarshalAs(UnmanagedType.FunctionPtr)]
455 internal _GetApplicationsThatSupportMimeType GetApplicationsThatSupportMimeType;
456
457 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
458 internal delegate uint _GetApplicationLaunchArguments(uint unHandle, System.Text.StringBuilder pchArgs, uint unArgs);
459 [MarshalAs(UnmanagedType.FunctionPtr)]
460 internal _GetApplicationLaunchArguments GetApplicationLaunchArguments;
461
462 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
463 internal delegate EVRApplicationError _GetStartingApplication(System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
464 [MarshalAs(UnmanagedType.FunctionPtr)]
465 internal _GetStartingApplication GetStartingApplication;
466
467 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
468 internal delegate EVRApplicationTransitionState _GetTransitionState();
469 [MarshalAs(UnmanagedType.FunctionPtr)]
470 internal _GetTransitionState GetTransitionState;
471
472 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
473 internal delegate EVRApplicationError _PerformApplicationPrelaunchCheck(string pchAppKey);
474 [MarshalAs(UnmanagedType.FunctionPtr)]
475 internal _PerformApplicationPrelaunchCheck PerformApplicationPrelaunchCheck;
476
477 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
478 internal delegate IntPtr _GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state);
479 [MarshalAs(UnmanagedType.FunctionPtr)]
480 internal _GetApplicationsTransitionStateNameFromEnum GetApplicationsTransitionStateNameFromEnum;
481
482 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
483 internal delegate bool _IsQuitUserPromptRequested();
484 [MarshalAs(UnmanagedType.FunctionPtr)]
485 internal _IsQuitUserPromptRequested IsQuitUserPromptRequested;
486
487 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
488 internal delegate EVRApplicationError _LaunchInternalProcess(string pchBinaryPath, string pchArguments, string pchWorkingDirectory);
489 [MarshalAs(UnmanagedType.FunctionPtr)]
490 internal _LaunchInternalProcess LaunchInternalProcess;
491
492 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
493 internal delegate uint _GetCurrentSceneProcessId();
494 [MarshalAs(UnmanagedType.FunctionPtr)]
495 internal _GetCurrentSceneProcessId GetCurrentSceneProcessId;
496
497}
498
499[StructLayout(LayoutKind.Sequential)]
500public struct IVRChaperone
501{
502 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
503 internal delegate ChaperoneCalibrationState _GetCalibrationState();
504 [MarshalAs(UnmanagedType.FunctionPtr)]
505 internal _GetCalibrationState GetCalibrationState;
506
507 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
508 internal delegate bool _GetPlayAreaSize(ref float pSizeX, ref float pSizeZ);
509 [MarshalAs(UnmanagedType.FunctionPtr)]
510 internal _GetPlayAreaSize GetPlayAreaSize;
511
512 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
513 internal delegate bool _GetPlayAreaRect(ref HmdQuad_t rect);
514 [MarshalAs(UnmanagedType.FunctionPtr)]
515 internal _GetPlayAreaRect GetPlayAreaRect;
516
517 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
518 internal delegate void _ReloadInfo();
519 [MarshalAs(UnmanagedType.FunctionPtr)]
520 internal _ReloadInfo ReloadInfo;
521
522 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
523 internal delegate void _SetSceneColor(HmdColor_t color);
524 [MarshalAs(UnmanagedType.FunctionPtr)]
525 internal _SetSceneColor SetSceneColor;
526
527 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
528 internal delegate void _GetBoundsColor(ref HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutputCameraColor);
529 [MarshalAs(UnmanagedType.FunctionPtr)]
530 internal _GetBoundsColor GetBoundsColor;
531
532 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
533 internal delegate bool _AreBoundsVisible();
534 [MarshalAs(UnmanagedType.FunctionPtr)]
535 internal _AreBoundsVisible AreBoundsVisible;
536
537 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
538 internal delegate void _ForceBoundsVisible(bool bForce);
539 [MarshalAs(UnmanagedType.FunctionPtr)]
540 internal _ForceBoundsVisible ForceBoundsVisible;
541
542}
543
544[StructLayout(LayoutKind.Sequential)]
545public struct IVRChaperoneSetup
546{
547 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
548 internal delegate bool _CommitWorkingCopy(EChaperoneConfigFile configFile);
549 [MarshalAs(UnmanagedType.FunctionPtr)]
550 internal _CommitWorkingCopy CommitWorkingCopy;
551
552 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
553 internal delegate void _RevertWorkingCopy();
554 [MarshalAs(UnmanagedType.FunctionPtr)]
555 internal _RevertWorkingCopy RevertWorkingCopy;
556
557 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
558 internal delegate bool _GetWorkingPlayAreaSize(ref float pSizeX, ref float pSizeZ);
559 [MarshalAs(UnmanagedType.FunctionPtr)]
560 internal _GetWorkingPlayAreaSize GetWorkingPlayAreaSize;
561
562 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
563 internal delegate bool _GetWorkingPlayAreaRect(ref HmdQuad_t rect);
564 [MarshalAs(UnmanagedType.FunctionPtr)]
565 internal _GetWorkingPlayAreaRect GetWorkingPlayAreaRect;
566
567 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
568 internal delegate bool _GetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
569 [MarshalAs(UnmanagedType.FunctionPtr)]
570 internal _GetWorkingCollisionBoundsInfo GetWorkingCollisionBoundsInfo;
571
572 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
573 internal delegate bool _GetLiveCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
574 [MarshalAs(UnmanagedType.FunctionPtr)]
575 internal _GetLiveCollisionBoundsInfo GetLiveCollisionBoundsInfo;
576
577 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
578 internal delegate bool _GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
579 [MarshalAs(UnmanagedType.FunctionPtr)]
580 internal _GetWorkingSeatedZeroPoseToRawTrackingPose GetWorkingSeatedZeroPoseToRawTrackingPose;
581
582 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
583 internal delegate bool _GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose);
584 [MarshalAs(UnmanagedType.FunctionPtr)]
585 internal _GetWorkingStandingZeroPoseToRawTrackingPose GetWorkingStandingZeroPoseToRawTrackingPose;
586
587 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
588 internal delegate void _SetWorkingPlayAreaSize(float sizeX, float sizeZ);
589 [MarshalAs(UnmanagedType.FunctionPtr)]
590 internal _SetWorkingPlayAreaSize SetWorkingPlayAreaSize;
591
592 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
593 internal delegate void _SetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount);
594 [MarshalAs(UnmanagedType.FunctionPtr)]
595 internal _SetWorkingCollisionBoundsInfo SetWorkingCollisionBoundsInfo;
596
597 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
598 internal delegate void _SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose);
599 [MarshalAs(UnmanagedType.FunctionPtr)]
600 internal _SetWorkingSeatedZeroPoseToRawTrackingPose SetWorkingSeatedZeroPoseToRawTrackingPose;
601
602 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
603 internal delegate void _SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose);
604 [MarshalAs(UnmanagedType.FunctionPtr)]
605 internal _SetWorkingStandingZeroPoseToRawTrackingPose SetWorkingStandingZeroPoseToRawTrackingPose;
606
607 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
608 internal delegate void _ReloadFromDisk(EChaperoneConfigFile configFile);
609 [MarshalAs(UnmanagedType.FunctionPtr)]
610 internal _ReloadFromDisk ReloadFromDisk;
611
612 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
613 internal delegate bool _GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
614 [MarshalAs(UnmanagedType.FunctionPtr)]
615 internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseToRawTrackingPose;
616
617 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
618 internal delegate void _SetWorkingCollisionBoundsTagsInfo([In, Out] byte[] pTagsBuffer, uint unTagCount);
619 [MarshalAs(UnmanagedType.FunctionPtr)]
620 internal _SetWorkingCollisionBoundsTagsInfo SetWorkingCollisionBoundsTagsInfo;
621
622 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
623 internal delegate bool _GetLiveCollisionBoundsTagsInfo([In, Out] byte[] pTagsBuffer, ref uint punTagCount);
624 [MarshalAs(UnmanagedType.FunctionPtr)]
625 internal _GetLiveCollisionBoundsTagsInfo GetLiveCollisionBoundsTagsInfo;
626
627 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
628 internal delegate bool _SetWorkingPhysicalBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount);
629 [MarshalAs(UnmanagedType.FunctionPtr)]
630 internal _SetWorkingPhysicalBoundsInfo SetWorkingPhysicalBoundsInfo;
631
632 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
633 internal delegate bool _GetLivePhysicalBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
634 [MarshalAs(UnmanagedType.FunctionPtr)]
635 internal _GetLivePhysicalBoundsInfo GetLivePhysicalBoundsInfo;
636
637 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
638 internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBuffer, ref uint pnBufferLength);
639 [MarshalAs(UnmanagedType.FunctionPtr)]
640 internal _ExportLiveToBuffer ExportLiveToBuffer;
641
642 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
643 internal delegate bool _ImportFromBufferToWorking(string pBuffer, uint nImportFlags);
644 [MarshalAs(UnmanagedType.FunctionPtr)]
645 internal _ImportFromBufferToWorking ImportFromBufferToWorking;
646
647}
648
649[StructLayout(LayoutKind.Sequential)]
650public struct IVRCompositor
651{
652 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
653 internal delegate void _SetTrackingSpace(ETrackingUniverseOrigin eOrigin);
654 [MarshalAs(UnmanagedType.FunctionPtr)]
655 internal _SetTrackingSpace SetTrackingSpace;
656
657 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
658 internal delegate ETrackingUniverseOrigin _GetTrackingSpace();
659 [MarshalAs(UnmanagedType.FunctionPtr)]
660 internal _GetTrackingSpace GetTrackingSpace;
661
662 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
663 internal delegate EVRCompositorError _WaitGetPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
664 [MarshalAs(UnmanagedType.FunctionPtr)]
665 internal _WaitGetPoses WaitGetPoses;
666
667 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
668 internal delegate EVRCompositorError _GetLastPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
669 [MarshalAs(UnmanagedType.FunctionPtr)]
670 internal _GetLastPoses GetLastPoses;
671
672 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
673 internal delegate EVRCompositorError _GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pOutputGamePose);
674 [MarshalAs(UnmanagedType.FunctionPtr)]
675 internal _GetLastPoseForTrackedDeviceIndex GetLastPoseForTrackedDeviceIndex;
676
677 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
678 internal delegate EVRCompositorError _Submit(EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags);
679 [MarshalAs(UnmanagedType.FunctionPtr)]
680 internal _Submit Submit;
681
682 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
683 internal delegate void _ClearLastSubmittedFrame();
684 [MarshalAs(UnmanagedType.FunctionPtr)]
685 internal _ClearLastSubmittedFrame ClearLastSubmittedFrame;
686
687 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
688 internal delegate void _PostPresentHandoff();
689 [MarshalAs(UnmanagedType.FunctionPtr)]
690 internal _PostPresentHandoff PostPresentHandoff;
691
692 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
693 internal delegate bool _GetFrameTiming(ref Compositor_FrameTiming pTiming, uint unFramesAgo);
694 [MarshalAs(UnmanagedType.FunctionPtr)]
695 internal _GetFrameTiming GetFrameTiming;
696
697 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
698 internal delegate uint _GetFrameTimings(ref Compositor_FrameTiming pTiming, uint nFrames);
699 [MarshalAs(UnmanagedType.FunctionPtr)]
700 internal _GetFrameTimings GetFrameTimings;
701
702 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
703 internal delegate float _GetFrameTimeRemaining();
704 [MarshalAs(UnmanagedType.FunctionPtr)]
705 internal _GetFrameTimeRemaining GetFrameTimeRemaining;
706
707 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
708 internal delegate void _GetCumulativeStats(ref Compositor_CumulativeStats pStats, uint nStatsSizeInBytes);
709 [MarshalAs(UnmanagedType.FunctionPtr)]
710 internal _GetCumulativeStats GetCumulativeStats;
711
712 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
713 internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
714 [MarshalAs(UnmanagedType.FunctionPtr)]
715 internal _FadeToColor FadeToColor;
716
717 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
718 internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground);
719 [MarshalAs(UnmanagedType.FunctionPtr)]
720 internal _GetCurrentFadeColor GetCurrentFadeColor;
721
722 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
723 internal delegate void _FadeGrid(float fSeconds, bool bFadeIn);
724 [MarshalAs(UnmanagedType.FunctionPtr)]
725 internal _FadeGrid FadeGrid;
726
727 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
728 internal delegate float _GetCurrentGridAlpha();
729 [MarshalAs(UnmanagedType.FunctionPtr)]
730 internal _GetCurrentGridAlpha GetCurrentGridAlpha;
731
732 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
733 internal delegate EVRCompositorError _SetSkyboxOverride([In, Out] Texture_t[] pTextures, uint unTextureCount);
734 [MarshalAs(UnmanagedType.FunctionPtr)]
735 internal _SetSkyboxOverride SetSkyboxOverride;
736
737 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
738 internal delegate void _ClearSkyboxOverride();
739 [MarshalAs(UnmanagedType.FunctionPtr)]
740 internal _ClearSkyboxOverride ClearSkyboxOverride;
741
742 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
743 internal delegate void _CompositorBringToFront();
744 [MarshalAs(UnmanagedType.FunctionPtr)]
745 internal _CompositorBringToFront CompositorBringToFront;
746
747 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
748 internal delegate void _CompositorGoToBack();
749 [MarshalAs(UnmanagedType.FunctionPtr)]
750 internal _CompositorGoToBack CompositorGoToBack;
751
752 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
753 internal delegate void _CompositorQuit();
754 [MarshalAs(UnmanagedType.FunctionPtr)]
755 internal _CompositorQuit CompositorQuit;
756
757 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
758 internal delegate bool _IsFullscreen();
759 [MarshalAs(UnmanagedType.FunctionPtr)]
760 internal _IsFullscreen IsFullscreen;
761
762 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
763 internal delegate uint _GetCurrentSceneFocusProcess();
764 [MarshalAs(UnmanagedType.FunctionPtr)]
765 internal _GetCurrentSceneFocusProcess GetCurrentSceneFocusProcess;
766
767 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
768 internal delegate uint _GetLastFrameRenderer();
769 [MarshalAs(UnmanagedType.FunctionPtr)]
770 internal _GetLastFrameRenderer GetLastFrameRenderer;
771
772 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
773 internal delegate bool _CanRenderScene();
774 [MarshalAs(UnmanagedType.FunctionPtr)]
775 internal _CanRenderScene CanRenderScene;
776
777 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
778 internal delegate void _ShowMirrorWindow();
779 [MarshalAs(UnmanagedType.FunctionPtr)]
780 internal _ShowMirrorWindow ShowMirrorWindow;
781
782 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
783 internal delegate void _HideMirrorWindow();
784 [MarshalAs(UnmanagedType.FunctionPtr)]
785 internal _HideMirrorWindow HideMirrorWindow;
786
787 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
788 internal delegate bool _IsMirrorWindowVisible();
789 [MarshalAs(UnmanagedType.FunctionPtr)]
790 internal _IsMirrorWindowVisible IsMirrorWindowVisible;
791
792 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
793 internal delegate void _CompositorDumpImages();
794 [MarshalAs(UnmanagedType.FunctionPtr)]
795 internal _CompositorDumpImages CompositorDumpImages;
796
797 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
798 internal delegate bool _ShouldAppRenderWithLowResources();
799 [MarshalAs(UnmanagedType.FunctionPtr)]
800 internal _ShouldAppRenderWithLowResources ShouldAppRenderWithLowResources;
801
802 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
803 internal delegate void _ForceInterleavedReprojectionOn(bool bOverride);
804 [MarshalAs(UnmanagedType.FunctionPtr)]
805 internal _ForceInterleavedReprojectionOn ForceInterleavedReprojectionOn;
806
807 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
808 internal delegate void _ForceReconnectProcess();
809 [MarshalAs(UnmanagedType.FunctionPtr)]
810 internal _ForceReconnectProcess ForceReconnectProcess;
811
812 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
813 internal delegate void _SuspendRendering(bool bSuspend);
814 [MarshalAs(UnmanagedType.FunctionPtr)]
815 internal _SuspendRendering SuspendRendering;
816
817 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
818 internal delegate EVRCompositorError _GetMirrorTextureD3D11(EVREye eEye, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView);
819 [MarshalAs(UnmanagedType.FunctionPtr)]
820 internal _GetMirrorTextureD3D11 GetMirrorTextureD3D11;
821
822 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
823 internal delegate void _ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView);
824 [MarshalAs(UnmanagedType.FunctionPtr)]
825 internal _ReleaseMirrorTextureD3D11 ReleaseMirrorTextureD3D11;
826
827 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
828 internal delegate EVRCompositorError _GetMirrorTextureGL(EVREye eEye, ref uint pglTextureId, IntPtr pglSharedTextureHandle);
829 [MarshalAs(UnmanagedType.FunctionPtr)]
830 internal _GetMirrorTextureGL GetMirrorTextureGL;
831
832 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
833 internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr glSharedTextureHandle);
834 [MarshalAs(UnmanagedType.FunctionPtr)]
835 internal _ReleaseSharedGLTexture ReleaseSharedGLTexture;
836
837 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
838 internal delegate void _LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
839 [MarshalAs(UnmanagedType.FunctionPtr)]
840 internal _LockGLSharedTextureForAccess LockGLSharedTextureForAccess;
841
842 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
843 internal delegate void _UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
844 [MarshalAs(UnmanagedType.FunctionPtr)]
845 internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess;
846
847 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
848 internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue, uint unBufferSize);
849 [MarshalAs(UnmanagedType.FunctionPtr)]
850 internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtensionsRequired;
851
852 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
853 internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice, System.Text.StringBuilder pchValue, uint unBufferSize);
854 [MarshalAs(UnmanagedType.FunctionPtr)]
855 internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired;
856
857 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
858 internal delegate void _SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode);
859 [MarshalAs(UnmanagedType.FunctionPtr)]
860 internal _SetExplicitTimingMode SetExplicitTimingMode;
861
862 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
863 internal delegate EVRCompositorError _SubmitExplicitTimingData();
864 [MarshalAs(UnmanagedType.FunctionPtr)]
865 internal _SubmitExplicitTimingData SubmitExplicitTimingData;
866
867}
868
869[StructLayout(LayoutKind.Sequential)]
870public struct IVROverlay
871{
872 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
873 internal delegate EVROverlayError _FindOverlay(string pchOverlayKey, ref ulong pOverlayHandle);
874 [MarshalAs(UnmanagedType.FunctionPtr)]
875 internal _FindOverlay FindOverlay;
876
877 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
878 internal delegate EVROverlayError _CreateOverlay(string pchOverlayKey, string pchOverlayName, ref ulong pOverlayHandle);
879 [MarshalAs(UnmanagedType.FunctionPtr)]
880 internal _CreateOverlay CreateOverlay;
881
882 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
883 internal delegate EVROverlayError _DestroyOverlay(ulong ulOverlayHandle);
884 [MarshalAs(UnmanagedType.FunctionPtr)]
885 internal _DestroyOverlay DestroyOverlay;
886
887 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
888 internal delegate EVROverlayError _SetHighQualityOverlay(ulong ulOverlayHandle);
889 [MarshalAs(UnmanagedType.FunctionPtr)]
890 internal _SetHighQualityOverlay SetHighQualityOverlay;
891
892 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
893 internal delegate ulong _GetHighQualityOverlay();
894 [MarshalAs(UnmanagedType.FunctionPtr)]
895 internal _GetHighQualityOverlay GetHighQualityOverlay;
896
897 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
898 internal delegate uint _GetOverlayKey(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
899 [MarshalAs(UnmanagedType.FunctionPtr)]
900 internal _GetOverlayKey GetOverlayKey;
901
902 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
903 internal delegate uint _GetOverlayName(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
904 [MarshalAs(UnmanagedType.FunctionPtr)]
905 internal _GetOverlayName GetOverlayName;
906
907 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
908 internal delegate EVROverlayError _SetOverlayName(ulong ulOverlayHandle, string pchName);
909 [MarshalAs(UnmanagedType.FunctionPtr)]
910 internal _SetOverlayName SetOverlayName;
911
912 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
913 internal delegate EVROverlayError _GetOverlayImageData(ulong ulOverlayHandle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight);
914 [MarshalAs(UnmanagedType.FunctionPtr)]
915 internal _GetOverlayImageData GetOverlayImageData;
916
917 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
918 internal delegate IntPtr _GetOverlayErrorNameFromEnum(EVROverlayError error);
919 [MarshalAs(UnmanagedType.FunctionPtr)]
920 internal _GetOverlayErrorNameFromEnum GetOverlayErrorNameFromEnum;
921
922 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
923 internal delegate EVROverlayError _SetOverlayRenderingPid(ulong ulOverlayHandle, uint unPID);
924 [MarshalAs(UnmanagedType.FunctionPtr)]
925 internal _SetOverlayRenderingPid SetOverlayRenderingPid;
926
927 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
928 internal delegate uint _GetOverlayRenderingPid(ulong ulOverlayHandle);
929 [MarshalAs(UnmanagedType.FunctionPtr)]
930 internal _GetOverlayRenderingPid GetOverlayRenderingPid;
931
932 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
933 internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
934 [MarshalAs(UnmanagedType.FunctionPtr)]
935 internal _SetOverlayFlag SetOverlayFlag;
936
937 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
938 internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled);
939 [MarshalAs(UnmanagedType.FunctionPtr)]
940 internal _GetOverlayFlag GetOverlayFlag;
941
942 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
943 internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue);
944 [MarshalAs(UnmanagedType.FunctionPtr)]
945 internal _SetOverlayColor SetOverlayColor;
946
947 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
948 internal delegate EVROverlayError _GetOverlayColor(ulong ulOverlayHandle, ref float pfRed, ref float pfGreen, ref float pfBlue);
949 [MarshalAs(UnmanagedType.FunctionPtr)]
950 internal _GetOverlayColor GetOverlayColor;
951
952 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
953 internal delegate EVROverlayError _SetOverlayAlpha(ulong ulOverlayHandle, float fAlpha);
954 [MarshalAs(UnmanagedType.FunctionPtr)]
955 internal _SetOverlayAlpha SetOverlayAlpha;
956
957 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
958 internal delegate EVROverlayError _GetOverlayAlpha(ulong ulOverlayHandle, ref float pfAlpha);
959 [MarshalAs(UnmanagedType.FunctionPtr)]
960 internal _GetOverlayAlpha GetOverlayAlpha;
961
962 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
963 internal delegate EVROverlayError _SetOverlayTexelAspect(ulong ulOverlayHandle, float fTexelAspect);
964 [MarshalAs(UnmanagedType.FunctionPtr)]
965 internal _SetOverlayTexelAspect SetOverlayTexelAspect;
966
967 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
968 internal delegate EVROverlayError _GetOverlayTexelAspect(ulong ulOverlayHandle, ref float pfTexelAspect);
969 [MarshalAs(UnmanagedType.FunctionPtr)]
970 internal _GetOverlayTexelAspect GetOverlayTexelAspect;
971
972 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
973 internal delegate EVROverlayError _SetOverlaySortOrder(ulong ulOverlayHandle, uint unSortOrder);
974 [MarshalAs(UnmanagedType.FunctionPtr)]
975 internal _SetOverlaySortOrder SetOverlaySortOrder;
976
977 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
978 internal delegate EVROverlayError _GetOverlaySortOrder(ulong ulOverlayHandle, ref uint punSortOrder);
979 [MarshalAs(UnmanagedType.FunctionPtr)]
980 internal _GetOverlaySortOrder GetOverlaySortOrder;
981
982 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
983 internal delegate EVROverlayError _SetOverlayWidthInMeters(ulong ulOverlayHandle, float fWidthInMeters);
984 [MarshalAs(UnmanagedType.FunctionPtr)]
985 internal _SetOverlayWidthInMeters SetOverlayWidthInMeters;
986
987 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
988 internal delegate EVROverlayError _GetOverlayWidthInMeters(ulong ulOverlayHandle, ref float pfWidthInMeters);
989 [MarshalAs(UnmanagedType.FunctionPtr)]
990 internal _GetOverlayWidthInMeters GetOverlayWidthInMeters;
991
992 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
993 internal delegate EVROverlayError _SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters);
994 [MarshalAs(UnmanagedType.FunctionPtr)]
995 internal _SetOverlayAutoCurveDistanceRangeInMeters SetOverlayAutoCurveDistanceRangeInMeters;
996
997 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
998 internal delegate EVROverlayError _GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle, ref float pfMinDistanceInMeters, ref float pfMaxDistanceInMeters);
999 [MarshalAs(UnmanagedType.FunctionPtr)]
1000 internal _GetOverlayAutoCurveDistanceRangeInMeters GetOverlayAutoCurveDistanceRangeInMeters;
1001
1002 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1003 internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace);
1004 [MarshalAs(UnmanagedType.FunctionPtr)]
1005 internal _SetOverlayTextureColorSpace SetOverlayTextureColorSpace;
1006
1007 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1008 internal delegate EVROverlayError _GetOverlayTextureColorSpace(ulong ulOverlayHandle, ref EColorSpace peTextureColorSpace);
1009 [MarshalAs(UnmanagedType.FunctionPtr)]
1010 internal _GetOverlayTextureColorSpace GetOverlayTextureColorSpace;
1011
1012 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1013 internal delegate EVROverlayError _SetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
1014 [MarshalAs(UnmanagedType.FunctionPtr)]
1015 internal _SetOverlayTextureBounds SetOverlayTextureBounds;
1016
1017 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1018 internal delegate EVROverlayError _GetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
1019 [MarshalAs(UnmanagedType.FunctionPtr)]
1020 internal _GetOverlayTextureBounds GetOverlayTextureBounds;
1021
1022 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1023 internal delegate uint _GetOverlayRenderModel(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref HmdColor_t pColor, ref EVROverlayError pError);
1024 [MarshalAs(UnmanagedType.FunctionPtr)]
1025 internal _GetOverlayRenderModel GetOverlayRenderModel;
1026
1027 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1028 internal delegate EVROverlayError _SetOverlayRenderModel(ulong ulOverlayHandle, string pchRenderModel, ref HmdColor_t pColor);
1029 [MarshalAs(UnmanagedType.FunctionPtr)]
1030 internal _SetOverlayRenderModel SetOverlayRenderModel;
1031
1032 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1033 internal delegate EVROverlayError _GetOverlayTransformType(ulong ulOverlayHandle, ref VROverlayTransformType peTransformType);
1034 [MarshalAs(UnmanagedType.FunctionPtr)]
1035 internal _GetOverlayTransformType GetOverlayTransformType;
1036
1037 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1038 internal delegate EVROverlayError _SetOverlayTransformAbsolute(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
1039 [MarshalAs(UnmanagedType.FunctionPtr)]
1040 internal _SetOverlayTransformAbsolute SetOverlayTransformAbsolute;
1041
1042 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1043 internal delegate EVROverlayError _GetOverlayTransformAbsolute(ulong ulOverlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
1044 [MarshalAs(UnmanagedType.FunctionPtr)]
1045 internal _GetOverlayTransformAbsolute GetOverlayTransformAbsolute;
1046
1047 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1048 internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
1049 [MarshalAs(UnmanagedType.FunctionPtr)]
1050 internal _SetOverlayTransformTrackedDeviceRelative SetOverlayTransformTrackedDeviceRelative;
1051
1052 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1053 internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
1054 [MarshalAs(UnmanagedType.FunctionPtr)]
1055 internal _GetOverlayTransformTrackedDeviceRelative GetOverlayTransformTrackedDeviceRelative;
1056
1057 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1058 internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, uint unDeviceIndex, string pchComponentName);
1059 [MarshalAs(UnmanagedType.FunctionPtr)]
1060 internal _SetOverlayTransformTrackedDeviceComponent SetOverlayTransformTrackedDeviceComponent;
1061
1062 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1063 internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, ref uint punDeviceIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameSize);
1064 [MarshalAs(UnmanagedType.FunctionPtr)]
1065 internal _GetOverlayTransformTrackedDeviceComponent GetOverlayTransformTrackedDeviceComponent;
1066
1067 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1068 internal delegate EVROverlayError _GetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ref ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
1069 [MarshalAs(UnmanagedType.FunctionPtr)]
1070 internal _GetOverlayTransformOverlayRelative GetOverlayTransformOverlayRelative;
1071
1072 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1073 internal delegate EVROverlayError _SetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
1074 [MarshalAs(UnmanagedType.FunctionPtr)]
1075 internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative;
1076
1077 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1078 internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle);
1079 [MarshalAs(UnmanagedType.FunctionPtr)]
1080 internal _ShowOverlay ShowOverlay;
1081
1082 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1083 internal delegate EVROverlayError _HideOverlay(ulong ulOverlayHandle);
1084 [MarshalAs(UnmanagedType.FunctionPtr)]
1085 internal _HideOverlay HideOverlay;
1086
1087 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1088 internal delegate bool _IsOverlayVisible(ulong ulOverlayHandle);
1089 [MarshalAs(UnmanagedType.FunctionPtr)]
1090 internal _IsOverlayVisible IsOverlayVisible;
1091
1092 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1093 internal delegate EVROverlayError _GetTransformForOverlayCoordinates(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform);
1094 [MarshalAs(UnmanagedType.FunctionPtr)]
1095 internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordinates;
1096
1097 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1098 internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent);
1099 [MarshalAs(UnmanagedType.FunctionPtr)]
1100 internal _PollNextOverlayEvent PollNextOverlayEvent;
1101
1102 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1103 internal delegate EVROverlayError _GetOverlayInputMethod(ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod);
1104 [MarshalAs(UnmanagedType.FunctionPtr)]
1105 internal _GetOverlayInputMethod GetOverlayInputMethod;
1106
1107 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1108 internal delegate EVROverlayError _SetOverlayInputMethod(ulong ulOverlayHandle, VROverlayInputMethod eInputMethod);
1109 [MarshalAs(UnmanagedType.FunctionPtr)]
1110 internal _SetOverlayInputMethod SetOverlayInputMethod;
1111
1112 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1113 internal delegate EVROverlayError _GetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
1114 [MarshalAs(UnmanagedType.FunctionPtr)]
1115 internal _GetOverlayMouseScale GetOverlayMouseScale;
1116
1117 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1118 internal delegate EVROverlayError _SetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
1119 [MarshalAs(UnmanagedType.FunctionPtr)]
1120 internal _SetOverlayMouseScale SetOverlayMouseScale;
1121
1122 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1123 internal delegate bool _ComputeOverlayIntersection(ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults);
1124 [MarshalAs(UnmanagedType.FunctionPtr)]
1125 internal _ComputeOverlayIntersection ComputeOverlayIntersection;
1126
1127 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1128 internal delegate bool _IsHoverTargetOverlay(ulong ulOverlayHandle);
1129 [MarshalAs(UnmanagedType.FunctionPtr)]
1130 internal _IsHoverTargetOverlay IsHoverTargetOverlay;
1131
1132 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1133 internal delegate ulong _GetGamepadFocusOverlay();
1134 [MarshalAs(UnmanagedType.FunctionPtr)]
1135 internal _GetGamepadFocusOverlay GetGamepadFocusOverlay;
1136
1137 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1138 internal delegate EVROverlayError _SetGamepadFocusOverlay(ulong ulNewFocusOverlay);
1139 [MarshalAs(UnmanagedType.FunctionPtr)]
1140 internal _SetGamepadFocusOverlay SetGamepadFocusOverlay;
1141
1142 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1143 internal delegate EVROverlayError _SetOverlayNeighbor(EOverlayDirection eDirection, ulong ulFrom, ulong ulTo);
1144 [MarshalAs(UnmanagedType.FunctionPtr)]
1145 internal _SetOverlayNeighbor SetOverlayNeighbor;
1146
1147 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1148 internal delegate EVROverlayError _MoveGamepadFocusToNeighbor(EOverlayDirection eDirection, ulong ulFrom);
1149 [MarshalAs(UnmanagedType.FunctionPtr)]
1150 internal _MoveGamepadFocusToNeighbor MoveGamepadFocusToNeighbor;
1151
1152 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1153 internal delegate EVROverlayError _SetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, IntPtr vCenter, float fRadius);
1154 [MarshalAs(UnmanagedType.FunctionPtr)]
1155 internal _SetOverlayDualAnalogTransform SetOverlayDualAnalogTransform;
1156
1157 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1158 internal delegate EVROverlayError _GetOverlayDualAnalogTransform(ulong ulOverlay, EDualAnalogWhich eWhich, ref HmdVector2_t pvCenter, ref float pfRadius);
1159 [MarshalAs(UnmanagedType.FunctionPtr)]
1160 internal _GetOverlayDualAnalogTransform GetOverlayDualAnalogTransform;
1161
1162 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1163 internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture);
1164 [MarshalAs(UnmanagedType.FunctionPtr)]
1165 internal _SetOverlayTexture SetOverlayTexture;
1166
1167 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1168 internal delegate EVROverlayError _ClearOverlayTexture(ulong ulOverlayHandle);
1169 [MarshalAs(UnmanagedType.FunctionPtr)]
1170 internal _ClearOverlayTexture ClearOverlayTexture;
1171
1172 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1173 internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth);
1174 [MarshalAs(UnmanagedType.FunctionPtr)]
1175 internal _SetOverlayRaw SetOverlayRaw;
1176
1177 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1178 internal delegate EVROverlayError _SetOverlayFromFile(ulong ulOverlayHandle, string pchFilePath);
1179 [MarshalAs(UnmanagedType.FunctionPtr)]
1180 internal _SetOverlayFromFile SetOverlayFromFile;
1181
1182 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1183 internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorSpace pColorSpace, ref VRTextureBounds_t pTextureBounds);
1184 [MarshalAs(UnmanagedType.FunctionPtr)]
1185 internal _GetOverlayTexture GetOverlayTexture;
1186
1187 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1188 internal delegate EVROverlayError _ReleaseNativeOverlayHandle(ulong ulOverlayHandle, IntPtr pNativeTextureHandle);
1189 [MarshalAs(UnmanagedType.FunctionPtr)]
1190 internal _ReleaseNativeOverlayHandle ReleaseNativeOverlayHandle;
1191
1192 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1193 internal delegate EVROverlayError _GetOverlayTextureSize(ulong ulOverlayHandle, ref uint pWidth, ref uint pHeight);
1194 [MarshalAs(UnmanagedType.FunctionPtr)]
1195 internal _GetOverlayTextureSize GetOverlayTextureSize;
1196
1197 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1198 internal delegate EVROverlayError _CreateDashboardOverlay(string pchOverlayKey, string pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle);
1199 [MarshalAs(UnmanagedType.FunctionPtr)]
1200 internal _CreateDashboardOverlay CreateDashboardOverlay;
1201
1202 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1203 internal delegate bool _IsDashboardVisible();
1204 [MarshalAs(UnmanagedType.FunctionPtr)]
1205 internal _IsDashboardVisible IsDashboardVisible;
1206
1207 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1208 internal delegate bool _IsActiveDashboardOverlay(ulong ulOverlayHandle);
1209 [MarshalAs(UnmanagedType.FunctionPtr)]
1210 internal _IsActiveDashboardOverlay IsActiveDashboardOverlay;
1211
1212 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1213 internal delegate EVROverlayError _SetDashboardOverlaySceneProcess(ulong ulOverlayHandle, uint unProcessId);
1214 [MarshalAs(UnmanagedType.FunctionPtr)]
1215 internal _SetDashboardOverlaySceneProcess SetDashboardOverlaySceneProcess;
1216
1217 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1218 internal delegate EVROverlayError _GetDashboardOverlaySceneProcess(ulong ulOverlayHandle, ref uint punProcessId);
1219 [MarshalAs(UnmanagedType.FunctionPtr)]
1220 internal _GetDashboardOverlaySceneProcess GetDashboardOverlaySceneProcess;
1221
1222 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1223 internal delegate void _ShowDashboard(string pchOverlayToShow);
1224 [MarshalAs(UnmanagedType.FunctionPtr)]
1225 internal _ShowDashboard ShowDashboard;
1226
1227 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1228 internal delegate uint _GetPrimaryDashboardDevice();
1229 [MarshalAs(UnmanagedType.FunctionPtr)]
1230 internal _GetPrimaryDashboardDevice GetPrimaryDashboardDevice;
1231
1232 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1233 internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue);
1234 [MarshalAs(UnmanagedType.FunctionPtr)]
1235 internal _ShowKeyboard ShowKeyboard;
1236
1237 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1238 internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue);
1239 [MarshalAs(UnmanagedType.FunctionPtr)]
1240 internal _ShowKeyboardForOverlay ShowKeyboardForOverlay;
1241
1242 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1243 internal delegate uint _GetKeyboardText(System.Text.StringBuilder pchText, uint cchText);
1244 [MarshalAs(UnmanagedType.FunctionPtr)]
1245 internal _GetKeyboardText GetKeyboardText;
1246
1247 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1248 internal delegate void _HideKeyboard();
1249 [MarshalAs(UnmanagedType.FunctionPtr)]
1250 internal _HideKeyboard HideKeyboard;
1251
1252 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1253 internal delegate void _SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform);
1254 [MarshalAs(UnmanagedType.FunctionPtr)]
1255 internal _SetKeyboardTransformAbsolute SetKeyboardTransformAbsolute;
1256
1257 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1258 internal delegate void _SetKeyboardPositionForOverlay(ulong ulOverlayHandle, HmdRect2_t avoidRect);
1259 [MarshalAs(UnmanagedType.FunctionPtr)]
1260 internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay;
1261
1262 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1263 internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
1264 [MarshalAs(UnmanagedType.FunctionPtr)]
1265 internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
1266
1267 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1268 internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
1269 [MarshalAs(UnmanagedType.FunctionPtr)]
1270 internal _GetOverlayFlags GetOverlayFlags;
1271
1272 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1273 internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pchText, string pchCaption, string pchButton0Text, string pchButton1Text, string pchButton2Text, string pchButton3Text);
1274 [MarshalAs(UnmanagedType.FunctionPtr)]
1275 internal _ShowMessageOverlay ShowMessageOverlay;
1276
1277 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1278 internal delegate void _CloseMessageOverlay();
1279 [MarshalAs(UnmanagedType.FunctionPtr)]
1280 internal _CloseMessageOverlay CloseMessageOverlay;
1281
1282}
1283
1284[StructLayout(LayoutKind.Sequential)]
1285public struct IVRRenderModels
1286{
1287 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1288 internal delegate EVRRenderModelError _LoadRenderModel_Async(string pchRenderModelName, ref IntPtr ppRenderModel);
1289 [MarshalAs(UnmanagedType.FunctionPtr)]
1290 internal _LoadRenderModel_Async LoadRenderModel_Async;
1291
1292 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1293 internal delegate void _FreeRenderModel(IntPtr pRenderModel);
1294 [MarshalAs(UnmanagedType.FunctionPtr)]
1295 internal _FreeRenderModel FreeRenderModel;
1296
1297 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1298 internal delegate EVRRenderModelError _LoadTexture_Async(int textureId, ref IntPtr ppTexture);
1299 [MarshalAs(UnmanagedType.FunctionPtr)]
1300 internal _LoadTexture_Async LoadTexture_Async;
1301
1302 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1303 internal delegate void _FreeTexture(IntPtr pTexture);
1304 [MarshalAs(UnmanagedType.FunctionPtr)]
1305 internal _FreeTexture FreeTexture;
1306
1307 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1308 internal delegate EVRRenderModelError _LoadTextureD3D11_Async(int textureId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D);
1309 [MarshalAs(UnmanagedType.FunctionPtr)]
1310 internal _LoadTextureD3D11_Async LoadTextureD3D11_Async;
1311
1312 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1313 internal delegate EVRRenderModelError _LoadIntoTextureD3D11_Async(int textureId, IntPtr pDstTexture);
1314 [MarshalAs(UnmanagedType.FunctionPtr)]
1315 internal _LoadIntoTextureD3D11_Async LoadIntoTextureD3D11_Async;
1316
1317 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1318 internal delegate void _FreeTextureD3D11(IntPtr pD3D11Texture2D);
1319 [MarshalAs(UnmanagedType.FunctionPtr)]
1320 internal _FreeTextureD3D11 FreeTextureD3D11;
1321
1322 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1323 internal delegate uint _GetRenderModelName(uint unRenderModelIndex, System.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen);
1324 [MarshalAs(UnmanagedType.FunctionPtr)]
1325 internal _GetRenderModelName GetRenderModelName;
1326
1327 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1328 internal delegate uint _GetRenderModelCount();
1329 [MarshalAs(UnmanagedType.FunctionPtr)]
1330 internal _GetRenderModelCount GetRenderModelCount;
1331
1332 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1333 internal delegate uint _GetComponentCount(string pchRenderModelName);
1334 [MarshalAs(UnmanagedType.FunctionPtr)]
1335 internal _GetComponentCount GetComponentCount;
1336
1337 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1338 internal delegate uint _GetComponentName(string pchRenderModelName, uint unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameLen);
1339 [MarshalAs(UnmanagedType.FunctionPtr)]
1340 internal _GetComponentName GetComponentName;
1341
1342 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1343 internal delegate ulong _GetComponentButtonMask(string pchRenderModelName, string pchComponentName);
1344 [MarshalAs(UnmanagedType.FunctionPtr)]
1345 internal _GetComponentButtonMask GetComponentButtonMask;
1346
1347 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1348 internal delegate uint _GetComponentRenderModelName(string pchRenderModelName, string pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen);
1349 [MarshalAs(UnmanagedType.FunctionPtr)]
1350 internal _GetComponentRenderModelName GetComponentRenderModelName;
1351
1352 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1353 internal delegate bool _GetComponentStateForDevicePath(string pchRenderModelName, string pchComponentName, ulong devicePath, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
1354 [MarshalAs(UnmanagedType.FunctionPtr)]
1355 internal _GetComponentStateForDevicePath GetComponentStateForDevicePath;
1356
1357 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1358 internal delegate bool _GetComponentState(string pchRenderModelName, string pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
1359 [MarshalAs(UnmanagedType.FunctionPtr)]
1360 internal _GetComponentState GetComponentState;
1361
1362 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1363 internal delegate bool _RenderModelHasComponent(string pchRenderModelName, string pchComponentName);
1364 [MarshalAs(UnmanagedType.FunctionPtr)]
1365 internal _RenderModelHasComponent RenderModelHasComponent;
1366
1367 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1368 internal delegate uint _GetRenderModelThumbnailURL(string pchRenderModelName, System.Text.StringBuilder pchThumbnailURL, uint unThumbnailURLLen, ref EVRRenderModelError peError);
1369 [MarshalAs(UnmanagedType.FunctionPtr)]
1370 internal _GetRenderModelThumbnailURL GetRenderModelThumbnailURL;
1371
1372 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1373 internal delegate uint _GetRenderModelOriginalPath(string pchRenderModelName, System.Text.StringBuilder pchOriginalPath, uint unOriginalPathLen, ref EVRRenderModelError peError);
1374 [MarshalAs(UnmanagedType.FunctionPtr)]
1375 internal _GetRenderModelOriginalPath GetRenderModelOriginalPath;
1376
1377 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1378 internal delegate IntPtr _GetRenderModelErrorNameFromEnum(EVRRenderModelError error);
1379 [MarshalAs(UnmanagedType.FunctionPtr)]
1380 internal _GetRenderModelErrorNameFromEnum GetRenderModelErrorNameFromEnum;
1381
1382}
1383
1384[StructLayout(LayoutKind.Sequential)]
1385public struct IVRNotifications
1386{
1387 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1388 internal delegate EVRNotificationError _CreateNotification(ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, string pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId);
1389 [MarshalAs(UnmanagedType.FunctionPtr)]
1390 internal _CreateNotification CreateNotification;
1391
1392 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1393 internal delegate EVRNotificationError _RemoveNotification(uint notificationId);
1394 [MarshalAs(UnmanagedType.FunctionPtr)]
1395 internal _RemoveNotification RemoveNotification;
1396
1397}
1398
1399[StructLayout(LayoutKind.Sequential)]
1400public struct IVRSettings
1401{
1402 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1403 internal delegate IntPtr _GetSettingsErrorNameFromEnum(EVRSettingsError eError);
1404 [MarshalAs(UnmanagedType.FunctionPtr)]
1405 internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum;
1406
1407 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1408 internal delegate bool _Sync(bool bForce, ref EVRSettingsError peError);
1409 [MarshalAs(UnmanagedType.FunctionPtr)]
1410 internal _Sync Sync;
1411
1412 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1413 internal delegate void _SetBool(string pchSection, string pchSettingsKey, bool bValue, ref EVRSettingsError peError);
1414 [MarshalAs(UnmanagedType.FunctionPtr)]
1415 internal _SetBool SetBool;
1416
1417 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1418 internal delegate void _SetInt32(string pchSection, string pchSettingsKey, int nValue, ref EVRSettingsError peError);
1419 [MarshalAs(UnmanagedType.FunctionPtr)]
1420 internal _SetInt32 SetInt32;
1421
1422 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1423 internal delegate void _SetFloat(string pchSection, string pchSettingsKey, float flValue, ref EVRSettingsError peError);
1424 [MarshalAs(UnmanagedType.FunctionPtr)]
1425 internal _SetFloat SetFloat;
1426
1427 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1428 internal delegate void _SetString(string pchSection, string pchSettingsKey, string pchValue, ref EVRSettingsError peError);
1429 [MarshalAs(UnmanagedType.FunctionPtr)]
1430 internal _SetString SetString;
1431
1432 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1433 internal delegate bool _GetBool(string pchSection, string pchSettingsKey, ref EVRSettingsError peError);
1434 [MarshalAs(UnmanagedType.FunctionPtr)]
1435 internal _GetBool GetBool;
1436
1437 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1438 internal delegate int _GetInt32(string pchSection, string pchSettingsKey, ref EVRSettingsError peError);
1439 [MarshalAs(UnmanagedType.FunctionPtr)]
1440 internal _GetInt32 GetInt32;
1441
1442 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1443 internal delegate float _GetFloat(string pchSection, string pchSettingsKey, ref EVRSettingsError peError);
1444 [MarshalAs(UnmanagedType.FunctionPtr)]
1445 internal _GetFloat GetFloat;
1446
1447 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1448 internal delegate void _GetString(string pchSection, string pchSettingsKey, System.Text.StringBuilder pchValue, uint unValueLen, ref EVRSettingsError peError);
1449 [MarshalAs(UnmanagedType.FunctionPtr)]
1450 internal _GetString GetString;
1451
1452 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1453 internal delegate void _RemoveSection(string pchSection, ref EVRSettingsError peError);
1454 [MarshalAs(UnmanagedType.FunctionPtr)]
1455 internal _RemoveSection RemoveSection;
1456
1457 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1458 internal delegate void _RemoveKeyInSection(string pchSection, string pchSettingsKey, ref EVRSettingsError peError);
1459 [MarshalAs(UnmanagedType.FunctionPtr)]
1460 internal _RemoveKeyInSection RemoveKeyInSection;
1461
1462}
1463
1464[StructLayout(LayoutKind.Sequential)]
1465public struct IVRScreenshots
1466{
1467 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1468 internal delegate EVRScreenshotError _RequestScreenshot(ref uint pOutScreenshotHandle, EVRScreenshotType type, string pchPreviewFilename, string pchVRFilename);
1469 [MarshalAs(UnmanagedType.FunctionPtr)]
1470 internal _RequestScreenshot RequestScreenshot;
1471
1472 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1473 internal delegate EVRScreenshotError _HookScreenshot([In, Out] EVRScreenshotType[] pSupportedTypes, int numTypes);
1474 [MarshalAs(UnmanagedType.FunctionPtr)]
1475 internal _HookScreenshot HookScreenshot;
1476
1477 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1478 internal delegate EVRScreenshotType _GetScreenshotPropertyType(uint screenshotHandle, ref EVRScreenshotError pError);
1479 [MarshalAs(UnmanagedType.FunctionPtr)]
1480 internal _GetScreenshotPropertyType GetScreenshotPropertyType;
1481
1482 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1483 internal delegate uint _GetScreenshotPropertyFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames filenameType, System.Text.StringBuilder pchFilename, uint cchFilename, ref EVRScreenshotError pError);
1484 [MarshalAs(UnmanagedType.FunctionPtr)]
1485 internal _GetScreenshotPropertyFilename GetScreenshotPropertyFilename;
1486
1487 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1488 internal delegate EVRScreenshotError _UpdateScreenshotProgress(uint screenshotHandle, float flProgress);
1489 [MarshalAs(UnmanagedType.FunctionPtr)]
1490 internal _UpdateScreenshotProgress UpdateScreenshotProgress;
1491
1492 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1493 internal delegate EVRScreenshotError _TakeStereoScreenshot(ref uint pOutScreenshotHandle, string pchPreviewFilename, string pchVRFilename);
1494 [MarshalAs(UnmanagedType.FunctionPtr)]
1495 internal _TakeStereoScreenshot TakeStereoScreenshot;
1496
1497 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1498 internal delegate EVRScreenshotError _SubmitScreenshot(uint screenshotHandle, EVRScreenshotType type, string pchSourcePreviewFilename, string pchSourceVRFilename);
1499 [MarshalAs(UnmanagedType.FunctionPtr)]
1500 internal _SubmitScreenshot SubmitScreenshot;
1501
1502}
1503
1504[StructLayout(LayoutKind.Sequential)]
1505public struct IVRResources
1506{
1507 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1508 internal delegate uint _LoadSharedResource(string pchResourceName, string pchBuffer, uint unBufferLen);
1509 [MarshalAs(UnmanagedType.FunctionPtr)]
1510 internal _LoadSharedResource LoadSharedResource;
1511
1512 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1513 internal delegate uint _GetResourceFullPath(string pchResourceName, string pchResourceTypeDirectory, System.Text.StringBuilder pchPathBuffer, uint unBufferLen);
1514 [MarshalAs(UnmanagedType.FunctionPtr)]
1515 internal _GetResourceFullPath GetResourceFullPath;
1516
1517}
1518
1519[StructLayout(LayoutKind.Sequential)]
1520public struct IVRDriverManager
1521{
1522 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1523 internal delegate uint _GetDriverCount();
1524 [MarshalAs(UnmanagedType.FunctionPtr)]
1525 internal _GetDriverCount GetDriverCount;
1526
1527 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1528 internal delegate uint _GetDriverName(uint nDriver, System.Text.StringBuilder pchValue, uint unBufferSize);
1529 [MarshalAs(UnmanagedType.FunctionPtr)]
1530 internal _GetDriverName GetDriverName;
1531
1532 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1533 internal delegate ulong _GetDriverHandle(string pchDriverName);
1534 [MarshalAs(UnmanagedType.FunctionPtr)]
1535 internal _GetDriverHandle GetDriverHandle;
1536
1537}
1538
1539[StructLayout(LayoutKind.Sequential)]
1540public struct IVRInput
1541{
1542 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1543 internal delegate EVRInputError _SetActionManifestPath(string pchActionManifestPath);
1544 [MarshalAs(UnmanagedType.FunctionPtr)]
1545 internal _SetActionManifestPath SetActionManifestPath;
1546
1547 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1548 internal delegate EVRInputError _GetActionSetHandle(string pchActionSetName, ref ulong pHandle);
1549 [MarshalAs(UnmanagedType.FunctionPtr)]
1550 internal _GetActionSetHandle GetActionSetHandle;
1551
1552 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1553 internal delegate EVRInputError _GetActionHandle(string pchActionName, ref ulong pHandle);
1554 [MarshalAs(UnmanagedType.FunctionPtr)]
1555 internal _GetActionHandle GetActionHandle;
1556
1557 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1558 internal delegate EVRInputError _GetInputSourceHandle(string pchInputSourcePath, ref ulong pHandle);
1559 [MarshalAs(UnmanagedType.FunctionPtr)]
1560 internal _GetInputSourceHandle GetInputSourceHandle;
1561
1562 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1563 internal delegate EVRInputError _UpdateActionState([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount);
1564 [MarshalAs(UnmanagedType.FunctionPtr)]
1565 internal _UpdateActionState UpdateActionState;
1566
1567 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1568 internal delegate EVRInputError _GetDigitalActionData(ulong action, ref InputDigitalActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
1569 [MarshalAs(UnmanagedType.FunctionPtr)]
1570 internal _GetDigitalActionData GetDigitalActionData;
1571
1572 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1573 internal delegate EVRInputError _GetAnalogActionData(ulong action, ref InputAnalogActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
1574 [MarshalAs(UnmanagedType.FunctionPtr)]
1575 internal _GetAnalogActionData GetAnalogActionData;
1576
1577 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1578 internal delegate EVRInputError _GetPoseActionData(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
1579 [MarshalAs(UnmanagedType.FunctionPtr)]
1580 internal _GetPoseActionData GetPoseActionData;
1581
1582 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1583 internal delegate EVRInputError _GetSkeletalActionData(ulong action, ref InputSkeletalActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
1584 [MarshalAs(UnmanagedType.FunctionPtr)]
1585 internal _GetSkeletalActionData GetSkeletalActionData;
1586
1587 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1588 internal delegate EVRInputError _GetSkeletalBoneData(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount, ulong ulRestrictToDevice);
1589 [MarshalAs(UnmanagedType.FunctionPtr)]
1590 internal _GetSkeletalBoneData GetSkeletalBoneData;
1591
1592 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1593 internal delegate EVRInputError _GetSkeletalBoneDataCompressed(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, IntPtr pvCompressedData, uint unCompressedSize, ref uint punRequiredCompressedSize, ulong ulRestrictToDevice);
1594 [MarshalAs(UnmanagedType.FunctionPtr)]
1595 internal _GetSkeletalBoneDataCompressed GetSkeletalBoneDataCompressed;
1596
1597 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1598 internal delegate EVRInputError _DecompressSkeletalBoneData(IntPtr pvCompressedBuffer, uint unCompressedBufferSize, ref EVRSkeletalTransformSpace peTransformSpace, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
1599 [MarshalAs(UnmanagedType.FunctionPtr)]
1600 internal _DecompressSkeletalBoneData DecompressSkeletalBoneData;
1601
1602 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1603 internal delegate EVRInputError _TriggerHapticVibrationAction(ulong action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, ulong ulRestrictToDevice);
1604 [MarshalAs(UnmanagedType.FunctionPtr)]
1605 internal _TriggerHapticVibrationAction TriggerHapticVibrationAction;
1606
1607 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1608 internal delegate EVRInputError _GetActionOrigins(ulong actionSetHandle, ulong digitalActionHandle, [In, Out] ulong[] originsOut, uint originOutCount);
1609 [MarshalAs(UnmanagedType.FunctionPtr)]
1610 internal _GetActionOrigins GetActionOrigins;
1611
1612 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1613 internal delegate EVRInputError _GetOriginLocalizedName(ulong origin, System.Text.StringBuilder pchNameArray, uint unNameArraySize);
1614 [MarshalAs(UnmanagedType.FunctionPtr)]
1615 internal _GetOriginLocalizedName GetOriginLocalizedName;
1616
1617 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1618 internal delegate EVRInputError _GetOriginTrackedDeviceInfo(ulong origin, ref InputOriginInfo_t pOriginInfo, uint unOriginInfoSize);
1619 [MarshalAs(UnmanagedType.FunctionPtr)]
1620 internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo;
1621
1622 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1623 internal delegate EVRInputError _ShowActionOrigins(ulong actionSetHandle, ulong ulActionHandle);
1624 [MarshalAs(UnmanagedType.FunctionPtr)]
1625 internal _ShowActionOrigins ShowActionOrigins;
1626
1627 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1628 internal delegate EVRInputError _ShowBindingsForActionSet([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount, ulong originToHighlight);
1629 [MarshalAs(UnmanagedType.FunctionPtr)]
1630 internal _ShowBindingsForActionSet ShowBindingsForActionSet;
1631
1632}
1633
1634[StructLayout(LayoutKind.Sequential)]
1635public struct IVRIOBuffer
1636{
1637 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1638 internal delegate EIOBufferError _Open(string pchPath, EIOBufferMode mode, uint unElementSize, uint unElements, ref ulong pulBuffer);
1639 [MarshalAs(UnmanagedType.FunctionPtr)]
1640 internal _Open Open;
1641
1642 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1643 internal delegate EIOBufferError _Close(ulong ulBuffer);
1644 [MarshalAs(UnmanagedType.FunctionPtr)]
1645 internal _Close Close;
1646
1647 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1648 internal delegate EIOBufferError _Read(ulong ulBuffer, IntPtr pDst, uint unBytes, ref uint punRead);
1649 [MarshalAs(UnmanagedType.FunctionPtr)]
1650 internal _Read Read;
1651
1652 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1653 internal delegate EIOBufferError _Write(ulong ulBuffer, IntPtr pSrc, uint unBytes);
1654 [MarshalAs(UnmanagedType.FunctionPtr)]
1655 internal _Write Write;
1656
1657 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1658 internal delegate ulong _PropertyContainer(ulong ulBuffer);
1659 [MarshalAs(UnmanagedType.FunctionPtr)]
1660 internal _PropertyContainer PropertyContainer;
1661
1662}
1663
1664[StructLayout(LayoutKind.Sequential)]
1665public struct IVRSpatialAnchors
1666{
1667 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1668 internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromDescriptor(string pchDescriptor, ref uint pHandleOut);
1669 [MarshalAs(UnmanagedType.FunctionPtr)]
1670 internal _CreateSpatialAnchorFromDescriptor CreateSpatialAnchorFromDescriptor;
1671
1672 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1673 internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromPose(uint unDeviceIndex, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPose, ref uint pHandleOut);
1674 [MarshalAs(UnmanagedType.FunctionPtr)]
1675 internal _CreateSpatialAnchorFromPose CreateSpatialAnchorFromPose;
1676
1677 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1678 internal delegate EVRSpatialAnchorError _GetSpatialAnchorPose(uint unHandle, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPoseOut);
1679 [MarshalAs(UnmanagedType.FunctionPtr)]
1680 internal _GetSpatialAnchorPose GetSpatialAnchorPose;
1681
1682 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1683 internal delegate EVRSpatialAnchorError _GetSpatialAnchorDescriptor(uint unHandle, System.Text.StringBuilder pchDescriptorOut, ref uint punDescriptorBufferLenInOut);
1684 [MarshalAs(UnmanagedType.FunctionPtr)]
1685 internal _GetSpatialAnchorDescriptor GetSpatialAnchorDescriptor;
1686
1687}
1688
1689
1690public class CVRSystem
1691{
1692 IVRSystem FnTable;
1693 internal CVRSystem(IntPtr pInterface)
1694 {
1695 FnTable = (IVRSystem)Marshal.PtrToStructure(pInterface, typeof(IVRSystem));
1696 }
1697 public void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnHeight)
1698 {
1699 pnWidth = 0;
1700 pnHeight = 0;
1701 FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight);
1702 }
1703 public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ)
1704 {
1705 HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ);
1706 return result;
1707 }
1708 public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
1709 {
1710 pfLeft = 0;
1711 pfRight = 0;
1712 pfTop = 0;
1713 pfBottom = 0;
1714 FnTable.GetProjectionRaw(eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
1715 }
1716 public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref DistortionCoordinates_t pDistortionCoordinates)
1717 {
1718 bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistortionCoordinates);
1719 return result;
1720 }
1721 public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye)
1722 {
1723 HmdMatrix34_t result = FnTable.GetEyeToHeadTransform(eEye);
1724 return result;
1725 }
1726 public bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref ulong pulFrameCounter)
1727 {
1728 pfSecondsSinceLastVsync = 0;
1729 pulFrameCounter = 0;
1730 bool result = FnTable.GetTimeSinceLastVsync(ref pfSecondsSinceLastVsync,ref pulFrameCounter);
1731 return result;
1732 }
1733 public int GetD3D9AdapterIndex()
1734 {
1735 int result = FnTable.GetD3D9AdapterIndex();
1736 return result;
1737 }
1738 public void GetDXGIOutputInfo(ref int pnAdapterIndex)
1739 {
1740 pnAdapterIndex = 0;
1741 FnTable.GetDXGIOutputInfo(ref pnAdapterIndex);
1742 }
1743 public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType,IntPtr pInstance)
1744 {
1745 pnDevice = 0;
1746 FnTable.GetOutputDevice(ref pnDevice,textureType,pInstance);
1747 }
1748 public bool IsDisplayOnDesktop()
1749 {
1750 bool result = FnTable.IsDisplayOnDesktop();
1751 return result;
1752 }
1753 public bool SetDisplayVisibility(bool bIsVisibleOnDesktop)
1754 {
1755 bool result = FnTable.SetDisplayVisibility(bIsVisibleOnDesktop);
1756 return result;
1757 }
1758 public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray)
1759 {
1760 FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
1761 }
1762 public void ResetSeatedZeroPose()
1763 {
1764 FnTable.ResetSeatedZeroPose();
1765 }
1766 public HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose()
1767 {
1768 HmdMatrix34_t result = FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
1769 return result;
1770 }
1771 public HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose()
1772 {
1773 HmdMatrix34_t result = FnTable.GetRawZeroPoseToStandingAbsoluteTrackingPose();
1774 return result;
1775 }
1776 public uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex)
1777 {
1778 uint result = FnTable.GetSortedTrackedDeviceIndicesOfClass(eTrackedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Length,unRelativeToTrackedDeviceIndex);
1779 return result;
1780 }
1781 public EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId)
1782 {
1783 EDeviceActivityLevel result = FnTable.GetTrackedDeviceActivityLevel(unDeviceId);
1784 return result;
1785 }
1786 public void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform)
1787 {
1788 FnTable.ApplyTransform(ref pOutputPose,ref pTrackedDevicePose,ref pTransform);
1789 }
1790 public uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType)
1791 {
1792 uint result = FnTable.GetTrackedDeviceIndexForControllerRole(unDeviceType);
1793 return result;
1794 }
1795 public ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex)
1796 {
1797 ETrackedControllerRole result = FnTable.GetControllerRoleForTrackedDeviceIndex(unDeviceIndex);
1798 return result;
1799 }
1800 public ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex)
1801 {
1802 ETrackedDeviceClass result = FnTable.GetTrackedDeviceClass(unDeviceIndex);
1803 return result;
1804 }
1805 public bool IsTrackedDeviceConnected(uint unDeviceIndex)
1806 {
1807 bool result = FnTable.IsTrackedDeviceConnected(unDeviceIndex);
1808 return result;
1809 }
1810 public bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
1811 {
1812 bool result = FnTable.GetBoolTrackedDeviceProperty(unDeviceIndex,prop,ref pError);
1813 return result;
1814 }
1815 public float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
1816 {
1817 float result = FnTable.GetFloatTrackedDeviceProperty(unDeviceIndex,prop,ref pError);
1818 return result;
1819 }
1820 public int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
1821 {
1822 int result = FnTable.GetInt32TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
1823 return result;
1824 }
1825 public ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
1826 {
1827 ulong result = FnTable.GetUint64TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
1828 return result;
1829 }
1830 public HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
1831 {
1832 HmdMatrix34_t result = FnTable.GetMatrix34TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
1833 return result;
1834 }
1835 public uint GetArrayTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,uint propType,IntPtr pBuffer,uint unBufferSize,ref ETrackedPropertyError pError)
1836 {
1837 uint result = FnTable.GetArrayTrackedDeviceProperty(unDeviceIndex,prop,propType,pBuffer,unBufferSize,ref pError);
1838 return result;
1839 }
1840 public uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError)
1841 {
1842 uint result = FnTable.GetStringTrackedDeviceProperty(unDeviceIndex,prop,pchValue,unBufferSize,ref pError);
1843 return result;
1844 }
1845 public string GetPropErrorNameFromEnum(ETrackedPropertyError error)
1846 {
1847 IntPtr result = FnTable.GetPropErrorNameFromEnum(error);
1848 return Marshal.PtrToStringAnsi(result);
1849 }
1850// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
1851// originally mis-compiled with the wrong packing for Linux and OSX.
1852 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1853 internal delegate bool _PollNextEventPacked(ref VREvent_t_Packed pEvent,uint uncbVREvent);
1854 [StructLayout(LayoutKind.Explicit)]
1855 struct PollNextEventUnion
1856 {
1857 [FieldOffset(0)]
1858 public IVRSystem._PollNextEvent pPollNextEvent;
1859 [FieldOffset(0)]
1860 public _PollNextEventPacked pPollNextEventPacked;
1861 }
1862 public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
1863 {
1864#if !UNITY_METRO
1865 if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
1866 (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
1867 {
1868 PollNextEventUnion u;
1869 VREvent_t_Packed event_packed = new VREvent_t_Packed();
1870 u.pPollNextEventPacked = null;
1871 u.pPollNextEvent = FnTable.PollNextEvent;
1872 bool packed_result = u.pPollNextEventPacked(ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed)));
1873
1874 event_packed.Unpack(ref pEvent);
1875 return packed_result;
1876 }
1877#endif
1878 bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
1879 return result;
1880 }
1881 public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose)
1882 {
1883 bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose);
1884 return result;
1885 }
1886 public string GetEventTypeNameFromEnum(EVREventType eType)
1887 {
1888 IntPtr result = FnTable.GetEventTypeNameFromEnum(eType);
1889 return Marshal.PtrToStringAnsi(result);
1890 }
1891 public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshType type)
1892 {
1893 HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type);
1894 return result;
1895 }
1896// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
1897// originally mis-compiled with the wrong packing for Linux and OSX.
1898 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1899 internal delegate bool _GetControllerStatePacked(uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize);
1900 [StructLayout(LayoutKind.Explicit)]
1901 struct GetControllerStateUnion
1902 {
1903 [FieldOffset(0)]
1904 public IVRSystem._GetControllerState pGetControllerState;
1905 [FieldOffset(0)]
1906 public _GetControllerStatePacked pGetControllerStatePacked;
1907 }
1908 public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
1909 {
1910#if !UNITY_METRO
1911 if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
1912 (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
1913 {
1914 GetControllerStateUnion u;
1915 VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
1916 u.pGetControllerStatePacked = null;
1917 u.pGetControllerState = FnTable.GetControllerState;
1918 bool packed_result = u.pGetControllerStatePacked(unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)));
1919
1920 state_packed.Unpack(ref pControllerState);
1921 return packed_result;
1922 }
1923#endif
1924 bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
1925 return result;
1926 }
1927// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
1928// originally mis-compiled with the wrong packing for Linux and OSX.
1929 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1930 internal delegate bool _GetControllerStateWithPosePacked(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose);
1931 [StructLayout(LayoutKind.Explicit)]
1932 struct GetControllerStateWithPoseUnion
1933 {
1934 [FieldOffset(0)]
1935 public IVRSystem._GetControllerStateWithPose pGetControllerStateWithPose;
1936 [FieldOffset(0)]
1937 public _GetControllerStateWithPosePacked pGetControllerStateWithPosePacked;
1938 }
1939 public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
1940 {
1941#if !UNITY_METRO
1942 if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
1943 (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
1944 {
1945 GetControllerStateWithPoseUnion u;
1946 VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
1947 u.pGetControllerStateWithPosePacked = null;
1948 u.pGetControllerStateWithPose = FnTable.GetControllerStateWithPose;
1949 bool packed_result = u.pGetControllerStateWithPosePacked(eOrigin,unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)),ref pTrackedDevicePose);
1950
1951 state_packed.Unpack(ref pControllerState);
1952 return packed_result;
1953 }
1954#endif
1955 bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
1956 return result;
1957 }
1958 public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,ushort usDurationMicroSec)
1959 {
1960 FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDurationMicroSec);
1961 }
1962 public string GetButtonIdNameFromEnum(EVRButtonId eButtonId)
1963 {
1964 IntPtr result = FnTable.GetButtonIdNameFromEnum(eButtonId);
1965 return Marshal.PtrToStringAnsi(result);
1966 }
1967 public string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType)
1968 {
1969 IntPtr result = FnTable.GetControllerAxisTypeNameFromEnum(eAxisType);
1970 return Marshal.PtrToStringAnsi(result);
1971 }
1972 public bool IsInputAvailable()
1973 {
1974 bool result = FnTable.IsInputAvailable();
1975 return result;
1976 }
1977 public bool IsSteamVRDrawingControllers()
1978 {
1979 bool result = FnTable.IsSteamVRDrawingControllers();
1980 return result;
1981 }
1982 public bool ShouldApplicationPause()
1983 {
1984 bool result = FnTable.ShouldApplicationPause();
1985 return result;
1986 }
1987 public bool ShouldApplicationReduceRenderingWork()
1988 {
1989 bool result = FnTable.ShouldApplicationReduceRenderingWork();
1990 return result;
1991 }
1992 public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text.StringBuilder pchResponseBuffer,uint unResponseBufferSize)
1993 {
1994 uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequest,pchResponseBuffer,unResponseBufferSize);
1995 return result;
1996 }
1997 public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex)
1998 {
1999 EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDeviceIndex);
2000 return result;
2001 }
2002 public void AcknowledgeQuit_Exiting()
2003 {
2004 FnTable.AcknowledgeQuit_Exiting();
2005 }
2006 public void AcknowledgeQuit_UserPrompt()
2007 {
2008 FnTable.AcknowledgeQuit_UserPrompt();
2009 }
2010}
2011
2012
2013public class CVRExtendedDisplay
2014{
2015 IVRExtendedDisplay FnTable;
2016 internal CVRExtendedDisplay(IntPtr pInterface)
2017 {
2018 FnTable = (IVRExtendedDisplay)Marshal.PtrToStructure(pInterface, typeof(IVRExtendedDisplay));
2019 }
2020 public void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref uint pnHeight)
2021 {
2022 pnX = 0;
2023 pnY = 0;
2024 pnWidth = 0;
2025 pnHeight = 0;
2026 FnTable.GetWindowBounds(ref pnX,ref pnY,ref pnWidth,ref pnHeight);
2027 }
2028 public void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight)
2029 {
2030 pnX = 0;
2031 pnY = 0;
2032 pnWidth = 0;
2033 pnHeight = 0;
2034 FnTable.GetEyeOutputViewport(eEye,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
2035 }
2036 public void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOutputIndex)
2037 {
2038 pnAdapterIndex = 0;
2039 pnAdapterOutputIndex = 0;
2040 FnTable.GetDXGIOutputInfo(ref pnAdapterIndex,ref pnAdapterOutputIndex);
2041 }
2042}
2043
2044
2045public class CVRTrackedCamera
2046{
2047 IVRTrackedCamera FnTable;
2048 internal CVRTrackedCamera(IntPtr pInterface)
2049 {
2050 FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera));
2051 }
2052 public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError)
2053 {
2054 IntPtr result = FnTable.GetCameraErrorNameFromEnum(eCameraError);
2055 return Marshal.PtrToStringAnsi(result);
2056 }
2057 public EVRTrackedCameraError HasCamera(uint nDeviceIndex,ref bool pHasCamera)
2058 {
2059 pHasCamera = false;
2060 EVRTrackedCameraError result = FnTable.HasCamera(nDeviceIndex,ref pHasCamera);
2061 return result;
2062 }
2063 public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref uint pnWidth,ref uint pnHeight,ref uint pnFrameBufferSize)
2064 {
2065 pnWidth = 0;
2066 pnHeight = 0;
2067 pnFrameBufferSize = 0;
2068 EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize);
2069 return result;
2070 }
2071 public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
2072 {
2073 EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,eFrameType,ref pFocalLength,ref pCenter);
2074 return result;
2075 }
2076 public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
2077 {
2078 EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,eFrameType,flZNear,flZFar,ref pProjection);
2079 return result;
2080 }
2081 public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex,ref ulong pHandle)
2082 {
2083 pHandle = 0;
2084 EVRTrackedCameraError result = FnTable.AcquireVideoStreamingService(nDeviceIndex,ref pHandle);
2085 return result;
2086 }
2087 public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTrackedCamera)
2088 {
2089 EVRTrackedCameraError result = FnTable.ReleaseVideoStreamingService(hTrackedCamera);
2090 return result;
2091 }
2092 public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pFrameBuffer,uint nFrameBufferSize,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
2093 {
2094 EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrameHeaderSize);
2095 return result;
2096 }
2097 public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref VRTextureBounds_t pTextureBounds,ref uint pnWidth,ref uint pnHeight)
2098 {
2099 pnWidth = 0;
2100 pnHeight = 0;
2101 EVRTrackedCameraError result = FnTable.GetVideoStreamTextureSize(nDeviceIndex,eFrameType,ref pTextureBounds,ref pnWidth,ref pnHeight);
2102 return result;
2103 }
2104 public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
2105 {
2106 EVRTrackedCameraError result = FnTable.GetVideoStreamTextureD3D11(hTrackedCamera,eFrameType,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView,ref pFrameHeader,nFrameHeaderSize);
2107 return result;
2108 }
2109 public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,ref uint pglTextureId,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
2110 {
2111 pglTextureId = 0;
2112 EVRTrackedCameraError result = FnTable.GetVideoStreamTextureGL(hTrackedCamera,eFrameType,ref pglTextureId,ref pFrameHeader,nFrameHeaderSize);
2113 return result;
2114 }
2115 public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera,uint glTextureId)
2116 {
2117 EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera,glTextureId);
2118 return result;
2119 }
2120}
2121
2122
2123public class CVRApplications
2124{
2125 IVRApplications FnTable;
2126 internal CVRApplications(IntPtr pInterface)
2127 {
2128 FnTable = (IVRApplications)Marshal.PtrToStructure(pInterface, typeof(IVRApplications));
2129 }
2130 public EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath,bool bTemporary)
2131 {
2132 EVRApplicationError result = FnTable.AddApplicationManifest(pchApplicationManifestFullPath,bTemporary);
2133 return result;
2134 }
2135 public EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath)
2136 {
2137 EVRApplicationError result = FnTable.RemoveApplicationManifest(pchApplicationManifestFullPath);
2138 return result;
2139 }
2140 public bool IsApplicationInstalled(string pchAppKey)
2141 {
2142 bool result = FnTable.IsApplicationInstalled(pchAppKey);
2143 return result;
2144 }
2145 public uint GetApplicationCount()
2146 {
2147 uint result = FnTable.GetApplicationCount();
2148 return result;
2149 }
2150 public EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
2151 {
2152 EVRApplicationError result = FnTable.GetApplicationKeyByIndex(unApplicationIndex,pchAppKeyBuffer,unAppKeyBufferLen);
2153 return result;
2154 }
2155 public EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
2156 {
2157 EVRApplicationError result = FnTable.GetApplicationKeyByProcessId(unProcessId,pchAppKeyBuffer,unAppKeyBufferLen);
2158 return result;
2159 }
2160 public EVRApplicationError LaunchApplication(string pchAppKey)
2161 {
2162 EVRApplicationError result = FnTable.LaunchApplication(pchAppKey);
2163 return result;
2164 }
2165 public EVRApplicationError LaunchTemplateApplication(string pchTemplateAppKey,string pchNewAppKey,AppOverrideKeys_t [] pKeys)
2166 {
2167 EVRApplicationError result = FnTable.LaunchTemplateApplication(pchTemplateAppKey,pchNewAppKey,pKeys,(uint) pKeys.Length);
2168 return result;
2169 }
2170 public EVRApplicationError LaunchApplicationFromMimeType(string pchMimeType,string pchArgs)
2171 {
2172 EVRApplicationError result = FnTable.LaunchApplicationFromMimeType(pchMimeType,pchArgs);
2173 return result;
2174 }
2175 public EVRApplicationError LaunchDashboardOverlay(string pchAppKey)
2176 {
2177 EVRApplicationError result = FnTable.LaunchDashboardOverlay(pchAppKey);
2178 return result;
2179 }
2180 public bool CancelApplicationLaunch(string pchAppKey)
2181 {
2182 bool result = FnTable.CancelApplicationLaunch(pchAppKey);
2183 return result;
2184 }
2185 public EVRApplicationError IdentifyApplication(uint unProcessId,string pchAppKey)
2186 {
2187 EVRApplicationError result = FnTable.IdentifyApplication(unProcessId,pchAppKey);
2188 return result;
2189 }
2190 public uint GetApplicationProcessId(string pchAppKey)
2191 {
2192 uint result = FnTable.GetApplicationProcessId(pchAppKey);
2193 return result;
2194 }
2195 public string GetApplicationsErrorNameFromEnum(EVRApplicationError error)
2196 {
2197 IntPtr result = FnTable.GetApplicationsErrorNameFromEnum(error);
2198 return Marshal.PtrToStringAnsi(result);
2199 }
2200 public uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,System.Text.StringBuilder pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError)
2201 {
2202 uint result = FnTable.GetApplicationPropertyString(pchAppKey,eProperty,pchPropertyValueBuffer,unPropertyValueBufferLen,ref peError);
2203 return result;
2204 }
2205 public bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
2206 {
2207 bool result = FnTable.GetApplicationPropertyBool(pchAppKey,eProperty,ref peError);
2208 return result;
2209 }
2210 public ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
2211 {
2212 ulong result = FnTable.GetApplicationPropertyUint64(pchAppKey,eProperty,ref peError);
2213 return result;
2214 }
2215 public EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch)
2216 {
2217 EVRApplicationError result = FnTable.SetApplicationAutoLaunch(pchAppKey,bAutoLaunch);
2218 return result;
2219 }
2220 public bool GetApplicationAutoLaunch(string pchAppKey)
2221 {
2222 bool result = FnTable.GetApplicationAutoLaunch(pchAppKey);
2223 return result;
2224 }
2225 public EVRApplicationError SetDefaultApplicationForMimeType(string pchAppKey,string pchMimeType)
2226 {
2227 EVRApplicationError result = FnTable.SetDefaultApplicationForMimeType(pchAppKey,pchMimeType);
2228 return result;
2229 }
2230 public bool GetDefaultApplicationForMimeType(string pchMimeType,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
2231 {
2232 bool result = FnTable.GetDefaultApplicationForMimeType(pchMimeType,pchAppKeyBuffer,unAppKeyBufferLen);
2233 return result;
2234 }
2235 public bool GetApplicationSupportedMimeTypes(string pchAppKey,System.Text.StringBuilder pchMimeTypesBuffer,uint unMimeTypesBuffer)
2236 {
2237 bool result = FnTable.GetApplicationSupportedMimeTypes(pchAppKey,pchMimeTypesBuffer,unMimeTypesBuffer);
2238 return result;
2239 }
2240 public uint GetApplicationsThatSupportMimeType(string pchMimeType,System.Text.StringBuilder pchAppKeysThatSupportBuffer,uint unAppKeysThatSupportBuffer)
2241 {
2242 uint result = FnTable.GetApplicationsThatSupportMimeType(pchMimeType,pchAppKeysThatSupportBuffer,unAppKeysThatSupportBuffer);
2243 return result;
2244 }
2245 public uint GetApplicationLaunchArguments(uint unHandle,System.Text.StringBuilder pchArgs,uint unArgs)
2246 {
2247 uint result = FnTable.GetApplicationLaunchArguments(unHandle,pchArgs,unArgs);
2248 return result;
2249 }
2250 public EVRApplicationError GetStartingApplication(System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
2251 {
2252 EVRApplicationError result = FnTable.GetStartingApplication(pchAppKeyBuffer,unAppKeyBufferLen);
2253 return result;
2254 }
2255 public EVRApplicationTransitionState GetTransitionState()
2256 {
2257 EVRApplicationTransitionState result = FnTable.GetTransitionState();
2258 return result;
2259 }
2260 public EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey)
2261 {
2262 EVRApplicationError result = FnTable.PerformApplicationPrelaunchCheck(pchAppKey);
2263 return result;
2264 }
2265 public string GetApplicationsTransitionStateNameFromEnum(EVRApplicationTransitionState state)
2266 {
2267 IntPtr result = FnTable.GetApplicationsTransitionStateNameFromEnum(state);
2268 return Marshal.PtrToStringAnsi(result);
2269 }
2270 public bool IsQuitUserPromptRequested()
2271 {
2272 bool result = FnTable.IsQuitUserPromptRequested();
2273 return result;
2274 }
2275 public EVRApplicationError LaunchInternalProcess(string pchBinaryPath,string pchArguments,string pchWorkingDirectory)
2276 {
2277 EVRApplicationError result = FnTable.LaunchInternalProcess(pchBinaryPath,pchArguments,pchWorkingDirectory);
2278 return result;
2279 }
2280 public uint GetCurrentSceneProcessId()
2281 {
2282 uint result = FnTable.GetCurrentSceneProcessId();
2283 return result;
2284 }
2285}
2286
2287
2288public class CVRChaperone
2289{
2290 IVRChaperone FnTable;
2291 internal CVRChaperone(IntPtr pInterface)
2292 {
2293 FnTable = (IVRChaperone)Marshal.PtrToStructure(pInterface, typeof(IVRChaperone));
2294 }
2295 public ChaperoneCalibrationState GetCalibrationState()
2296 {
2297 ChaperoneCalibrationState result = FnTable.GetCalibrationState();
2298 return result;
2299 }
2300 public bool GetPlayAreaSize(ref float pSizeX,ref float pSizeZ)
2301 {
2302 pSizeX = 0;
2303 pSizeZ = 0;
2304 bool result = FnTable.GetPlayAreaSize(ref pSizeX,ref pSizeZ);
2305 return result;
2306 }
2307 public bool GetPlayAreaRect(ref HmdQuad_t rect)
2308 {
2309 bool result = FnTable.GetPlayAreaRect(ref rect);
2310 return result;
2311 }
2312 public void ReloadInfo()
2313 {
2314 FnTable.ReloadInfo();
2315 }
2316 public void SetSceneColor(HmdColor_t color)
2317 {
2318 FnTable.SetSceneColor(color);
2319 }
2320 public void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors,float flCollisionBoundsFadeDistance,ref HmdColor_t pOutputCameraColor)
2321 {
2322 FnTable.GetBoundsColor(ref pOutputColorArray,nNumOutputColors,flCollisionBoundsFadeDistance,ref pOutputCameraColor);
2323 }
2324 public bool AreBoundsVisible()
2325 {
2326 bool result = FnTable.AreBoundsVisible();
2327 return result;
2328 }
2329 public void ForceBoundsVisible(bool bForce)
2330 {
2331 FnTable.ForceBoundsVisible(bForce);
2332 }
2333}
2334
2335
2336public class CVRChaperoneSetup
2337{
2338 IVRChaperoneSetup FnTable;
2339 internal CVRChaperoneSetup(IntPtr pInterface)
2340 {
2341 FnTable = (IVRChaperoneSetup)Marshal.PtrToStructure(pInterface, typeof(IVRChaperoneSetup));
2342 }
2343 public bool CommitWorkingCopy(EChaperoneConfigFile configFile)
2344 {
2345 bool result = FnTable.CommitWorkingCopy(configFile);
2346 return result;
2347 }
2348 public void RevertWorkingCopy()
2349 {
2350 FnTable.RevertWorkingCopy();
2351 }
2352 public bool GetWorkingPlayAreaSize(ref float pSizeX,ref float pSizeZ)
2353 {
2354 pSizeX = 0;
2355 pSizeZ = 0;
2356 bool result = FnTable.GetWorkingPlayAreaSize(ref pSizeX,ref pSizeZ);
2357 return result;
2358 }
2359 public bool GetWorkingPlayAreaRect(ref HmdQuad_t rect)
2360 {
2361 bool result = FnTable.GetWorkingPlayAreaRect(ref rect);
2362 return result;
2363 }
2364 public bool GetWorkingCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
2365 {
2366 uint punQuadsCount = 0;
2367 bool result = FnTable.GetWorkingCollisionBoundsInfo(null,ref punQuadsCount);
2368 pQuadsBuffer= new HmdQuad_t[punQuadsCount];
2369 result = FnTable.GetWorkingCollisionBoundsInfo(pQuadsBuffer,ref punQuadsCount);
2370 return result;
2371 }
2372 public bool GetLiveCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
2373 {
2374 uint punQuadsCount = 0;
2375 bool result = FnTable.GetLiveCollisionBoundsInfo(null,ref punQuadsCount);
2376 pQuadsBuffer= new HmdQuad_t[punQuadsCount];
2377 result = FnTable.GetLiveCollisionBoundsInfo(pQuadsBuffer,ref punQuadsCount);
2378 return result;
2379 }
2380 public bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
2381 {
2382 bool result = FnTable.GetWorkingSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose);
2383 return result;
2384 }
2385 public bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose)
2386 {
2387 bool result = FnTable.GetWorkingStandingZeroPoseToRawTrackingPose(ref pmatStandingZeroPoseToRawTrackingPose);
2388 return result;
2389 }
2390 public void SetWorkingPlayAreaSize(float sizeX,float sizeZ)
2391 {
2392 FnTable.SetWorkingPlayAreaSize(sizeX,sizeZ);
2393 }
2394 public void SetWorkingCollisionBoundsInfo(HmdQuad_t [] pQuadsBuffer)
2395 {
2396 FnTable.SetWorkingCollisionBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length);
2397 }
2398 public void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose)
2399 {
2400 FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose(ref pMatSeatedZeroPoseToRawTrackingPose);
2401 }
2402 public void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose)
2403 {
2404 FnTable.SetWorkingStandingZeroPoseToRawTrackingPose(ref pMatStandingZeroPoseToRawTrackingPose);
2405 }
2406 public void ReloadFromDisk(EChaperoneConfigFile configFile)
2407 {
2408 FnTable.ReloadFromDisk(configFile);
2409 }
2410 public bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
2411 {
2412 bool result = FnTable.GetLiveSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose);
2413 return result;
2414 }
2415 public void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer)
2416 {
2417 FnTable.SetWorkingCollisionBoundsTagsInfo(pTagsBuffer,(uint) pTagsBuffer.Length);
2418 }
2419 public bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer)
2420 {
2421 uint punTagCount = 0;
2422 bool result = FnTable.GetLiveCollisionBoundsTagsInfo(null,ref punTagCount);
2423 pTagsBuffer= new byte[punTagCount];
2424 result = FnTable.GetLiveCollisionBoundsTagsInfo(pTagsBuffer,ref punTagCount);
2425 return result;
2426 }
2427 public bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer)
2428 {
2429 bool result = FnTable.SetWorkingPhysicalBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length);
2430 return result;
2431 }
2432 public bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
2433 {
2434 uint punQuadsCount = 0;
2435 bool result = FnTable.GetLivePhysicalBoundsInfo(null,ref punQuadsCount);
2436 pQuadsBuffer= new HmdQuad_t[punQuadsCount];
2437 result = FnTable.GetLivePhysicalBoundsInfo(pQuadsBuffer,ref punQuadsCount);
2438 return result;
2439 }
2440 public bool ExportLiveToBuffer(System.Text.StringBuilder pBuffer,ref uint pnBufferLength)
2441 {
2442 pnBufferLength = 0;
2443 bool result = FnTable.ExportLiveToBuffer(pBuffer,ref pnBufferLength);
2444 return result;
2445 }
2446 public bool ImportFromBufferToWorking(string pBuffer,uint nImportFlags)
2447 {
2448 bool result = FnTable.ImportFromBufferToWorking(pBuffer,nImportFlags);
2449 return result;
2450 }
2451}
2452
2453
2454public class CVRCompositor
2455{
2456 IVRCompositor FnTable;
2457 internal CVRCompositor(IntPtr pInterface)
2458 {
2459 FnTable = (IVRCompositor)Marshal.PtrToStructure(pInterface, typeof(IVRCompositor));
2460 }
2461 public void SetTrackingSpace(ETrackingUniverseOrigin eOrigin)
2462 {
2463 FnTable.SetTrackingSpace(eOrigin);
2464 }
2465 public ETrackingUniverseOrigin GetTrackingSpace()
2466 {
2467 ETrackingUniverseOrigin result = FnTable.GetTrackingSpace();
2468 return result;
2469 }
2470 public EVRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
2471 {
2472 EVRCompositorError result = FnTable.WaitGetPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
2473 return result;
2474 }
2475 public EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
2476 {
2477 EVRCompositorError result = FnTable.GetLastPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
2478 return result;
2479 }
2480 public EVRCompositorError GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex,ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pOutputGamePose)
2481 {
2482 EVRCompositorError result = FnTable.GetLastPoseForTrackedDeviceIndex(unDeviceIndex,ref pOutputPose,ref pOutputGamePose);
2483 return result;
2484 }
2485 public EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags)
2486 {
2487 EVRCompositorError result = FnTable.Submit(eEye,ref pTexture,ref pBounds,nSubmitFlags);
2488 return result;
2489 }
2490 public void ClearLastSubmittedFrame()
2491 {
2492 FnTable.ClearLastSubmittedFrame();
2493 }
2494 public void PostPresentHandoff()
2495 {
2496 FnTable.PostPresentHandoff();
2497 }
2498 public bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo)
2499 {
2500 bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo);
2501 return result;
2502 }
2503 public uint GetFrameTimings(ref Compositor_FrameTiming pTiming,uint nFrames)
2504 {
2505 uint result = FnTable.GetFrameTimings(ref pTiming,nFrames);
2506 return result;
2507 }
2508 public float GetFrameTimeRemaining()
2509 {
2510 float result = FnTable.GetFrameTimeRemaining();
2511 return result;
2512 }
2513 public void GetCumulativeStats(ref Compositor_CumulativeStats pStats,uint nStatsSizeInBytes)
2514 {
2515 FnTable.GetCumulativeStats(ref pStats,nStatsSizeInBytes);
2516 }
2517 public void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground)
2518 {
2519 FnTable.FadeToColor(fSeconds,fRed,fGreen,fBlue,fAlpha,bBackground);
2520 }
2521 public HmdColor_t GetCurrentFadeColor(bool bBackground)
2522 {
2523 HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground);
2524 return result;
2525 }
2526 public void FadeGrid(float fSeconds,bool bFadeIn)
2527 {
2528 FnTable.FadeGrid(fSeconds,bFadeIn);
2529 }
2530 public float GetCurrentGridAlpha()
2531 {
2532 float result = FnTable.GetCurrentGridAlpha();
2533 return result;
2534 }
2535 public EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures)
2536 {
2537 EVRCompositorError result = FnTable.SetSkyboxOverride(pTextures,(uint) pTextures.Length);
2538 return result;
2539 }
2540 public void ClearSkyboxOverride()
2541 {
2542 FnTable.ClearSkyboxOverride();
2543 }
2544 public void CompositorBringToFront()
2545 {
2546 FnTable.CompositorBringToFront();
2547 }
2548 public void CompositorGoToBack()
2549 {
2550 FnTable.CompositorGoToBack();
2551 }
2552 public void CompositorQuit()
2553 {
2554 FnTable.CompositorQuit();
2555 }
2556 public bool IsFullscreen()
2557 {
2558 bool result = FnTable.IsFullscreen();
2559 return result;
2560 }
2561 public uint GetCurrentSceneFocusProcess()
2562 {
2563 uint result = FnTable.GetCurrentSceneFocusProcess();
2564 return result;
2565 }
2566 public uint GetLastFrameRenderer()
2567 {
2568 uint result = FnTable.GetLastFrameRenderer();
2569 return result;
2570 }
2571 public bool CanRenderScene()
2572 {
2573 bool result = FnTable.CanRenderScene();
2574 return result;
2575 }
2576 public void ShowMirrorWindow()
2577 {
2578 FnTable.ShowMirrorWindow();
2579 }
2580 public void HideMirrorWindow()
2581 {
2582 FnTable.HideMirrorWindow();
2583 }
2584 public bool IsMirrorWindowVisible()
2585 {
2586 bool result = FnTable.IsMirrorWindowVisible();
2587 return result;
2588 }
2589 public void CompositorDumpImages()
2590 {
2591 FnTable.CompositorDumpImages();
2592 }
2593 public bool ShouldAppRenderWithLowResources()
2594 {
2595 bool result = FnTable.ShouldAppRenderWithLowResources();
2596 return result;
2597 }
2598 public void ForceInterleavedReprojectionOn(bool bOverride)
2599 {
2600 FnTable.ForceInterleavedReprojectionOn(bOverride);
2601 }
2602 public void ForceReconnectProcess()
2603 {
2604 FnTable.ForceReconnectProcess();
2605 }
2606 public void SuspendRendering(bool bSuspend)
2607 {
2608 FnTable.SuspendRendering(bSuspend);
2609 }
2610 public EVRCompositorError GetMirrorTextureD3D11(EVREye eEye,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView)
2611 {
2612 EVRCompositorError result = FnTable.GetMirrorTextureD3D11(eEye,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView);
2613 return result;
2614 }
2615 public void ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView)
2616 {
2617 FnTable.ReleaseMirrorTextureD3D11(pD3D11ShaderResourceView);
2618 }
2619 public EVRCompositorError GetMirrorTextureGL(EVREye eEye,ref uint pglTextureId,IntPtr pglSharedTextureHandle)
2620 {
2621 pglTextureId = 0;
2622 EVRCompositorError result = FnTable.GetMirrorTextureGL(eEye,ref pglTextureId,pglSharedTextureHandle);
2623 return result;
2624 }
2625 public bool ReleaseSharedGLTexture(uint glTextureId,IntPtr glSharedTextureHandle)
2626 {
2627 bool result = FnTable.ReleaseSharedGLTexture(glTextureId,glSharedTextureHandle);
2628 return result;
2629 }
2630 public void LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle)
2631 {
2632 FnTable.LockGLSharedTextureForAccess(glSharedTextureHandle);
2633 }
2634 public void UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle)
2635 {
2636 FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle);
2637 }
2638 public uint GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue,uint unBufferSize)
2639 {
2640 uint result = FnTable.GetVulkanInstanceExtensionsRequired(pchValue,unBufferSize);
2641 return result;
2642 }
2643 public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text.StringBuilder pchValue,uint unBufferSize)
2644 {
2645 uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize);
2646 return result;
2647 }
2648 public void SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode)
2649 {
2650 FnTable.SetExplicitTimingMode(eTimingMode);
2651 }
2652 public EVRCompositorError SubmitExplicitTimingData()
2653 {
2654 EVRCompositorError result = FnTable.SubmitExplicitTimingData();
2655 return result;
2656 }
2657}
2658
2659
2660public class CVROverlay
2661{
2662 IVROverlay FnTable;
2663 internal CVROverlay(IntPtr pInterface)
2664 {
2665 FnTable = (IVROverlay)Marshal.PtrToStructure(pInterface, typeof(IVROverlay));
2666 }
2667 public EVROverlayError FindOverlay(string pchOverlayKey,ref ulong pOverlayHandle)
2668 {
2669 pOverlayHandle = 0;
2670 EVROverlayError result = FnTable.FindOverlay(pchOverlayKey,ref pOverlayHandle);
2671 return result;
2672 }
2673 public EVROverlayError CreateOverlay(string pchOverlayKey,string pchOverlayName,ref ulong pOverlayHandle)
2674 {
2675 pOverlayHandle = 0;
2676 EVROverlayError result = FnTable.CreateOverlay(pchOverlayKey,pchOverlayName,ref pOverlayHandle);
2677 return result;
2678 }
2679 public EVROverlayError DestroyOverlay(ulong ulOverlayHandle)
2680 {
2681 EVROverlayError result = FnTable.DestroyOverlay(ulOverlayHandle);
2682 return result;
2683 }
2684 public EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle)
2685 {
2686 EVROverlayError result = FnTable.SetHighQualityOverlay(ulOverlayHandle);
2687 return result;
2688 }
2689 public ulong GetHighQualityOverlay()
2690 {
2691 ulong result = FnTable.GetHighQualityOverlay();
2692 return result;
2693 }
2694 public uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError)
2695 {
2696 uint result = FnTable.GetOverlayKey(ulOverlayHandle,pchValue,unBufferSize,ref pError);
2697 return result;
2698 }
2699 public uint GetOverlayName(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError)
2700 {
2701 uint result = FnTable.GetOverlayName(ulOverlayHandle,pchValue,unBufferSize,ref pError);
2702 return result;
2703 }
2704 public EVROverlayError SetOverlayName(ulong ulOverlayHandle,string pchName)
2705 {
2706 EVROverlayError result = FnTable.SetOverlayName(ulOverlayHandle,pchName);
2707 return result;
2708 }
2709 public EVROverlayError GetOverlayImageData(ulong ulOverlayHandle,IntPtr pvBuffer,uint unBufferSize,ref uint punWidth,ref uint punHeight)
2710 {
2711 punWidth = 0;
2712 punHeight = 0;
2713 EVROverlayError result = FnTable.GetOverlayImageData(ulOverlayHandle,pvBuffer,unBufferSize,ref punWidth,ref punHeight);
2714 return result;
2715 }
2716 public string GetOverlayErrorNameFromEnum(EVROverlayError error)
2717 {
2718 IntPtr result = FnTable.GetOverlayErrorNameFromEnum(error);
2719 return Marshal.PtrToStringAnsi(result);
2720 }
2721 public EVROverlayError SetOverlayRenderingPid(ulong ulOverlayHandle,uint unPID)
2722 {
2723 EVROverlayError result = FnTable.SetOverlayRenderingPid(ulOverlayHandle,unPID);
2724 return result;
2725 }
2726 public uint GetOverlayRenderingPid(ulong ulOverlayHandle)
2727 {
2728 uint result = FnTable.GetOverlayRenderingPid(ulOverlayHandle);
2729 return result;
2730 }
2731 public EVROverlayError SetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,bool bEnabled)
2732 {
2733 EVROverlayError result = FnTable.SetOverlayFlag(ulOverlayHandle,eOverlayFlag,bEnabled);
2734 return result;
2735 }
2736 public EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,ref bool pbEnabled)
2737 {
2738 pbEnabled = false;
2739 EVROverlayError result = FnTable.GetOverlayFlag(ulOverlayHandle,eOverlayFlag,ref pbEnabled);
2740 return result;
2741 }
2742 public EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue)
2743 {
2744 EVROverlayError result = FnTable.SetOverlayColor(ulOverlayHandle,fRed,fGreen,fBlue);
2745 return result;
2746 }
2747 public EVROverlayError GetOverlayColor(ulong ulOverlayHandle,ref float pfRed,ref float pfGreen,ref float pfBlue)
2748 {
2749 pfRed = 0;
2750 pfGreen = 0;
2751 pfBlue = 0;
2752 EVROverlayError result = FnTable.GetOverlayColor(ulOverlayHandle,ref pfRed,ref pfGreen,ref pfBlue);
2753 return result;
2754 }
2755 public EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle,float fAlpha)
2756 {
2757 EVROverlayError result = FnTable.SetOverlayAlpha(ulOverlayHandle,fAlpha);
2758 return result;
2759 }
2760 public EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle,ref float pfAlpha)
2761 {
2762 pfAlpha = 0;
2763 EVROverlayError result = FnTable.GetOverlayAlpha(ulOverlayHandle,ref pfAlpha);
2764 return result;
2765 }
2766 public EVROverlayError SetOverlayTexelAspect(ulong ulOverlayHandle,float fTexelAspect)
2767 {
2768 EVROverlayError result = FnTable.SetOverlayTexelAspect(ulOverlayHandle,fTexelAspect);
2769 return result;
2770 }
2771 public EVROverlayError GetOverlayTexelAspect(ulong ulOverlayHandle,ref float pfTexelAspect)
2772 {
2773 pfTexelAspect = 0;
2774 EVROverlayError result = FnTable.GetOverlayTexelAspect(ulOverlayHandle,ref pfTexelAspect);
2775 return result;
2776 }
2777 public EVROverlayError SetOverlaySortOrder(ulong ulOverlayHandle,uint unSortOrder)
2778 {
2779 EVROverlayError result = FnTable.SetOverlaySortOrder(ulOverlayHandle,unSortOrder);
2780 return result;
2781 }
2782 public EVROverlayError GetOverlaySortOrder(ulong ulOverlayHandle,ref uint punSortOrder)
2783 {
2784 punSortOrder = 0;
2785 EVROverlayError result = FnTable.GetOverlaySortOrder(ulOverlayHandle,ref punSortOrder);
2786 return result;
2787 }
2788 public EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,float fWidthInMeters)
2789 {
2790 EVROverlayError result = FnTable.SetOverlayWidthInMeters(ulOverlayHandle,fWidthInMeters);
2791 return result;
2792 }
2793 public EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref float pfWidthInMeters)
2794 {
2795 pfWidthInMeters = 0;
2796 EVROverlayError result = FnTable.GetOverlayWidthInMeters(ulOverlayHandle,ref pfWidthInMeters);
2797 return result;
2798 }
2799 public EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,float fMinDistanceInMeters,float fMaxDistanceInMeters)
2800 {
2801 EVROverlayError result = FnTable.SetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle,fMinDistanceInMeters,fMaxDistanceInMeters);
2802 return result;
2803 }
2804 public EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ulOverlayHandle,ref float pfMinDistanceInMeters,ref float pfMaxDistanceInMeters)
2805 {
2806 pfMinDistanceInMeters = 0;
2807 pfMaxDistanceInMeters = 0;
2808 EVROverlayError result = FnTable.GetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle,ref pfMinDistanceInMeters,ref pfMaxDistanceInMeters);
2809 return result;
2810 }
2811 public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace)
2812 {
2813 EVROverlayError result = FnTable.SetOverlayTextureColorSpace(ulOverlayHandle,eTextureColorSpace);
2814 return result;
2815 }
2816 public EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle,ref EColorSpace peTextureColorSpace)
2817 {
2818 EVROverlayError result = FnTable.GetOverlayTextureColorSpace(ulOverlayHandle,ref peTextureColorSpace);
2819 return result;
2820 }
2821 public EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds)
2822 {
2823 EVROverlayError result = FnTable.SetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds);
2824 return result;
2825 }
2826 public EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds)
2827 {
2828 EVROverlayError result = FnTable.GetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds);
2829 return result;
2830 }
2831 public uint GetOverlayRenderModel(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref HmdColor_t pColor,ref EVROverlayError pError)
2832 {
2833 uint result = FnTable.GetOverlayRenderModel(ulOverlayHandle,pchValue,unBufferSize,ref pColor,ref pError);
2834 return result;
2835 }
2836 public EVROverlayError SetOverlayRenderModel(ulong ulOverlayHandle,string pchRenderModel,ref HmdColor_t pColor)
2837 {
2838 EVROverlayError result = FnTable.SetOverlayRenderModel(ulOverlayHandle,pchRenderModel,ref pColor);
2839 return result;
2840 }
2841 public EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref VROverlayTransformType peTransformType)
2842 {
2843 EVROverlayError result = FnTable.GetOverlayTransformType(ulOverlayHandle,ref peTransformType);
2844 return result;
2845 }
2846 public EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
2847 {
2848 EVROverlayError result = FnTable.SetOverlayTransformAbsolute(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform);
2849 return result;
2850 }
2851 public EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
2852 {
2853 EVROverlayError result = FnTable.GetOverlayTransformAbsolute(ulOverlayHandle,ref peTrackingOrigin,ref pmatTrackingOriginToOverlayTransform);
2854 return result;
2855 }
2856 public EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
2857 {
2858 EVROverlayError result = FnTable.SetOverlayTransformTrackedDeviceRelative(ulOverlayHandle,unTrackedDevice,ref pmatTrackedDeviceToOverlayTransform);
2859 return result;
2860 }
2861 public EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
2862 {
2863 punTrackedDevice = 0;
2864 EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceRelative(ulOverlayHandle,ref punTrackedDevice,ref pmatTrackedDeviceToOverlayTransform);
2865 return result;
2866 }
2867 public EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName)
2868 {
2869 EVROverlayError result = FnTable.SetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,unDeviceIndex,pchComponentName);
2870 return result;
2871 }
2872 public EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameSize)
2873 {
2874 punDeviceIndex = 0;
2875 EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSize);
2876 return result;
2877 }
2878 public EVROverlayError GetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ref ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform)
2879 {
2880 ulOverlayHandleParent = 0;
2881 EVROverlayError result = FnTable.GetOverlayTransformOverlayRelative(ulOverlayHandle,ref ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
2882 return result;
2883 }
2884 public EVROverlayError SetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform)
2885 {
2886 EVROverlayError result = FnTable.SetOverlayTransformOverlayRelative(ulOverlayHandle,ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
2887 return result;
2888 }
2889 public EVROverlayError ShowOverlay(ulong ulOverlayHandle)
2890 {
2891 EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle);
2892 return result;
2893 }
2894 public EVROverlayError HideOverlay(ulong ulOverlayHandle)
2895 {
2896 EVROverlayError result = FnTable.HideOverlay(ulOverlayHandle);
2897 return result;
2898 }
2899 public bool IsOverlayVisible(ulong ulOverlayHandle)
2900 {
2901 bool result = FnTable.IsOverlayVisible(ulOverlayHandle);
2902 return result;
2903 }
2904 public EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay,ref HmdMatrix34_t pmatTransform)
2905 {
2906 EVROverlayError result = FnTable.GetTransformForOverlayCoordinates(ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform);
2907 return result;
2908 }
2909// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
2910// originally mis-compiled with the wrong packing for Linux and OSX.
2911 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2912 internal delegate bool _PollNextOverlayEventPacked(ulong ulOverlayHandle,ref VREvent_t_Packed pEvent,uint uncbVREvent);
2913 [StructLayout(LayoutKind.Explicit)]
2914 struct PollNextOverlayEventUnion
2915 {
2916 [FieldOffset(0)]
2917 public IVROverlay._PollNextOverlayEvent pPollNextOverlayEvent;
2918 [FieldOffset(0)]
2919 public _PollNextOverlayEventPacked pPollNextOverlayEventPacked;
2920 }
2921 public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
2922 {
2923#if !UNITY_METRO
2924 if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
2925 (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
2926 {
2927 PollNextOverlayEventUnion u;
2928 VREvent_t_Packed event_packed = new VREvent_t_Packed();
2929 u.pPollNextOverlayEventPacked = null;
2930 u.pPollNextOverlayEvent = FnTable.PollNextOverlayEvent;
2931 bool packed_result = u.pPollNextOverlayEventPacked(ulOverlayHandle,ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed)));
2932
2933 event_packed.Unpack(ref pEvent);
2934 return packed_result;
2935 }
2936#endif
2937 bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent);
2938 return result;
2939 }
2940 public EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod)
2941 {
2942 EVROverlayError result = FnTable.GetOverlayInputMethod(ulOverlayHandle,ref peInputMethod);
2943 return result;
2944 }
2945 public EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROverlayInputMethod eInputMethod)
2946 {
2947 EVROverlayError result = FnTable.SetOverlayInputMethod(ulOverlayHandle,eInputMethod);
2948 return result;
2949 }
2950 public EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale)
2951 {
2952 EVROverlayError result = FnTable.GetOverlayMouseScale(ulOverlayHandle,ref pvecMouseScale);
2953 return result;
2954 }
2955 public EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale)
2956 {
2957 EVROverlayError result = FnTable.SetOverlayMouseScale(ulOverlayHandle,ref pvecMouseScale);
2958 return result;
2959 }
2960 public bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverlayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults)
2961 {
2962 bool result = FnTable.ComputeOverlayIntersection(ulOverlayHandle,ref pParams,ref pResults);
2963 return result;
2964 }
2965 public bool IsHoverTargetOverlay(ulong ulOverlayHandle)
2966 {
2967 bool result = FnTable.IsHoverTargetOverlay(ulOverlayHandle);
2968 return result;
2969 }
2970 public ulong GetGamepadFocusOverlay()
2971 {
2972 ulong result = FnTable.GetGamepadFocusOverlay();
2973 return result;
2974 }
2975 public EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay)
2976 {
2977 EVROverlayError result = FnTable.SetGamepadFocusOverlay(ulNewFocusOverlay);
2978 return result;
2979 }
2980 public EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection,ulong ulFrom,ulong ulTo)
2981 {
2982 EVROverlayError result = FnTable.SetOverlayNeighbor(eDirection,ulFrom,ulTo);
2983 return result;
2984 }
2985 public EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDirection,ulong ulFrom)
2986 {
2987 EVROverlayError result = FnTable.MoveGamepadFocusToNeighbor(eDirection,ulFrom);
2988 return result;
2989 }
2990 public EVROverlayError SetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,IntPtr vCenter,float fRadius)
2991 {
2992 EVROverlayError result = FnTable.SetOverlayDualAnalogTransform(ulOverlay,eWhich,vCenter,fRadius);
2993 return result;
2994 }
2995 public EVROverlayError GetOverlayDualAnalogTransform(ulong ulOverlay,EDualAnalogWhich eWhich,ref HmdVector2_t pvCenter,ref float pfRadius)
2996 {
2997 pfRadius = 0;
2998 EVROverlayError result = FnTable.GetOverlayDualAnalogTransform(ulOverlay,eWhich,ref pvCenter,ref pfRadius);
2999 return result;
3000 }
3001 public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture)
3002 {
3003 EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHandle,ref pTexture);
3004 return result;
3005 }
3006 public EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle)
3007 {
3008 EVROverlayError result = FnTable.ClearOverlayTexture(ulOverlayHandle);
3009 return result;
3010 }
3011 public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unDepth)
3012 {
3013 EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unDepth);
3014 return result;
3015 }
3016 public EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath)
3017 {
3018 EVROverlayError result = FnTable.SetOverlayFromFile(ulOverlayHandle,pchFilePath);
3019 return result;
3020 }
3021 public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref ETextureType pAPIType,ref EColorSpace pColorSpace,ref VRTextureBounds_t pTextureBounds)
3022 {
3023 pWidth = 0;
3024 pHeight = 0;
3025 pNativeFormat = 0;
3026 EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPIType,ref pColorSpace,ref pTextureBounds);
3027 return result;
3028 }
3029 public EVROverlayError ReleaseNativeOverlayHandle(ulong ulOverlayHandle,IntPtr pNativeTextureHandle)
3030 {
3031 EVROverlayError result = FnTable.ReleaseNativeOverlayHandle(ulOverlayHandle,pNativeTextureHandle);
3032 return result;
3033 }
3034 public EVROverlayError GetOverlayTextureSize(ulong ulOverlayHandle,ref uint pWidth,ref uint pHeight)
3035 {
3036 pWidth = 0;
3037 pHeight = 0;
3038 EVROverlayError result = FnTable.GetOverlayTextureSize(ulOverlayHandle,ref pWidth,ref pHeight);
3039 return result;
3040 }
3041 public EVROverlayError CreateDashboardOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle)
3042 {
3043 pMainHandle = 0;
3044 pThumbnailHandle = 0;
3045 EVROverlayError result = FnTable.CreateDashboardOverlay(pchOverlayKey,pchOverlayFriendlyName,ref pMainHandle,ref pThumbnailHandle);
3046 return result;
3047 }
3048 public bool IsDashboardVisible()
3049 {
3050 bool result = FnTable.IsDashboardVisible();
3051 return result;
3052 }
3053 public bool IsActiveDashboardOverlay(ulong ulOverlayHandle)
3054 {
3055 bool result = FnTable.IsActiveDashboardOverlay(ulOverlayHandle);
3056 return result;
3057 }
3058 public EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle,uint unProcessId)
3059 {
3060 EVROverlayError result = FnTable.SetDashboardOverlaySceneProcess(ulOverlayHandle,unProcessId);
3061 return result;
3062 }
3063 public EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle,ref uint punProcessId)
3064 {
3065 punProcessId = 0;
3066 EVROverlayError result = FnTable.GetDashboardOverlaySceneProcess(ulOverlayHandle,ref punProcessId);
3067 return result;
3068 }
3069 public void ShowDashboard(string pchOverlayToShow)
3070 {
3071 FnTable.ShowDashboard(pchOverlayToShow);
3072 }
3073 public uint GetPrimaryDashboardDevice()
3074 {
3075 uint result = FnTable.GetPrimaryDashboardDevice();
3076 return result;
3077 }
3078 public EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue)
3079 {
3080 EVROverlayError result = FnTable.ShowKeyboard(eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue);
3081 return result;
3082 }
3083 public EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,ulong uUserValue)
3084 {
3085 EVROverlayError result = FnTable.ShowKeyboardForOverlay(ulOverlayHandle,eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue);
3086 return result;
3087 }
3088 public uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText)
3089 {
3090 uint result = FnTable.GetKeyboardText(pchText,cchText);
3091 return result;
3092 }
3093 public void HideKeyboard()
3094 {
3095 FnTable.HideKeyboard();
3096 }
3097 public void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform)
3098 {
3099 FnTable.SetKeyboardTransformAbsolute(eTrackingOrigin,ref pmatTrackingOriginToKeyboardTransform);
3100 }
3101 public void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2_t avoidRect)
3102 {
3103 FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect);
3104 }
3105 public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize)
3106 {
3107 EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
3108 return result;
3109 }
3110 public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags)
3111 {
3112 pFlags = 0;
3113 EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags);
3114 return result;
3115 }
3116 public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text)
3117 {
3118 VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchText,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text);
3119 return result;
3120 }
3121 public void CloseMessageOverlay()
3122 {
3123 FnTable.CloseMessageOverlay();
3124 }
3125}
3126
3127
3128public class CVRRenderModels
3129{
3130 IVRRenderModels FnTable;
3131 internal CVRRenderModels(IntPtr pInterface)
3132 {
3133 FnTable = (IVRRenderModels)Marshal.PtrToStructure(pInterface, typeof(IVRRenderModels));
3134 }
3135 public EVRRenderModelError LoadRenderModel_Async(string pchRenderModelName,ref IntPtr ppRenderModel)
3136 {
3137 EVRRenderModelError result = FnTable.LoadRenderModel_Async(pchRenderModelName,ref ppRenderModel);
3138 return result;
3139 }
3140 public void FreeRenderModel(IntPtr pRenderModel)
3141 {
3142 FnTable.FreeRenderModel(pRenderModel);
3143 }
3144 public EVRRenderModelError LoadTexture_Async(int textureId,ref IntPtr ppTexture)
3145 {
3146 EVRRenderModelError result = FnTable.LoadTexture_Async(textureId,ref ppTexture);
3147 return result;
3148 }
3149 public void FreeTexture(IntPtr pTexture)
3150 {
3151 FnTable.FreeTexture(pTexture);
3152 }
3153 public EVRRenderModelError LoadTextureD3D11_Async(int textureId,IntPtr pD3D11Device,ref IntPtr ppD3D11Texture2D)
3154 {
3155 EVRRenderModelError result = FnTable.LoadTextureD3D11_Async(textureId,pD3D11Device,ref ppD3D11Texture2D);
3156 return result;
3157 }
3158 public EVRRenderModelError LoadIntoTextureD3D11_Async(int textureId,IntPtr pDstTexture)
3159 {
3160 EVRRenderModelError result = FnTable.LoadIntoTextureD3D11_Async(textureId,pDstTexture);
3161 return result;
3162 }
3163 public void FreeTextureD3D11(IntPtr pD3D11Texture2D)
3164 {
3165 FnTable.FreeTextureD3D11(pD3D11Texture2D);
3166 }
3167 public uint GetRenderModelName(uint unRenderModelIndex,System.Text.StringBuilder pchRenderModelName,uint unRenderModelNameLen)
3168 {
3169 uint result = FnTable.GetRenderModelName(unRenderModelIndex,pchRenderModelName,unRenderModelNameLen);
3170 return result;
3171 }
3172 public uint GetRenderModelCount()
3173 {
3174 uint result = FnTable.GetRenderModelCount();
3175 return result;
3176 }
3177 public uint GetComponentCount(string pchRenderModelName)
3178 {
3179 uint result = FnTable.GetComponentCount(pchRenderModelName);
3180 return result;
3181 }
3182 public uint GetComponentName(string pchRenderModelName,uint unComponentIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameLen)
3183 {
3184 uint result = FnTable.GetComponentName(pchRenderModelName,unComponentIndex,pchComponentName,unComponentNameLen);
3185 return result;
3186 }
3187 public ulong GetComponentButtonMask(string pchRenderModelName,string pchComponentName)
3188 {
3189 ulong result = FnTable.GetComponentButtonMask(pchRenderModelName,pchComponentName);
3190 return result;
3191 }
3192 public uint GetComponentRenderModelName(string pchRenderModelName,string pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unComponentRenderModelNameLen)
3193 {
3194 uint result = FnTable.GetComponentRenderModelName(pchRenderModelName,pchComponentName,pchComponentRenderModelName,unComponentRenderModelNameLen);
3195 return result;
3196 }
3197 public bool GetComponentStateForDevicePath(string pchRenderModelName,string pchComponentName,ulong devicePath,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
3198 {
3199 bool result = FnTable.GetComponentStateForDevicePath(pchRenderModelName,pchComponentName,devicePath,ref pState,ref pComponentState);
3200 return result;
3201 }
3202// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
3203// originally mis-compiled with the wrong packing for Linux and OSX.
3204 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
3205 internal delegate bool _GetComponentStatePacked(string pchRenderModelName,string pchComponentName,ref VRControllerState_t_Packed pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState);
3206 [StructLayout(LayoutKind.Explicit)]
3207 struct GetComponentStateUnion
3208 {
3209 [FieldOffset(0)]
3210 public IVRRenderModels._GetComponentState pGetComponentState;
3211 [FieldOffset(0)]
3212 public _GetComponentStatePacked pGetComponentStatePacked;
3213 }
3214 public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
3215 {
3216#if !UNITY_METRO
3217 if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
3218 (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
3219 {
3220 GetComponentStateUnion u;
3221 VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
3222 u.pGetComponentStatePacked = null;
3223 u.pGetComponentState = FnTable.GetComponentState;
3224 bool packed_result = u.pGetComponentStatePacked(pchRenderModelName,pchComponentName,ref state_packed,ref pState,ref pComponentState);
3225
3226 state_packed.Unpack(ref pControllerState);
3227 return packed_result;
3228 }
3229#endif
3230 bool result = FnTable.GetComponentState(pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState);
3231 return result;
3232 }
3233 public bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName)
3234 {
3235 bool result = FnTable.RenderModelHasComponent(pchRenderModelName,pchComponentName);
3236 return result;
3237 }
3238 public uint GetRenderModelThumbnailURL(string pchRenderModelName,System.Text.StringBuilder pchThumbnailURL,uint unThumbnailURLLen,ref EVRRenderModelError peError)
3239 {
3240 uint result = FnTable.GetRenderModelThumbnailURL(pchRenderModelName,pchThumbnailURL,unThumbnailURLLen,ref peError);
3241 return result;
3242 }
3243 public uint GetRenderModelOriginalPath(string pchRenderModelName,System.Text.StringBuilder pchOriginalPath,uint unOriginalPathLen,ref EVRRenderModelError peError)
3244 {
3245 uint result = FnTable.GetRenderModelOriginalPath(pchRenderModelName,pchOriginalPath,unOriginalPathLen,ref peError);
3246 return result;
3247 }
3248 public string GetRenderModelErrorNameFromEnum(EVRRenderModelError error)
3249 {
3250 IntPtr result = FnTable.GetRenderModelErrorNameFromEnum(error);
3251 return Marshal.PtrToStringAnsi(result);
3252 }
3253}
3254
3255
3256public class CVRNotifications
3257{
3258 IVRNotifications FnTable;
3259 internal CVRNotifications(IntPtr pInterface)
3260 {
3261 FnTable = (IVRNotifications)Marshal.PtrToStructure(pInterface, typeof(IVRNotifications));
3262 }
3263 public EVRNotificationError CreateNotification(ulong ulOverlayHandle,ulong ulUserValue,EVRNotificationType type,string pchText,EVRNotificationStyle style,ref NotificationBitmap_t pImage,ref uint pNotificationId)
3264 {
3265 pNotificationId = 0;
3266 EVRNotificationError result = FnTable.CreateNotification(ulOverlayHandle,ulUserValue,type,pchText,style,ref pImage,ref pNotificationId);
3267 return result;
3268 }
3269 public EVRNotificationError RemoveNotification(uint notificationId)
3270 {
3271 EVRNotificationError result = FnTable.RemoveNotification(notificationId);
3272 return result;
3273 }
3274}
3275
3276
3277public class CVRSettings
3278{
3279 IVRSettings FnTable;
3280 internal CVRSettings(IntPtr pInterface)
3281 {
3282 FnTable = (IVRSettings)Marshal.PtrToStructure(pInterface, typeof(IVRSettings));
3283 }
3284 public string GetSettingsErrorNameFromEnum(EVRSettingsError eError)
3285 {
3286 IntPtr result = FnTable.GetSettingsErrorNameFromEnum(eError);
3287 return Marshal.PtrToStringAnsi(result);
3288 }
3289 public bool Sync(bool bForce,ref EVRSettingsError peError)
3290 {
3291 bool result = FnTable.Sync(bForce,ref peError);
3292 return result;
3293 }
3294 public void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError)
3295 {
3296 FnTable.SetBool(pchSection,pchSettingsKey,bValue,ref peError);
3297 }
3298 public void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref EVRSettingsError peError)
3299 {
3300 FnTable.SetInt32(pchSection,pchSettingsKey,nValue,ref peError);
3301 }
3302 public void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref EVRSettingsError peError)
3303 {
3304 FnTable.SetFloat(pchSection,pchSettingsKey,flValue,ref peError);
3305 }
3306 public void SetString(string pchSection,string pchSettingsKey,string pchValue,ref EVRSettingsError peError)
3307 {
3308 FnTable.SetString(pchSection,pchSettingsKey,pchValue,ref peError);
3309 }
3310 public bool GetBool(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
3311 {
3312 bool result = FnTable.GetBool(pchSection,pchSettingsKey,ref peError);
3313 return result;
3314 }
3315 public int GetInt32(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
3316 {
3317 int result = FnTable.GetInt32(pchSection,pchSettingsKey,ref peError);
3318 return result;
3319 }
3320 public float GetFloat(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
3321 {
3322 float result = FnTable.GetFloat(pchSection,pchSettingsKey,ref peError);
3323 return result;
3324 }
3325 public void GetString(string pchSection,string pchSettingsKey,System.Text.StringBuilder pchValue,uint unValueLen,ref EVRSettingsError peError)
3326 {
3327 FnTable.GetString(pchSection,pchSettingsKey,pchValue,unValueLen,ref peError);
3328 }
3329 public void RemoveSection(string pchSection,ref EVRSettingsError peError)
3330 {
3331 FnTable.RemoveSection(pchSection,ref peError);
3332 }
3333 public void RemoveKeyInSection(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
3334 {
3335 FnTable.RemoveKeyInSection(pchSection,pchSettingsKey,ref peError);
3336 }
3337}
3338
3339
3340public class CVRScreenshots
3341{
3342 IVRScreenshots FnTable;
3343 internal CVRScreenshots(IntPtr pInterface)
3344 {
3345 FnTable = (IVRScreenshots)Marshal.PtrToStructure(pInterface, typeof(IVRScreenshots));
3346 }
3347 public EVRScreenshotError RequestScreenshot(ref uint pOutScreenshotHandle,EVRScreenshotType type,string pchPreviewFilename,string pchVRFilename)
3348 {
3349 pOutScreenshotHandle = 0;
3350 EVRScreenshotError result = FnTable.RequestScreenshot(ref pOutScreenshotHandle,type,pchPreviewFilename,pchVRFilename);
3351 return result;
3352 }
3353 public EVRScreenshotError HookScreenshot(EVRScreenshotType [] pSupportedTypes)
3354 {
3355 EVRScreenshotError result = FnTable.HookScreenshot(pSupportedTypes,(int) pSupportedTypes.Length);
3356 return result;
3357 }
3358 public EVRScreenshotType GetScreenshotPropertyType(uint screenshotHandle,ref EVRScreenshotError pError)
3359 {
3360 EVRScreenshotType result = FnTable.GetScreenshotPropertyType(screenshotHandle,ref pError);
3361 return result;
3362 }
3363 public uint GetScreenshotPropertyFilename(uint screenshotHandle,EVRScreenshotPropertyFilenames filenameType,System.Text.StringBuilder pchFilename,uint cchFilename,ref EVRScreenshotError pError)
3364 {
3365 uint result = FnTable.GetScreenshotPropertyFilename(screenshotHandle,filenameType,pchFilename,cchFilename,ref pError);
3366 return result;
3367 }
3368 public EVRScreenshotError UpdateScreenshotProgress(uint screenshotHandle,float flProgress)
3369 {
3370 EVRScreenshotError result = FnTable.UpdateScreenshotProgress(screenshotHandle,flProgress);
3371 return result;
3372 }
3373 public EVRScreenshotError TakeStereoScreenshot(ref uint pOutScreenshotHandle,string pchPreviewFilename,string pchVRFilename)
3374 {
3375 pOutScreenshotHandle = 0;
3376 EVRScreenshotError result = FnTable.TakeStereoScreenshot(ref pOutScreenshotHandle,pchPreviewFilename,pchVRFilename);
3377 return result;
3378 }
3379 public EVRScreenshotError SubmitScreenshot(uint screenshotHandle,EVRScreenshotType type,string pchSourcePreviewFilename,string pchSourceVRFilename)
3380 {
3381 EVRScreenshotError result = FnTable.SubmitScreenshot(screenshotHandle,type,pchSourcePreviewFilename,pchSourceVRFilename);
3382 return result;
3383 }
3384}
3385
3386
3387public class CVRResources
3388{
3389 IVRResources FnTable;
3390 internal CVRResources(IntPtr pInterface)
3391 {
3392 FnTable = (IVRResources)Marshal.PtrToStructure(pInterface, typeof(IVRResources));
3393 }
3394 public uint LoadSharedResource(string pchResourceName,string pchBuffer,uint unBufferLen)
3395 {
3396 uint result = FnTable.LoadSharedResource(pchResourceName,pchBuffer,unBufferLen);
3397 return result;
3398 }
3399 public uint GetResourceFullPath(string pchResourceName,string pchResourceTypeDirectory,System.Text.StringBuilder pchPathBuffer,uint unBufferLen)
3400 {
3401 uint result = FnTable.GetResourceFullPath(pchResourceName,pchResourceTypeDirectory,pchPathBuffer,unBufferLen);
3402 return result;
3403 }
3404}
3405
3406
3407public class CVRDriverManager
3408{
3409 IVRDriverManager FnTable;
3410 internal CVRDriverManager(IntPtr pInterface)
3411 {
3412 FnTable = (IVRDriverManager)Marshal.PtrToStructure(pInterface, typeof(IVRDriverManager));
3413 }
3414 public uint GetDriverCount()
3415 {
3416 uint result = FnTable.GetDriverCount();
3417 return result;
3418 }
3419 public uint GetDriverName(uint nDriver,System.Text.StringBuilder pchValue,uint unBufferSize)
3420 {
3421 uint result = FnTable.GetDriverName(nDriver,pchValue,unBufferSize);
3422 return result;
3423 }
3424 public ulong GetDriverHandle(string pchDriverName)
3425 {
3426 ulong result = FnTable.GetDriverHandle(pchDriverName);
3427 return result;
3428 }
3429}
3430
3431
3432public class CVRInput
3433{
3434 IVRInput FnTable;
3435 internal CVRInput(IntPtr pInterface)
3436 {
3437 FnTable = (IVRInput)Marshal.PtrToStructure(pInterface, typeof(IVRInput));
3438 }
3439 public EVRInputError SetActionManifestPath(string pchActionManifestPath)
3440 {
3441 EVRInputError result = FnTable.SetActionManifestPath(pchActionManifestPath);
3442 return result;
3443 }
3444 public EVRInputError GetActionSetHandle(string pchActionSetName,ref ulong pHandle)
3445 {
3446 pHandle = 0;
3447 EVRInputError result = FnTable.GetActionSetHandle(pchActionSetName,ref pHandle);
3448 return result;
3449 }
3450 public EVRInputError GetActionHandle(string pchActionName,ref ulong pHandle)
3451 {
3452 pHandle = 0;
3453 EVRInputError result = FnTable.GetActionHandle(pchActionName,ref pHandle);
3454 return result;
3455 }
3456 public EVRInputError GetInputSourceHandle(string pchInputSourcePath,ref ulong pHandle)
3457 {
3458 pHandle = 0;
3459 EVRInputError result = FnTable.GetInputSourceHandle(pchInputSourcePath,ref pHandle);
3460 return result;
3461 }
3462 public EVRInputError UpdateActionState(VRActiveActionSet_t [] pSets,uint unSizeOfVRSelectedActionSet_t)
3463 {
3464 EVRInputError result = FnTable.UpdateActionState(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length);
3465 return result;
3466 }
3467 public EVRInputError GetDigitalActionData(ulong action,ref InputDigitalActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
3468 {
3469 EVRInputError result = FnTable.GetDigitalActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice);
3470 return result;
3471 }
3472 public EVRInputError GetAnalogActionData(ulong action,ref InputAnalogActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
3473 {
3474 EVRInputError result = FnTable.GetAnalogActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice);
3475 return result;
3476 }
3477 public EVRInputError GetPoseActionData(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
3478 {
3479 EVRInputError result = FnTable.GetPoseActionData(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice);
3480 return result;
3481 }
3482 public EVRInputError GetSkeletalActionData(ulong action,ref InputSkeletalActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
3483 {
3484 EVRInputError result = FnTable.GetSkeletalActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice);
3485 return result;
3486 }
3487 public EVRInputError GetSkeletalBoneData(ulong action,EVRSkeletalTransformSpace eTransformSpace,EVRSkeletalMotionRange eMotionRange,VRBoneTransform_t [] pTransformArray,ulong ulRestrictToDevice)
3488 {
3489 EVRInputError result = FnTable.GetSkeletalBoneData(action,eTransformSpace,eMotionRange,pTransformArray,(uint) pTransformArray.Length,ulRestrictToDevice);
3490 return result;
3491 }
3492 public EVRInputError GetSkeletalBoneDataCompressed(ulong action,EVRSkeletalTransformSpace eTransformSpace,EVRSkeletalMotionRange eMotionRange,IntPtr pvCompressedData,uint unCompressedSize,ref uint punRequiredCompressedSize,ulong ulRestrictToDevice)
3493 {
3494 punRequiredCompressedSize = 0;
3495 EVRInputError result = FnTable.GetSkeletalBoneDataCompressed(action,eTransformSpace,eMotionRange,pvCompressedData,unCompressedSize,ref punRequiredCompressedSize,ulRestrictToDevice);
3496 return result;
3497 }
3498 public EVRInputError DecompressSkeletalBoneData(IntPtr pvCompressedBuffer,uint unCompressedBufferSize,ref EVRSkeletalTransformSpace peTransformSpace,VRBoneTransform_t [] pTransformArray)
3499 {
3500 EVRInputError result = FnTable.DecompressSkeletalBoneData(pvCompressedBuffer,unCompressedBufferSize,ref peTransformSpace,pTransformArray,(uint) pTransformArray.Length);
3501 return result;
3502 }
3503 public EVRInputError TriggerHapticVibrationAction(ulong action,float fStartSecondsFromNow,float fDurationSeconds,float fFrequency,float fAmplitude,ulong ulRestrictToDevice)
3504 {
3505 EVRInputError result = FnTable.TriggerHapticVibrationAction(action,fStartSecondsFromNow,fDurationSeconds,fFrequency,fAmplitude,ulRestrictToDevice);
3506 return result;
3507 }
3508 public EVRInputError GetActionOrigins(ulong actionSetHandle,ulong digitalActionHandle,ulong [] originsOut)
3509 {
3510 EVRInputError result = FnTable.GetActionOrigins(actionSetHandle,digitalActionHandle,originsOut,(uint) originsOut.Length);
3511 return result;
3512 }
3513 public EVRInputError GetOriginLocalizedName(ulong origin,System.Text.StringBuilder pchNameArray,uint unNameArraySize)
3514 {
3515 EVRInputError result = FnTable.GetOriginLocalizedName(origin,pchNameArray,unNameArraySize);
3516 return result;
3517 }
3518 public EVRInputError GetOriginTrackedDeviceInfo(ulong origin,ref InputOriginInfo_t pOriginInfo,uint unOriginInfoSize)
3519 {
3520 EVRInputError result = FnTable.GetOriginTrackedDeviceInfo(origin,ref pOriginInfo,unOriginInfoSize);
3521 return result;
3522 }
3523 public EVRInputError ShowActionOrigins(ulong actionSetHandle,ulong ulActionHandle)
3524 {
3525 EVRInputError result = FnTable.ShowActionOrigins(actionSetHandle,ulActionHandle);
3526 return result;
3527 }
3528 public EVRInputError ShowBindingsForActionSet(VRActiveActionSet_t [] pSets,uint unSizeOfVRSelectedActionSet_t,ulong originToHighlight)
3529 {
3530 EVRInputError result = FnTable.ShowBindingsForActionSet(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length,originToHighlight);
3531 return result;
3532 }
3533}
3534
3535
3536public class CVRIOBuffer
3537{
3538 IVRIOBuffer FnTable;
3539 internal CVRIOBuffer(IntPtr pInterface)
3540 {
3541 FnTable = (IVRIOBuffer)Marshal.PtrToStructure(pInterface, typeof(IVRIOBuffer));
3542 }
3543 public EIOBufferError Open(string pchPath,EIOBufferMode mode,uint unElementSize,uint unElements,ref ulong pulBuffer)
3544 {
3545 pulBuffer = 0;
3546 EIOBufferError result = FnTable.Open(pchPath,mode,unElementSize,unElements,ref pulBuffer);
3547 return result;
3548 }
3549 public EIOBufferError Close(ulong ulBuffer)
3550 {
3551 EIOBufferError result = FnTable.Close(ulBuffer);
3552 return result;
3553 }
3554 public EIOBufferError Read(ulong ulBuffer,IntPtr pDst,uint unBytes,ref uint punRead)
3555 {
3556 punRead = 0;
3557 EIOBufferError result = FnTable.Read(ulBuffer,pDst,unBytes,ref punRead);
3558 return result;
3559 }
3560 public EIOBufferError Write(ulong ulBuffer,IntPtr pSrc,uint unBytes)
3561 {
3562 EIOBufferError result = FnTable.Write(ulBuffer,pSrc,unBytes);
3563 return result;
3564 }
3565 public ulong PropertyContainer(ulong ulBuffer)
3566 {
3567 ulong result = FnTable.PropertyContainer(ulBuffer);
3568 return result;
3569 }
3570}
3571
3572
3573public class CVRSpatialAnchors
3574{
3575 IVRSpatialAnchors FnTable;
3576 internal CVRSpatialAnchors(IntPtr pInterface)
3577 {
3578 FnTable = (IVRSpatialAnchors)Marshal.PtrToStructure(pInterface, typeof(IVRSpatialAnchors));
3579 }
3580 public EVRSpatialAnchorError CreateSpatialAnchorFromDescriptor(string pchDescriptor,ref uint pHandleOut)
3581 {
3582 pHandleOut = 0;
3583 EVRSpatialAnchorError result = FnTable.CreateSpatialAnchorFromDescriptor(pchDescriptor,ref pHandleOut);
3584 return result;
3585 }
3586 public EVRSpatialAnchorError CreateSpatialAnchorFromPose(uint unDeviceIndex,ETrackingUniverseOrigin eOrigin,ref SpatialAnchorPose_t pPose,ref uint pHandleOut)
3587 {
3588 pHandleOut = 0;
3589 EVRSpatialAnchorError result = FnTable.CreateSpatialAnchorFromPose(unDeviceIndex,eOrigin,ref pPose,ref pHandleOut);
3590 return result;
3591 }
3592 public EVRSpatialAnchorError GetSpatialAnchorPose(uint unHandle,ETrackingUniverseOrigin eOrigin,ref SpatialAnchorPose_t pPoseOut)
3593 {
3594 EVRSpatialAnchorError result = FnTable.GetSpatialAnchorPose(unHandle,eOrigin,ref pPoseOut);
3595 return result;
3596 }
3597 public EVRSpatialAnchorError GetSpatialAnchorDescriptor(uint unHandle,System.Text.StringBuilder pchDescriptorOut,ref uint punDescriptorBufferLenInOut)
3598 {
3599 punDescriptorBufferLenInOut = 0;
3600 EVRSpatialAnchorError result = FnTable.GetSpatialAnchorDescriptor(unHandle,pchDescriptorOut,ref punDescriptorBufferLenInOut);
3601 return result;
3602 }
3603}
3604
3605
3606public class OpenVRInterop
3607{
3608 [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)]
3609 internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType);
3610 [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal2", CallingConvention = CallingConvention.Cdecl)]
3611 internal static extern uint InitInternal2(ref EVRInitError peError, EVRApplicationType eApplicationType,[In, MarshalAs(UnmanagedType.LPStr)] string pStartupInfo);
3612 [DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal", CallingConvention = CallingConvention.Cdecl)]
3613 internal static extern void ShutdownInternal();
3614 [DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent", CallingConvention = CallingConvention.Cdecl)]
3615 internal static extern bool IsHmdPresent();
3616 [DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled", CallingConvention = CallingConvention.Cdecl)]
3617 internal static extern bool IsRuntimeInstalled();
3618 [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError", CallingConvention = CallingConvention.Cdecl)]
3619 internal static extern IntPtr GetStringForHmdError(EVRInitError error);
3620 [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface", CallingConvention = CallingConvention.Cdecl)]
3621 internal static extern IntPtr GetGenericInterface([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion, ref EVRInitError peError);
3622 [DllImportAttribute("openvr_api", EntryPoint = "VR_IsInterfaceVersionValid", CallingConvention = CallingConvention.Cdecl)]
3623 internal static extern bool IsInterfaceVersionValid([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion);
3624 [DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken", CallingConvention = CallingConvention.Cdecl)]
3625 internal static extern uint GetInitToken();
3626}
3627
3628
3629public enum EVREye
3630{
3631 Eye_Left = 0,
3632 Eye_Right = 1,
3633}
3634public enum ETextureType
3635{
3636 Invalid = -1,
3637 DirectX = 0,
3638 OpenGL = 1,
3639 Vulkan = 2,
3640 IOSurface = 3,
3641 DirectX12 = 4,
3642 DXGISharedHandle = 5,
3643 Metal = 6,
3644}
3645public enum EColorSpace
3646{
3647 Auto = 0,
3648 Gamma = 1,
3649 Linear = 2,
3650}
3651public enum ETrackingResult
3652{
3653 Uninitialized = 1,
3654 Calibrating_InProgress = 100,
3655 Calibrating_OutOfRange = 101,
3656 Running_OK = 200,
3657 Running_OutOfRange = 201,
3658}
3659public enum ETrackedDeviceClass
3660{
3661 Invalid = 0,
3662 HMD = 1,
3663 Controller = 2,
3664 GenericTracker = 3,
3665 TrackingReference = 4,
3666 DisplayRedirect = 5,
3667 Max = 6,
3668}
3669public enum ETrackedControllerRole
3670{
3671 Invalid = 0,
3672 LeftHand = 1,
3673 RightHand = 2,
3674 OptOut = 3,
3675 Max = 4,
3676}
3677public enum ETrackingUniverseOrigin
3678{
3679 TrackingUniverseSeated = 0,
3680 TrackingUniverseStanding = 1,
3681 TrackingUniverseRawAndUncalibrated = 2,
3682}
3683public enum ETrackedDeviceProperty
3684{
3685 Prop_Invalid = 0,
3686 Prop_TrackingSystemName_String = 1000,
3687 Prop_ModelNumber_String = 1001,
3688 Prop_SerialNumber_String = 1002,
3689 Prop_RenderModelName_String = 1003,
3690 Prop_WillDriftInYaw_Bool = 1004,
3691 Prop_ManufacturerName_String = 1005,
3692 Prop_TrackingFirmwareVersion_String = 1006,
3693 Prop_HardwareRevision_String = 1007,
3694 Prop_AllWirelessDongleDescriptions_String = 1008,
3695 Prop_ConnectedWirelessDongle_String = 1009,
3696 Prop_DeviceIsWireless_Bool = 1010,
3697 Prop_DeviceIsCharging_Bool = 1011,
3698 Prop_DeviceBatteryPercentage_Float = 1012,
3699 Prop_StatusDisplayTransform_Matrix34 = 1013,
3700 Prop_Firmware_UpdateAvailable_Bool = 1014,
3701 Prop_Firmware_ManualUpdate_Bool = 1015,
3702 Prop_Firmware_ManualUpdateURL_String = 1016,
3703 Prop_HardwareRevision_Uint64 = 1017,
3704 Prop_FirmwareVersion_Uint64 = 1018,
3705 Prop_FPGAVersion_Uint64 = 1019,
3706 Prop_VRCVersion_Uint64 = 1020,
3707 Prop_RadioVersion_Uint64 = 1021,
3708 Prop_DongleVersion_Uint64 = 1022,
3709 Prop_BlockServerShutdown_Bool = 1023,
3710 Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024,
3711 Prop_ContainsProximitySensor_Bool = 1025,
3712 Prop_DeviceProvidesBatteryStatus_Bool = 1026,
3713 Prop_DeviceCanPowerOff_Bool = 1027,
3714 Prop_Firmware_ProgrammingTarget_String = 1028,
3715 Prop_DeviceClass_Int32 = 1029,
3716 Prop_HasCamera_Bool = 1030,
3717 Prop_DriverVersion_String = 1031,
3718 Prop_Firmware_ForceUpdateRequired_Bool = 1032,
3719 Prop_ViveSystemButtonFixRequired_Bool = 1033,
3720 Prop_ParentDriver_Uint64 = 1034,
3721 Prop_ResourceRoot_String = 1035,
3722 Prop_RegisteredDeviceType_String = 1036,
3723 Prop_InputProfilePath_String = 1037,
3724 Prop_NeverTracked_Bool = 1038,
3725 Prop_NumCameras_Int32 = 1039,
3726 Prop_CameraFrameLayout_Int32 = 1040,
3727 Prop_ReportsTimeSinceVSync_Bool = 2000,
3728 Prop_SecondsFromVsyncToPhotons_Float = 2001,
3729 Prop_DisplayFrequency_Float = 2002,
3730 Prop_UserIpdMeters_Float = 2003,
3731 Prop_CurrentUniverseId_Uint64 = 2004,
3732 Prop_PreviousUniverseId_Uint64 = 2005,
3733 Prop_DisplayFirmwareVersion_Uint64 = 2006,
3734 Prop_IsOnDesktop_Bool = 2007,
3735 Prop_DisplayMCType_Int32 = 2008,
3736 Prop_DisplayMCOffset_Float = 2009,
3737 Prop_DisplayMCScale_Float = 2010,
3738 Prop_EdidVendorID_Int32 = 2011,
3739 Prop_DisplayMCImageLeft_String = 2012,
3740 Prop_DisplayMCImageRight_String = 2013,
3741 Prop_DisplayGCBlackClamp_Float = 2014,
3742 Prop_EdidProductID_Int32 = 2015,
3743 Prop_CameraToHeadTransform_Matrix34 = 2016,
3744 Prop_DisplayGCType_Int32 = 2017,
3745 Prop_DisplayGCOffset_Float = 2018,
3746 Prop_DisplayGCScale_Float = 2019,
3747 Prop_DisplayGCPrescale_Float = 2020,
3748 Prop_DisplayGCImage_String = 2021,
3749 Prop_LensCenterLeftU_Float = 2022,
3750 Prop_LensCenterLeftV_Float = 2023,
3751 Prop_LensCenterRightU_Float = 2024,
3752 Prop_LensCenterRightV_Float = 2025,
3753 Prop_UserHeadToEyeDepthMeters_Float = 2026,
3754 Prop_CameraFirmwareVersion_Uint64 = 2027,
3755 Prop_CameraFirmwareDescription_String = 2028,
3756 Prop_DisplayFPGAVersion_Uint64 = 2029,
3757 Prop_DisplayBootloaderVersion_Uint64 = 2030,
3758 Prop_DisplayHardwareVersion_Uint64 = 2031,
3759 Prop_AudioFirmwareVersion_Uint64 = 2032,
3760 Prop_CameraCompatibilityMode_Int32 = 2033,
3761 Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
3762 Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
3763 Prop_DisplaySuppressed_Bool = 2036,
3764 Prop_DisplayAllowNightMode_Bool = 2037,
3765 Prop_DisplayMCImageWidth_Int32 = 2038,
3766 Prop_DisplayMCImageHeight_Int32 = 2039,
3767 Prop_DisplayMCImageNumChannels_Int32 = 2040,
3768 Prop_DisplayMCImageData_Binary = 2041,
3769 Prop_SecondsFromPhotonsToVblank_Float = 2042,
3770 Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
3771 Prop_DisplayDebugMode_Bool = 2044,
3772 Prop_GraphicsAdapterLuid_Uint64 = 2045,
3773 Prop_DriverProvidedChaperonePath_String = 2048,
3774 Prop_ExpectedTrackingReferenceCount_Int32 = 2049,
3775 Prop_ExpectedControllerCount_Int32 = 2050,
3776 Prop_NamedIconPathControllerLeftDeviceOff_String = 2051,
3777 Prop_NamedIconPathControllerRightDeviceOff_String = 2052,
3778 Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053,
3779 Prop_DoNotApplyPrediction_Bool = 2054,
3780 Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
3781 Prop_DistortionMeshResolution_Int32 = 2056,
3782 Prop_DriverIsDrawingControllers_Bool = 2057,
3783 Prop_DriverRequestsApplicationPause_Bool = 2058,
3784 Prop_DriverRequestsReducedRendering_Bool = 2059,
3785 Prop_MinimumIpdStepMeters_Float = 2060,
3786 Prop_AudioBridgeFirmwareVersion_Uint64 = 2061,
3787 Prop_ImageBridgeFirmwareVersion_Uint64 = 2062,
3788 Prop_ImuToHeadTransform_Matrix34 = 2063,
3789 Prop_ImuFactoryGyroBias_Vector3 = 2064,
3790 Prop_ImuFactoryGyroScale_Vector3 = 2065,
3791 Prop_ImuFactoryAccelerometerBias_Vector3 = 2066,
3792 Prop_ImuFactoryAccelerometerScale_Vector3 = 2067,
3793 Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069,
3794 Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
3795 Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
3796 Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
3797 Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203,
3798 Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204,
3799 Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205,
3800 Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206,
3801 Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207,
3802 Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208,
3803 Prop_AttachedDeviceId_String = 3000,
3804 Prop_SupportedButtons_Uint64 = 3001,
3805 Prop_Axis0Type_Int32 = 3002,
3806 Prop_Axis1Type_Int32 = 3003,
3807 Prop_Axis2Type_Int32 = 3004,
3808 Prop_Axis3Type_Int32 = 3005,
3809 Prop_Axis4Type_Int32 = 3006,
3810 Prop_ControllerRoleHint_Int32 = 3007,
3811 Prop_FieldOfViewLeftDegrees_Float = 4000,
3812 Prop_FieldOfViewRightDegrees_Float = 4001,
3813 Prop_FieldOfViewTopDegrees_Float = 4002,
3814 Prop_FieldOfViewBottomDegrees_Float = 4003,
3815 Prop_TrackingRangeMinimumMeters_Float = 4004,
3816 Prop_TrackingRangeMaximumMeters_Float = 4005,
3817 Prop_ModeLabel_String = 4006,
3818 Prop_IconPathName_String = 5000,
3819 Prop_NamedIconPathDeviceOff_String = 5001,
3820 Prop_NamedIconPathDeviceSearching_String = 5002,
3821 Prop_NamedIconPathDeviceSearchingAlert_String = 5003,
3822 Prop_NamedIconPathDeviceReady_String = 5004,
3823 Prop_NamedIconPathDeviceReadyAlert_String = 5005,
3824 Prop_NamedIconPathDeviceNotReady_String = 5006,
3825 Prop_NamedIconPathDeviceStandby_String = 5007,
3826 Prop_NamedIconPathDeviceAlertLow_String = 5008,
3827 Prop_DisplayHiddenArea_Binary_Start = 5100,
3828 Prop_DisplayHiddenArea_Binary_End = 5150,
3829 Prop_ParentContainer = 5151,
3830 Prop_UserConfigPath_String = 6000,
3831 Prop_InstallPath_String = 6001,
3832 Prop_HasDisplayComponent_Bool = 6002,
3833 Prop_HasControllerComponent_Bool = 6003,
3834 Prop_HasCameraComponent_Bool = 6004,
3835 Prop_HasDriverDirectModeComponent_Bool = 6005,
3836 Prop_HasVirtualDisplayComponent_Bool = 6006,
3837 Prop_HasSpatialAnchorsSupport_Bool = 6007,
3838 Prop_ControllerType_String = 7000,
3839 Prop_LegacyInputProfile_String = 7001,
3840 Prop_VendorSpecific_Reserved_Start = 10000,
3841 Prop_VendorSpecific_Reserved_End = 10999,
3842 Prop_TrackedDeviceProperty_Max = 1000000,
3843}
3844public enum ETrackedPropertyError
3845{
3846 TrackedProp_Success = 0,
3847 TrackedProp_WrongDataType = 1,
3848 TrackedProp_WrongDeviceClass = 2,
3849 TrackedProp_BufferTooSmall = 3,
3850 TrackedProp_UnknownProperty = 4,
3851 TrackedProp_InvalidDevice = 5,
3852 TrackedProp_CouldNotContactServer = 6,
3853 TrackedProp_ValueNotProvidedByDevice = 7,
3854 TrackedProp_StringExceedsMaximumLength = 8,
3855 TrackedProp_NotYetAvailable = 9,
3856 TrackedProp_PermissionDenied = 10,
3857 TrackedProp_InvalidOperation = 11,
3858 TrackedProp_CannotWriteToWildcards = 12,
3859}
3860public enum EVRSubmitFlags
3861{
3862 Submit_Default = 0,
3863 Submit_LensDistortionAlreadyApplied = 1,
3864 Submit_GlRenderBuffer = 2,
3865 Submit_Reserved = 4,
3866 Submit_TextureWithPose = 8,
3867 Submit_TextureWithDepth = 16,
3868}
3869public enum EVRState
3870{
3871 Undefined = -1,
3872 Off = 0,
3873 Searching = 1,
3874 Searching_Alert = 2,
3875 Ready = 3,
3876 Ready_Alert = 4,
3877 NotReady = 5,
3878 Standby = 6,
3879 Ready_Alert_Low = 7,
3880}
3881public enum EVREventType
3882{
3883 VREvent_None = 0,
3884 VREvent_TrackedDeviceActivated = 100,
3885 VREvent_TrackedDeviceDeactivated = 101,
3886 VREvent_TrackedDeviceUpdated = 102,
3887 VREvent_TrackedDeviceUserInteractionStarted = 103,
3888 VREvent_TrackedDeviceUserInteractionEnded = 104,
3889 VREvent_IpdChanged = 105,
3890 VREvent_EnterStandbyMode = 106,
3891 VREvent_LeaveStandbyMode = 107,
3892 VREvent_TrackedDeviceRoleChanged = 108,
3893 VREvent_WatchdogWakeUpRequested = 109,
3894 VREvent_LensDistortionChanged = 110,
3895 VREvent_PropertyChanged = 111,
3896 VREvent_WirelessDisconnect = 112,
3897 VREvent_WirelessReconnect = 113,
3898 VREvent_ButtonPress = 200,
3899 VREvent_ButtonUnpress = 201,
3900 VREvent_ButtonTouch = 202,
3901 VREvent_ButtonUntouch = 203,
3902 VREvent_DualAnalog_Press = 250,
3903 VREvent_DualAnalog_Unpress = 251,
3904 VREvent_DualAnalog_Touch = 252,
3905 VREvent_DualAnalog_Untouch = 253,
3906 VREvent_DualAnalog_Move = 254,
3907 VREvent_DualAnalog_ModeSwitch1 = 255,
3908 VREvent_DualAnalog_ModeSwitch2 = 256,
3909 VREvent_DualAnalog_Cancel = 257,
3910 VREvent_MouseMove = 300,
3911 VREvent_MouseButtonDown = 301,
3912 VREvent_MouseButtonUp = 302,
3913 VREvent_FocusEnter = 303,
3914 VREvent_FocusLeave = 304,
3915 VREvent_Scroll = 305,
3916 VREvent_TouchPadMove = 306,
3917 VREvent_OverlayFocusChanged = 307,
3918 VREvent_InputFocusCaptured = 400,
3919 VREvent_InputFocusReleased = 401,
3920 VREvent_SceneFocusLost = 402,
3921 VREvent_SceneFocusGained = 403,
3922 VREvent_SceneApplicationChanged = 404,
3923 VREvent_SceneFocusChanged = 405,
3924 VREvent_InputFocusChanged = 406,
3925 VREvent_SceneApplicationSecondaryRenderingStarted = 407,
3926 VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408,
3927 VREvent_ActionBindingReloaded = 409,
3928 VREvent_HideRenderModels = 410,
3929 VREvent_ShowRenderModels = 411,
3930 VREvent_ConsoleOpened = 420,
3931 VREvent_ConsoleClosed = 421,
3932 VREvent_OverlayShown = 500,
3933 VREvent_OverlayHidden = 501,
3934 VREvent_DashboardActivated = 502,
3935 VREvent_DashboardDeactivated = 503,
3936 VREvent_DashboardThumbSelected = 504,
3937 VREvent_DashboardRequested = 505,
3938 VREvent_ResetDashboard = 506,
3939 VREvent_RenderToast = 507,
3940 VREvent_ImageLoaded = 508,
3941 VREvent_ShowKeyboard = 509,
3942 VREvent_HideKeyboard = 510,
3943 VREvent_OverlayGamepadFocusGained = 511,
3944 VREvent_OverlayGamepadFocusLost = 512,
3945 VREvent_OverlaySharedTextureChanged = 513,
3946 VREvent_ScreenshotTriggered = 516,
3947 VREvent_ImageFailed = 517,
3948 VREvent_DashboardOverlayCreated = 518,
3949 VREvent_SwitchGamepadFocus = 519,
3950 VREvent_RequestScreenshot = 520,
3951 VREvent_ScreenshotTaken = 521,
3952 VREvent_ScreenshotFailed = 522,
3953 VREvent_SubmitScreenshotToDashboard = 523,
3954 VREvent_ScreenshotProgressToDashboard = 524,
3955 VREvent_PrimaryDashboardDeviceChanged = 525,
3956 VREvent_RoomViewShown = 526,
3957 VREvent_RoomViewHidden = 527,
3958 VREvent_Notification_Shown = 600,
3959 VREvent_Notification_Hidden = 601,
3960 VREvent_Notification_BeginInteraction = 602,
3961 VREvent_Notification_Destroyed = 603,
3962 VREvent_Quit = 700,
3963 VREvent_ProcessQuit = 701,
3964 VREvent_QuitAborted_UserPrompt = 702,
3965 VREvent_QuitAcknowledged = 703,
3966 VREvent_DriverRequestedQuit = 704,
3967 VREvent_ChaperoneDataHasChanged = 800,
3968 VREvent_ChaperoneUniverseHasChanged = 801,
3969 VREvent_ChaperoneTempDataHasChanged = 802,
3970 VREvent_ChaperoneSettingsHaveChanged = 803,
3971 VREvent_SeatedZeroPoseReset = 804,
3972 VREvent_AudioSettingsHaveChanged = 820,
3973 VREvent_BackgroundSettingHasChanged = 850,
3974 VREvent_CameraSettingsHaveChanged = 851,
3975 VREvent_ReprojectionSettingHasChanged = 852,
3976 VREvent_ModelSkinSettingsHaveChanged = 853,
3977 VREvent_EnvironmentSettingsHaveChanged = 854,
3978 VREvent_PowerSettingsHaveChanged = 855,
3979 VREvent_EnableHomeAppSettingsHaveChanged = 856,
3980 VREvent_SteamVRSectionSettingChanged = 857,
3981 VREvent_LighthouseSectionSettingChanged = 858,
3982 VREvent_NullSectionSettingChanged = 859,
3983 VREvent_UserInterfaceSectionSettingChanged = 860,
3984 VREvent_NotificationsSectionSettingChanged = 861,
3985 VREvent_KeyboardSectionSettingChanged = 862,
3986 VREvent_PerfSectionSettingChanged = 863,
3987 VREvent_DashboardSectionSettingChanged = 864,
3988 VREvent_WebInterfaceSectionSettingChanged = 865,
3989 VREvent_TrackersSectionSettingChanged = 866,
3990 VREvent_StatusUpdate = 900,
3991 VREvent_WebInterface_InstallDriverCompleted = 950,
3992 VREvent_MCImageUpdated = 1000,
3993 VREvent_FirmwareUpdateStarted = 1100,
3994 VREvent_FirmwareUpdateFinished = 1101,
3995 VREvent_KeyboardClosed = 1200,
3996 VREvent_KeyboardCharInput = 1201,
3997 VREvent_KeyboardDone = 1202,
3998 VREvent_ApplicationTransitionStarted = 1300,
3999 VREvent_ApplicationTransitionAborted = 1301,
4000 VREvent_ApplicationTransitionNewAppStarted = 1302,
4001 VREvent_ApplicationListUpdated = 1303,
4002 VREvent_ApplicationMimeTypeLoad = 1304,
4003 VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
4004 VREvent_ProcessConnected = 1306,
4005 VREvent_ProcessDisconnected = 1307,
4006 VREvent_Compositor_MirrorWindowShown = 1400,
4007 VREvent_Compositor_MirrorWindowHidden = 1401,
4008 VREvent_Compositor_ChaperoneBoundsShown = 1410,
4009 VREvent_Compositor_ChaperoneBoundsHidden = 1411,
4010 VREvent_TrackedCamera_StartVideoStream = 1500,
4011 VREvent_TrackedCamera_StopVideoStream = 1501,
4012 VREvent_TrackedCamera_PauseVideoStream = 1502,
4013 VREvent_TrackedCamera_ResumeVideoStream = 1503,
4014 VREvent_TrackedCamera_EditingSurface = 1550,
4015 VREvent_PerformanceTest_EnableCapture = 1600,
4016 VREvent_PerformanceTest_DisableCapture = 1601,
4017 VREvent_PerformanceTest_FidelityLevel = 1602,
4018 VREvent_MessageOverlay_Closed = 1650,
4019 VREvent_MessageOverlayCloseRequested = 1651,
4020 VREvent_Input_HapticVibration = 1700,
4021 VREvent_Input_BindingLoadFailed = 1701,
4022 VREvent_Input_BindingLoadSuccessful = 1702,
4023 VREvent_Input_ActionManifestReloaded = 1703,
4024 VREvent_Input_ActionManifestLoadFailed = 1704,
4025 VREvent_SpatialAnchors_PoseUpdated = 1800,
4026 VREvent_SpatialAnchors_DescriptorUpdated = 1801,
4027 VREvent_SpatialAnchors_RequestPoseUpdate = 1802,
4028 VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803,
4029 VREvent_VendorSpecific_Reserved_Start = 10000,
4030 VREvent_VendorSpecific_Reserved_End = 19999,
4031}
4032public enum EDeviceActivityLevel
4033{
4034 k_EDeviceActivityLevel_Unknown = -1,
4035 k_EDeviceActivityLevel_Idle = 0,
4036 k_EDeviceActivityLevel_UserInteraction = 1,
4037 k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
4038 k_EDeviceActivityLevel_Standby = 3,
4039}
4040public enum EVRButtonId
4041{
4042 k_EButton_System = 0,
4043 k_EButton_ApplicationMenu = 1,
4044 k_EButton_Grip = 2,
4045 k_EButton_DPad_Left = 3,
4046 k_EButton_DPad_Up = 4,
4047 k_EButton_DPad_Right = 5,
4048 k_EButton_DPad_Down = 6,
4049 k_EButton_A = 7,
4050 k_EButton_ProximitySensor = 31,
4051 k_EButton_Axis0 = 32,
4052 k_EButton_Axis1 = 33,
4053 k_EButton_Axis2 = 34,
4054 k_EButton_Axis3 = 35,
4055 k_EButton_Axis4 = 36,
4056 k_EButton_SteamVR_Touchpad = 32,
4057 k_EButton_SteamVR_Trigger = 33,
4058 k_EButton_Dashboard_Back = 2,
4059 k_EButton_Knuckles_A = 2,
4060 k_EButton_Knuckles_B = 1,
4061 k_EButton_Knuckles_JoyStick = 35,
4062 k_EButton_Max = 64,
4063}
4064public enum EVRMouseButton
4065{
4066 Left = 1,
4067 Right = 2,
4068 Middle = 4,
4069}
4070public enum EDualAnalogWhich
4071{
4072 k_EDualAnalog_Left = 0,
4073 k_EDualAnalog_Right = 1,
4074}
4075public enum EVRInputError
4076{
4077 None = 0,
4078 NameNotFound = 1,
4079 WrongType = 2,
4080 InvalidHandle = 3,
4081 InvalidParam = 4,
4082 NoSteam = 5,
4083 MaxCapacityReached = 6,
4084 IPCError = 7,
4085 NoActiveActionSet = 8,
4086 InvalidDevice = 9,
4087 InvalidSkeleton = 10,
4088 InvalidBoneCount = 11,
4089 InvalidCompressedData = 12,
4090 NoData = 13,
4091 BufferTooSmall = 14,
4092 MismatchedActionManifest = 15,
4093 MissingSkeletonData = 16,
4094}
4095public enum EVRSpatialAnchorError
4096{
4097 Success = 0,
4098 Internal = 1,
4099 UnknownHandle = 2,
4100 ArrayTooSmall = 3,
4101 InvalidDescriptorChar = 4,
4102 NotYetAvailable = 5,
4103 NotAvailableInThisUniverse = 6,
4104 PermanentlyUnavailable = 7,
4105 WrongDriver = 8,
4106 DescriptorTooLong = 9,
4107 Unknown = 10,
4108 NoRoomCalibration = 11,
4109 InvalidArgument = 12,
4110 UnknownDriver = 13,
4111}
4112public enum EHiddenAreaMeshType
4113{
4114 k_eHiddenAreaMesh_Standard = 0,
4115 k_eHiddenAreaMesh_Inverse = 1,
4116 k_eHiddenAreaMesh_LineLoop = 2,
4117 k_eHiddenAreaMesh_Max = 3,
4118}
4119public enum EVRControllerAxisType
4120{
4121 k_eControllerAxis_None = 0,
4122 k_eControllerAxis_TrackPad = 1,
4123 k_eControllerAxis_Joystick = 2,
4124 k_eControllerAxis_Trigger = 3,
4125}
4126public enum EVRControllerEventOutputType
4127{
4128 ControllerEventOutput_OSEvents = 0,
4129 ControllerEventOutput_VREvents = 1,
4130}
4131public enum ECollisionBoundsStyle
4132{
4133 COLLISION_BOUNDS_STYLE_BEGINNER = 0,
4134 COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1,
4135 COLLISION_BOUNDS_STYLE_SQUARES = 2,
4136 COLLISION_BOUNDS_STYLE_ADVANCED = 3,
4137 COLLISION_BOUNDS_STYLE_NONE = 4,
4138 COLLISION_BOUNDS_STYLE_COUNT = 5,
4139}
4140public enum EVROverlayError
4141{
4142 None = 0,
4143 UnknownOverlay = 10,
4144 InvalidHandle = 11,
4145 PermissionDenied = 12,
4146 OverlayLimitExceeded = 13,
4147 WrongVisibilityType = 14,
4148 KeyTooLong = 15,
4149 NameTooLong = 16,
4150 KeyInUse = 17,
4151 WrongTransformType = 18,
4152 InvalidTrackedDevice = 19,
4153 InvalidParameter = 20,
4154 ThumbnailCantBeDestroyed = 21,
4155 ArrayTooSmall = 22,
4156 RequestFailed = 23,
4157 InvalidTexture = 24,
4158 UnableToLoadFile = 25,
4159 KeyboardAlreadyInUse = 26,
4160 NoNeighbor = 27,
4161 TooManyMaskPrimitives = 29,
4162 BadMaskPrimitive = 30,
4163 TextureAlreadyLocked = 31,
4164 TextureLockCapacityReached = 32,
4165 TextureNotLocked = 33,
4166}
4167public enum EVRApplicationType
4168{
4169 VRApplication_Other = 0,
4170 VRApplication_Scene = 1,
4171 VRApplication_Overlay = 2,
4172 VRApplication_Background = 3,
4173 VRApplication_Utility = 4,
4174 VRApplication_VRMonitor = 5,
4175 VRApplication_SteamWatchdog = 6,
4176 VRApplication_Bootstrapper = 7,
4177 VRApplication_Max = 8,
4178}
4179public enum EVRFirmwareError
4180{
4181 None = 0,
4182 Success = 1,
4183 Fail = 2,
4184}
4185public enum EVRNotificationError
4186{
4187 OK = 0,
4188 InvalidNotificationId = 100,
4189 NotificationQueueFull = 101,
4190 InvalidOverlayHandle = 102,
4191 SystemWithUserValueAlreadyExists = 103,
4192}
4193public enum EVRSkeletalMotionRange
4194{
4195 WithController = 0,
4196 WithoutController = 1,
4197}
4198public enum EVRInitError
4199{
4200 None = 0,
4201 Unknown = 1,
4202 Init_InstallationNotFound = 100,
4203 Init_InstallationCorrupt = 101,
4204 Init_VRClientDLLNotFound = 102,
4205 Init_FileNotFound = 103,
4206 Init_FactoryNotFound = 104,
4207 Init_InterfaceNotFound = 105,
4208 Init_InvalidInterface = 106,
4209 Init_UserConfigDirectoryInvalid = 107,
4210 Init_HmdNotFound = 108,
4211 Init_NotInitialized = 109,
4212 Init_PathRegistryNotFound = 110,
4213 Init_NoConfigPath = 111,
4214 Init_NoLogPath = 112,
4215 Init_PathRegistryNotWritable = 113,
4216 Init_AppInfoInitFailed = 114,
4217 Init_Retry = 115,
4218 Init_InitCanceledByUser = 116,
4219 Init_AnotherAppLaunching = 117,
4220 Init_SettingsInitFailed = 118,
4221 Init_ShuttingDown = 119,
4222 Init_TooManyObjects = 120,
4223 Init_NoServerForBackgroundApp = 121,
4224 Init_NotSupportedWithCompositor = 122,
4225 Init_NotAvailableToUtilityApps = 123,
4226 Init_Internal = 124,
4227 Init_HmdDriverIdIsNone = 125,
4228 Init_HmdNotFoundPresenceFailed = 126,
4229 Init_VRMonitorNotFound = 127,
4230 Init_VRMonitorStartupFailed = 128,
4231 Init_LowPowerWatchdogNotSupported = 129,
4232 Init_InvalidApplicationType = 130,
4233 Init_NotAvailableToWatchdogApps = 131,
4234 Init_WatchdogDisabledInSettings = 132,
4235 Init_VRDashboardNotFound = 133,
4236 Init_VRDashboardStartupFailed = 134,
4237 Init_VRHomeNotFound = 135,
4238 Init_VRHomeStartupFailed = 136,
4239 Init_RebootingBusy = 137,
4240 Init_FirmwareUpdateBusy = 138,
4241 Init_FirmwareRecoveryBusy = 139,
4242 Init_USBServiceBusy = 140,
4243 Init_VRWebHelperStartupFailed = 141,
4244 Init_TrackerManagerInitFailed = 142,
4245 Driver_Failed = 200,
4246 Driver_Unknown = 201,
4247 Driver_HmdUnknown = 202,
4248 Driver_NotLoaded = 203,
4249 Driver_RuntimeOutOfDate = 204,
4250 Driver_HmdInUse = 205,
4251 Driver_NotCalibrated = 206,
4252 Driver_CalibrationInvalid = 207,
4253 Driver_HmdDisplayNotFound = 208,
4254 Driver_TrackedDeviceInterfaceUnknown = 209,
4255 Driver_HmdDriverIdOutOfBounds = 211,
4256 Driver_HmdDisplayMirrored = 212,
4257 IPC_ServerInitFailed = 300,
4258 IPC_ConnectFailed = 301,
4259 IPC_SharedStateInitFailed = 302,
4260 IPC_CompositorInitFailed = 303,
4261 IPC_MutexInitFailed = 304,
4262 IPC_Failed = 305,
4263 IPC_CompositorConnectFailed = 306,
4264 IPC_CompositorInvalidConnectResponse = 307,
4265 IPC_ConnectFailedAfterMultipleAttempts = 308,
4266 Compositor_Failed = 400,
4267 Compositor_D3D11HardwareRequired = 401,
4268 Compositor_FirmwareRequiresUpdate = 402,
4269 Compositor_OverlayInitFailed = 403,
4270 Compositor_ScreenshotsInitFailed = 404,
4271 Compositor_UnableToCreateDevice = 405,
4272 VendorSpecific_UnableToConnectToOculusRuntime = 1000,
4273 VendorSpecific_WindowsNotInDevMode = 1001,
4274 VendorSpecific_HmdFound_CantOpenDevice = 1101,
4275 VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
4276 VendorSpecific_HmdFound_NoStoredConfig = 1103,
4277 VendorSpecific_HmdFound_ConfigTooBig = 1104,
4278 VendorSpecific_HmdFound_ConfigTooSmall = 1105,
4279 VendorSpecific_HmdFound_UnableToInitZLib = 1106,
4280 VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107,
4281 VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108,
4282 VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109,
4283 VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110,
4284 VendorSpecific_HmdFound_UserDataAddressRange = 1111,
4285 VendorSpecific_HmdFound_UserDataError = 1112,
4286 VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
4287 Steam_SteamInstallationNotFound = 2000,
4288}
4289public enum EVRScreenshotType
4290{
4291 None = 0,
4292 Mono = 1,
4293 Stereo = 2,
4294 Cubemap = 3,
4295 MonoPanorama = 4,
4296 StereoPanorama = 5,
4297}
4298public enum EVRScreenshotPropertyFilenames
4299{
4300 Preview = 0,
4301 VR = 1,
4302}
4303public enum EVRTrackedCameraError
4304{
4305 None = 0,
4306 OperationFailed = 100,
4307 InvalidHandle = 101,
4308 InvalidFrameHeaderVersion = 102,
4309 OutOfHandles = 103,
4310 IPCFailure = 104,
4311 NotSupportedForThisDevice = 105,
4312 SharedMemoryFailure = 106,
4313 FrameBufferingFailure = 107,
4314 StreamSetupFailure = 108,
4315 InvalidGLTextureId = 109,
4316 InvalidSharedTextureHandle = 110,
4317 FailedToGetGLTextureId = 111,
4318 SharedTextureFailure = 112,
4319 NoFrameAvailable = 113,
4320 InvalidArgument = 114,
4321 InvalidFrameBufferSize = 115,
4322}
4323public enum EVRTrackedCameraFrameLayout
4324{
4325 Mono = 1,
4326 Stereo = 2,
4327 VerticalLayout = 16,
4328 HorizontalLayout = 32,
4329}
4330public enum EVRTrackedCameraFrameType
4331{
4332 Distorted = 0,
4333 Undistorted = 1,
4334 MaximumUndistorted = 2,
4335 MAX_CAMERA_FRAME_TYPES = 3,
4336}
4337public enum EVSync
4338{
4339 None = 0,
4340 WaitRender = 1,
4341 NoWaitRender = 2,
4342}
4343public enum EVRMuraCorrectionMode
4344{
4345 Default = 0,
4346 NoCorrection = 1,
4347}
4348public enum Imu_OffScaleFlags
4349{
4350 OffScale_AccelX = 1,
4351 OffScale_AccelY = 2,
4352 OffScale_AccelZ = 4,
4353 OffScale_GyroX = 8,
4354 OffScale_GyroY = 16,
4355 OffScale_GyroZ = 32,
4356}
4357public enum EVRApplicationError
4358{
4359 None = 0,
4360 AppKeyAlreadyExists = 100,
4361 NoManifest = 101,
4362 NoApplication = 102,
4363 InvalidIndex = 103,
4364 UnknownApplication = 104,
4365 IPCFailed = 105,
4366 ApplicationAlreadyRunning = 106,
4367 InvalidManifest = 107,
4368 InvalidApplication = 108,
4369 LaunchFailed = 109,
4370 ApplicationAlreadyStarting = 110,
4371 LaunchInProgress = 111,
4372 OldApplicationQuitting = 112,
4373 TransitionAborted = 113,
4374 IsTemplate = 114,
4375 SteamVRIsExiting = 115,
4376 BufferTooSmall = 200,
4377 PropertyNotSet = 201,
4378 UnknownProperty = 202,
4379 InvalidParameter = 203,
4380}
4381public enum EVRApplicationProperty
4382{
4383 Name_String = 0,
4384 LaunchType_String = 11,
4385 WorkingDirectory_String = 12,
4386 BinaryPath_String = 13,
4387 Arguments_String = 14,
4388 URL_String = 15,
4389 Description_String = 50,
4390 NewsURL_String = 51,
4391 ImagePath_String = 52,
4392 Source_String = 53,
4393 ActionManifestURL_String = 54,
4394 IsDashboardOverlay_Bool = 60,
4395 IsTemplate_Bool = 61,
4396 IsInstanced_Bool = 62,
4397 IsInternal_Bool = 63,
4398 WantsCompositorPauseInStandby_Bool = 64,
4399 LastLaunchTime_Uint64 = 70,
4400}
4401public enum EVRApplicationTransitionState
4402{
4403 VRApplicationTransition_None = 0,
4404 VRApplicationTransition_OldAppQuitSent = 10,
4405 VRApplicationTransition_WaitingForExternalLaunch = 11,
4406 VRApplicationTransition_NewAppLaunched = 20,
4407}
4408public enum ChaperoneCalibrationState
4409{
4410 OK = 1,
4411 Warning = 100,
4412 Warning_BaseStationMayHaveMoved = 101,
4413 Warning_BaseStationRemoved = 102,
4414 Warning_SeatedBoundsInvalid = 103,
4415 Error = 200,
4416 Error_BaseStationUninitialized = 201,
4417 Error_BaseStationConflict = 202,
4418 Error_PlayAreaInvalid = 203,
4419 Error_CollisionBoundsInvalid = 204,
4420}
4421public enum EChaperoneConfigFile
4422{
4423 Live = 1,
4424 Temp = 2,
4425}
4426public enum EChaperoneImportFlags
4427{
4428 EChaperoneImport_BoundsOnly = 1,
4429}
4430public enum EVRCompositorError
4431{
4432 None = 0,
4433 RequestFailed = 1,
4434 IncompatibleVersion = 100,
4435 DoNotHaveFocus = 101,
4436 InvalidTexture = 102,
4437 IsNotSceneApplication = 103,
4438 TextureIsOnWrongDevice = 104,
4439 TextureUsesUnsupportedFormat = 105,
4440 SharedTexturesNotSupported = 106,
4441 IndexOutOfRange = 107,
4442 AlreadySubmitted = 108,
4443 InvalidBounds = 109,
4444}
4445public enum EVRCompositorTimingMode
4446{
4447 Implicit = 0,
4448 Explicit_RuntimePerformsPostPresentHandoff = 1,
4449 Explicit_ApplicationPerformsPostPresentHandoff = 2,
4450}
4451public enum VROverlayInputMethod
4452{
4453 None = 0,
4454 Mouse = 1,
4455 DualAnalog = 2,
4456}
4457public enum VROverlayTransformType
4458{
4459 VROverlayTransform_Absolute = 0,
4460 VROverlayTransform_TrackedDeviceRelative = 1,
4461 VROverlayTransform_SystemOverlay = 2,
4462 VROverlayTransform_TrackedComponent = 3,
4463}
4464public enum VROverlayFlags
4465{
4466 None = 0,
4467 Curved = 1,
4468 RGSS4X = 2,
4469 NoDashboardTab = 3,
4470 AcceptsGamepadEvents = 4,
4471 ShowGamepadFocus = 5,
4472 SendVRScrollEvents = 6,
4473 SendVRTouchpadEvents = 7,
4474 ShowTouchPadScrollWheel = 8,
4475 TransferOwnershipToInternalProcess = 9,
4476 SideBySide_Parallel = 10,
4477 SideBySide_Crossed = 11,
4478 Panorama = 12,
4479 StereoPanorama = 13,
4480 SortWithNonSceneOverlays = 14,
4481 VisibleInDashboard = 15,
4482}
4483public enum VRMessageOverlayResponse
4484{
4485 ButtonPress_0 = 0,
4486 ButtonPress_1 = 1,
4487 ButtonPress_2 = 2,
4488 ButtonPress_3 = 3,
4489 CouldntFindSystemOverlay = 4,
4490 CouldntFindOrCreateClientOverlay = 5,
4491 ApplicationQuit = 6,
4492}
4493public enum EGamepadTextInputMode
4494{
4495 k_EGamepadTextInputModeNormal = 0,
4496 k_EGamepadTextInputModePassword = 1,
4497 k_EGamepadTextInputModeSubmit = 2,
4498}
4499public enum EGamepadTextInputLineMode
4500{
4501 k_EGamepadTextInputLineModeSingleLine = 0,
4502 k_EGamepadTextInputLineModeMultipleLines = 1,
4503}
4504public enum EOverlayDirection
4505{
4506 Up = 0,
4507 Down = 1,
4508 Left = 2,
4509 Right = 3,
4510 Count = 4,
4511}
4512public enum EVROverlayIntersectionMaskPrimitiveType
4513{
4514 OverlayIntersectionPrimitiveType_Rectangle = 0,
4515 OverlayIntersectionPrimitiveType_Circle = 1,
4516}
4517public enum EVRRenderModelError
4518{
4519 None = 0,
4520 Loading = 100,
4521 NotSupported = 200,
4522 InvalidArg = 300,
4523 InvalidModel = 301,
4524 NoShapes = 302,
4525 MultipleShapes = 303,
4526 TooManyVertices = 304,
4527 MultipleTextures = 305,
4528 BufferTooSmall = 306,
4529 NotEnoughNormals = 307,
4530 NotEnoughTexCoords = 308,
4531 InvalidTexture = 400,
4532}
4533public enum EVRComponentProperty
4534{
4535 IsStatic = 1,
4536 IsVisible = 2,
4537 IsTouched = 4,
4538 IsPressed = 8,
4539 IsScrolled = 16,
4540}
4541public enum EVRNotificationType
4542{
4543 Transient = 0,
4544 Persistent = 1,
4545 Transient_SystemWithUserValue = 2,
4546}
4547public enum EVRNotificationStyle
4548{
4549 None = 0,
4550 Application = 100,
4551 Contact_Disabled = 200,
4552 Contact_Enabled = 201,
4553 Contact_Active = 202,
4554}
4555public enum EVRSettingsError
4556{
4557 None = 0,
4558 IPCFailed = 1,
4559 WriteFailed = 2,
4560 ReadFailed = 3,
4561 JsonParseFailed = 4,
4562 UnsetSettingHasNoDefault = 5,
4563}
4564public enum EVRScreenshotError
4565{
4566 None = 0,
4567 RequestFailed = 1,
4568 IncompatibleVersion = 100,
4569 NotFound = 101,
4570 BufferTooSmall = 102,
4571 ScreenshotAlreadyInProgress = 108,
4572}
4573public enum EVRSkeletalTransformSpace
4574{
4575 Model = 0,
4576 Parent = 1,
4577 Additive = 2,
4578}
4579public enum EVRInputFilterCancelType
4580{
4581 VRInputFilterCancel_Timers = 0,
4582 VRInputFilterCancel_Momentum = 1,
4583}
4584public enum EIOBufferError
4585{
4586 IOBuffer_Success = 0,
4587 IOBuffer_OperationFailed = 100,
4588 IOBuffer_InvalidHandle = 101,
4589 IOBuffer_InvalidArgument = 102,
4590 IOBuffer_PathExists = 103,
4591 IOBuffer_PathDoesNotExist = 104,
4592 IOBuffer_Permission = 105,
4593}
4594public enum EIOBufferMode
4595{
4596 Read = 1,
4597 Write = 2,
4598 Create = 512,
4599}
4600
4601[StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t
4602{
4603 [FieldOffset(0)] public VREvent_Reserved_t reserved;
4604 [FieldOffset(0)] public VREvent_Controller_t controller;
4605 [FieldOffset(0)] public VREvent_Mouse_t mouse;
4606 [FieldOffset(0)] public VREvent_Scroll_t scroll;
4607 [FieldOffset(0)] public VREvent_Process_t process;
4608 [FieldOffset(0)] public VREvent_Notification_t notification;
4609 [FieldOffset(0)] public VREvent_Overlay_t overlay;
4610 [FieldOffset(0)] public VREvent_Status_t status;
4611 [FieldOffset(0)] public VREvent_Ipd_t ipd;
4612 [FieldOffset(0)] public VREvent_Chaperone_t chaperone;
4613 [FieldOffset(0)] public VREvent_PerformanceTest_t performanceTest;
4614 [FieldOffset(0)] public VREvent_TouchPadMove_t touchPadMove;
4615 [FieldOffset(0)] public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
4616 [FieldOffset(0)] public VREvent_Screenshot_t screenshot;
4617 [FieldOffset(0)] public VREvent_ScreenshotProgress_t screenshotProgress;
4618 [FieldOffset(0)] public VREvent_ApplicationLaunch_t applicationLaunch;
4619 [FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface;
4620 [FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay;
4621 [FieldOffset(0)] public VREvent_Property_t property;
4622 [FieldOffset(0)] public VREvent_DualAnalog_t dualAnalog;
4623 [FieldOffset(0)] public VREvent_HapticVibration_t hapticVibration;
4624 [FieldOffset(0)] public VREvent_WebConsole_t webConsole;
4625 [FieldOffset(0)] public VREvent_InputBindingLoad_t inputBinding;
4626 [FieldOffset(0)] public VREvent_SpatialAnchor_t spatialAnchor;
4627 [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
4628}
4629
4630
4631[StructLayout(LayoutKind.Explicit)] public struct VROverlayIntersectionMaskPrimitive_Data_t
4632{
4633 [FieldOffset(0)] public IntersectionMaskRectangle_t m_Rectangle;
4634 [FieldOffset(0)] public IntersectionMaskCircle_t m_Circle;
4635}
4636
4637[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t
4638{
4639 public float m0; //float[3][4]
4640 public float m1;
4641 public float m2;
4642 public float m3;
4643 public float m4;
4644 public float m5;
4645 public float m6;
4646 public float m7;
4647 public float m8;
4648 public float m9;
4649 public float m10;
4650 public float m11;
4651}
4652[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix33_t
4653{
4654 public float m0; //float[3][3]
4655 public float m1;
4656 public float m2;
4657 public float m3;
4658 public float m4;
4659 public float m5;
4660 public float m6;
4661 public float m7;
4662 public float m8;
4663}
4664[StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t
4665{
4666 public float m0; //float[4][4]
4667 public float m1;
4668 public float m2;
4669 public float m3;
4670 public float m4;
4671 public float m5;
4672 public float m6;
4673 public float m7;
4674 public float m8;
4675 public float m9;
4676 public float m10;
4677 public float m11;
4678 public float m12;
4679 public float m13;
4680 public float m14;
4681 public float m15;
4682}
4683[StructLayout(LayoutKind.Sequential)] public struct HmdVector3_t
4684{
4685 public float v0; //float[3]
4686 public float v1;
4687 public float v2;
4688}
4689[StructLayout(LayoutKind.Sequential)] public struct HmdVector4_t
4690{
4691 public float v0; //float[4]
4692 public float v1;
4693 public float v2;
4694 public float v3;
4695}
4696[StructLayout(LayoutKind.Sequential)] public struct HmdVector3d_t
4697{
4698 public double v0; //double[3]
4699 public double v1;
4700 public double v2;
4701}
4702[StructLayout(LayoutKind.Sequential)] public struct HmdVector2_t
4703{
4704 public float v0; //float[2]
4705 public float v1;
4706}
4707[StructLayout(LayoutKind.Sequential)] public struct HmdQuaternion_t
4708{
4709 public double w;
4710 public double x;
4711 public double y;
4712 public double z;
4713}
4714[StructLayout(LayoutKind.Sequential)] public struct HmdQuaternionf_t
4715{
4716 public float w;
4717 public float x;
4718 public float y;
4719 public float z;
4720}
4721[StructLayout(LayoutKind.Sequential)] public struct HmdColor_t
4722{
4723 public float r;
4724 public float g;
4725 public float b;
4726 public float a;
4727}
4728[StructLayout(LayoutKind.Sequential)] public struct HmdQuad_t
4729{
4730 public HmdVector3_t vCorners0; //HmdVector3_t[4]
4731 public HmdVector3_t vCorners1;
4732 public HmdVector3_t vCorners2;
4733 public HmdVector3_t vCorners3;
4734}
4735[StructLayout(LayoutKind.Sequential)] public struct HmdRect2_t
4736{
4737 public HmdVector2_t vTopLeft;
4738 public HmdVector2_t vBottomRight;
4739}
4740[StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t
4741{
4742 public float rfRed0; //float[2]
4743 public float rfRed1;
4744 public float rfGreen0; //float[2]
4745 public float rfGreen1;
4746 public float rfBlue0; //float[2]
4747 public float rfBlue1;
4748}
4749[StructLayout(LayoutKind.Sequential)] public struct Texture_t
4750{
4751 public IntPtr handle; // void *
4752 public ETextureType eType;
4753 public EColorSpace eColorSpace;
4754}
4755[StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
4756{
4757 public HmdMatrix34_t mDeviceToAbsoluteTracking;
4758 public HmdVector3_t vVelocity;
4759 public HmdVector3_t vAngularVelocity;
4760 public ETrackingResult eTrackingResult;
4761 [MarshalAs(UnmanagedType.I1)]
4762 public bool bPoseIsValid;
4763 [MarshalAs(UnmanagedType.I1)]
4764 public bool bDeviceIsConnected;
4765}
4766[StructLayout(LayoutKind.Sequential)] public struct VRTextureBounds_t
4767{
4768 public float uMin;
4769 public float vMin;
4770 public float uMax;
4771 public float vMax;
4772}
4773[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPose_t
4774{
4775 public HmdMatrix34_t mDeviceToAbsoluteTracking;
4776}
4777[StructLayout(LayoutKind.Sequential)] public struct VRTextureDepthInfo_t
4778{
4779 public IntPtr handle; // void *
4780 public HmdMatrix44_t mProjection;
4781 public HmdVector2_t vRange;
4782}
4783[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithDepth_t
4784{
4785 public VRTextureDepthInfo_t depth;
4786}
4787[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPoseAndDepth_t
4788{
4789 public VRTextureDepthInfo_t depth;
4790}
4791[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
4792{
4793 public ulong m_nImage;
4794 public IntPtr m_pDevice; // struct VkDevice_T *
4795 public IntPtr m_pPhysicalDevice; // struct VkPhysicalDevice_T *
4796 public IntPtr m_pInstance; // struct VkInstance_T *
4797 public IntPtr m_pQueue; // struct VkQueue_T *
4798 public uint m_nQueueFamilyIndex;
4799 public uint m_nWidth;
4800 public uint m_nHeight;
4801 public uint m_nFormat;
4802 public uint m_nSampleCount;
4803}
4804[StructLayout(LayoutKind.Sequential)] public struct D3D12TextureData_t
4805{
4806 public IntPtr m_pResource; // struct ID3D12Resource *
4807 public IntPtr m_pCommandQueue; // struct ID3D12CommandQueue *
4808 public uint m_nNodeMask;
4809}
4810[StructLayout(LayoutKind.Sequential)] public struct VREvent_Controller_t
4811{
4812 public uint button;
4813}
4814[StructLayout(LayoutKind.Sequential)] public struct VREvent_Mouse_t
4815{
4816 public float x;
4817 public float y;
4818 public uint button;
4819}
4820[StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t
4821{
4822 public float xdelta;
4823 public float ydelta;
4824 public uint repeatCount;
4825}
4826[StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t
4827{
4828 [MarshalAs(UnmanagedType.I1)]
4829 public bool bFingerDown;
4830 public float flSecondsFingerDown;
4831 public float fValueXFirst;
4832 public float fValueYFirst;
4833 public float fValueXRaw;
4834 public float fValueYRaw;
4835}
4836[StructLayout(LayoutKind.Sequential)] public struct VREvent_Notification_t
4837{
4838 public ulong ulUserValue;
4839 public uint notificationId;
4840}
4841[StructLayout(LayoutKind.Sequential)] public struct VREvent_Process_t
4842{
4843 public uint pid;
4844 public uint oldPid;
4845 [MarshalAs(UnmanagedType.I1)]
4846 public bool bForced;
4847}
4848[StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t
4849{
4850 public ulong overlayHandle;
4851 public ulong devicePath;
4852}
4853[StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t
4854{
4855 public uint statusState;
4856}
4857[StructLayout(Layout
4858… afgekapt