OLD | NEW |
(Empty) | |
| 1 //======= Copyright (c) Valve Corporation, All rights reserved. =============== |
| 2 // |
| 3 // Purpose: This file contains C#/managed code bindings for the OpenVR interface
s |
| 4 // This file is auto-generated, do not edit it. |
| 5 // |
| 6 //============================================================================= |
| 7 |
| 8 using System; |
| 9 using System.Runtime.InteropServices; |
| 10 using Valve.VR; |
| 11 |
| 12 namespace Valve.VR |
| 13 { |
| 14 |
| 15 [StructLayout(LayoutKind.Sequential)] |
| 16 public struct IVRSystem |
| 17 { |
| 18 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 19 internal delegate void _GetRecommendedRenderTargetSize(ref uint pnWidth,
ref uint pnHeight); |
| 20 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 21 internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize; |
| 22 |
| 23 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 24 internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float
fNearZ, float fFarZ); |
| 25 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 26 internal _GetProjectionMatrix GetProjectionMatrix; |
| 27 |
| 28 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 29 internal delegate void _GetProjectionRaw(EVREye eEye, ref float pfLeft,
ref float pfRight, ref float pfTop, ref float pfBottom); |
| 30 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 31 internal _GetProjectionRaw GetProjectionRaw; |
| 32 |
| 33 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 34 internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float f
V, ref DistortionCoordinates_t pDistortionCoordinates); |
| 35 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 36 internal _ComputeDistortion ComputeDistortion; |
| 37 |
| 38 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 39 internal delegate HmdMatrix34_t _GetEyeToHeadTransform(EVREye eEye); |
| 40 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 41 internal _GetEyeToHeadTransform GetEyeToHeadTransform; |
| 42 |
| 43 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 44 internal delegate bool _GetTimeSinceLastVsync(ref float pfSecondsSinceLa
stVsync, ref ulong pulFrameCounter); |
| 45 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 46 internal _GetTimeSinceLastVsync GetTimeSinceLastVsync; |
| 47 |
| 48 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 49 internal delegate int _GetD3D9AdapterIndex(); |
| 50 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 51 internal _GetD3D9AdapterIndex GetD3D9AdapterIndex; |
| 52 |
| 53 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 54 internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex); |
| 55 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 56 internal _GetDXGIOutputInfo GetDXGIOutputInfo; |
| 57 |
| 58 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 59 internal delegate bool _IsDisplayOnDesktop(); |
| 60 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 61 internal _IsDisplayOnDesktop IsDisplayOnDesktop; |
| 62 |
| 63 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 64 internal delegate bool _SetDisplayVisibility(bool bIsVisibleOnDesktop); |
| 65 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 66 internal _SetDisplayVisibility SetDisplayVisibility; |
| 67 |
| 68 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 69 internal delegate void _GetDeviceToAbsoluteTrackingPose(ETrackingUnivers
eOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, [In, Out] TrackedDevic
ePose_t[] pTrackedDevicePoseArray, uint unTrackedDevicePoseArrayCount); |
| 70 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 71 internal _GetDeviceToAbsoluteTrackingPose GetDeviceToAbsoluteTrackingPos
e; |
| 72 |
| 73 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 74 internal delegate void _ResetSeatedZeroPose(); |
| 75 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 76 internal _ResetSeatedZeroPose ResetSeatedZeroPose; |
| 77 |
| 78 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 79 internal delegate HmdMatrix34_t _GetSeatedZeroPoseToStandingAbsoluteTrac
kingPose(); |
| 80 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 81 internal _GetSeatedZeroPoseToStandingAbsoluteTrackingPose GetSeatedZeroP
oseToStandingAbsoluteTrackingPose; |
| 82 |
| 83 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 84 internal delegate HmdMatrix34_t _GetRawZeroPoseToStandingAbsoluteTrackin
gPose(); |
| 85 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 86 internal _GetRawZeroPoseToStandingAbsoluteTrackingPose GetRawZeroPoseToS
tandingAbsoluteTrackingPose; |
| 87 |
| 88 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 89 internal delegate uint _GetSortedTrackedDeviceIndicesOfClass(ETrackedDev
iceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint
unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex); |
| 90 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 91 internal _GetSortedTrackedDeviceIndicesOfClass GetSortedTrackedDeviceInd
icesOfClass; |
| 92 |
| 93 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 94 internal delegate EDeviceActivityLevel _GetTrackedDeviceActivityLevel(ui
nt unDeviceId); |
| 95 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 96 internal _GetTrackedDeviceActivityLevel GetTrackedDeviceActivityLevel; |
| 97 |
| 98 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 99 internal delegate void _ApplyTransform(ref TrackedDevicePose_t pOutputPo
se, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform); |
| 100 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 101 internal _ApplyTransform ApplyTransform; |
| 102 |
| 103 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 104 internal delegate uint _GetTrackedDeviceIndexForControllerRole(ETrackedC
ontrollerRole unDeviceType); |
| 105 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 106 internal _GetTrackedDeviceIndexForControllerRole GetTrackedDeviceIndexFo
rControllerRole; |
| 107 |
| 108 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 109 internal delegate ETrackedControllerRole _GetControllerRoleForTrackedDev
iceIndex(uint unDeviceIndex); |
| 110 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 111 internal _GetControllerRoleForTrackedDeviceIndex GetControllerRoleForTra
ckedDeviceIndex; |
| 112 |
| 113 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 114 internal delegate ETrackedDeviceClass _GetTrackedDeviceClass(uint unDevi
ceIndex); |
| 115 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 116 internal _GetTrackedDeviceClass GetTrackedDeviceClass; |
| 117 |
| 118 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 119 internal delegate bool _IsTrackedDeviceConnected(uint unDeviceIndex); |
| 120 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 121 internal _IsTrackedDeviceConnected IsTrackedDeviceConnected; |
| 122 |
| 123 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 124 internal delegate bool _GetBoolTrackedDeviceProperty(uint unDeviceIndex,
ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); |
| 125 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 126 internal _GetBoolTrackedDeviceProperty GetBoolTrackedDeviceProperty; |
| 127 |
| 128 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 129 internal delegate float _GetFloatTrackedDeviceProperty(uint unDeviceInde
x, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); |
| 130 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 131 internal _GetFloatTrackedDeviceProperty GetFloatTrackedDeviceProperty; |
| 132 |
| 133 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 134 internal delegate int _GetInt32TrackedDeviceProperty(uint unDeviceIndex,
ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); |
| 135 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 136 internal _GetInt32TrackedDeviceProperty GetInt32TrackedDeviceProperty; |
| 137 |
| 138 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 139 internal delegate ulong _GetUint64TrackedDeviceProperty(uint unDeviceInd
ex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); |
| 140 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 141 internal _GetUint64TrackedDeviceProperty GetUint64TrackedDeviceProperty; |
| 142 |
| 143 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 144 internal delegate HmdMatrix34_t _GetMatrix34TrackedDeviceProperty(uint u
nDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError); |
| 145 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 146 internal _GetMatrix34TrackedDeviceProperty GetMatrix34TrackedDevicePrope
rty; |
| 147 |
| 148 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 149 internal delegate uint _GetStringTrackedDeviceProperty(uint unDeviceInde
x, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBuffe
rSize, ref ETrackedPropertyError pError); |
| 150 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 151 internal _GetStringTrackedDeviceProperty GetStringTrackedDeviceProperty; |
| 152 |
| 153 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 154 internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError
error); |
| 155 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 156 internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum; |
| 157 |
| 158 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 159 internal delegate bool _PollNextEvent(ref VREvent_t pEvent, uint uncbVRE
vent); |
| 160 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 161 internal _PollNextEvent PollNextEvent; |
| 162 |
| 163 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 164 internal delegate bool _PollNextEventWithPose(ETrackingUniverseOrigin eO
rigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedD
evicePose); |
| 165 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 166 internal _PollNextEventWithPose PollNextEventWithPose; |
| 167 |
| 168 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 169 internal delegate IntPtr _GetEventTypeNameFromEnum(EVREventType eType); |
| 170 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 171 internal _GetEventTypeNameFromEnum GetEventTypeNameFromEnum; |
| 172 |
| 173 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 174 internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye, EHidd
enAreaMeshType type); |
| 175 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 176 internal _GetHiddenAreaMesh GetHiddenAreaMesh; |
| 177 |
| 178 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 179 internal delegate bool _GetControllerState(uint unControllerDeviceIndex,
ref VRControllerState_t pControllerState, uint unControllerStateSize); |
| 180 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 181 internal _GetControllerState GetControllerState; |
| 182 |
| 183 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 184 internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrig
in eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerSta
te, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose); |
| 185 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 186 internal _GetControllerStateWithPose GetControllerStateWithPose; |
| 187 |
| 188 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 189 internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex,
uint unAxisId, char usDurationMicroSec); |
| 190 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 191 internal _TriggerHapticPulse TriggerHapticPulse; |
| 192 |
| 193 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 194 internal delegate IntPtr _GetButtonIdNameFromEnum(EVRButtonId eButtonId)
; |
| 195 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 196 internal _GetButtonIdNameFromEnum GetButtonIdNameFromEnum; |
| 197 |
| 198 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 199 internal delegate IntPtr _GetControllerAxisTypeNameFromEnum(EVRControlle
rAxisType eAxisType); |
| 200 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 201 internal _GetControllerAxisTypeNameFromEnum GetControllerAxisTypeNameFro
mEnum; |
| 202 |
| 203 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 204 internal delegate bool _CaptureInputFocus(); |
| 205 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 206 internal _CaptureInputFocus CaptureInputFocus; |
| 207 |
| 208 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 209 internal delegate void _ReleaseInputFocus(); |
| 210 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 211 internal _ReleaseInputFocus ReleaseInputFocus; |
| 212 |
| 213 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 214 internal delegate bool _IsInputFocusCapturedByAnotherProcess(); |
| 215 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 216 internal _IsInputFocusCapturedByAnotherProcess IsInputFocusCapturedByAno
therProcess; |
| 217 |
| 218 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 219 internal delegate uint _DriverDebugRequest(uint unDeviceIndex, string pc
hRequest, string pchResponseBuffer, uint unResponseBufferSize); |
| 220 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 221 internal _DriverDebugRequest DriverDebugRequest; |
| 222 |
| 223 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 224 internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceI
ndex); |
| 225 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 226 internal _PerformFirmwareUpdate PerformFirmwareUpdate; |
| 227 |
| 228 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 229 internal delegate void _AcknowledgeQuit_Exiting(); |
| 230 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 231 internal _AcknowledgeQuit_Exiting AcknowledgeQuit_Exiting; |
| 232 |
| 233 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 234 internal delegate void _AcknowledgeQuit_UserPrompt(); |
| 235 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 236 internal _AcknowledgeQuit_UserPrompt AcknowledgeQuit_UserPrompt; |
| 237 |
| 238 } |
| 239 |
| 240 [StructLayout(LayoutKind.Sequential)] |
| 241 public struct IVRExtendedDisplay |
| 242 { |
| 243 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 244 internal delegate void _GetWindowBounds(ref int pnX, ref int pnY, ref ui
nt pnWidth, ref uint pnHeight); |
| 245 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 246 internal _GetWindowBounds GetWindowBounds; |
| 247 |
| 248 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 249 internal delegate void _GetEyeOutputViewport(EVREye eEye, ref uint pnX,
ref uint pnY, ref uint pnWidth, ref uint pnHeight); |
| 250 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 251 internal _GetEyeOutputViewport GetEyeOutputViewport; |
| 252 |
| 253 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 254 internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex, ref in
t pnAdapterOutputIndex); |
| 255 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 256 internal _GetDXGIOutputInfo GetDXGIOutputInfo; |
| 257 |
| 258 } |
| 259 |
| 260 [StructLayout(LayoutKind.Sequential)] |
| 261 public struct IVRTrackedCamera |
| 262 { |
| 263 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 264 internal delegate IntPtr _GetCameraErrorNameFromEnum(EVRTrackedCameraErr
or eCameraError); |
| 265 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 266 internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum; |
| 267 |
| 268 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 269 internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, re
f bool pHasCamera); |
| 270 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 271 internal _HasCamera HasCamera; |
| 272 |
| 273 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 274 internal delegate EVRTrackedCameraError _GetCameraFrameSize(uint nDevice
Index, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight
, ref uint pnFrameBufferSize); |
| 275 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 276 internal _GetCameraFrameSize GetCameraFrameSize; |
| 277 |
| 278 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 279 internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDevic
eIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref
HmdVector2_t pCenter); |
| 280 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 281 internal _GetCameraIntrinsics GetCameraIntrinsics; |
| 282 |
| 283 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 284 internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDevic
eIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref H
mdMatrix44_t pProjection); |
| 285 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 286 internal _GetCameraProjection GetCameraProjection; |
| 287 |
| 288 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 289 internal delegate EVRTrackedCameraError _AcquireVideoStreamingService(ui
nt nDeviceIndex, ref ulong pHandle); |
| 290 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 291 internal _AcquireVideoStreamingService AcquireVideoStreamingService; |
| 292 |
| 293 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 294 internal delegate EVRTrackedCameraError _ReleaseVideoStreamingService(ul
ong hTrackedCamera); |
| 295 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 296 internal _ReleaseVideoStreamingService ReleaseVideoStreamingService; |
| 297 |
| 298 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 299 internal delegate EVRTrackedCameraError _GetVideoStreamFrameBuffer(ulong
hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint
nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameH
eaderSize); |
| 300 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 301 internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer; |
| 302 |
| 303 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 304 internal delegate EVRTrackedCameraError _GetVideoStreamTextureSize(uint
nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextu
reBounds, ref uint pnWidth, ref uint pnHeight); |
| 305 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 306 internal _GetVideoStreamTextureSize GetVideoStreamTextureSize; |
| 307 |
| 308 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 309 internal delegate EVRTrackedCameraError _GetVideoStreamTextureD3D11(ulon
g hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrRes
ource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t
pFrameHeader, uint nFrameHeaderSize); |
| 310 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 311 internal _GetVideoStreamTextureD3D11 GetVideoStreamTextureD3D11; |
| 312 |
| 313 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 314 internal delegate EVRTrackedCameraError _GetVideoStreamTextureGL(ulong h
TrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref
CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize); |
| 315 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 316 internal _GetVideoStreamTextureGL GetVideoStreamTextureGL; |
| 317 |
| 318 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 319 internal delegate EVRTrackedCameraError _ReleaseVideoStreamTextureGL(ulo
ng hTrackedCamera, uint glTextureId); |
| 320 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 321 internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL; |
| 322 |
| 323 } |
| 324 |
| 325 [StructLayout(LayoutKind.Sequential)] |
| 326 public struct IVRApplications |
| 327 { |
| 328 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 329 internal delegate EVRApplicationError _AddApplicationManifest(string pch
ApplicationManifestFullPath, bool bTemporary); |
| 330 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 331 internal _AddApplicationManifest AddApplicationManifest; |
| 332 |
| 333 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 334 internal delegate EVRApplicationError _RemoveApplicationManifest(string
pchApplicationManifestFullPath); |
| 335 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 336 internal _RemoveApplicationManifest RemoveApplicationManifest; |
| 337 |
| 338 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 339 internal delegate bool _IsApplicationInstalled(string pchAppKey); |
| 340 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 341 internal _IsApplicationInstalled IsApplicationInstalled; |
| 342 |
| 343 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 344 internal delegate uint _GetApplicationCount(); |
| 345 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 346 internal _GetApplicationCount GetApplicationCount; |
| 347 |
| 348 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 349 internal delegate EVRApplicationError _GetApplicationKeyByIndex(uint unA
pplicationIndex, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferL
en); |
| 350 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 351 internal _GetApplicationKeyByIndex GetApplicationKeyByIndex; |
| 352 |
| 353 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 354 internal delegate EVRApplicationError _GetApplicationKeyByProcessId(uint
unProcessId, string pchAppKeyBuffer, uint unAppKeyBufferLen); |
| 355 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 356 internal _GetApplicationKeyByProcessId GetApplicationKeyByProcessId; |
| 357 |
| 358 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 359 internal delegate EVRApplicationError _LaunchApplication(string pchAppKe
y); |
| 360 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 361 internal _LaunchApplication LaunchApplication; |
| 362 |
| 363 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 364 internal delegate EVRApplicationError _LaunchTemplateApplication(string
pchTemplateAppKey, string pchNewAppKey, [In, Out] AppOverrideKeys_t[] pKeys, uin
t unKeys); |
| 365 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 366 internal _LaunchTemplateApplication LaunchTemplateApplication; |
| 367 |
| 368 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 369 internal delegate EVRApplicationError _LaunchApplicationFromMimeType(str
ing pchMimeType, string pchArgs); |
| 370 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 371 internal _LaunchApplicationFromMimeType LaunchApplicationFromMimeType; |
| 372 |
| 373 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 374 internal delegate EVRApplicationError _LaunchDashboardOverlay(string pch
AppKey); |
| 375 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 376 internal _LaunchDashboardOverlay LaunchDashboardOverlay; |
| 377 |
| 378 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 379 internal delegate bool _CancelApplicationLaunch(string pchAppKey); |
| 380 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 381 internal _CancelApplicationLaunch CancelApplicationLaunch; |
| 382 |
| 383 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 384 internal delegate EVRApplicationError _IdentifyApplication(uint unProces
sId, string pchAppKey); |
| 385 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 386 internal _IdentifyApplication IdentifyApplication; |
| 387 |
| 388 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 389 internal delegate uint _GetApplicationProcessId(string pchAppKey); |
| 390 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 391 internal _GetApplicationProcessId GetApplicationProcessId; |
| 392 |
| 393 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 394 internal delegate IntPtr _GetApplicationsErrorNameFromEnum(EVRApplicatio
nError error); |
| 395 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 396 internal _GetApplicationsErrorNameFromEnum GetApplicationsErrorNameFromE
num; |
| 397 |
| 398 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 399 internal delegate uint _GetApplicationPropertyString(string pchAppKey, E
VRApplicationProperty eProperty, System.Text.StringBuilder pchPropertyValueBuffe
r, uint unPropertyValueBufferLen, ref EVRApplicationError peError); |
| 400 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 401 internal _GetApplicationPropertyString GetApplicationPropertyString; |
| 402 |
| 403 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 404 internal delegate bool _GetApplicationPropertyBool(string pchAppKey, EVR
ApplicationProperty eProperty, ref EVRApplicationError peError); |
| 405 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 406 internal _GetApplicationPropertyBool GetApplicationPropertyBool; |
| 407 |
| 408 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 409 internal delegate ulong _GetApplicationPropertyUint64(string pchAppKey,
EVRApplicationProperty eProperty, ref EVRApplicationError peError); |
| 410 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 411 internal _GetApplicationPropertyUint64 GetApplicationPropertyUint64; |
| 412 |
| 413 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 414 internal delegate EVRApplicationError _SetApplicationAutoLaunch(string p
chAppKey, bool bAutoLaunch); |
| 415 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 416 internal _SetApplicationAutoLaunch SetApplicationAutoLaunch; |
| 417 |
| 418 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 419 internal delegate bool _GetApplicationAutoLaunch(string pchAppKey); |
| 420 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 421 internal _GetApplicationAutoLaunch GetApplicationAutoLaunch; |
| 422 |
| 423 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 424 internal delegate EVRApplicationError _SetDefaultApplicationForMimeType(
string pchAppKey, string pchMimeType); |
| 425 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 426 internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeT
ype; |
| 427 |
| 428 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 429 internal delegate bool _GetDefaultApplicationForMimeType(string pchMimeT
ype, string pchAppKeyBuffer, uint unAppKeyBufferLen); |
| 430 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 431 internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeT
ype; |
| 432 |
| 433 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 434 internal delegate bool _GetApplicationSupportedMimeTypes(string pchAppKe
y, string pchMimeTypesBuffer, uint unMimeTypesBuffer); |
| 435 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 436 internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTy
pes; |
| 437 |
| 438 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 439 internal delegate uint _GetApplicationsThatSupportMimeType(string pchMim
eType, string pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer); |
| 440 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 441 internal _GetApplicationsThatSupportMimeType GetApplicationsThatSupportM
imeType; |
| 442 |
| 443 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 444 internal delegate uint _GetApplicationLaunchArguments(uint unHandle, str
ing pchArgs, uint unArgs); |
| 445 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 446 internal _GetApplicationLaunchArguments GetApplicationLaunchArguments; |
| 447 |
| 448 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 449 internal delegate EVRApplicationError _GetStartingApplication(string pch
AppKeyBuffer, uint unAppKeyBufferLen); |
| 450 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 451 internal _GetStartingApplication GetStartingApplication; |
| 452 |
| 453 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 454 internal delegate EVRApplicationTransitionState _GetTransitionState(); |
| 455 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 456 internal _GetTransitionState GetTransitionState; |
| 457 |
| 458 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 459 internal delegate EVRApplicationError _PerformApplicationPrelaunchCheck(
string pchAppKey); |
| 460 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 461 internal _PerformApplicationPrelaunchCheck PerformApplicationPrelaunchCh
eck; |
| 462 |
| 463 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 464 internal delegate IntPtr _GetApplicationsTransitionStateNameFromEnum(EVR
ApplicationTransitionState state); |
| 465 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 466 internal _GetApplicationsTransitionStateNameFromEnum GetApplicationsTran
sitionStateNameFromEnum; |
| 467 |
| 468 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 469 internal delegate bool _IsQuitUserPromptRequested(); |
| 470 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 471 internal _IsQuitUserPromptRequested IsQuitUserPromptRequested; |
| 472 |
| 473 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 474 internal delegate EVRApplicationError _LaunchInternalProcess(string pchB
inaryPath, string pchArguments, string pchWorkingDirectory); |
| 475 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 476 internal _LaunchInternalProcess LaunchInternalProcess; |
| 477 |
| 478 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 479 internal delegate uint _GetCurrentSceneProcessId(); |
| 480 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 481 internal _GetCurrentSceneProcessId GetCurrentSceneProcessId; |
| 482 |
| 483 } |
| 484 |
| 485 [StructLayout(LayoutKind.Sequential)] |
| 486 public struct IVRChaperone |
| 487 { |
| 488 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 489 internal delegate ChaperoneCalibrationState _GetCalibrationState(); |
| 490 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 491 internal _GetCalibrationState GetCalibrationState; |
| 492 |
| 493 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 494 internal delegate bool _GetPlayAreaSize(ref float pSizeX, ref float pSiz
eZ); |
| 495 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 496 internal _GetPlayAreaSize GetPlayAreaSize; |
| 497 |
| 498 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 499 internal delegate bool _GetPlayAreaRect(ref HmdQuad_t rect); |
| 500 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 501 internal _GetPlayAreaRect GetPlayAreaRect; |
| 502 |
| 503 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 504 internal delegate void _ReloadInfo(); |
| 505 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 506 internal _ReloadInfo ReloadInfo; |
| 507 |
| 508 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 509 internal delegate void _SetSceneColor(HmdColor_t color); |
| 510 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 511 internal _SetSceneColor SetSceneColor; |
| 512 |
| 513 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 514 internal delegate void _GetBoundsColor(ref HmdColor_t pOutputColorArray,
int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutp
utCameraColor); |
| 515 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 516 internal _GetBoundsColor GetBoundsColor; |
| 517 |
| 518 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 519 internal delegate bool _AreBoundsVisible(); |
| 520 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 521 internal _AreBoundsVisible AreBoundsVisible; |
| 522 |
| 523 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 524 internal delegate void _ForceBoundsVisible(bool bForce); |
| 525 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 526 internal _ForceBoundsVisible ForceBoundsVisible; |
| 527 |
| 528 } |
| 529 |
| 530 [StructLayout(LayoutKind.Sequential)] |
| 531 public struct IVRChaperoneSetup |
| 532 { |
| 533 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 534 internal delegate bool _CommitWorkingCopy(EChaperoneConfigFile configFil
e); |
| 535 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 536 internal _CommitWorkingCopy CommitWorkingCopy; |
| 537 |
| 538 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 539 internal delegate void _RevertWorkingCopy(); |
| 540 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 541 internal _RevertWorkingCopy RevertWorkingCopy; |
| 542 |
| 543 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 544 internal delegate bool _GetWorkingPlayAreaSize(ref float pSizeX, ref flo
at pSizeZ); |
| 545 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 546 internal _GetWorkingPlayAreaSize GetWorkingPlayAreaSize; |
| 547 |
| 548 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 549 internal delegate bool _GetWorkingPlayAreaRect(ref HmdQuad_t rect); |
| 550 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 551 internal _GetWorkingPlayAreaRect GetWorkingPlayAreaRect; |
| 552 |
| 553 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 554 internal delegate bool _GetWorkingCollisionBoundsInfo([In, Out] HmdQuad_
t[] pQuadsBuffer, ref uint punQuadsCount); |
| 555 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 556 internal _GetWorkingCollisionBoundsInfo GetWorkingCollisionBoundsInfo; |
| 557 |
| 558 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 559 internal delegate bool _GetLiveCollisionBoundsInfo([In, Out] HmdQuad_t[]
pQuadsBuffer, ref uint punQuadsCount); |
| 560 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 561 internal _GetLiveCollisionBoundsInfo GetLiveCollisionBoundsInfo; |
| 562 |
| 563 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 564 internal delegate bool _GetWorkingSeatedZeroPoseToRawTrackingPose(ref Hm
dMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); |
| 565 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 566 internal _GetWorkingSeatedZeroPoseToRawTrackingPose GetWorkingSeatedZero
PoseToRawTrackingPose; |
| 567 |
| 568 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 569 internal delegate bool _GetWorkingStandingZeroPoseToRawTrackingPose(ref
HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose); |
| 570 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 571 internal _GetWorkingStandingZeroPoseToRawTrackingPose GetWorkingStanding
ZeroPoseToRawTrackingPose; |
| 572 |
| 573 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 574 internal delegate void _SetWorkingPlayAreaSize(float sizeX, float sizeZ)
; |
| 575 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 576 internal _SetWorkingPlayAreaSize SetWorkingPlayAreaSize; |
| 577 |
| 578 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 579 internal delegate void _SetWorkingCollisionBoundsInfo([In, Out] HmdQuad_
t[] pQuadsBuffer, uint unQuadsCount); |
| 580 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 581 internal _SetWorkingCollisionBoundsInfo SetWorkingCollisionBoundsInfo; |
| 582 |
| 583 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 584 internal delegate void _SetWorkingSeatedZeroPoseToRawTrackingPose(ref Hm
dMatrix34_t pMatSeatedZeroPoseToRawTrackingPose); |
| 585 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 586 internal _SetWorkingSeatedZeroPoseToRawTrackingPose SetWorkingSeatedZero
PoseToRawTrackingPose; |
| 587 |
| 588 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 589 internal delegate void _SetWorkingStandingZeroPoseToRawTrackingPose(ref
HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose); |
| 590 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 591 internal _SetWorkingStandingZeroPoseToRawTrackingPose SetWorkingStanding
ZeroPoseToRawTrackingPose; |
| 592 |
| 593 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 594 internal delegate void _ReloadFromDisk(EChaperoneConfigFile configFile); |
| 595 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 596 internal _ReloadFromDisk ReloadFromDisk; |
| 597 |
| 598 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 599 internal delegate bool _GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMa
trix34_t pmatSeatedZeroPoseToRawTrackingPose); |
| 600 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 601 internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseTo
RawTrackingPose; |
| 602 |
| 603 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 604 internal delegate void _SetWorkingCollisionBoundsTagsInfo([In, Out] byte
[] pTagsBuffer, uint unTagCount); |
| 605 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 606 internal _SetWorkingCollisionBoundsTagsInfo SetWorkingCollisionBoundsTag
sInfo; |
| 607 |
| 608 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 609 internal delegate bool _GetLiveCollisionBoundsTagsInfo([In, Out] byte[]
pTagsBuffer, ref uint punTagCount); |
| 610 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 611 internal _GetLiveCollisionBoundsTagsInfo GetLiveCollisionBoundsTagsInfo; |
| 612 |
| 613 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 614 internal delegate bool _SetWorkingPhysicalBoundsInfo([In, Out] HmdQuad_t
[] pQuadsBuffer, uint unQuadsCount); |
| 615 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 616 internal _SetWorkingPhysicalBoundsInfo SetWorkingPhysicalBoundsInfo; |
| 617 |
| 618 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 619 internal delegate bool _GetLivePhysicalBoundsInfo([In, Out] HmdQuad_t[]
pQuadsBuffer, ref uint punQuadsCount); |
| 620 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 621 internal _GetLivePhysicalBoundsInfo GetLivePhysicalBoundsInfo; |
| 622 |
| 623 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 624 internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBu
ffer, ref uint pnBufferLength); |
| 625 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 626 internal _ExportLiveToBuffer ExportLiveToBuffer; |
| 627 |
| 628 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 629 internal delegate bool _ImportFromBufferToWorking(string pBuffer, uint n
ImportFlags); |
| 630 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 631 internal _ImportFromBufferToWorking ImportFromBufferToWorking; |
| 632 |
| 633 } |
| 634 |
| 635 [StructLayout(LayoutKind.Sequential)] |
| 636 public struct IVRCompositor |
| 637 { |
| 638 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 639 internal delegate void _SetTrackingSpace(ETrackingUniverseOrigin eOrigin
); |
| 640 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 641 internal _SetTrackingSpace SetTrackingSpace; |
| 642 |
| 643 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 644 internal delegate ETrackingUniverseOrigin _GetTrackingSpace(); |
| 645 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 646 internal _GetTrackingSpace GetTrackingSpace; |
| 647 |
| 648 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 649 internal delegate EVRCompositorError _WaitGetPoses([In, Out] TrackedDevi
cePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevic
ePose_t[] pGamePoseArray, uint unGamePoseArrayCount); |
| 650 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 651 internal _WaitGetPoses WaitGetPoses; |
| 652 |
| 653 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 654 internal delegate EVRCompositorError _GetLastPoses([In, Out] TrackedDevi
cePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevic
ePose_t[] pGamePoseArray, uint unGamePoseArrayCount); |
| 655 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 656 internal _GetLastPoses GetLastPoses; |
| 657 |
| 658 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 659 internal delegate EVRCompositorError _GetLastPoseForTrackedDeviceIndex(u
int unDeviceIndex, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t
pOutputGamePose); |
| 660 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 661 internal _GetLastPoseForTrackedDeviceIndex GetLastPoseForTrackedDeviceIn
dex; |
| 662 |
| 663 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 664 internal delegate EVRCompositorError _Submit(EVREye eEye, ref Texture_t
pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags); |
| 665 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 666 internal _Submit Submit; |
| 667 |
| 668 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 669 internal delegate void _ClearLastSubmittedFrame(); |
| 670 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 671 internal _ClearLastSubmittedFrame ClearLastSubmittedFrame; |
| 672 |
| 673 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 674 internal delegate void _PostPresentHandoff(); |
| 675 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 676 internal _PostPresentHandoff PostPresentHandoff; |
| 677 |
| 678 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 679 internal delegate bool _GetFrameTiming(ref Compositor_FrameTiming pTimin
g, uint unFramesAgo); |
| 680 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 681 internal _GetFrameTiming GetFrameTiming; |
| 682 |
| 683 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 684 internal delegate uint _GetFrameTimings(ref Compositor_FrameTiming pTimi
ng, uint nFrames); |
| 685 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 686 internal _GetFrameTimings GetFrameTimings; |
| 687 |
| 688 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 689 internal delegate float _GetFrameTimeRemaining(); |
| 690 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 691 internal _GetFrameTimeRemaining GetFrameTimeRemaining; |
| 692 |
| 693 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 694 internal delegate void _GetCumulativeStats(ref Compositor_CumulativeStat
s pStats, uint nStatsSizeInBytes); |
| 695 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 696 internal _GetCumulativeStats GetCumulativeStats; |
| 697 |
| 698 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 699 internal delegate void _FadeToColor(float fSeconds, float fRed, float fG
reen, float fBlue, float fAlpha, bool bBackground); |
| 700 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 701 internal _FadeToColor FadeToColor; |
| 702 |
| 703 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 704 internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground); |
| 705 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 706 internal _GetCurrentFadeColor GetCurrentFadeColor; |
| 707 |
| 708 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 709 internal delegate void _FadeGrid(float fSeconds, bool bFadeIn); |
| 710 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 711 internal _FadeGrid FadeGrid; |
| 712 |
| 713 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 714 internal delegate float _GetCurrentGridAlpha(); |
| 715 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 716 internal _GetCurrentGridAlpha GetCurrentGridAlpha; |
| 717 |
| 718 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 719 internal delegate EVRCompositorError _SetSkyboxOverride([In, Out] Textur
e_t[] pTextures, uint unTextureCount); |
| 720 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 721 internal _SetSkyboxOverride SetSkyboxOverride; |
| 722 |
| 723 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 724 internal delegate void _ClearSkyboxOverride(); |
| 725 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 726 internal _ClearSkyboxOverride ClearSkyboxOverride; |
| 727 |
| 728 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 729 internal delegate void _CompositorBringToFront(); |
| 730 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 731 internal _CompositorBringToFront CompositorBringToFront; |
| 732 |
| 733 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 734 internal delegate void _CompositorGoToBack(); |
| 735 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 736 internal _CompositorGoToBack CompositorGoToBack; |
| 737 |
| 738 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 739 internal delegate void _CompositorQuit(); |
| 740 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 741 internal _CompositorQuit CompositorQuit; |
| 742 |
| 743 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 744 internal delegate bool _IsFullscreen(); |
| 745 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 746 internal _IsFullscreen IsFullscreen; |
| 747 |
| 748 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 749 internal delegate uint _GetCurrentSceneFocusProcess(); |
| 750 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 751 internal _GetCurrentSceneFocusProcess GetCurrentSceneFocusProcess; |
| 752 |
| 753 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 754 internal delegate uint _GetLastFrameRenderer(); |
| 755 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 756 internal _GetLastFrameRenderer GetLastFrameRenderer; |
| 757 |
| 758 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 759 internal delegate bool _CanRenderScene(); |
| 760 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 761 internal _CanRenderScene CanRenderScene; |
| 762 |
| 763 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 764 internal delegate void _ShowMirrorWindow(); |
| 765 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 766 internal _ShowMirrorWindow ShowMirrorWindow; |
| 767 |
| 768 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 769 internal delegate void _HideMirrorWindow(); |
| 770 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 771 internal _HideMirrorWindow HideMirrorWindow; |
| 772 |
| 773 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 774 internal delegate bool _IsMirrorWindowVisible(); |
| 775 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 776 internal _IsMirrorWindowVisible IsMirrorWindowVisible; |
| 777 |
| 778 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 779 internal delegate void _CompositorDumpImages(); |
| 780 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 781 internal _CompositorDumpImages CompositorDumpImages; |
| 782 |
| 783 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 784 internal delegate bool _ShouldAppRenderWithLowResources(); |
| 785 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 786 internal _ShouldAppRenderWithLowResources ShouldAppRenderWithLowResource
s; |
| 787 |
| 788 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 789 internal delegate void _ForceInterleavedReprojectionOn(bool bOverride); |
| 790 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 791 internal _ForceInterleavedReprojectionOn ForceInterleavedReprojectionOn; |
| 792 |
| 793 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 794 internal delegate void _ForceReconnectProcess(); |
| 795 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 796 internal _ForceReconnectProcess ForceReconnectProcess; |
| 797 |
| 798 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 799 internal delegate void _SuspendRendering(bool bSuspend); |
| 800 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 801 internal _SuspendRendering SuspendRendering; |
| 802 |
| 803 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 804 internal delegate EVRCompositorError _GetMirrorTextureD3D11(EVREye eEye,
IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView); |
| 805 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 806 internal _GetMirrorTextureD3D11 GetMirrorTextureD3D11; |
| 807 |
| 808 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 809 internal delegate void _ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderRes
ourceView); |
| 810 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 811 internal _ReleaseMirrorTextureD3D11 ReleaseMirrorTextureD3D11; |
| 812 |
| 813 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 814 internal delegate EVRCompositorError _GetMirrorTextureGL(EVREye eEye, re
f uint pglTextureId, IntPtr pglSharedTextureHandle); |
| 815 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 816 internal _GetMirrorTextureGL GetMirrorTextureGL; |
| 817 |
| 818 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 819 internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr
glSharedTextureHandle); |
| 820 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 821 internal _ReleaseSharedGLTexture ReleaseSharedGLTexture; |
| 822 |
| 823 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 824 internal delegate void _LockGLSharedTextureForAccess(IntPtr glSharedText
ureHandle); |
| 825 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 826 internal _LockGLSharedTextureForAccess LockGLSharedTextureForAccess; |
| 827 |
| 828 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 829 internal delegate void _UnlockGLSharedTextureForAccess(IntPtr glSharedTe
xtureHandle); |
| 830 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 831 internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess; |
| 832 |
| 833 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 834 internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.
StringBuilder pchValue, uint unBufferSize); |
| 835 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 836 internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtension
sRequired; |
| 837 |
| 838 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 839 internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysic
alDevice, System.Text.StringBuilder pchValue, uint unBufferSize); |
| 840 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 841 internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsReq
uired; |
| 842 |
| 843 } |
| 844 |
| 845 [StructLayout(LayoutKind.Sequential)] |
| 846 public struct IVROverlay |
| 847 { |
| 848 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 849 internal delegate EVROverlayError _FindOverlay(string pchOverlayKey, ref
ulong pOverlayHandle); |
| 850 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 851 internal _FindOverlay FindOverlay; |
| 852 |
| 853 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 854 internal delegate EVROverlayError _CreateOverlay(string pchOverlayKey, s
tring pchOverlayFriendlyName, ref ulong pOverlayHandle); |
| 855 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 856 internal _CreateOverlay CreateOverlay; |
| 857 |
| 858 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 859 internal delegate EVROverlayError _DestroyOverlay(ulong ulOverlayHandle)
; |
| 860 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 861 internal _DestroyOverlay DestroyOverlay; |
| 862 |
| 863 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 864 internal delegate EVROverlayError _SetHighQualityOverlay(ulong ulOverlay
Handle); |
| 865 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 866 internal _SetHighQualityOverlay SetHighQualityOverlay; |
| 867 |
| 868 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 869 internal delegate ulong _GetHighQualityOverlay(); |
| 870 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 871 internal _GetHighQualityOverlay GetHighQualityOverlay; |
| 872 |
| 873 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 874 internal delegate uint _GetOverlayKey(ulong ulOverlayHandle, System.Text
.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError); |
| 875 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 876 internal _GetOverlayKey GetOverlayKey; |
| 877 |
| 878 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 879 internal delegate uint _GetOverlayName(ulong ulOverlayHandle, System.Tex
t.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError); |
| 880 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 881 internal _GetOverlayName GetOverlayName; |
| 882 |
| 883 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 884 internal delegate EVROverlayError _GetOverlayImageData(ulong ulOverlayHa
ndle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight)
; |
| 885 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 886 internal _GetOverlayImageData GetOverlayImageData; |
| 887 |
| 888 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 889 internal delegate IntPtr _GetOverlayErrorNameFromEnum(EVROverlayError er
ror); |
| 890 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 891 internal _GetOverlayErrorNameFromEnum GetOverlayErrorNameFromEnum; |
| 892 |
| 893 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 894 internal delegate EVROverlayError _SetOverlayRenderingPid(ulong ulOverla
yHandle, uint unPID); |
| 895 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 896 internal _SetOverlayRenderingPid SetOverlayRenderingPid; |
| 897 |
| 898 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 899 internal delegate uint _GetOverlayRenderingPid(ulong ulOverlayHandle); |
| 900 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 901 internal _GetOverlayRenderingPid GetOverlayRenderingPid; |
| 902 |
| 903 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 904 internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle,
VROverlayFlags eOverlayFlag, bool bEnabled); |
| 905 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 906 internal _SetOverlayFlag SetOverlayFlag; |
| 907 |
| 908 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 909 internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle,
VROverlayFlags eOverlayFlag, ref bool pbEnabled); |
| 910 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 911 internal _GetOverlayFlag GetOverlayFlag; |
| 912 |
| 913 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 914 internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle
, float fRed, float fGreen, float fBlue); |
| 915 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 916 internal _SetOverlayColor SetOverlayColor; |
| 917 |
| 918 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 919 internal delegate EVROverlayError _GetOverlayColor(ulong ulOverlayHandle
, ref float pfRed, ref float pfGreen, ref float pfBlue); |
| 920 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 921 internal _GetOverlayColor GetOverlayColor; |
| 922 |
| 923 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 924 internal delegate EVROverlayError _SetOverlayAlpha(ulong ulOverlayHandle
, float fAlpha); |
| 925 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 926 internal _SetOverlayAlpha SetOverlayAlpha; |
| 927 |
| 928 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 929 internal delegate EVROverlayError _GetOverlayAlpha(ulong ulOverlayHandle
, ref float pfAlpha); |
| 930 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 931 internal _GetOverlayAlpha GetOverlayAlpha; |
| 932 |
| 933 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 934 internal delegate EVROverlayError _SetOverlayTexelAspect(ulong ulOverlay
Handle, float fTexelAspect); |
| 935 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 936 internal _SetOverlayTexelAspect SetOverlayTexelAspect; |
| 937 |
| 938 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 939 internal delegate EVROverlayError _GetOverlayTexelAspect(ulong ulOverlay
Handle, ref float pfTexelAspect); |
| 940 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 941 internal _GetOverlayTexelAspect GetOverlayTexelAspect; |
| 942 |
| 943 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 944 internal delegate EVROverlayError _SetOverlaySortOrder(ulong ulOverlayHa
ndle, uint unSortOrder); |
| 945 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 946 internal _SetOverlaySortOrder SetOverlaySortOrder; |
| 947 |
| 948 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 949 internal delegate EVROverlayError _GetOverlaySortOrder(ulong ulOverlayHa
ndle, ref uint punSortOrder); |
| 950 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 951 internal _GetOverlaySortOrder GetOverlaySortOrder; |
| 952 |
| 953 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 954 internal delegate EVROverlayError _SetOverlayWidthInMeters(ulong ulOverl
ayHandle, float fWidthInMeters); |
| 955 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 956 internal _SetOverlayWidthInMeters SetOverlayWidthInMeters; |
| 957 |
| 958 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 959 internal delegate EVROverlayError _GetOverlayWidthInMeters(ulong ulOverl
ayHandle, ref float pfWidthInMeters); |
| 960 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 961 internal _GetOverlayWidthInMeters GetOverlayWidthInMeters; |
| 962 |
| 963 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 964 internal delegate EVROverlayError _SetOverlayAutoCurveDistanceRangeInMet
ers(ulong ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeter
s); |
| 965 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 966 internal _SetOverlayAutoCurveDistanceRangeInMeters SetOverlayAutoCurveDi
stanceRangeInMeters; |
| 967 |
| 968 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 969 internal delegate EVROverlayError _GetOverlayAutoCurveDistanceRangeInMet
ers(ulong ulOverlayHandle, ref float pfMinDistanceInMeters, ref float pfMaxDista
nceInMeters); |
| 970 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 971 internal _GetOverlayAutoCurveDistanceRangeInMeters GetOverlayAutoCurveDi
stanceRangeInMeters; |
| 972 |
| 973 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 974 internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulO
verlayHandle, EColorSpace eTextureColorSpace); |
| 975 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 976 internal _SetOverlayTextureColorSpace SetOverlayTextureColorSpace; |
| 977 |
| 978 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 979 internal delegate EVROverlayError _GetOverlayTextureColorSpace(ulong ulO
verlayHandle, ref EColorSpace peTextureColorSpace); |
| 980 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 981 internal _GetOverlayTextureColorSpace GetOverlayTextureColorSpace; |
| 982 |
| 983 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 984 internal delegate EVROverlayError _SetOverlayTextureBounds(ulong ulOverl
ayHandle, ref VRTextureBounds_t pOverlayTextureBounds); |
| 985 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 986 internal _SetOverlayTextureBounds SetOverlayTextureBounds; |
| 987 |
| 988 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 989 internal delegate EVROverlayError _GetOverlayTextureBounds(ulong ulOverl
ayHandle, ref VRTextureBounds_t pOverlayTextureBounds); |
| 990 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 991 internal _GetOverlayTextureBounds GetOverlayTextureBounds; |
| 992 |
| 993 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 994 internal delegate EVROverlayError _GetOverlayTransformType(ulong ulOverl
ayHandle, ref VROverlayTransformType peTransformType); |
| 995 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 996 internal _GetOverlayTransformType GetOverlayTransformType; |
| 997 |
| 998 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 999 internal delegate EVROverlayError _SetOverlayTransformAbsolute(ulong ulO
verlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTra
ckingOriginToOverlayTransform); |
| 1000 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1001 internal _SetOverlayTransformAbsolute SetOverlayTransformAbsolute; |
| 1002 |
| 1003 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1004 internal delegate EVROverlayError _GetOverlayTransformAbsolute(ulong ulO
verlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pm
atTrackingOriginToOverlayTransform); |
| 1005 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1006 internal _GetOverlayTransformAbsolute GetOverlayTransformAbsolute; |
| 1007 |
| 1008 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1009 internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceRelat
ive(ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDe
viceToOverlayTransform); |
| 1010 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1011 internal _SetOverlayTransformTrackedDeviceRelative SetOverlayTransformTr
ackedDeviceRelative; |
| 1012 |
| 1013 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1014 internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceRelat
ive(ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrac
kedDeviceToOverlayTransform); |
| 1015 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1016 internal _GetOverlayTransformTrackedDeviceRelative GetOverlayTransformTr
ackedDeviceRelative; |
| 1017 |
| 1018 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1019 internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceCompo
nent(ulong ulOverlayHandle, uint unDeviceIndex, string pchComponentName); |
| 1020 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1021 internal _SetOverlayTransformTrackedDeviceComponent SetOverlayTransformT
rackedDeviceComponent; |
| 1022 |
| 1023 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1024 internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceCompo
nent(ulong ulOverlayHandle, ref uint punDeviceIndex, string pchComponentName, ui
nt unComponentNameSize); |
| 1025 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1026 internal _GetOverlayTransformTrackedDeviceComponent GetOverlayTransformT
rackedDeviceComponent; |
| 1027 |
| 1028 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1029 internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle); |
| 1030 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1031 internal _ShowOverlay ShowOverlay; |
| 1032 |
| 1033 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1034 internal delegate EVROverlayError _HideOverlay(ulong ulOverlayHandle); |
| 1035 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1036 internal _HideOverlay HideOverlay; |
| 1037 |
| 1038 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1039 internal delegate bool _IsOverlayVisible(ulong ulOverlayHandle); |
| 1040 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1041 internal _IsOverlayVisible IsOverlayVisible; |
| 1042 |
| 1043 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1044 internal delegate EVROverlayError _GetTransformForOverlayCoordinates(ulo
ng ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordi
natesInOverlay, ref HmdMatrix34_t pmatTransform); |
| 1045 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1046 internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordi
nates; |
| 1047 |
| 1048 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1049 internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref
VREvent_t pEvent, uint uncbVREvent); |
| 1050 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1051 internal _PollNextOverlayEvent PollNextOverlayEvent; |
| 1052 |
| 1053 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1054 internal delegate EVROverlayError _GetOverlayInputMethod(ulong ulOverlay
Handle, ref VROverlayInputMethod peInputMethod); |
| 1055 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1056 internal _GetOverlayInputMethod GetOverlayInputMethod; |
| 1057 |
| 1058 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1059 internal delegate EVROverlayError _SetOverlayInputMethod(ulong ulOverlay
Handle, VROverlayInputMethod eInputMethod); |
| 1060 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1061 internal _SetOverlayInputMethod SetOverlayInputMethod; |
| 1062 |
| 1063 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1064 internal delegate EVROverlayError _GetOverlayMouseScale(ulong ulOverlayH
andle, ref HmdVector2_t pvecMouseScale); |
| 1065 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1066 internal _GetOverlayMouseScale GetOverlayMouseScale; |
| 1067 |
| 1068 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1069 internal delegate EVROverlayError _SetOverlayMouseScale(ulong ulOverlayH
andle, ref HmdVector2_t pvecMouseScale); |
| 1070 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1071 internal _SetOverlayMouseScale SetOverlayMouseScale; |
| 1072 |
| 1073 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1074 internal delegate bool _ComputeOverlayIntersection(ulong ulOverlayHandle
, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t
pResults); |
| 1075 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1076 internal _ComputeOverlayIntersection ComputeOverlayIntersection; |
| 1077 |
| 1078 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1079 internal delegate bool _HandleControllerOverlayInteractionAsMouse(ulong
ulOverlayHandle, uint unControllerDeviceIndex); |
| 1080 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1081 internal _HandleControllerOverlayInteractionAsMouse HandleControllerOver
layInteractionAsMouse; |
| 1082 |
| 1083 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1084 internal delegate bool _IsHoverTargetOverlay(ulong ulOverlayHandle); |
| 1085 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1086 internal _IsHoverTargetOverlay IsHoverTargetOverlay; |
| 1087 |
| 1088 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1089 internal delegate ulong _GetGamepadFocusOverlay(); |
| 1090 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1091 internal _GetGamepadFocusOverlay GetGamepadFocusOverlay; |
| 1092 |
| 1093 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1094 internal delegate EVROverlayError _SetGamepadFocusOverlay(ulong ulNewFoc
usOverlay); |
| 1095 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1096 internal _SetGamepadFocusOverlay SetGamepadFocusOverlay; |
| 1097 |
| 1098 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1099 internal delegate EVROverlayError _SetOverlayNeighbor(EOverlayDirection
eDirection, ulong ulFrom, ulong ulTo); |
| 1100 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1101 internal _SetOverlayNeighbor SetOverlayNeighbor; |
| 1102 |
| 1103 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1104 internal delegate EVROverlayError _MoveGamepadFocusToNeighbor(EOverlayDi
rection eDirection, ulong ulFrom); |
| 1105 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1106 internal _MoveGamepadFocusToNeighbor MoveGamepadFocusToNeighbor; |
| 1107 |
| 1108 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1109 internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHand
le, ref Texture_t pTexture); |
| 1110 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1111 internal _SetOverlayTexture SetOverlayTexture; |
| 1112 |
| 1113 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1114 internal delegate EVROverlayError _ClearOverlayTexture(ulong ulOverlayHa
ndle); |
| 1115 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1116 internal _ClearOverlayTexture ClearOverlayTexture; |
| 1117 |
| 1118 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1119 internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle,
IntPtr pvBuffer, uint unWidth, uint unHeight, uint unDepth); |
| 1120 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1121 internal _SetOverlayRaw SetOverlayRaw; |
| 1122 |
| 1123 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1124 internal delegate EVROverlayError _SetOverlayFromFile(ulong ulOverlayHan
dle, string pchFilePath); |
| 1125 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1126 internal _SetOverlayFromFile SetOverlayFromFile; |
| 1127 |
| 1128 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1129 internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHand
le, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth,
ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorS
pace pColorSpace, ref VRTextureBounds_t pTextureBounds); |
| 1130 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1131 internal _GetOverlayTexture GetOverlayTexture; |
| 1132 |
| 1133 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1134 internal delegate EVROverlayError _ReleaseNativeOverlayHandle(ulong ulOv
erlayHandle, IntPtr pNativeTextureHandle); |
| 1135 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1136 internal _ReleaseNativeOverlayHandle ReleaseNativeOverlayHandle; |
| 1137 |
| 1138 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1139 internal delegate EVROverlayError _GetOverlayTextureSize(ulong ulOverlay
Handle, ref uint pWidth, ref uint pHeight); |
| 1140 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1141 internal _GetOverlayTextureSize GetOverlayTextureSize; |
| 1142 |
| 1143 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1144 internal delegate EVROverlayError _CreateDashboardOverlay(string pchOver
layKey, string pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbna
ilHandle); |
| 1145 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1146 internal _CreateDashboardOverlay CreateDashboardOverlay; |
| 1147 |
| 1148 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1149 internal delegate bool _IsDashboardVisible(); |
| 1150 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1151 internal _IsDashboardVisible IsDashboardVisible; |
| 1152 |
| 1153 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1154 internal delegate bool _IsActiveDashboardOverlay(ulong ulOverlayHandle); |
| 1155 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1156 internal _IsActiveDashboardOverlay IsActiveDashboardOverlay; |
| 1157 |
| 1158 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1159 internal delegate EVROverlayError _SetDashboardOverlaySceneProcess(ulong
ulOverlayHandle, uint unProcessId); |
| 1160 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1161 internal _SetDashboardOverlaySceneProcess SetDashboardOverlaySceneProces
s; |
| 1162 |
| 1163 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1164 internal delegate EVROverlayError _GetDashboardOverlaySceneProcess(ulong
ulOverlayHandle, ref uint punProcessId); |
| 1165 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1166 internal _GetDashboardOverlaySceneProcess GetDashboardOverlaySceneProces
s; |
| 1167 |
| 1168 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1169 internal delegate void _ShowDashboard(string pchOverlayToShow); |
| 1170 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1171 internal _ShowDashboard ShowDashboard; |
| 1172 |
| 1173 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1174 internal delegate uint _GetPrimaryDashboardDevice(); |
| 1175 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1176 internal _GetPrimaryDashboardDevice GetPrimaryDashboardDevice; |
| 1177 |
| 1178 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1179 internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLin
eInputMode, string pchDescription, uint unCharMax, string pchExistingText, bool
bUseMinimalMode, ulong uUserValue); |
| 1180 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1181 internal _ShowKeyboard ShowKeyboard; |
| 1182 |
| 1183 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1184 internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverla
yHandle, int eInputMode, int eLineInputMode, string pchDescription, uint unCharM
ax, string pchExistingText, bool bUseMinimalMode, ulong uUserValue); |
| 1185 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1186 internal _ShowKeyboardForOverlay ShowKeyboardForOverlay; |
| 1187 |
| 1188 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1189 internal delegate uint _GetKeyboardText(System.Text.StringBuilder pchTex
t, uint cchText); |
| 1190 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1191 internal _GetKeyboardText GetKeyboardText; |
| 1192 |
| 1193 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1194 internal delegate void _HideKeyboard(); |
| 1195 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1196 internal _HideKeyboard HideKeyboard; |
| 1197 |
| 1198 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1199 internal delegate void _SetKeyboardTransformAbsolute(ETrackingUniverseOr
igin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform); |
| 1200 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1201 internal _SetKeyboardTransformAbsolute SetKeyboardTransformAbsolute; |
| 1202 |
| 1203 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1204 internal delegate void _SetKeyboardPositionForOverlay(ulong ulOverlayHan
dle, HmdRect2_t avoidRect); |
| 1205 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1206 internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay; |
| 1207 |
| 1208 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1209 internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOv
erlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNu
mMaskPrimitives, uint unPrimitiveSize); |
| 1210 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1211 internal _SetOverlayIntersectionMask SetOverlayIntersectionMask; |
| 1212 |
| 1213 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1214 internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle
, ref uint pFlags); |
| 1215 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1216 internal _GetOverlayFlags GetOverlayFlags; |
| 1217 |
| 1218 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1219 internal delegate VRMessageOverlayResponse _ShowMessageOverlay(string pc
hText, string pchCaption, string pchButton0Text, string pchButton1Text, string p
chButton2Text, string pchButton3Text); |
| 1220 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1221 internal _ShowMessageOverlay ShowMessageOverlay; |
| 1222 |
| 1223 } |
| 1224 |
| 1225 [StructLayout(LayoutKind.Sequential)] |
| 1226 public struct IVRRenderModels |
| 1227 { |
| 1228 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1229 internal delegate EVRRenderModelError _LoadRenderModel_Async(string pchR
enderModelName, ref IntPtr ppRenderModel); |
| 1230 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1231 internal _LoadRenderModel_Async LoadRenderModel_Async; |
| 1232 |
| 1233 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1234 internal delegate void _FreeRenderModel(IntPtr pRenderModel); |
| 1235 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1236 internal _FreeRenderModel FreeRenderModel; |
| 1237 |
| 1238 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1239 internal delegate EVRRenderModelError _LoadTexture_Async(int textureId,
ref IntPtr ppTexture); |
| 1240 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1241 internal _LoadTexture_Async LoadTexture_Async; |
| 1242 |
| 1243 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1244 internal delegate void _FreeTexture(IntPtr pTexture); |
| 1245 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1246 internal _FreeTexture FreeTexture; |
| 1247 |
| 1248 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1249 internal delegate EVRRenderModelError _LoadTextureD3D11_Async(int textur
eId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D); |
| 1250 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1251 internal _LoadTextureD3D11_Async LoadTextureD3D11_Async; |
| 1252 |
| 1253 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1254 internal delegate EVRRenderModelError _LoadIntoTextureD3D11_Async(int te
xtureId, IntPtr pDstTexture); |
| 1255 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1256 internal _LoadIntoTextureD3D11_Async LoadIntoTextureD3D11_Async; |
| 1257 |
| 1258 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1259 internal delegate void _FreeTextureD3D11(IntPtr pD3D11Texture2D); |
| 1260 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1261 internal _FreeTextureD3D11 FreeTextureD3D11; |
| 1262 |
| 1263 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1264 internal delegate uint _GetRenderModelName(uint unRenderModelIndex, Syst
em.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen); |
| 1265 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1266 internal _GetRenderModelName GetRenderModelName; |
| 1267 |
| 1268 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1269 internal delegate uint _GetRenderModelCount(); |
| 1270 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1271 internal _GetRenderModelCount GetRenderModelCount; |
| 1272 |
| 1273 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1274 internal delegate uint _GetComponentCount(string pchRenderModelName); |
| 1275 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1276 internal _GetComponentCount GetComponentCount; |
| 1277 |
| 1278 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1279 internal delegate uint _GetComponentName(string pchRenderModelName, uint
unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentN
ameLen); |
| 1280 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1281 internal _GetComponentName GetComponentName; |
| 1282 |
| 1283 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1284 internal delegate ulong _GetComponentButtonMask(string pchRenderModelNam
e, string pchComponentName); |
| 1285 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1286 internal _GetComponentButtonMask GetComponentButtonMask; |
| 1287 |
| 1288 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1289 internal delegate uint _GetComponentRenderModelName(string pchRenderMode
lName, string pchComponentName, System.Text.StringBuilder pchComponentRenderMode
lName, uint unComponentRenderModelNameLen); |
| 1290 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1291 internal _GetComponentRenderModelName GetComponentRenderModelName; |
| 1292 |
| 1293 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1294 internal delegate bool _GetComponentState(string pchRenderModelName, str
ing pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_
ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState)
; |
| 1295 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1296 internal _GetComponentState GetComponentState; |
| 1297 |
| 1298 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1299 internal delegate bool _RenderModelHasComponent(string pchRenderModelNam
e, string pchComponentName); |
| 1300 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1301 internal _RenderModelHasComponent RenderModelHasComponent; |
| 1302 |
| 1303 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1304 internal delegate uint _GetRenderModelThumbnailURL(string pchRenderModel
Name, System.Text.StringBuilder pchThumbnailURL, uint unThumbnailURLLen, ref EVR
RenderModelError peError); |
| 1305 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1306 internal _GetRenderModelThumbnailURL GetRenderModelThumbnailURL; |
| 1307 |
| 1308 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1309 internal delegate uint _GetRenderModelOriginalPath(string pchRenderModel
Name, System.Text.StringBuilder pchOriginalPath, uint unOriginalPathLen, ref EVR
RenderModelError peError); |
| 1310 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1311 internal _GetRenderModelOriginalPath GetRenderModelOriginalPath; |
| 1312 |
| 1313 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1314 internal delegate IntPtr _GetRenderModelErrorNameFromEnum(EVRRenderModel
Error error); |
| 1315 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1316 internal _GetRenderModelErrorNameFromEnum GetRenderModelErrorNameFromEnu
m; |
| 1317 |
| 1318 } |
| 1319 |
| 1320 [StructLayout(LayoutKind.Sequential)] |
| 1321 public struct IVRNotifications |
| 1322 { |
| 1323 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1324 internal delegate EVRNotificationError _CreateNotification(ulong ulOverl
ayHandle, ulong ulUserValue, EVRNotificationType type, string pchText, EVRNotifi
cationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId); |
| 1325 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1326 internal _CreateNotification CreateNotification; |
| 1327 |
| 1328 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1329 internal delegate EVRNotificationError _RemoveNotification(uint notifica
tionId); |
| 1330 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1331 internal _RemoveNotification RemoveNotification; |
| 1332 |
| 1333 } |
| 1334 |
| 1335 [StructLayout(LayoutKind.Sequential)] |
| 1336 public struct IVRSettings |
| 1337 { |
| 1338 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1339 internal delegate IntPtr _GetSettingsErrorNameFromEnum(EVRSettingsError
eError); |
| 1340 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1341 internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum; |
| 1342 |
| 1343 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1344 internal delegate bool _Sync(bool bForce, ref EVRSettingsError peError); |
| 1345 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1346 internal _Sync Sync; |
| 1347 |
| 1348 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1349 internal delegate void _SetBool(string pchSection, string pchSettingsKey
, bool bValue, ref EVRSettingsError peError); |
| 1350 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1351 internal _SetBool SetBool; |
| 1352 |
| 1353 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1354 internal delegate void _SetInt32(string pchSection, string pchSettingsKe
y, int nValue, ref EVRSettingsError peError); |
| 1355 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1356 internal _SetInt32 SetInt32; |
| 1357 |
| 1358 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1359 internal delegate void _SetFloat(string pchSection, string pchSettingsKe
y, float flValue, ref EVRSettingsError peError); |
| 1360 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1361 internal _SetFloat SetFloat; |
| 1362 |
| 1363 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1364 internal delegate void _SetString(string pchSection, string pchSettingsK
ey, string pchValue, ref EVRSettingsError peError); |
| 1365 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1366 internal _SetString SetString; |
| 1367 |
| 1368 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1369 internal delegate bool _GetBool(string pchSection, string pchSettingsKey
, ref EVRSettingsError peError); |
| 1370 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1371 internal _GetBool GetBool; |
| 1372 |
| 1373 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1374 internal delegate int _GetInt32(string pchSection, string pchSettingsKey
, ref EVRSettingsError peError); |
| 1375 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1376 internal _GetInt32 GetInt32; |
| 1377 |
| 1378 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1379 internal delegate float _GetFloat(string pchSection, string pchSettingsK
ey, ref EVRSettingsError peError); |
| 1380 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1381 internal _GetFloat GetFloat; |
| 1382 |
| 1383 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1384 internal delegate void _GetString(string pchSection, string pchSettingsK
ey, System.Text.StringBuilder pchValue, uint unValueLen, ref EVRSettingsError pe
Error); |
| 1385 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1386 internal _GetString GetString; |
| 1387 |
| 1388 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1389 internal delegate void _RemoveSection(string pchSection, ref EVRSettings
Error peError); |
| 1390 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1391 internal _RemoveSection RemoveSection; |
| 1392 |
| 1393 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1394 internal delegate void _RemoveKeyInSection(string pchSection, string pch
SettingsKey, ref EVRSettingsError peError); |
| 1395 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1396 internal _RemoveKeyInSection RemoveKeyInSection; |
| 1397 |
| 1398 } |
| 1399 |
| 1400 [StructLayout(LayoutKind.Sequential)] |
| 1401 public struct IVRScreenshots |
| 1402 { |
| 1403 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1404 internal delegate EVRScreenshotError _RequestScreenshot(ref uint pOutScr
eenshotHandle, EVRScreenshotType type, string pchPreviewFilename, string pchVRFi
lename); |
| 1405 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1406 internal _RequestScreenshot RequestScreenshot; |
| 1407 |
| 1408 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1409 internal delegate EVRScreenshotError _HookScreenshot([In, Out] EVRScreen
shotType[] pSupportedTypes, int numTypes); |
| 1410 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1411 internal _HookScreenshot HookScreenshot; |
| 1412 |
| 1413 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1414 internal delegate EVRScreenshotType _GetScreenshotPropertyType(uint scre
enshotHandle, ref EVRScreenshotError pError); |
| 1415 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1416 internal _GetScreenshotPropertyType GetScreenshotPropertyType; |
| 1417 |
| 1418 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1419 internal delegate uint _GetScreenshotPropertyFilename(uint screenshotHan
dle, EVRScreenshotPropertyFilenames filenameType, System.Text.StringBuilder pchF
ilename, uint cchFilename, ref EVRScreenshotError pError); |
| 1420 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1421 internal _GetScreenshotPropertyFilename GetScreenshotPropertyFilename; |
| 1422 |
| 1423 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1424 internal delegate EVRScreenshotError _UpdateScreenshotProgress(uint scre
enshotHandle, float flProgress); |
| 1425 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1426 internal _UpdateScreenshotProgress UpdateScreenshotProgress; |
| 1427 |
| 1428 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1429 internal delegate EVRScreenshotError _TakeStereoScreenshot(ref uint pOut
ScreenshotHandle, string pchPreviewFilename, string pchVRFilename); |
| 1430 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1431 internal _TakeStereoScreenshot TakeStereoScreenshot; |
| 1432 |
| 1433 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1434 internal delegate EVRScreenshotError _SubmitScreenshot(uint screenshotHa
ndle, EVRScreenshotType type, string pchSourcePreviewFilename, string pchSourceV
RFilename); |
| 1435 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1436 internal _SubmitScreenshot SubmitScreenshot; |
| 1437 |
| 1438 } |
| 1439 |
| 1440 [StructLayout(LayoutKind.Sequential)] |
| 1441 public struct IVRResources |
| 1442 { |
| 1443 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1444 internal delegate uint _LoadSharedResource(string pchResourceName, strin
g pchBuffer, uint unBufferLen); |
| 1445 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1446 internal _LoadSharedResource LoadSharedResource; |
| 1447 |
| 1448 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1449 internal delegate uint _GetResourceFullPath(string pchResourceName, stri
ng pchResourceTypeDirectory, string pchPathBuffer, uint unBufferLen); |
| 1450 [MarshalAs(UnmanagedType.FunctionPtr)] |
| 1451 internal _GetResourceFullPath GetResourceFullPath; |
| 1452 |
| 1453 } |
| 1454 |
| 1455 |
| 1456 public class CVRSystem |
| 1457 { |
| 1458 IVRSystem FnTable; |
| 1459 internal CVRSystem(IntPtr pInterface) |
| 1460 { |
| 1461 FnTable = (IVRSystem)Marshal.PtrToStructure(pInterface, typeof(I
VRSystem)); |
| 1462 } |
| 1463 public void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnH
eight) |
| 1464 { |
| 1465 pnWidth = 0; |
| 1466 pnHeight = 0; |
| 1467 FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight)
; |
| 1468 } |
| 1469 public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float
fFarZ) |
| 1470 { |
| 1471 HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,f
FarZ); |
| 1472 return result; |
| 1473 } |
| 1474 public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRi
ght,ref float pfTop,ref float pfBottom) |
| 1475 { |
| 1476 pfLeft = 0; |
| 1477 pfRight = 0; |
| 1478 pfTop = 0; |
| 1479 pfBottom = 0; |
| 1480 FnTable.GetProjectionRaw(eEye,ref pfLeft,ref pfRight,ref pfTop,r
ef pfBottom); |
| 1481 } |
| 1482 public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref Distorti
onCoordinates_t pDistortionCoordinates) |
| 1483 { |
| 1484 bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistorti
onCoordinates); |
| 1485 return result; |
| 1486 } |
| 1487 public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye) |
| 1488 { |
| 1489 HmdMatrix34_t result = FnTable.GetEyeToHeadTransform(eEye); |
| 1490 return result; |
| 1491 } |
| 1492 public bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref
ulong pulFrameCounter) |
| 1493 { |
| 1494 pfSecondsSinceLastVsync = 0; |
| 1495 pulFrameCounter = 0; |
| 1496 bool result = FnTable.GetTimeSinceLastVsync(ref pfSecondsSinceLa
stVsync,ref pulFrameCounter); |
| 1497 return result; |
| 1498 } |
| 1499 public int GetD3D9AdapterIndex() |
| 1500 { |
| 1501 int result = FnTable.GetD3D9AdapterIndex(); |
| 1502 return result; |
| 1503 } |
| 1504 public void GetDXGIOutputInfo(ref int pnAdapterIndex) |
| 1505 { |
| 1506 pnAdapterIndex = 0; |
| 1507 FnTable.GetDXGIOutputInfo(ref pnAdapterIndex); |
| 1508 } |
| 1509 public bool IsDisplayOnDesktop() |
| 1510 { |
| 1511 bool result = FnTable.IsDisplayOnDesktop(); |
| 1512 return result; |
| 1513 } |
| 1514 public bool SetDisplayVisibility(bool bIsVisibleOnDesktop) |
| 1515 { |
| 1516 bool result = FnTable.SetDisplayVisibility(bIsVisibleOnDesktop); |
| 1517 return result; |
| 1518 } |
| 1519 public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOri
gin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevic
ePoseArray) |
| 1520 { |
| 1521 FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecond
sToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length)
; |
| 1522 } |
| 1523 public void ResetSeatedZeroPose() |
| 1524 { |
| 1525 FnTable.ResetSeatedZeroPose(); |
| 1526 } |
| 1527 public HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() |
| 1528 { |
| 1529 HmdMatrix34_t result = FnTable.GetSeatedZeroPoseToStandingAbsolu
teTrackingPose(); |
| 1530 return result; |
| 1531 } |
| 1532 public HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() |
| 1533 { |
| 1534 HmdMatrix34_t result = FnTable.GetRawZeroPoseToStandingAbsoluteT
rackingPose(); |
| 1535 return result; |
| 1536 } |
| 1537 public uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTr
ackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDevi
ceIndex) |
| 1538 { |
| 1539 uint result = FnTable.GetSortedTrackedDeviceIndicesOfClass(eTrac
kedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Leng
th,unRelativeToTrackedDeviceIndex); |
| 1540 return result; |
| 1541 } |
| 1542 public EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceI
d) |
| 1543 { |
| 1544 EDeviceActivityLevel result = FnTable.GetTrackedDeviceActivityLe
vel(unDeviceId); |
| 1545 return result; |
| 1546 } |
| 1547 public void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref Track
edDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform) |
| 1548 { |
| 1549 FnTable.ApplyTransform(ref pOutputPose,ref pTrackedDevicePose,re
f pTransform); |
| 1550 } |
| 1551 public uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRol
e unDeviceType) |
| 1552 { |
| 1553 uint result = FnTable.GetTrackedDeviceIndexForControllerRole(unD
eviceType); |
| 1554 return result; |
| 1555 } |
| 1556 public ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uin
t unDeviceIndex) |
| 1557 { |
| 1558 ETrackedControllerRole result = FnTable.GetControllerRoleForTrac
kedDeviceIndex(unDeviceIndex); |
| 1559 return result; |
| 1560 } |
| 1561 public ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex) |
| 1562 { |
| 1563 ETrackedDeviceClass result = FnTable.GetTrackedDeviceClass(unDev
iceIndex); |
| 1564 return result; |
| 1565 } |
| 1566 public bool IsTrackedDeviceConnected(uint unDeviceIndex) |
| 1567 { |
| 1568 bool result = FnTable.IsTrackedDeviceConnected(unDeviceIndex); |
| 1569 return result; |
| 1570 } |
| 1571 public bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDevi
ceProperty prop,ref ETrackedPropertyError pError) |
| 1572 { |
| 1573 bool result = FnTable.GetBoolTrackedDeviceProperty(unDeviceIndex
,prop,ref pError); |
| 1574 return result; |
| 1575 } |
| 1576 public float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDe
viceProperty prop,ref ETrackedPropertyError pError) |
| 1577 { |
| 1578 float result = FnTable.GetFloatTrackedDeviceProperty(unDeviceInd
ex,prop,ref pError); |
| 1579 return result; |
| 1580 } |
| 1581 public int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDevi
ceProperty prop,ref ETrackedPropertyError pError) |
| 1582 { |
| 1583 int result = FnTable.GetInt32TrackedDeviceProperty(unDeviceIndex
,prop,ref pError); |
| 1584 return result; |
| 1585 } |
| 1586 public ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedD
eviceProperty prop,ref ETrackedPropertyError pError) |
| 1587 { |
| 1588 ulong result = FnTable.GetUint64TrackedDeviceProperty(unDeviceIn
dex,prop,ref pError); |
| 1589 return result; |
| 1590 } |
| 1591 public HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex
,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError) |
| 1592 { |
| 1593 HmdMatrix34_t result = FnTable.GetMatrix34TrackedDeviceProperty(
unDeviceIndex,prop,ref pError); |
| 1594 return result; |
| 1595 } |
| 1596 public uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDe
viceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrac
kedPropertyError pError) |
| 1597 { |
| 1598 uint result = FnTable.GetStringTrackedDeviceProperty(unDeviceInd
ex,prop,pchValue,unBufferSize,ref pError); |
| 1599 return result; |
| 1600 } |
| 1601 public string GetPropErrorNameFromEnum(ETrackedPropertyError error) |
| 1602 { |
| 1603 IntPtr result = FnTable.GetPropErrorNameFromEnum(error); |
| 1604 return Marshal.PtrToStringAnsi(result); |
| 1605 } |
| 1606 public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent) |
| 1607 { |
| 1608 bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent); |
| 1609 return result; |
| 1610 } |
| 1611 public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VR
Event_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose) |
| 1612 { |
| 1613 bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,u
ncbVREvent,ref pTrackedDevicePose); |
| 1614 return result; |
| 1615 } |
| 1616 public string GetEventTypeNameFromEnum(EVREventType eType) |
| 1617 { |
| 1618 IntPtr result = FnTable.GetEventTypeNameFromEnum(eType); |
| 1619 return Marshal.PtrToStringAnsi(result); |
| 1620 } |
| 1621 public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshTyp
e type) |
| 1622 { |
| 1623 HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type); |
| 1624 return result; |
| 1625 } |
| 1626 // This is a terrible hack to workaround the fact that VRControllerState_t was |
| 1627 // originally mis-compiled with the wrong packing for Linux and OSX. |
| 1628 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1629 internal delegate bool _GetControllerStatePacked(uint unControllerDevice
Index,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize
); |
| 1630 [StructLayout(LayoutKind.Explicit)] |
| 1631 struct GetControllerStateUnion |
| 1632 { |
| 1633 [FieldOffset(0)] |
| 1634 public IVRSystem._GetControllerState pGetControllerState; |
| 1635 [FieldOffset(0)] |
| 1636 public _GetControllerStatePacked pGetControllerStatePacked; |
| 1637 } |
| 1638 public bool GetControllerState(uint unControllerDeviceIndex,ref VRContro
llerState_t pControllerState,uint unControllerStateSize) |
| 1639 { |
| 1640 if ((System.Environment.OSVersion.Platform == System.PlatformID.
MacOSX) || |
| 1641 (System.Environment.OSVersion.Platform == System
.PlatformID.Unix)) |
| 1642 { |
| 1643 GetControllerStateUnion u; |
| 1644 VRControllerState_t_Packed state_packed = new VRControll
erState_t_Packed(); |
| 1645 u.pGetControllerStatePacked = null; |
| 1646 u.pGetControllerState = FnTable.GetControllerState; |
| 1647 bool packed_result = u.pGetControllerStatePacked(unContr
ollerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.S
izeOf(typeof(VRControllerState_t_Packed))); |
| 1648 |
| 1649 state_packed.Unpack(ref pControllerState); |
| 1650 return packed_result; |
| 1651 } |
| 1652 bool result = FnTable.GetControllerState(unControllerDeviceIndex
,ref pControllerState,unControllerStateSize); |
| 1653 return result; |
| 1654 } |
| 1655 // This is a terrible hack to workaround the fact that VRControllerState_t was |
| 1656 // originally mis-compiled with the wrong packing for Linux and OSX. |
| 1657 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 1658 internal delegate bool _GetControllerStateWithPosePacked(ETrackingUniver
seOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t_Packed pCo
ntrollerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDeviceP
ose); |
| 1659 [StructLayout(LayoutKind.Explicit)] |
| 1660 struct GetControllerStateWithPoseUnion |
| 1661 { |
| 1662 [FieldOffset(0)] |
| 1663 public IVRSystem._GetControllerStateWithPose pGetControllerState
WithPose; |
| 1664 [FieldOffset(0)] |
| 1665 public _GetControllerStateWithPosePacked pGetControllerStateWith
PosePacked; |
| 1666 } |
| 1667 public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,u
int unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unCont
rollerStateSize,ref TrackedDevicePose_t pTrackedDevicePose) |
| 1668 { |
| 1669 if ((System.Environment.OSVersion.Platform == System.PlatformID.
MacOSX) || |
| 1670 (System.Environment.OSVersion.Platform == System
.PlatformID.Unix)) |
| 1671 { |
| 1672 GetControllerStateWithPoseUnion u; |
| 1673 VRControllerState_t_Packed state_packed = new VRControll
erState_t_Packed(); |
| 1674 u.pGetControllerStateWithPosePacked = null; |
| 1675 u.pGetControllerStateWithPose = FnTable.GetControllerSta
teWithPose; |
| 1676 bool packed_result = u.pGetControllerStateWithPosePacked
(eOrigin,unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropSe
rvices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)),ref pTrackedDevicePose
); |
| 1677 |
| 1678 state_packed.Unpack(ref pControllerState); |
| 1679 return packed_result; |
| 1680 } |
| 1681 bool result = FnTable.GetControllerStateWithPose(eOrigin,unContr
ollerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePo
se); |
| 1682 return result; |
| 1683 } |
| 1684 public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisI
d,char usDurationMicroSec) |
| 1685 { |
| 1686 FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDu
rationMicroSec); |
| 1687 } |
| 1688 public string GetButtonIdNameFromEnum(EVRButtonId eButtonId) |
| 1689 { |
| 1690 IntPtr result = FnTable.GetButtonIdNameFromEnum(eButtonId); |
| 1691 return Marshal.PtrToStringAnsi(result); |
| 1692 } |
| 1693 public string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eA
xisType) |
| 1694 { |
| 1695 IntPtr result = FnTable.GetControllerAxisTypeNameFromEnum(eAxisT
ype); |
| 1696 return Marshal.PtrToStringAnsi(result); |
| 1697 } |
| 1698 public bool CaptureInputFocus() |
| 1699 { |
| 1700 bool result = FnTable.CaptureInputFocus(); |
| 1701 return result; |
| 1702 } |
| 1703 public void ReleaseInputFocus() |
| 1704 { |
| 1705 FnTable.ReleaseInputFocus(); |
| 1706 } |
| 1707 public bool IsInputFocusCapturedByAnotherProcess() |
| 1708 { |
| 1709 bool result = FnTable.IsInputFocusCapturedByAnotherProcess(); |
| 1710 return result; |
| 1711 } |
| 1712 public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,stri
ng pchResponseBuffer,uint unResponseBufferSize) |
| 1713 { |
| 1714 uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchReques
t,pchResponseBuffer,unResponseBufferSize); |
| 1715 return result; |
| 1716 } |
| 1717 public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex) |
| 1718 { |
| 1719 EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDevice
Index); |
| 1720 return result; |
| 1721 } |
| 1722 public void AcknowledgeQuit_Exiting() |
| 1723 { |
| 1724 FnTable.AcknowledgeQuit_Exiting(); |
| 1725 } |
| 1726 public void AcknowledgeQuit_UserPrompt() |
| 1727 { |
| 1728 FnTable.AcknowledgeQuit_UserPrompt(); |
| 1729 } |
| 1730 } |
| 1731 |
| 1732 |
| 1733 public class CVRExtendedDisplay |
| 1734 { |
| 1735 IVRExtendedDisplay FnTable; |
| 1736 internal CVRExtendedDisplay(IntPtr pInterface) |
| 1737 { |
| 1738 FnTable = (IVRExtendedDisplay)Marshal.PtrToStructure(pInterface,
typeof(IVRExtendedDisplay)); |
| 1739 } |
| 1740 public void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref
uint pnHeight) |
| 1741 { |
| 1742 pnX = 0; |
| 1743 pnY = 0; |
| 1744 pnWidth = 0; |
| 1745 pnHeight = 0; |
| 1746 FnTable.GetWindowBounds(ref pnX,ref pnY,ref pnWidth,ref pnHeight
); |
| 1747 } |
| 1748 public void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,r
ef uint pnWidth,ref uint pnHeight) |
| 1749 { |
| 1750 pnX = 0; |
| 1751 pnY = 0; |
| 1752 pnWidth = 0; |
| 1753 pnHeight = 0; |
| 1754 FnTable.GetEyeOutputViewport(eEye,ref pnX,ref pnY,ref pnWidth,re
f pnHeight); |
| 1755 } |
| 1756 public void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOu
tputIndex) |
| 1757 { |
| 1758 pnAdapterIndex = 0; |
| 1759 pnAdapterOutputIndex = 0; |
| 1760 FnTable.GetDXGIOutputInfo(ref pnAdapterIndex,ref pnAdapterOutput
Index); |
| 1761 } |
| 1762 } |
| 1763 |
| 1764 |
| 1765 public class CVRTrackedCamera |
| 1766 { |
| 1767 IVRTrackedCamera FnTable; |
| 1768 internal CVRTrackedCamera(IntPtr pInterface) |
| 1769 { |
| 1770 FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, t
ypeof(IVRTrackedCamera)); |
| 1771 } |
| 1772 public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraEr
ror) |
| 1773 { |
| 1774 IntPtr result = FnTable.GetCameraErrorNameFromEnum(eCameraError)
; |
| 1775 return Marshal.PtrToStringAnsi(result); |
| 1776 } |
| 1777 public EVRTrackedCameraError HasCamera(uint nDeviceIndex,ref bool pHasCa
mera) |
| 1778 { |
| 1779 pHasCamera = false; |
| 1780 EVRTrackedCameraError result = FnTable.HasCamera(nDeviceIndex,re
f pHasCamera); |
| 1781 return result; |
| 1782 } |
| 1783 public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex,EVRTra
ckedCameraFrameType eFrameType,ref uint pnWidth,ref uint pnHeight,ref uint pnFra
meBufferSize) |
| 1784 { |
| 1785 pnWidth = 0; |
| 1786 pnHeight = 0; |
| 1787 pnFrameBufferSize = 0; |
| 1788 EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDevic
eIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize); |
| 1789 return result; |
| 1790 } |
| 1791 public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,EVRTr
ackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t p
Center) |
| 1792 { |
| 1793 EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDevi
ceIndex,eFrameType,ref pFocalLength,ref pCenter); |
| 1794 return result; |
| 1795 } |
| 1796 public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,EVRTr
ackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pPr
ojection) |
| 1797 { |
| 1798 EVRTrackedCameraError result = FnTable.GetCameraProjection(nDevi
ceIndex,eFrameType,flZNear,flZFar,ref pProjection); |
| 1799 return result; |
| 1800 } |
| 1801 public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIn
dex,ref ulong pHandle) |
| 1802 { |
| 1803 pHandle = 0; |
| 1804 EVRTrackedCameraError result = FnTable.AcquireVideoStreamingServ
ice(nDeviceIndex,ref pHandle); |
| 1805 return result; |
| 1806 } |
| 1807 public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTracked
Camera) |
| 1808 { |
| 1809 EVRTrackedCameraError result = FnTable.ReleaseVideoStreamingServ
ice(hTrackedCamera); |
| 1810 return result; |
| 1811 } |
| 1812 public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCam
era,EVRTrackedCameraFrameType eFrameType,IntPtr pFrameBuffer,uint nFrameBufferSi
ze,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize) |
| 1813 { |
| 1814 EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer
(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrame
HeaderSize); |
| 1815 return result; |
| 1816 } |
| 1817 public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex
,EVRTrackedCameraFrameType eFrameType,ref VRTextureBounds_t pTextureBounds,ref u
int pnWidth,ref uint pnHeight) |
| 1818 { |
| 1819 pnWidth = 0; |
| 1820 pnHeight = 0; |
| 1821 EVRTrackedCameraError result = FnTable.GetVideoStreamTextureSize
(nDeviceIndex,eFrameType,ref pTextureBounds,ref pnWidth,ref pnHeight); |
| 1822 return result; |
| 1823 } |
| 1824 public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCa
mera,EVRTrackedCameraFrameType eFrameType,IntPtr pD3D11DeviceOrResource,ref IntP
tr ppD3D11ShaderResourceView,ref CameraVideoStreamFrameHeader_t pFrameHeader,uin
t nFrameHeaderSize) |
| 1825 { |
| 1826 EVRTrackedCameraError result = FnTable.GetVideoStreamTextureD3D1
1(hTrackedCamera,eFrameType,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView
,ref pFrameHeader,nFrameHeaderSize); |
| 1827 return result; |
| 1828 } |
| 1829 public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamer
a,EVRTrackedCameraFrameType eFrameType,ref uint pglTextureId,ref CameraVideoStre
amFrameHeader_t pFrameHeader,uint nFrameHeaderSize) |
| 1830 { |
| 1831 pglTextureId = 0; |
| 1832 EVRTrackedCameraError result = FnTable.GetVideoStreamTextureGL(h
TrackedCamera,eFrameType,ref pglTextureId,ref pFrameHeader,nFrameHeaderSize); |
| 1833 return result; |
| 1834 } |
| 1835 public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedC
amera,uint glTextureId) |
| 1836 { |
| 1837 EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTexture
GL(hTrackedCamera,glTextureId); |
| 1838 return result; |
| 1839 } |
| 1840 } |
| 1841 |
| 1842 |
| 1843 public class CVRApplications |
| 1844 { |
| 1845 IVRApplications FnTable; |
| 1846 internal CVRApplications(IntPtr pInterface) |
| 1847 { |
| 1848 FnTable = (IVRApplications)Marshal.PtrToStructure(pInterface, ty
peof(IVRApplications)); |
| 1849 } |
| 1850 public EVRApplicationError AddApplicationManifest(string pchApplicationM
anifestFullPath,bool bTemporary) |
| 1851 { |
| 1852 EVRApplicationError result = FnTable.AddApplicationManifest(pchA
pplicationManifestFullPath,bTemporary); |
| 1853 return result; |
| 1854 } |
| 1855 public EVRApplicationError RemoveApplicationManifest(string pchApplicati
onManifestFullPath) |
| 1856 { |
| 1857 EVRApplicationError result = FnTable.RemoveApplicationManifest(p
chApplicationManifestFullPath); |
| 1858 return result; |
| 1859 } |
| 1860 public bool IsApplicationInstalled(string pchAppKey) |
| 1861 { |
| 1862 bool result = FnTable.IsApplicationInstalled(pchAppKey); |
| 1863 return result; |
| 1864 } |
| 1865 public uint GetApplicationCount() |
| 1866 { |
| 1867 uint result = FnTable.GetApplicationCount(); |
| 1868 return result; |
| 1869 } |
| 1870 public EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIn
dex,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen) |
| 1871 { |
| 1872 EVRApplicationError result = FnTable.GetApplicationKeyByIndex(un
ApplicationIndex,pchAppKeyBuffer,unAppKeyBufferLen); |
| 1873 return result; |
| 1874 } |
| 1875 public EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId
,string pchAppKeyBuffer,uint unAppKeyBufferLen) |
| 1876 { |
| 1877 EVRApplicationError result = FnTable.GetApplicationKeyByProcessI
d(unProcessId,pchAppKeyBuffer,unAppKeyBufferLen); |
| 1878 return result; |
| 1879 } |
| 1880 public EVRApplicationError LaunchApplication(string pchAppKey) |
| 1881 { |
| 1882 EVRApplicationError result = FnTable.LaunchApplication(pchAppKey
); |
| 1883 return result; |
| 1884 } |
| 1885 public EVRApplicationError LaunchTemplateApplication(string pchTemplateA
ppKey,string pchNewAppKey,AppOverrideKeys_t [] pKeys) |
| 1886 { |
| 1887 EVRApplicationError result = FnTable.LaunchTemplateApplication(p
chTemplateAppKey,pchNewAppKey,pKeys,(uint) pKeys.Length); |
| 1888 return result; |
| 1889 } |
| 1890 public EVRApplicationError LaunchApplicationFromMimeType(string pchMimeT
ype,string pchArgs) |
| 1891 { |
| 1892 EVRApplicationError result = FnTable.LaunchApplicationFromMimeTy
pe(pchMimeType,pchArgs); |
| 1893 return result; |
| 1894 } |
| 1895 public EVRApplicationError LaunchDashboardOverlay(string pchAppKey) |
| 1896 { |
| 1897 EVRApplicationError result = FnTable.LaunchDashboardOverlay(pchA
ppKey); |
| 1898 return result; |
| 1899 } |
| 1900 public bool CancelApplicationLaunch(string pchAppKey) |
| 1901 { |
| 1902 bool result = FnTable.CancelApplicationLaunch(pchAppKey); |
| 1903 return result; |
| 1904 } |
| 1905 public EVRApplicationError IdentifyApplication(uint unProcessId,string p
chAppKey) |
| 1906 { |
| 1907 EVRApplicationError result = FnTable.IdentifyApplication(unProce
ssId,pchAppKey); |
| 1908 return result; |
| 1909 } |
| 1910 public uint GetApplicationProcessId(string pchAppKey) |
| 1911 { |
| 1912 uint result = FnTable.GetApplicationProcessId(pchAppKey); |
| 1913 return result; |
| 1914 } |
| 1915 public string GetApplicationsErrorNameFromEnum(EVRApplicationError error
) |
| 1916 { |
| 1917 IntPtr result = FnTable.GetApplicationsErrorNameFromEnum(error); |
| 1918 return Marshal.PtrToStringAnsi(result); |
| 1919 } |
| 1920 public uint GetApplicationPropertyString(string pchAppKey,EVRApplication
Property eProperty,System.Text.StringBuilder pchPropertyValueBuffer,uint unPrope
rtyValueBufferLen,ref EVRApplicationError peError) |
| 1921 { |
| 1922 uint result = FnTable.GetApplicationPropertyString(pchAppKey,ePr
operty,pchPropertyValueBuffer,unPropertyValueBufferLen,ref peError); |
| 1923 return result; |
| 1924 } |
| 1925 public bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationPr
operty eProperty,ref EVRApplicationError peError) |
| 1926 { |
| 1927 bool result = FnTable.GetApplicationPropertyBool(pchAppKey,eProp
erty,ref peError); |
| 1928 return result; |
| 1929 } |
| 1930 public ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicatio
nProperty eProperty,ref EVRApplicationError peError) |
| 1931 { |
| 1932 ulong result = FnTable.GetApplicationPropertyUint64(pchAppKey,eP
roperty,ref peError); |
| 1933 return result; |
| 1934 } |
| 1935 public EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,boo
l bAutoLaunch) |
| 1936 { |
| 1937 EVRApplicationError result = FnTable.SetApplicationAutoLaunch(pc
hAppKey,bAutoLaunch); |
| 1938 return result; |
| 1939 } |
| 1940 public bool GetApplicationAutoLaunch(string pchAppKey) |
| 1941 { |
| 1942 bool result = FnTable.GetApplicationAutoLaunch(pchAppKey); |
| 1943 return result; |
| 1944 } |
| 1945 public EVRApplicationError SetDefaultApplicationForMimeType(string pchAp
pKey,string pchMimeType) |
| 1946 { |
| 1947 EVRApplicationError result = FnTable.SetDefaultApplicationForMim
eType(pchAppKey,pchMimeType); |
| 1948 return result; |
| 1949 } |
| 1950 public bool GetDefaultApplicationForMimeType(string pchMimeType,string p
chAppKeyBuffer,uint unAppKeyBufferLen) |
| 1951 { |
| 1952 bool result = FnTable.GetDefaultApplicationForMimeType(pchMimeTy
pe,pchAppKeyBuffer,unAppKeyBufferLen); |
| 1953 return result; |
| 1954 } |
| 1955 public bool GetApplicationSupportedMimeTypes(string pchAppKey,string pch
MimeTypesBuffer,uint unMimeTypesBuffer) |
| 1956 { |
| 1957 bool result = FnTable.GetApplicationSupportedMimeTypes(pchAppKey
,pchMimeTypesBuffer,unMimeTypesBuffer); |
| 1958 return result; |
| 1959 } |
| 1960 public uint GetApplicationsThatSupportMimeType(string pchMimeType,string
pchAppKeysThatSupportBuffer,uint unAppKeysThatSupportBuffer) |
| 1961 { |
| 1962 uint result = FnTable.GetApplicationsThatSupportMimeType(pchMime
Type,pchAppKeysThatSupportBuffer,unAppKeysThatSupportBuffer); |
| 1963 return result; |
| 1964 } |
| 1965 public uint GetApplicationLaunchArguments(uint unHandle,string pchArgs,u
int unArgs) |
| 1966 { |
| 1967 uint result = FnTable.GetApplicationLaunchArguments(unHandle,pch
Args,unArgs); |
| 1968 return result; |
| 1969 } |
| 1970 public EVRApplicationError GetStartingApplication(string pchAppKeyBuffer
,uint unAppKeyBufferLen) |
| 1971 { |
| 1972 EVRApplicationError result = FnTable.GetStartingApplication(pchA
ppKeyBuffer,unAppKeyBufferLen); |
| 1973 return result; |
| 1974 } |
| 1975 public EVRApplicationTransitionState GetTransitionState() |
| 1976 { |
| 1977 EVRApplicationTransitionState result = FnTable.GetTransitionStat
e(); |
| 1978 return result; |
| 1979 } |
| 1980 public EVRApplicationError PerformApplicationPrelaunchCheck(string pchAp
pKey) |
| 1981 { |
| 1982 EVRApplicationError result = FnTable.PerformApplicationPrelaunch
Check(pchAppKey); |
| 1983 return result; |
| 1984 } |
| 1985 public string GetApplicationsTransitionStateNameFromEnum(EVRApplicationT
ransitionState state) |
| 1986 { |
| 1987 IntPtr result = FnTable.GetApplicationsTransitionStateNameFromEn
um(state); |
| 1988 return Marshal.PtrToStringAnsi(result); |
| 1989 } |
| 1990 public bool IsQuitUserPromptRequested() |
| 1991 { |
| 1992 bool result = FnTable.IsQuitUserPromptRequested(); |
| 1993 return result; |
| 1994 } |
| 1995 public EVRApplicationError LaunchInternalProcess(string pchBinaryPath,st
ring pchArguments,string pchWorkingDirectory) |
| 1996 { |
| 1997 EVRApplicationError result = FnTable.LaunchInternalProcess(pchBi
naryPath,pchArguments,pchWorkingDirectory); |
| 1998 return result; |
| 1999 } |
| 2000 public uint GetCurrentSceneProcessId() |
| 2001 { |
| 2002 uint result = FnTable.GetCurrentSceneProcessId(); |
| 2003 return result; |
| 2004 } |
| 2005 } |
| 2006 |
| 2007 |
| 2008 public class CVRChaperone |
| 2009 { |
| 2010 IVRChaperone FnTable; |
| 2011 internal CVRChaperone(IntPtr pInterface) |
| 2012 { |
| 2013 FnTable = (IVRChaperone)Marshal.PtrToStructure(pInterface, typeo
f(IVRChaperone)); |
| 2014 } |
| 2015 public ChaperoneCalibrationState GetCalibrationState() |
| 2016 { |
| 2017 ChaperoneCalibrationState result = FnTable.GetCalibrationState()
; |
| 2018 return result; |
| 2019 } |
| 2020 public bool GetPlayAreaSize(ref float pSizeX,ref float pSizeZ) |
| 2021 { |
| 2022 pSizeX = 0; |
| 2023 pSizeZ = 0; |
| 2024 bool result = FnTable.GetPlayAreaSize(ref pSizeX,ref pSizeZ); |
| 2025 return result; |
| 2026 } |
| 2027 public bool GetPlayAreaRect(ref HmdQuad_t rect) |
| 2028 { |
| 2029 bool result = FnTable.GetPlayAreaRect(ref rect); |
| 2030 return result; |
| 2031 } |
| 2032 public void ReloadInfo() |
| 2033 { |
| 2034 FnTable.ReloadInfo(); |
| 2035 } |
| 2036 public void SetSceneColor(HmdColor_t color) |
| 2037 { |
| 2038 FnTable.SetSceneColor(color); |
| 2039 } |
| 2040 public void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutp
utColors,float flCollisionBoundsFadeDistance,ref HmdColor_t pOutputCameraColor) |
| 2041 { |
| 2042 FnTable.GetBoundsColor(ref pOutputColorArray,nNumOutputColors,fl
CollisionBoundsFadeDistance,ref pOutputCameraColor); |
| 2043 } |
| 2044 public bool AreBoundsVisible() |
| 2045 { |
| 2046 bool result = FnTable.AreBoundsVisible(); |
| 2047 return result; |
| 2048 } |
| 2049 public void ForceBoundsVisible(bool bForce) |
| 2050 { |
| 2051 FnTable.ForceBoundsVisible(bForce); |
| 2052 } |
| 2053 } |
| 2054 |
| 2055 |
| 2056 public class CVRChaperoneSetup |
| 2057 { |
| 2058 IVRChaperoneSetup FnTable; |
| 2059 internal CVRChaperoneSetup(IntPtr pInterface) |
| 2060 { |
| 2061 FnTable = (IVRChaperoneSetup)Marshal.PtrToStructure(pInterface,
typeof(IVRChaperoneSetup)); |
| 2062 } |
| 2063 public bool CommitWorkingCopy(EChaperoneConfigFile configFile) |
| 2064 { |
| 2065 bool result = FnTable.CommitWorkingCopy(configFile); |
| 2066 return result; |
| 2067 } |
| 2068 public void RevertWorkingCopy() |
| 2069 { |
| 2070 FnTable.RevertWorkingCopy(); |
| 2071 } |
| 2072 public bool GetWorkingPlayAreaSize(ref float pSizeX,ref float pSizeZ) |
| 2073 { |
| 2074 pSizeX = 0; |
| 2075 pSizeZ = 0; |
| 2076 bool result = FnTable.GetWorkingPlayAreaSize(ref pSizeX,ref pSiz
eZ); |
| 2077 return result; |
| 2078 } |
| 2079 public bool GetWorkingPlayAreaRect(ref HmdQuad_t rect) |
| 2080 { |
| 2081 bool result = FnTable.GetWorkingPlayAreaRect(ref rect); |
| 2082 return result; |
| 2083 } |
| 2084 public bool GetWorkingCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer) |
| 2085 { |
| 2086 uint punQuadsCount = 0; |
| 2087 bool result = FnTable.GetWorkingCollisionBoundsInfo(null,ref pun
QuadsCount); |
| 2088 pQuadsBuffer= new HmdQuad_t[punQuadsCount]; |
| 2089 result = FnTable.GetWorkingCollisionBoundsInfo(pQuadsBuffer,ref
punQuadsCount); |
| 2090 return result; |
| 2091 } |
| 2092 public bool GetLiveCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer) |
| 2093 { |
| 2094 uint punQuadsCount = 0; |
| 2095 bool result = FnTable.GetLiveCollisionBoundsInfo(null,ref punQua
dsCount); |
| 2096 pQuadsBuffer= new HmdQuad_t[punQuadsCount]; |
| 2097 result = FnTable.GetLiveCollisionBoundsInfo(pQuadsBuffer,ref pun
QuadsCount); |
| 2098 return result; |
| 2099 } |
| 2100 public bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t
pmatSeatedZeroPoseToRawTrackingPose) |
| 2101 { |
| 2102 bool result = FnTable.GetWorkingSeatedZeroPoseToRawTrackingPose(
ref pmatSeatedZeroPoseToRawTrackingPose); |
| 2103 return result; |
| 2104 } |
| 2105 public bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_
t pmatStandingZeroPoseToRawTrackingPose) |
| 2106 { |
| 2107 bool result = FnTable.GetWorkingStandingZeroPoseToRawTrackingPos
e(ref pmatStandingZeroPoseToRawTrackingPose); |
| 2108 return result; |
| 2109 } |
| 2110 public void SetWorkingPlayAreaSize(float sizeX,float sizeZ) |
| 2111 { |
| 2112 FnTable.SetWorkingPlayAreaSize(sizeX,sizeZ); |
| 2113 } |
| 2114 public void SetWorkingCollisionBoundsInfo(HmdQuad_t [] pQuadsBuffer) |
| 2115 { |
| 2116 FnTable.SetWorkingCollisionBoundsInfo(pQuadsBuffer,(uint) pQuads
Buffer.Length); |
| 2117 } |
| 2118 public void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t
pMatSeatedZeroPoseToRawTrackingPose) |
| 2119 { |
| 2120 FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose(ref pMatSeated
ZeroPoseToRawTrackingPose); |
| 2121 } |
| 2122 public void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_
t pMatStandingZeroPoseToRawTrackingPose) |
| 2123 { |
| 2124 FnTable.SetWorkingStandingZeroPoseToRawTrackingPose(ref pMatStan
dingZeroPoseToRawTrackingPose); |
| 2125 } |
| 2126 public void ReloadFromDisk(EChaperoneConfigFile configFile) |
| 2127 { |
| 2128 FnTable.ReloadFromDisk(configFile); |
| 2129 } |
| 2130 public bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pma
tSeatedZeroPoseToRawTrackingPose) |
| 2131 { |
| 2132 bool result = FnTable.GetLiveSeatedZeroPoseToRawTrackingPose(ref
pmatSeatedZeroPoseToRawTrackingPose); |
| 2133 return result; |
| 2134 } |
| 2135 public void SetWorkingCollisionBoundsTagsInfo(byte [] pTagsBuffer) |
| 2136 { |
| 2137 FnTable.SetWorkingCollisionBoundsTagsInfo(pTagsBuffer,(uint) pTa
gsBuffer.Length); |
| 2138 } |
| 2139 public bool GetLiveCollisionBoundsTagsInfo(out byte [] pTagsBuffer) |
| 2140 { |
| 2141 uint punTagCount = 0; |
| 2142 bool result = FnTable.GetLiveCollisionBoundsTagsInfo(null,ref pu
nTagCount); |
| 2143 pTagsBuffer= new byte[punTagCount]; |
| 2144 result = FnTable.GetLiveCollisionBoundsTagsInfo(pTagsBuffer,ref
punTagCount); |
| 2145 return result; |
| 2146 } |
| 2147 public bool SetWorkingPhysicalBoundsInfo(HmdQuad_t [] pQuadsBuffer) |
| 2148 { |
| 2149 bool result = FnTable.SetWorkingPhysicalBoundsInfo(pQuadsBuffer,
(uint) pQuadsBuffer.Length); |
| 2150 return result; |
| 2151 } |
| 2152 public bool GetLivePhysicalBoundsInfo(out HmdQuad_t [] pQuadsBuffer) |
| 2153 { |
| 2154 uint punQuadsCount = 0; |
| 2155 bool result = FnTable.GetLivePhysicalBoundsInfo(null,ref punQuad
sCount); |
| 2156 pQuadsBuffer= new HmdQuad_t[punQuadsCount]; |
| 2157 result = FnTable.GetLivePhysicalBoundsInfo(pQuadsBuffer,ref punQ
uadsCount); |
| 2158 return result; |
| 2159 } |
| 2160 public bool ExportLiveToBuffer(System.Text.StringBuilder pBuffer,ref uin
t pnBufferLength) |
| 2161 { |
| 2162 pnBufferLength = 0; |
| 2163 bool result = FnTable.ExportLiveToBuffer(pBuffer,ref pnBufferLen
gth); |
| 2164 return result; |
| 2165 } |
| 2166 public bool ImportFromBufferToWorking(string pBuffer,uint nImportFlags) |
| 2167 { |
| 2168 bool result = FnTable.ImportFromBufferToWorking(pBuffer,nImportF
lags); |
| 2169 return result; |
| 2170 } |
| 2171 } |
| 2172 |
| 2173 |
| 2174 public class CVRCompositor |
| 2175 { |
| 2176 IVRCompositor FnTable; |
| 2177 internal CVRCompositor(IntPtr pInterface) |
| 2178 { |
| 2179 FnTable = (IVRCompositor)Marshal.PtrToStructure(pInterface, type
of(IVRCompositor)); |
| 2180 } |
| 2181 public void SetTrackingSpace(ETrackingUniverseOrigin eOrigin) |
| 2182 { |
| 2183 FnTable.SetTrackingSpace(eOrigin); |
| 2184 } |
| 2185 public ETrackingUniverseOrigin GetTrackingSpace() |
| 2186 { |
| 2187 ETrackingUniverseOrigin result = FnTable.GetTrackingSpace(); |
| 2188 return result; |
| 2189 } |
| 2190 public EVRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPos
eArray,TrackedDevicePose_t [] pGamePoseArray) |
| 2191 { |
| 2192 EVRCompositorError result = FnTable.WaitGetPoses(pRenderPoseArra
y,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length); |
| 2193 return result; |
| 2194 } |
| 2195 public EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPos
eArray,TrackedDevicePose_t [] pGamePoseArray) |
| 2196 { |
| 2197 EVRCompositorError result = FnTable.GetLastPoses(pRenderPoseArra
y,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length); |
| 2198 return result; |
| 2199 } |
| 2200 public EVRCompositorError GetLastPoseForTrackedDeviceIndex(uint unDevice
Index,ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pOutputGamePos
e) |
| 2201 { |
| 2202 EVRCompositorError result = FnTable.GetLastPoseForTrackedDeviceI
ndex(unDeviceIndex,ref pOutputPose,ref pOutputGamePose); |
| 2203 return result; |
| 2204 } |
| 2205 public EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref
VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags) |
| 2206 { |
| 2207 EVRCompositorError result = FnTable.Submit(eEye,ref pTexture,ref
pBounds,nSubmitFlags); |
| 2208 return result; |
| 2209 } |
| 2210 public void ClearLastSubmittedFrame() |
| 2211 { |
| 2212 FnTable.ClearLastSubmittedFrame(); |
| 2213 } |
| 2214 public void PostPresentHandoff() |
| 2215 { |
| 2216 FnTable.PostPresentHandoff(); |
| 2217 } |
| 2218 public bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFra
mesAgo) |
| 2219 { |
| 2220 bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo); |
| 2221 return result; |
| 2222 } |
| 2223 public uint GetFrameTimings(ref Compositor_FrameTiming pTiming,uint nFra
mes) |
| 2224 { |
| 2225 uint result = FnTable.GetFrameTimings(ref pTiming,nFrames); |
| 2226 return result; |
| 2227 } |
| 2228 public float GetFrameTimeRemaining() |
| 2229 { |
| 2230 float result = FnTable.GetFrameTimeRemaining(); |
| 2231 return result; |
| 2232 } |
| 2233 public void GetCumulativeStats(ref Compositor_CumulativeStats pStats,uin
t nStatsSizeInBytes) |
| 2234 { |
| 2235 FnTable.GetCumulativeStats(ref pStats,nStatsSizeInBytes); |
| 2236 } |
| 2237 public void FadeToColor(float fSeconds,float fRed,float fGreen,float fBl
ue,float fAlpha,bool bBackground) |
| 2238 { |
| 2239 FnTable.FadeToColor(fSeconds,fRed,fGreen,fBlue,fAlpha,bBackgroun
d); |
| 2240 } |
| 2241 public HmdColor_t GetCurrentFadeColor(bool bBackground) |
| 2242 { |
| 2243 HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground); |
| 2244 return result; |
| 2245 } |
| 2246 public void FadeGrid(float fSeconds,bool bFadeIn) |
| 2247 { |
| 2248 FnTable.FadeGrid(fSeconds,bFadeIn); |
| 2249 } |
| 2250 public float GetCurrentGridAlpha() |
| 2251 { |
| 2252 float result = FnTable.GetCurrentGridAlpha(); |
| 2253 return result; |
| 2254 } |
| 2255 public EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures) |
| 2256 { |
| 2257 EVRCompositorError result = FnTable.SetSkyboxOverride(pTextures,
(uint) pTextures.Length); |
| 2258 return result; |
| 2259 } |
| 2260 public void ClearSkyboxOverride() |
| 2261 { |
| 2262 FnTable.ClearSkyboxOverride(); |
| 2263 } |
| 2264 public void CompositorBringToFront() |
| 2265 { |
| 2266 FnTable.CompositorBringToFront(); |
| 2267 } |
| 2268 public void CompositorGoToBack() |
| 2269 { |
| 2270 FnTable.CompositorGoToBack(); |
| 2271 } |
| 2272 public void CompositorQuit() |
| 2273 { |
| 2274 FnTable.CompositorQuit(); |
| 2275 } |
| 2276 public bool IsFullscreen() |
| 2277 { |
| 2278 bool result = FnTable.IsFullscreen(); |
| 2279 return result; |
| 2280 } |
| 2281 public uint GetCurrentSceneFocusProcess() |
| 2282 { |
| 2283 uint result = FnTable.GetCurrentSceneFocusProcess(); |
| 2284 return result; |
| 2285 } |
| 2286 public uint GetLastFrameRenderer() |
| 2287 { |
| 2288 uint result = FnTable.GetLastFrameRenderer(); |
| 2289 return result; |
| 2290 } |
| 2291 public bool CanRenderScene() |
| 2292 { |
| 2293 bool result = FnTable.CanRenderScene(); |
| 2294 return result; |
| 2295 } |
| 2296 public void ShowMirrorWindow() |
| 2297 { |
| 2298 FnTable.ShowMirrorWindow(); |
| 2299 } |
| 2300 public void HideMirrorWindow() |
| 2301 { |
| 2302 FnTable.HideMirrorWindow(); |
| 2303 } |
| 2304 public bool IsMirrorWindowVisible() |
| 2305 { |
| 2306 bool result = FnTable.IsMirrorWindowVisible(); |
| 2307 return result; |
| 2308 } |
| 2309 public void CompositorDumpImages() |
| 2310 { |
| 2311 FnTable.CompositorDumpImages(); |
| 2312 } |
| 2313 public bool ShouldAppRenderWithLowResources() |
| 2314 { |
| 2315 bool result = FnTable.ShouldAppRenderWithLowResources(); |
| 2316 return result; |
| 2317 } |
| 2318 public void ForceInterleavedReprojectionOn(bool bOverride) |
| 2319 { |
| 2320 FnTable.ForceInterleavedReprojectionOn(bOverride); |
| 2321 } |
| 2322 public void ForceReconnectProcess() |
| 2323 { |
| 2324 FnTable.ForceReconnectProcess(); |
| 2325 } |
| 2326 public void SuspendRendering(bool bSuspend) |
| 2327 { |
| 2328 FnTable.SuspendRendering(bSuspend); |
| 2329 } |
| 2330 public EVRCompositorError GetMirrorTextureD3D11(EVREye eEye,IntPtr pD3D1
1DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView) |
| 2331 { |
| 2332 EVRCompositorError result = FnTable.GetMirrorTextureD3D11(eEye,p
D3D11DeviceOrResource,ref ppD3D11ShaderResourceView); |
| 2333 return result; |
| 2334 } |
| 2335 public void ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView) |
| 2336 { |
| 2337 FnTable.ReleaseMirrorTextureD3D11(pD3D11ShaderResourceView); |
| 2338 } |
| 2339 public EVRCompositorError GetMirrorTextureGL(EVREye eEye,ref uint pglTex
tureId,IntPtr pglSharedTextureHandle) |
| 2340 { |
| 2341 pglTextureId = 0; |
| 2342 EVRCompositorError result = FnTable.GetMirrorTextureGL(eEye,ref
pglTextureId,pglSharedTextureHandle); |
| 2343 return result; |
| 2344 } |
| 2345 public bool ReleaseSharedGLTexture(uint glTextureId,IntPtr glSharedTextu
reHandle) |
| 2346 { |
| 2347 bool result = FnTable.ReleaseSharedGLTexture(glTextureId,glShare
dTextureHandle); |
| 2348 return result; |
| 2349 } |
| 2350 public void LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle) |
| 2351 { |
| 2352 FnTable.LockGLSharedTextureForAccess(glSharedTextureHandle); |
| 2353 } |
| 2354 public void UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle) |
| 2355 { |
| 2356 FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle); |
| 2357 } |
| 2358 public uint GetVulkanInstanceExtensionsRequired(System.Text.StringBuilde
r pchValue,uint unBufferSize) |
| 2359 { |
| 2360 uint result = FnTable.GetVulkanInstanceExtensionsRequired(pchVal
ue,unBufferSize); |
| 2361 return result; |
| 2362 } |
| 2363 public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,Sys
tem.Text.StringBuilder pchValue,uint unBufferSize) |
| 2364 { |
| 2365 uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysica
lDevice,pchValue,unBufferSize); |
| 2366 return result; |
| 2367 } |
| 2368 } |
| 2369 |
| 2370 |
| 2371 public class CVROverlay |
| 2372 { |
| 2373 IVROverlay FnTable; |
| 2374 internal CVROverlay(IntPtr pInterface) |
| 2375 { |
| 2376 FnTable = (IVROverlay)Marshal.PtrToStructure(pInterface, typeof(
IVROverlay)); |
| 2377 } |
| 2378 public EVROverlayError FindOverlay(string pchOverlayKey,ref ulong pOverl
ayHandle) |
| 2379 { |
| 2380 pOverlayHandle = 0; |
| 2381 EVROverlayError result = FnTable.FindOverlay(pchOverlayKey,ref p
OverlayHandle); |
| 2382 return result; |
| 2383 } |
| 2384 public EVROverlayError CreateOverlay(string pchOverlayKey,string pchOver
layFriendlyName,ref ulong pOverlayHandle) |
| 2385 { |
| 2386 pOverlayHandle = 0; |
| 2387 EVROverlayError result = FnTable.CreateOverlay(pchOverlayKey,pch
OverlayFriendlyName,ref pOverlayHandle); |
| 2388 return result; |
| 2389 } |
| 2390 public EVROverlayError DestroyOverlay(ulong ulOverlayHandle) |
| 2391 { |
| 2392 EVROverlayError result = FnTable.DestroyOverlay(ulOverlayHandle)
; |
| 2393 return result; |
| 2394 } |
| 2395 public EVROverlayError SetHighQualityOverlay(ulong ulOverlayHandle) |
| 2396 { |
| 2397 EVROverlayError result = FnTable.SetHighQualityOverlay(ulOverlay
Handle); |
| 2398 return result; |
| 2399 } |
| 2400 public ulong GetHighQualityOverlay() |
| 2401 { |
| 2402 ulong result = FnTable.GetHighQualityOverlay(); |
| 2403 return result; |
| 2404 } |
| 2405 public uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilde
r pchValue,uint unBufferSize,ref EVROverlayError pError) |
| 2406 { |
| 2407 uint result = FnTable.GetOverlayKey(ulOverlayHandle,pchValue,unB
ufferSize,ref pError); |
| 2408 return result; |
| 2409 } |
| 2410 public uint GetOverlayName(ulong ulOverlayHandle,System.Text.StringBuild
er pchValue,uint unBufferSize,ref EVROverlayError pError) |
| 2411 { |
| 2412 uint result = FnTable.GetOverlayName(ulOverlayHandle,pchValue,un
BufferSize,ref pError); |
| 2413 return result; |
| 2414 } |
| 2415 public EVROverlayError GetOverlayImageData(ulong ulOverlayHandle,IntPtr
pvBuffer,uint unBufferSize,ref uint punWidth,ref uint punHeight) |
| 2416 { |
| 2417 punWidth = 0; |
| 2418 punHeight = 0; |
| 2419 EVROverlayError result = FnTable.GetOverlayImageData(ulOverlayHa
ndle,pvBuffer,unBufferSize,ref punWidth,ref punHeight); |
| 2420 return result; |
| 2421 } |
| 2422 public string GetOverlayErrorNameFromEnum(EVROverlayError error) |
| 2423 { |
| 2424 IntPtr result = FnTable.GetOverlayErrorNameFromEnum(error); |
| 2425 return Marshal.PtrToStringAnsi(result); |
| 2426 } |
| 2427 public EVROverlayError SetOverlayRenderingPid(ulong ulOverlayHandle,uint
unPID) |
| 2428 { |
| 2429 EVROverlayError result = FnTable.SetOverlayRenderingPid(ulOverla
yHandle,unPID); |
| 2430 return result; |
| 2431 } |
| 2432 public uint GetOverlayRenderingPid(ulong ulOverlayHandle) |
| 2433 { |
| 2434 uint result = FnTable.GetOverlayRenderingPid(ulOverlayHandle); |
| 2435 return result; |
| 2436 } |
| 2437 public EVROverlayError SetOverlayFlag(ulong ulOverlayHandle,VROverlayFla
gs eOverlayFlag,bool bEnabled) |
| 2438 { |
| 2439 EVROverlayError result = FnTable.SetOverlayFlag(ulOverlayHandle,
eOverlayFlag,bEnabled); |
| 2440 return result; |
| 2441 } |
| 2442 public EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFla
gs eOverlayFlag,ref bool pbEnabled) |
| 2443 { |
| 2444 pbEnabled = false; |
| 2445 EVROverlayError result = FnTable.GetOverlayFlag(ulOverlayHandle,
eOverlayFlag,ref pbEnabled); |
| 2446 return result; |
| 2447 } |
| 2448 public EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,
float fGreen,float fBlue) |
| 2449 { |
| 2450 EVROverlayError result = FnTable.SetOverlayColor(ulOverlayHandle
,fRed,fGreen,fBlue); |
| 2451 return result; |
| 2452 } |
| 2453 public EVROverlayError GetOverlayColor(ulong ulOverlayHandle,ref float p
fRed,ref float pfGreen,ref float pfBlue) |
| 2454 { |
| 2455 pfRed = 0; |
| 2456 pfGreen = 0; |
| 2457 pfBlue = 0; |
| 2458 EVROverlayError result = FnTable.GetOverlayColor(ulOverlayHandle
,ref pfRed,ref pfGreen,ref pfBlue); |
| 2459 return result; |
| 2460 } |
| 2461 public EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle,float fAlph
a) |
| 2462 { |
| 2463 EVROverlayError result = FnTable.SetOverlayAlpha(ulOverlayHandle
,fAlpha); |
| 2464 return result; |
| 2465 } |
| 2466 public EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle,ref float p
fAlpha) |
| 2467 { |
| 2468 pfAlpha = 0; |
| 2469 EVROverlayError result = FnTable.GetOverlayAlpha(ulOverlayHandle
,ref pfAlpha); |
| 2470 return result; |
| 2471 } |
| 2472 public EVROverlayError SetOverlayTexelAspect(ulong ulOverlayHandle,float
fTexelAspect) |
| 2473 { |
| 2474 EVROverlayError result = FnTable.SetOverlayTexelAspect(ulOverlay
Handle,fTexelAspect); |
| 2475 return result; |
| 2476 } |
| 2477 public EVROverlayError GetOverlayTexelAspect(ulong ulOverlayHandle,ref f
loat pfTexelAspect) |
| 2478 { |
| 2479 pfTexelAspect = 0; |
| 2480 EVROverlayError result = FnTable.GetOverlayTexelAspect(ulOverlay
Handle,ref pfTexelAspect); |
| 2481 return result; |
| 2482 } |
| 2483 public EVROverlayError SetOverlaySortOrder(ulong ulOverlayHandle,uint un
SortOrder) |
| 2484 { |
| 2485 EVROverlayError result = FnTable.SetOverlaySortOrder(ulOverlayHa
ndle,unSortOrder); |
| 2486 return result; |
| 2487 } |
| 2488 public EVROverlayError GetOverlaySortOrder(ulong ulOverlayHandle,ref uin
t punSortOrder) |
| 2489 { |
| 2490 punSortOrder = 0; |
| 2491 EVROverlayError result = FnTable.GetOverlaySortOrder(ulOverlayHa
ndle,ref punSortOrder); |
| 2492 return result; |
| 2493 } |
| 2494 public EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,flo
at fWidthInMeters) |
| 2495 { |
| 2496 EVROverlayError result = FnTable.SetOverlayWidthInMeters(ulOverl
ayHandle,fWidthInMeters); |
| 2497 return result; |
| 2498 } |
| 2499 public EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref
float pfWidthInMeters) |
| 2500 { |
| 2501 pfWidthInMeters = 0; |
| 2502 EVROverlayError result = FnTable.GetOverlayWidthInMeters(ulOverl
ayHandle,ref pfWidthInMeters); |
| 2503 return result; |
| 2504 } |
| 2505 public EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters(ulong ul
OverlayHandle,float fMinDistanceInMeters,float fMaxDistanceInMeters) |
| 2506 { |
| 2507 EVROverlayError result = FnTable.SetOverlayAutoCurveDistanceRang
eInMeters(ulOverlayHandle,fMinDistanceInMeters,fMaxDistanceInMeters); |
| 2508 return result; |
| 2509 } |
| 2510 public EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters(ulong ul
OverlayHandle,ref float pfMinDistanceInMeters,ref float pfMaxDistanceInMeters) |
| 2511 { |
| 2512 pfMinDistanceInMeters = 0; |
| 2513 pfMaxDistanceInMeters = 0; |
| 2514 EVROverlayError result = FnTable.GetOverlayAutoCurveDistanceRang
eInMeters(ulOverlayHandle,ref pfMinDistanceInMeters,ref pfMaxDistanceInMeters); |
| 2515 return result; |
| 2516 } |
| 2517 public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle
,EColorSpace eTextureColorSpace) |
| 2518 { |
| 2519 EVROverlayError result = FnTable.SetOverlayTextureColorSpace(ulO
verlayHandle,eTextureColorSpace); |
| 2520 return result; |
| 2521 } |
| 2522 public EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle
,ref EColorSpace peTextureColorSpace) |
| 2523 { |
| 2524 EVROverlayError result = FnTable.GetOverlayTextureColorSpace(ulO
verlayHandle,ref peTextureColorSpace); |
| 2525 return result; |
| 2526 } |
| 2527 public EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle,ref
VRTextureBounds_t pOverlayTextureBounds) |
| 2528 { |
| 2529 EVROverlayError result = FnTable.SetOverlayTextureBounds(ulOverl
ayHandle,ref pOverlayTextureBounds); |
| 2530 return result; |
| 2531 } |
| 2532 public EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle,ref
VRTextureBounds_t pOverlayTextureBounds) |
| 2533 { |
| 2534 EVROverlayError result = FnTable.GetOverlayTextureBounds(ulOverl
ayHandle,ref pOverlayTextureBounds); |
| 2535 return result; |
| 2536 } |
| 2537 public EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref
VROverlayTransformType peTransformType) |
| 2538 { |
| 2539 EVROverlayError result = FnTable.GetOverlayTransformType(ulOverl
ayHandle,ref peTransformType); |
| 2540 return result; |
| 2541 } |
| 2542 public EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle
,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToO
verlayTransform) |
| 2543 { |
| 2544 EVROverlayError result = FnTable.SetOverlayTransformAbsolute(ulO
verlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform); |
| 2545 return result; |
| 2546 } |
| 2547 public EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle
,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOrig
inToOverlayTransform) |
| 2548 { |
| 2549 EVROverlayError result = FnTable.GetOverlayTransformAbsolute(ulO
verlayHandle,ref peTrackingOrigin,ref pmatTrackingOriginToOverlayTransform); |
| 2550 return result; |
| 2551 } |
| 2552 public EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ul
OverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayT
ransform) |
| 2553 { |
| 2554 EVROverlayError result = FnTable.SetOverlayTransformTrackedDevic
eRelative(ulOverlayHandle,unTrackedDevice,ref pmatTrackedDeviceToOverlayTransfor
m); |
| 2555 return result; |
| 2556 } |
| 2557 public EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ul
OverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOve
rlayTransform) |
| 2558 { |
| 2559 punTrackedDevice = 0; |
| 2560 EVROverlayError result = FnTable.GetOverlayTransformTrackedDevic
eRelative(ulOverlayHandle,ref punTrackedDevice,ref pmatTrackedDeviceToOverlayTra
nsform); |
| 2561 return result; |
| 2562 } |
| 2563 public EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong u
lOverlayHandle,uint unDeviceIndex,string pchComponentName) |
| 2564 { |
| 2565 EVROverlayError result = FnTable.SetOverlayTransformTrackedDevic
eComponent(ulOverlayHandle,unDeviceIndex,pchComponentName); |
| 2566 return result; |
| 2567 } |
| 2568 public EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong u
lOverlayHandle,ref uint punDeviceIndex,string pchComponentName,uint unComponentN
ameSize) |
| 2569 { |
| 2570 punDeviceIndex = 0; |
| 2571 EVROverlayError result = FnTable.GetOverlayTransformTrackedDevic
eComponent(ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSi
ze); |
| 2572 return result; |
| 2573 } |
| 2574 public EVROverlayError ShowOverlay(ulong ulOverlayHandle) |
| 2575 { |
| 2576 EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle); |
| 2577 return result; |
| 2578 } |
| 2579 public EVROverlayError HideOverlay(ulong ulOverlayHandle) |
| 2580 { |
| 2581 EVROverlayError result = FnTable.HideOverlay(ulOverlayHandle); |
| 2582 return result; |
| 2583 } |
| 2584 public bool IsOverlayVisible(ulong ulOverlayHandle) |
| 2585 { |
| 2586 bool result = FnTable.IsOverlayVisible(ulOverlayHandle); |
| 2587 return result; |
| 2588 } |
| 2589 public EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlay
Handle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay
,ref HmdMatrix34_t pmatTransform) |
| 2590 { |
| 2591 EVROverlayError result = FnTable.GetTransformForOverlayCoordinat
es(ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform); |
| 2592 return result; |
| 2593 } |
| 2594 public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEv
ent,uint uncbVREvent) |
| 2595 { |
| 2596 bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref p
Event,uncbVREvent); |
| 2597 return result; |
| 2598 } |
| 2599 public EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref V
ROverlayInputMethod peInputMethod) |
| 2600 { |
| 2601 EVROverlayError result = FnTable.GetOverlayInputMethod(ulOverlay
Handle,ref peInputMethod); |
| 2602 return result; |
| 2603 } |
| 2604 public EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROve
rlayInputMethod eInputMethod) |
| 2605 { |
| 2606 EVROverlayError result = FnTable.SetOverlayInputMethod(ulOverlay
Handle,eInputMethod); |
| 2607 return result; |
| 2608 } |
| 2609 public EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref Hm
dVector2_t pvecMouseScale) |
| 2610 { |
| 2611 EVROverlayError result = FnTable.GetOverlayMouseScale(ulOverlayH
andle,ref pvecMouseScale); |
| 2612 return result; |
| 2613 } |
| 2614 public EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref Hm
dVector2_t pvecMouseScale) |
| 2615 { |
| 2616 EVROverlayError result = FnTable.SetOverlayMouseScale(ulOverlayH
andle,ref pvecMouseScale); |
| 2617 return result; |
| 2618 } |
| 2619 public bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverl
ayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults) |
| 2620 { |
| 2621 bool result = FnTable.ComputeOverlayIntersection(ulOverlayHandle
,ref pParams,ref pResults); |
| 2622 return result; |
| 2623 } |
| 2624 public bool HandleControllerOverlayInteractionAsMouse(ulong ulOverlayHan
dle,uint unControllerDeviceIndex) |
| 2625 { |
| 2626 bool result = FnTable.HandleControllerOverlayInteractionAsMouse(
ulOverlayHandle,unControllerDeviceIndex); |
| 2627 return result; |
| 2628 } |
| 2629 public bool IsHoverTargetOverlay(ulong ulOverlayHandle) |
| 2630 { |
| 2631 bool result = FnTable.IsHoverTargetOverlay(ulOverlayHandle); |
| 2632 return result; |
| 2633 } |
| 2634 public ulong GetGamepadFocusOverlay() |
| 2635 { |
| 2636 ulong result = FnTable.GetGamepadFocusOverlay(); |
| 2637 return result; |
| 2638 } |
| 2639 public EVROverlayError SetGamepadFocusOverlay(ulong ulNewFocusOverlay) |
| 2640 { |
| 2641 EVROverlayError result = FnTable.SetGamepadFocusOverlay(ulNewFoc
usOverlay); |
| 2642 return result; |
| 2643 } |
| 2644 public EVROverlayError SetOverlayNeighbor(EOverlayDirection eDirection,u
long ulFrom,ulong ulTo) |
| 2645 { |
| 2646 EVROverlayError result = FnTable.SetOverlayNeighbor(eDirection,u
lFrom,ulTo); |
| 2647 return result; |
| 2648 } |
| 2649 public EVROverlayError MoveGamepadFocusToNeighbor(EOverlayDirection eDir
ection,ulong ulFrom) |
| 2650 { |
| 2651 EVROverlayError result = FnTable.MoveGamepadFocusToNeighbor(eDir
ection,ulFrom); |
| 2652 return result; |
| 2653 } |
| 2654 public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Textu
re_t pTexture) |
| 2655 { |
| 2656 EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHand
le,ref pTexture); |
| 2657 return result; |
| 2658 } |
| 2659 public EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle) |
| 2660 { |
| 2661 EVROverlayError result = FnTable.ClearOverlayTexture(ulOverlayHa
ndle); |
| 2662 return result; |
| 2663 } |
| 2664 public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuff
er,uint unWidth,uint unHeight,uint unDepth) |
| 2665 { |
| 2666 EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,p
vBuffer,unWidth,unHeight,unDepth); |
| 2667 return result; |
| 2668 } |
| 2669 public EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string p
chFilePath) |
| 2670 { |
| 2671 EVROverlayError result = FnTable.SetOverlayFromFile(ulOverlayHan
dle,pchFilePath); |
| 2672 return result; |
| 2673 } |
| 2674 public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPt
r pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight
,ref uint pNativeFormat,ref ETextureType pAPIType,ref EColorSpace pColorSpace,re
f VRTextureBounds_t pTextureBounds) |
| 2675 { |
| 2676 pWidth = 0; |
| 2677 pHeight = 0; |
| 2678 pNativeFormat = 0; |
| 2679 EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHand
le,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNative
Format,ref pAPIType,ref pColorSpace,ref pTextureBounds); |
| 2680 return result; |
| 2681 } |
| 2682 public EVROverlayError ReleaseNativeOverlayHandle(ulong ulOverlayHandle,
IntPtr pNativeTextureHandle) |
| 2683 { |
| 2684 EVROverlayError result = FnTable.ReleaseNativeOverlayHandle(ulOv
erlayHandle,pNativeTextureHandle); |
| 2685 return result; |
| 2686 } |
| 2687 public EVROverlayError GetOverlayTextureSize(ulong ulOverlayHandle,ref u
int pWidth,ref uint pHeight) |
| 2688 { |
| 2689 pWidth = 0; |
| 2690 pHeight = 0; |
| 2691 EVROverlayError result = FnTable.GetOverlayTextureSize(ulOverlay
Handle,ref pWidth,ref pHeight); |
| 2692 return result; |
| 2693 } |
| 2694 public EVROverlayError CreateDashboardOverlay(string pchOverlayKey,strin
g pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle) |
| 2695 { |
| 2696 pMainHandle = 0; |
| 2697 pThumbnailHandle = 0; |
| 2698 EVROverlayError result = FnTable.CreateDashboardOverlay(pchOverl
ayKey,pchOverlayFriendlyName,ref pMainHandle,ref pThumbnailHandle); |
| 2699 return result; |
| 2700 } |
| 2701 public bool IsDashboardVisible() |
| 2702 { |
| 2703 bool result = FnTable.IsDashboardVisible(); |
| 2704 return result; |
| 2705 } |
| 2706 public bool IsActiveDashboardOverlay(ulong ulOverlayHandle) |
| 2707 { |
| 2708 bool result = FnTable.IsActiveDashboardOverlay(ulOverlayHandle); |
| 2709 return result; |
| 2710 } |
| 2711 public EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHa
ndle,uint unProcessId) |
| 2712 { |
| 2713 EVROverlayError result = FnTable.SetDashboardOverlaySceneProcess
(ulOverlayHandle,unProcessId); |
| 2714 return result; |
| 2715 } |
| 2716 public EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHa
ndle,ref uint punProcessId) |
| 2717 { |
| 2718 punProcessId = 0; |
| 2719 EVROverlayError result = FnTable.GetDashboardOverlaySceneProcess
(ulOverlayHandle,ref punProcessId); |
| 2720 return result; |
| 2721 } |
| 2722 public void ShowDashboard(string pchOverlayToShow) |
| 2723 { |
| 2724 FnTable.ShowDashboard(pchOverlayToShow); |
| 2725 } |
| 2726 public uint GetPrimaryDashboardDevice() |
| 2727 { |
| 2728 uint result = FnTable.GetPrimaryDashboardDevice(); |
| 2729 return result; |
| 2730 } |
| 2731 public EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,st
ring pchDescription,uint unCharMax,string pchExistingText,bool bUseMinimalMode,u
long uUserValue) |
| 2732 { |
| 2733 EVROverlayError result = FnTable.ShowKeyboard(eInputMode,eLineIn
putMode,pchDescription,unCharMax,pchExistingText,bUseMinimalMode,uUserValue); |
| 2734 return result; |
| 2735 } |
| 2736 public EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int
eInputMode,int eLineInputMode,string pchDescription,uint unCharMax,string pchExi
stingText,bool bUseMinimalMode,ulong uUserValue) |
| 2737 { |
| 2738 EVROverlayError result = FnTable.ShowKeyboardForOverlay(ulOverla
yHandle,eInputMode,eLineInputMode,pchDescription,unCharMax,pchExistingText,bUseM
inimalMode,uUserValue); |
| 2739 return result; |
| 2740 } |
| 2741 public uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchTe
xt) |
| 2742 { |
| 2743 uint result = FnTable.GetKeyboardText(pchText,cchText); |
| 2744 return result; |
| 2745 } |
| 2746 public void HideKeyboard() |
| 2747 { |
| 2748 FnTable.HideKeyboard(); |
| 2749 } |
| 2750 public void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTracki
ngOrigin,ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform) |
| 2751 { |
| 2752 FnTable.SetKeyboardTransformAbsolute(eTrackingOrigin,ref pmatTra
ckingOriginToKeyboardTransform); |
| 2753 } |
| 2754 public void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2
_t avoidRect) |
| 2755 { |
| 2756 FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect)
; |
| 2757 } |
| 2758 public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,
ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitive
s,uint unPrimitiveSize) |
| 2759 { |
| 2760 EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOv
erlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize); |
| 2761 return result; |
| 2762 } |
| 2763 public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pF
lags) |
| 2764 { |
| 2765 pFlags = 0; |
| 2766 EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle
,ref pFlags); |
| 2767 return result; |
| 2768 } |
| 2769 public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string
pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,st
ring pchButton3Text) |
| 2770 { |
| 2771 VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pch
Text,pchCaption,pchButton0Text,pchButton1Text,pchButton2Text,pchButton3Text); |
| 2772 return result; |
| 2773 } |
| 2774 } |
| 2775 |
| 2776 |
| 2777 public class CVRRenderModels |
| 2778 { |
| 2779 IVRRenderModels FnTable; |
| 2780 internal CVRRenderModels(IntPtr pInterface) |
| 2781 { |
| 2782 FnTable = (IVRRenderModels)Marshal.PtrToStructure(pInterface, ty
peof(IVRRenderModels)); |
| 2783 } |
| 2784 public EVRRenderModelError LoadRenderModel_Async(string pchRenderModelNa
me,ref IntPtr ppRenderModel) |
| 2785 { |
| 2786 EVRRenderModelError result = FnTable.LoadRenderModel_Async(pchRe
nderModelName,ref ppRenderModel); |
| 2787 return result; |
| 2788 } |
| 2789 public void FreeRenderModel(IntPtr pRenderModel) |
| 2790 { |
| 2791 FnTable.FreeRenderModel(pRenderModel); |
| 2792 } |
| 2793 public EVRRenderModelError LoadTexture_Async(int textureId,ref IntPtr pp
Texture) |
| 2794 { |
| 2795 EVRRenderModelError result = FnTable.LoadTexture_Async(textureId
,ref ppTexture); |
| 2796 return result; |
| 2797 } |
| 2798 public void FreeTexture(IntPtr pTexture) |
| 2799 { |
| 2800 FnTable.FreeTexture(pTexture); |
| 2801 } |
| 2802 public EVRRenderModelError LoadTextureD3D11_Async(int textureId,IntPtr p
D3D11Device,ref IntPtr ppD3D11Texture2D) |
| 2803 { |
| 2804 EVRRenderModelError result = FnTable.LoadTextureD3D11_Async(text
ureId,pD3D11Device,ref ppD3D11Texture2D); |
| 2805 return result; |
| 2806 } |
| 2807 public EVRRenderModelError LoadIntoTextureD3D11_Async(int textureId,IntP
tr pDstTexture) |
| 2808 { |
| 2809 EVRRenderModelError result = FnTable.LoadIntoTextureD3D11_Async(
textureId,pDstTexture); |
| 2810 return result; |
| 2811 } |
| 2812 public void FreeTextureD3D11(IntPtr pD3D11Texture2D) |
| 2813 { |
| 2814 FnTable.FreeTextureD3D11(pD3D11Texture2D); |
| 2815 } |
| 2816 public uint GetRenderModelName(uint unRenderModelIndex,System.Text.Strin
gBuilder pchRenderModelName,uint unRenderModelNameLen) |
| 2817 { |
| 2818 uint result = FnTable.GetRenderModelName(unRenderModelIndex,pchR
enderModelName,unRenderModelNameLen); |
| 2819 return result; |
| 2820 } |
| 2821 public uint GetRenderModelCount() |
| 2822 { |
| 2823 uint result = FnTable.GetRenderModelCount(); |
| 2824 return result; |
| 2825 } |
| 2826 public uint GetComponentCount(string pchRenderModelName) |
| 2827 { |
| 2828 uint result = FnTable.GetComponentCount(pchRenderModelName); |
| 2829 return result; |
| 2830 } |
| 2831 public uint GetComponentName(string pchRenderModelName,uint unComponentI
ndex,System.Text.StringBuilder pchComponentName,uint unComponentNameLen) |
| 2832 { |
| 2833 uint result = FnTable.GetComponentName(pchRenderModelName,unComp
onentIndex,pchComponentName,unComponentNameLen); |
| 2834 return result; |
| 2835 } |
| 2836 public ulong GetComponentButtonMask(string pchRenderModelName,string pch
ComponentName) |
| 2837 { |
| 2838 ulong result = FnTable.GetComponentButtonMask(pchRenderModelName
,pchComponentName); |
| 2839 return result; |
| 2840 } |
| 2841 public uint GetComponentRenderModelName(string pchRenderModelName,string
pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unC
omponentRenderModelNameLen) |
| 2842 { |
| 2843 uint result = FnTable.GetComponentRenderModelName(pchRenderModel
Name,pchComponentName,pchComponentRenderModelName,unComponentRenderModelNameLen)
; |
| 2844 return result; |
| 2845 } |
| 2846 // This is a terrible hack to workaround the fact that VRControllerState_t was |
| 2847 // originally mis-compiled with the wrong packing for Linux and OSX. |
| 2848 [UnmanagedFunctionPointer(CallingConvention.StdCall)] |
| 2849 internal delegate bool _GetComponentStatePacked(string pchRenderModelNam
e,string pchComponentName,ref VRControllerState_t_Packed pControllerState,ref Re
nderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pCompon
entState); |
| 2850 [StructLayout(LayoutKind.Explicit)] |
| 2851 struct GetComponentStateUnion |
| 2852 { |
| 2853 [FieldOffset(0)] |
| 2854 public IVRRenderModels._GetComponentState pGetComponentState; |
| 2855 [FieldOffset(0)] |
| 2856 public _GetComponentStatePacked pGetComponentStatePacked; |
| 2857 } |
| 2858 public bool GetComponentState(string pchRenderModelName,string pchCompon
entName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_
State_t pState,ref RenderModel_ComponentState_t pComponentState) |
| 2859 { |
| 2860 if ((System.Environment.OSVersion.Platform == System.PlatformID.
MacOSX) || |
| 2861 (System.Environment.OSVersion.Platform == System
.PlatformID.Unix)) |
| 2862 { |
| 2863 GetComponentStateUnion u; |
| 2864 VRControllerState_t_Packed state_packed = new VRControll
erState_t_Packed(); |
| 2865 u.pGetComponentStatePacked = null; |
| 2866 u.pGetComponentState = FnTable.GetComponentState; |
| 2867 bool packed_result = u.pGetComponentStatePacked(pchRende
rModelName,pchComponentName,ref state_packed,ref pState,ref pComponentState); |
| 2868 |
| 2869 state_packed.Unpack(ref pControllerState); |
| 2870 return packed_result; |
| 2871 } |
| 2872 bool result = FnTable.GetComponentState(pchRenderModelName,pchCo
mponentName,ref pControllerState,ref pState,ref pComponentState); |
| 2873 return result; |
| 2874 } |
| 2875 public bool RenderModelHasComponent(string pchRenderModelName,string pch
ComponentName) |
| 2876 { |
| 2877 bool result = FnTable.RenderModelHasComponent(pchRenderModelName
,pchComponentName); |
| 2878 return result; |
| 2879 } |
| 2880 public uint GetRenderModelThumbnailURL(string pchRenderModelName,System.
Text.StringBuilder pchThumbnailURL,uint unThumbnailURLLen,ref EVRRenderModelErro
r peError) |
| 2881 { |
| 2882 uint result = FnTable.GetRenderModelThumbnailURL(pchRenderModelN
ame,pchThumbnailURL,unThumbnailURLLen,ref peError); |
| 2883 return result; |
| 2884 } |
| 2885 public uint GetRenderModelOriginalPath(string pchRenderModelName,System.
Text.StringBuilder pchOriginalPath,uint unOriginalPathLen,ref EVRRenderModelErro
r peError) |
| 2886 { |
| 2887 uint result = FnTable.GetRenderModelOriginalPath(pchRenderModelN
ame,pchOriginalPath,unOriginalPathLen,ref peError); |
| 2888 return result; |
| 2889 } |
| 2890 public string GetRenderModelErrorNameFromEnum(EVRRenderModelError error) |
| 2891 { |
| 2892 IntPtr result = FnTable.GetRenderModelErrorNameFromEnum(error); |
| 2893 return Marshal.PtrToStringAnsi(result); |
| 2894 } |
| 2895 } |
| 2896 |
| 2897 |
| 2898 public class CVRNotifications |
| 2899 { |
| 2900 IVRNotifications FnTable; |
| 2901 internal CVRNotifications(IntPtr pInterface) |
| 2902 { |
| 2903 FnTable = (IVRNotifications)Marshal.PtrToStructure(pInterface, t
ypeof(IVRNotifications)); |
| 2904 } |
| 2905 public EVRNotificationError CreateNotification(ulong ulOverlayHandle,ulo
ng ulUserValue,EVRNotificationType type,string pchText,EVRNotificationStyle styl
e,ref NotificationBitmap_t pImage,ref uint pNotificationId) |
| 2906 { |
| 2907 pNotificationId = 0; |
| 2908 EVRNotificationError result = FnTable.CreateNotification(ulOverl
ayHandle,ulUserValue,type,pchText,style,ref pImage,ref pNotificationId); |
| 2909 return result; |
| 2910 } |
| 2911 public EVRNotificationError RemoveNotification(uint notificationId) |
| 2912 { |
| 2913 EVRNotificationError result = FnTable.RemoveNotification(notific
ationId); |
| 2914 return result; |
| 2915 } |
| 2916 } |
| 2917 |
| 2918 |
| 2919 public class CVRSettings |
| 2920 { |
| 2921 IVRSettings FnTable; |
| 2922 internal CVRSettings(IntPtr pInterface) |
| 2923 { |
| 2924 FnTable = (IVRSettings)Marshal.PtrToStructure(pInterface, typeof
(IVRSettings)); |
| 2925 } |
| 2926 public string GetSettingsErrorNameFromEnum(EVRSettingsError eError) |
| 2927 { |
| 2928 IntPtr result = FnTable.GetSettingsErrorNameFromEnum(eError); |
| 2929 return Marshal.PtrToStringAnsi(result); |
| 2930 } |
| 2931 public bool Sync(bool bForce,ref EVRSettingsError peError) |
| 2932 { |
| 2933 bool result = FnTable.Sync(bForce,ref peError); |
| 2934 return result; |
| 2935 } |
| 2936 public void SetBool(string pchSection,string pchSettingsKey,bool bValue,
ref EVRSettingsError peError) |
| 2937 { |
| 2938 FnTable.SetBool(pchSection,pchSettingsKey,bValue,ref peError); |
| 2939 } |
| 2940 public void SetInt32(string pchSection,string pchSettingsKey,int nValue,
ref EVRSettingsError peError) |
| 2941 { |
| 2942 FnTable.SetInt32(pchSection,pchSettingsKey,nValue,ref peError); |
| 2943 } |
| 2944 public void SetFloat(string pchSection,string pchSettingsKey,float flVal
ue,ref EVRSettingsError peError) |
| 2945 { |
| 2946 FnTable.SetFloat(pchSection,pchSettingsKey,flValue,ref peError); |
| 2947 } |
| 2948 public void SetString(string pchSection,string pchSettingsKey,string pch
Value,ref EVRSettingsError peError) |
| 2949 { |
| 2950 FnTable.SetString(pchSection,pchSettingsKey,pchValue,ref peError
); |
| 2951 } |
| 2952 public bool GetBool(string pchSection,string pchSettingsKey,ref EVRSetti
ngsError peError) |
| 2953 { |
| 2954 bool result = FnTable.GetBool(pchSection,pchSettingsKey,ref peEr
ror); |
| 2955 return result; |
| 2956 } |
| 2957 public int GetInt32(string pchSection,string pchSettingsKey,ref EVRSetti
ngsError peError) |
| 2958 { |
| 2959 int result = FnTable.GetInt32(pchSection,pchSettingsKey,ref peEr
ror); |
| 2960 return result; |
| 2961 } |
| 2962 public float GetFloat(string pchSection,string pchSettingsKey,ref EVRSet
tingsError peError) |
| 2963 { |
| 2964 float result = FnTable.GetFloat(pchSection,pchSettingsKey,ref pe
Error); |
| 2965 return result; |
| 2966 } |
| 2967 public void GetString(string pchSection,string pchSettingsKey,System.Tex
t.StringBuilder pchValue,uint unValueLen,ref EVRSettingsError peError) |
| 2968 { |
| 2969 FnTable.GetString(pchSection,pchSettingsKey,pchValue,unValueLen,
ref peError); |
| 2970 } |
| 2971 public void RemoveSection(string pchSection,ref EVRSettingsError peError
) |
| 2972 { |
| 2973 FnTable.RemoveSection(pchSection,ref peError); |
| 2974 } |
| 2975 public void RemoveKeyInSection(string pchSection,string pchSettingsKey,r
ef EVRSettingsError peError) |
| 2976 { |
| 2977 FnTable.RemoveKeyInSection(pchSection,pchSettingsKey,ref peError
); |
| 2978 } |
| 2979 } |
| 2980 |
| 2981 |
| 2982 public class CVRScreenshots |
| 2983 { |
| 2984 IVRScreenshots FnTable; |
| 2985 internal CVRScreenshots(IntPtr pInterface) |
| 2986 { |
| 2987 FnTable = (IVRScreenshots)Marshal.PtrToStructure(pInterface, typ
eof(IVRScreenshots)); |
| 2988 } |
| 2989 public EVRScreenshotError RequestScreenshot(ref uint pOutScreenshotHandl
e,EVRScreenshotType type,string pchPreviewFilename,string pchVRFilename) |
| 2990 { |
| 2991 pOutScreenshotHandle = 0; |
| 2992 EVRScreenshotError result = FnTable.RequestScreenshot(ref pOutSc
reenshotHandle,type,pchPreviewFilename,pchVRFilename); |
| 2993 return result; |
| 2994 } |
| 2995 public EVRScreenshotError HookScreenshot(EVRScreenshotType [] pSupported
Types) |
| 2996 { |
| 2997 EVRScreenshotError result = FnTable.HookScreenshot(pSupportedTyp
es,(int) pSupportedTypes.Length); |
| 2998 return result; |
| 2999 } |
| 3000 public EVRScreenshotType GetScreenshotPropertyType(uint screenshotHandle
,ref EVRScreenshotError pError) |
| 3001 { |
| 3002 EVRScreenshotType result = FnTable.GetScreenshotPropertyType(scr
eenshotHandle,ref pError); |
| 3003 return result; |
| 3004 } |
| 3005 public uint GetScreenshotPropertyFilename(uint screenshotHandle,EVRScree
nshotPropertyFilenames filenameType,System.Text.StringBuilder pchFilename,uint c
chFilename,ref EVRScreenshotError pError) |
| 3006 { |
| 3007 uint result = FnTable.GetScreenshotPropertyFilename(screenshotHa
ndle,filenameType,pchFilename,cchFilename,ref pError); |
| 3008 return result; |
| 3009 } |
| 3010 public EVRScreenshotError UpdateScreenshotProgress(uint screenshotHandle
,float flProgress) |
| 3011 { |
| 3012 EVRScreenshotError result = FnTable.UpdateScreenshotProgress(scr
eenshotHandle,flProgress); |
| 3013 return result; |
| 3014 } |
| 3015 public EVRScreenshotError TakeStereoScreenshot(ref uint pOutScreenshotHa
ndle,string pchPreviewFilename,string pchVRFilename) |
| 3016 { |
| 3017 pOutScreenshotHandle = 0; |
| 3018 EVRScreenshotError result = FnTable.TakeStereoScreenshot(ref pOu
tScreenshotHandle,pchPreviewFilename,pchVRFilename); |
| 3019 return result; |
| 3020 } |
| 3021 public EVRScreenshotError SubmitScreenshot(uint screenshotHandle,EVRScre
enshotType type,string pchSourcePreviewFilename,string pchSourceVRFilename) |
| 3022 { |
| 3023 EVRScreenshotError result = FnTable.SubmitScreenshot(screenshotH
andle,type,pchSourcePreviewFilename,pchSourceVRFilename); |
| 3024 return result; |
| 3025 } |
| 3026 } |
| 3027 |
| 3028 |
| 3029 public class CVRResources |
| 3030 { |
| 3031 IVRResources FnTable; |
| 3032 internal CVRResources(IntPtr pInterface) |
| 3033 { |
| 3034 FnTable = (IVRResources)Marshal.PtrToStructure(pInterface, typeo
f(IVRResources)); |
| 3035 } |
| 3036 public uint LoadSharedResource(string pchResourceName,string pchBuffer,u
int unBufferLen) |
| 3037 { |
| 3038 uint result = FnTable.LoadSharedResource(pchResourceName,pchBuff
er,unBufferLen); |
| 3039 return result; |
| 3040 } |
| 3041 public uint GetResourceFullPath(string pchResourceName,string pchResourc
eTypeDirectory,string pchPathBuffer,uint unBufferLen) |
| 3042 { |
| 3043 uint result = FnTable.GetResourceFullPath(pchResourceName,pchRes
ourceTypeDirectory,pchPathBuffer,unBufferLen); |
| 3044 return result; |
| 3045 } |
| 3046 } |
| 3047 |
| 3048 |
| 3049 public class OpenVRInterop |
| 3050 { |
| 3051 [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", Callin
gConvention = CallingConvention.Cdecl)] |
| 3052 internal static extern uint InitInternal(ref EVRInitError peError, EVRAp
plicationType eApplicationType); |
| 3053 [DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal", Ca
llingConvention = CallingConvention.Cdecl)] |
| 3054 internal static extern void ShutdownInternal(); |
| 3055 [DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent", Callin
gConvention = CallingConvention.Cdecl)] |
| 3056 internal static extern bool IsHmdPresent(); |
| 3057 [DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled",
CallingConvention = CallingConvention.Cdecl)] |
| 3058 internal static extern bool IsRuntimeInstalled(); |
| 3059 [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError"
, CallingConvention = CallingConvention.Cdecl)] |
| 3060 internal static extern IntPtr GetStringForHmdError(EVRInitError error); |
| 3061 [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface",
CallingConvention = CallingConvention.Cdecl)] |
| 3062 internal static extern IntPtr GetGenericInterface([In, MarshalAs(Unmanag
edType.LPStr)] string pchInterfaceVersion, ref EVRInitError peError); |
| 3063 [DllImportAttribute("openvr_api", EntryPoint = "VR_IsInterfaceVersionVal
id", CallingConvention = CallingConvention.Cdecl)] |
| 3064 internal static extern bool IsInterfaceVersionValid([In, MarshalAs(Unman
agedType.LPStr)] string pchInterfaceVersion); |
| 3065 [DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken", Callin
gConvention = CallingConvention.Cdecl)] |
| 3066 internal static extern uint GetInitToken(); |
| 3067 } |
| 3068 |
| 3069 |
| 3070 public enum EVREye |
| 3071 { |
| 3072 Eye_Left = 0, |
| 3073 Eye_Right = 1, |
| 3074 } |
| 3075 public enum ETextureType |
| 3076 { |
| 3077 DirectX = 0, |
| 3078 OpenGL = 1, |
| 3079 Vulkan = 2, |
| 3080 IOSurface = 3, |
| 3081 DirectX12 = 4, |
| 3082 } |
| 3083 public enum EColorSpace |
| 3084 { |
| 3085 Auto = 0, |
| 3086 Gamma = 1, |
| 3087 Linear = 2, |
| 3088 } |
| 3089 public enum ETrackingResult |
| 3090 { |
| 3091 Uninitialized = 1, |
| 3092 Calibrating_InProgress = 100, |
| 3093 Calibrating_OutOfRange = 101, |
| 3094 Running_OK = 200, |
| 3095 Running_OutOfRange = 201, |
| 3096 } |
| 3097 public enum ETrackedDeviceClass |
| 3098 { |
| 3099 Invalid = 0, |
| 3100 HMD = 1, |
| 3101 Controller = 2, |
| 3102 GenericTracker = 3, |
| 3103 TrackingReference = 4, |
| 3104 } |
| 3105 public enum ETrackedControllerRole |
| 3106 { |
| 3107 Invalid = 0, |
| 3108 LeftHand = 1, |
| 3109 RightHand = 2, |
| 3110 } |
| 3111 public enum ETrackingUniverseOrigin |
| 3112 { |
| 3113 TrackingUniverseSeated = 0, |
| 3114 TrackingUniverseStanding = 1, |
| 3115 TrackingUniverseRawAndUncalibrated = 2, |
| 3116 } |
| 3117 public enum ETrackedDeviceProperty |
| 3118 { |
| 3119 Prop_Invalid = 0, |
| 3120 Prop_TrackingSystemName_String = 1000, |
| 3121 Prop_ModelNumber_String = 1001, |
| 3122 Prop_SerialNumber_String = 1002, |
| 3123 Prop_RenderModelName_String = 1003, |
| 3124 Prop_WillDriftInYaw_Bool = 1004, |
| 3125 Prop_ManufacturerName_String = 1005, |
| 3126 Prop_TrackingFirmwareVersion_String = 1006, |
| 3127 Prop_HardwareRevision_String = 1007, |
| 3128 Prop_AllWirelessDongleDescriptions_String = 1008, |
| 3129 Prop_ConnectedWirelessDongle_String = 1009, |
| 3130 Prop_DeviceIsWireless_Bool = 1010, |
| 3131 Prop_DeviceIsCharging_Bool = 1011, |
| 3132 Prop_DeviceBatteryPercentage_Float = 1012, |
| 3133 Prop_StatusDisplayTransform_Matrix34 = 1013, |
| 3134 Prop_Firmware_UpdateAvailable_Bool = 1014, |
| 3135 Prop_Firmware_ManualUpdate_Bool = 1015, |
| 3136 Prop_Firmware_ManualUpdateURL_String = 1016, |
| 3137 Prop_HardwareRevision_Uint64 = 1017, |
| 3138 Prop_FirmwareVersion_Uint64 = 1018, |
| 3139 Prop_FPGAVersion_Uint64 = 1019, |
| 3140 Prop_VRCVersion_Uint64 = 1020, |
| 3141 Prop_RadioVersion_Uint64 = 1021, |
| 3142 Prop_DongleVersion_Uint64 = 1022, |
| 3143 Prop_BlockServerShutdown_Bool = 1023, |
| 3144 Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, |
| 3145 Prop_ContainsProximitySensor_Bool = 1025, |
| 3146 Prop_DeviceProvidesBatteryStatus_Bool = 1026, |
| 3147 Prop_DeviceCanPowerOff_Bool = 1027, |
| 3148 Prop_Firmware_ProgrammingTarget_String = 1028, |
| 3149 Prop_DeviceClass_Int32 = 1029, |
| 3150 Prop_HasCamera_Bool = 1030, |
| 3151 Prop_DriverVersion_String = 1031, |
| 3152 Prop_Firmware_ForceUpdateRequired_Bool = 1032, |
| 3153 Prop_ViveSystemButtonFixRequired_Bool = 1033, |
| 3154 Prop_ParentDriver_Uint64 = 1034, |
| 3155 Prop_ReportsTimeSinceVSync_Bool = 2000, |
| 3156 Prop_SecondsFromVsyncToPhotons_Float = 2001, |
| 3157 Prop_DisplayFrequency_Float = 2002, |
| 3158 Prop_UserIpdMeters_Float = 2003, |
| 3159 Prop_CurrentUniverseId_Uint64 = 2004, |
| 3160 Prop_PreviousUniverseId_Uint64 = 2005, |
| 3161 Prop_DisplayFirmwareVersion_Uint64 = 2006, |
| 3162 Prop_IsOnDesktop_Bool = 2007, |
| 3163 Prop_DisplayMCType_Int32 = 2008, |
| 3164 Prop_DisplayMCOffset_Float = 2009, |
| 3165 Prop_DisplayMCScale_Float = 2010, |
| 3166 Prop_EdidVendorID_Int32 = 2011, |
| 3167 Prop_DisplayMCImageLeft_String = 2012, |
| 3168 Prop_DisplayMCImageRight_String = 2013, |
| 3169 Prop_DisplayGCBlackClamp_Float = 2014, |
| 3170 Prop_EdidProductID_Int32 = 2015, |
| 3171 Prop_CameraToHeadTransform_Matrix34 = 2016, |
| 3172 Prop_DisplayGCType_Int32 = 2017, |
| 3173 Prop_DisplayGCOffset_Float = 2018, |
| 3174 Prop_DisplayGCScale_Float = 2019, |
| 3175 Prop_DisplayGCPrescale_Float = 2020, |
| 3176 Prop_DisplayGCImage_String = 2021, |
| 3177 Prop_LensCenterLeftU_Float = 2022, |
| 3178 Prop_LensCenterLeftV_Float = 2023, |
| 3179 Prop_LensCenterRightU_Float = 2024, |
| 3180 Prop_LensCenterRightV_Float = 2025, |
| 3181 Prop_UserHeadToEyeDepthMeters_Float = 2026, |
| 3182 Prop_CameraFirmwareVersion_Uint64 = 2027, |
| 3183 Prop_CameraFirmwareDescription_String = 2028, |
| 3184 Prop_DisplayFPGAVersion_Uint64 = 2029, |
| 3185 Prop_DisplayBootloaderVersion_Uint64 = 2030, |
| 3186 Prop_DisplayHardwareVersion_Uint64 = 2031, |
| 3187 Prop_AudioFirmwareVersion_Uint64 = 2032, |
| 3188 Prop_CameraCompatibilityMode_Int32 = 2033, |
| 3189 Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, |
| 3190 Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, |
| 3191 Prop_DisplaySuppressed_Bool = 2036, |
| 3192 Prop_DisplayAllowNightMode_Bool = 2037, |
| 3193 Prop_DisplayMCImageWidth_Int32 = 2038, |
| 3194 Prop_DisplayMCImageHeight_Int32 = 2039, |
| 3195 Prop_DisplayMCImageNumChannels_Int32 = 2040, |
| 3196 Prop_DisplayMCImageData_Binary = 2041, |
| 3197 Prop_UsesDriverDirectMode_Bool = 2042, |
| 3198 Prop_AttachedDeviceId_String = 3000, |
| 3199 Prop_SupportedButtons_Uint64 = 3001, |
| 3200 Prop_Axis0Type_Int32 = 3002, |
| 3201 Prop_Axis1Type_Int32 = 3003, |
| 3202 Prop_Axis2Type_Int32 = 3004, |
| 3203 Prop_Axis3Type_Int32 = 3005, |
| 3204 Prop_Axis4Type_Int32 = 3006, |
| 3205 Prop_ControllerRoleHint_Int32 = 3007, |
| 3206 Prop_FieldOfViewLeftDegrees_Float = 4000, |
| 3207 Prop_FieldOfViewRightDegrees_Float = 4001, |
| 3208 Prop_FieldOfViewTopDegrees_Float = 4002, |
| 3209 Prop_FieldOfViewBottomDegrees_Float = 4003, |
| 3210 Prop_TrackingRangeMinimumMeters_Float = 4004, |
| 3211 Prop_TrackingRangeMaximumMeters_Float = 4005, |
| 3212 Prop_ModeLabel_String = 4006, |
| 3213 Prop_IconPathName_String = 5000, |
| 3214 Prop_NamedIconPathDeviceOff_String = 5001, |
| 3215 Prop_NamedIconPathDeviceSearching_String = 5002, |
| 3216 Prop_NamedIconPathDeviceSearchingAlert_String = 5003, |
| 3217 Prop_NamedIconPathDeviceReady_String = 5004, |
| 3218 Prop_NamedIconPathDeviceReadyAlert_String = 5005, |
| 3219 Prop_NamedIconPathDeviceNotReady_String = 5006, |
| 3220 Prop_NamedIconPathDeviceStandby_String = 5007, |
| 3221 Prop_NamedIconPathDeviceAlertLow_String = 5008, |
| 3222 Prop_DisplayHiddenArea_Binary_Start = 5100, |
| 3223 Prop_DisplayHiddenArea_Binary_End = 5150, |
| 3224 Prop_UserConfigPath_String = 6000, |
| 3225 Prop_InstallPath_String = 6001, |
| 3226 Prop_VendorSpecific_Reserved_Start = 10000, |
| 3227 Prop_VendorSpecific_Reserved_End = 10999, |
| 3228 } |
| 3229 public enum ETrackedPropertyError |
| 3230 { |
| 3231 TrackedProp_Success = 0, |
| 3232 TrackedProp_WrongDataType = 1, |
| 3233 TrackedProp_WrongDeviceClass = 2, |
| 3234 TrackedProp_BufferTooSmall = 3, |
| 3235 TrackedProp_UnknownProperty = 4, |
| 3236 TrackedProp_InvalidDevice = 5, |
| 3237 TrackedProp_CouldNotContactServer = 6, |
| 3238 TrackedProp_ValueNotProvidedByDevice = 7, |
| 3239 TrackedProp_StringExceedsMaximumLength = 8, |
| 3240 TrackedProp_NotYetAvailable = 9, |
| 3241 TrackedProp_PermissionDenied = 10, |
| 3242 TrackedProp_InvalidOperation = 11, |
| 3243 } |
| 3244 public enum EVRSubmitFlags |
| 3245 { |
| 3246 Submit_Default = 0, |
| 3247 Submit_LensDistortionAlreadyApplied = 1, |
| 3248 Submit_GlRenderBuffer = 2, |
| 3249 Submit_Reserved = 4, |
| 3250 } |
| 3251 public enum EVRState |
| 3252 { |
| 3253 Undefined = -1, |
| 3254 Off = 0, |
| 3255 Searching = 1, |
| 3256 Searching_Alert = 2, |
| 3257 Ready = 3, |
| 3258 Ready_Alert = 4, |
| 3259 NotReady = 5, |
| 3260 Standby = 6, |
| 3261 Ready_Alert_Low = 7, |
| 3262 } |
| 3263 public enum EVREventType |
| 3264 { |
| 3265 VREvent_None = 0, |
| 3266 VREvent_TrackedDeviceActivated = 100, |
| 3267 VREvent_TrackedDeviceDeactivated = 101, |
| 3268 VREvent_TrackedDeviceUpdated = 102, |
| 3269 VREvent_TrackedDeviceUserInteractionStarted = 103, |
| 3270 VREvent_TrackedDeviceUserInteractionEnded = 104, |
| 3271 VREvent_IpdChanged = 105, |
| 3272 VREvent_EnterStandbyMode = 106, |
| 3273 VREvent_LeaveStandbyMode = 107, |
| 3274 VREvent_TrackedDeviceRoleChanged = 108, |
| 3275 VREvent_WatchdogWakeUpRequested = 109, |
| 3276 VREvent_LensDistortionChanged = 110, |
| 3277 VREvent_PropertyChanged = 111, |
| 3278 VREvent_ButtonPress = 200, |
| 3279 VREvent_ButtonUnpress = 201, |
| 3280 VREvent_ButtonTouch = 202, |
| 3281 VREvent_ButtonUntouch = 203, |
| 3282 VREvent_MouseMove = 300, |
| 3283 VREvent_MouseButtonDown = 301, |
| 3284 VREvent_MouseButtonUp = 302, |
| 3285 VREvent_FocusEnter = 303, |
| 3286 VREvent_FocusLeave = 304, |
| 3287 VREvent_Scroll = 305, |
| 3288 VREvent_TouchPadMove = 306, |
| 3289 VREvent_OverlayFocusChanged = 307, |
| 3290 VREvent_InputFocusCaptured = 400, |
| 3291 VREvent_InputFocusReleased = 401, |
| 3292 VREvent_SceneFocusLost = 402, |
| 3293 VREvent_SceneFocusGained = 403, |
| 3294 VREvent_SceneApplicationChanged = 404, |
| 3295 VREvent_SceneFocusChanged = 405, |
| 3296 VREvent_InputFocusChanged = 406, |
| 3297 VREvent_SceneApplicationSecondaryRenderingStarted = 407, |
| 3298 VREvent_HideRenderModels = 410, |
| 3299 VREvent_ShowRenderModels = 411, |
| 3300 VREvent_OverlayShown = 500, |
| 3301 VREvent_OverlayHidden = 501, |
| 3302 VREvent_DashboardActivated = 502, |
| 3303 VREvent_DashboardDeactivated = 503, |
| 3304 VREvent_DashboardThumbSelected = 504, |
| 3305 VREvent_DashboardRequested = 505, |
| 3306 VREvent_ResetDashboard = 506, |
| 3307 VREvent_RenderToast = 507, |
| 3308 VREvent_ImageLoaded = 508, |
| 3309 VREvent_ShowKeyboard = 509, |
| 3310 VREvent_HideKeyboard = 510, |
| 3311 VREvent_OverlayGamepadFocusGained = 511, |
| 3312 VREvent_OverlayGamepadFocusLost = 512, |
| 3313 VREvent_OverlaySharedTextureChanged = 513, |
| 3314 VREvent_DashboardGuideButtonDown = 514, |
| 3315 VREvent_DashboardGuideButtonUp = 515, |
| 3316 VREvent_ScreenshotTriggered = 516, |
| 3317 VREvent_ImageFailed = 517, |
| 3318 VREvent_DashboardOverlayCreated = 518, |
| 3319 VREvent_RequestScreenshot = 520, |
| 3320 VREvent_ScreenshotTaken = 521, |
| 3321 VREvent_ScreenshotFailed = 522, |
| 3322 VREvent_SubmitScreenshotToDashboard = 523, |
| 3323 VREvent_ScreenshotProgressToDashboard = 524, |
| 3324 VREvent_PrimaryDashboardDeviceChanged = 525, |
| 3325 VREvent_Notification_Shown = 600, |
| 3326 VREvent_Notification_Hidden = 601, |
| 3327 VREvent_Notification_BeginInteraction = 602, |
| 3328 VREvent_Notification_Destroyed = 603, |
| 3329 VREvent_Quit = 700, |
| 3330 VREvent_ProcessQuit = 701, |
| 3331 VREvent_QuitAborted_UserPrompt = 702, |
| 3332 VREvent_QuitAcknowledged = 703, |
| 3333 VREvent_DriverRequestedQuit = 704, |
| 3334 VREvent_ChaperoneDataHasChanged = 800, |
| 3335 VREvent_ChaperoneUniverseHasChanged = 801, |
| 3336 VREvent_ChaperoneTempDataHasChanged = 802, |
| 3337 VREvent_ChaperoneSettingsHaveChanged = 803, |
| 3338 VREvent_SeatedZeroPoseReset = 804, |
| 3339 VREvent_AudioSettingsHaveChanged = 820, |
| 3340 VREvent_BackgroundSettingHasChanged = 850, |
| 3341 VREvent_CameraSettingsHaveChanged = 851, |
| 3342 VREvent_ReprojectionSettingHasChanged = 852, |
| 3343 VREvent_ModelSkinSettingsHaveChanged = 853, |
| 3344 VREvent_EnvironmentSettingsHaveChanged = 854, |
| 3345 VREvent_PowerSettingsHaveChanged = 855, |
| 3346 VREvent_StatusUpdate = 900, |
| 3347 VREvent_MCImageUpdated = 1000, |
| 3348 VREvent_FirmwareUpdateStarted = 1100, |
| 3349 VREvent_FirmwareUpdateFinished = 1101, |
| 3350 VREvent_KeyboardClosed = 1200, |
| 3351 VREvent_KeyboardCharInput = 1201, |
| 3352 VREvent_KeyboardDone = 1202, |
| 3353 VREvent_ApplicationTransitionStarted = 1300, |
| 3354 VREvent_ApplicationTransitionAborted = 1301, |
| 3355 VREvent_ApplicationTransitionNewAppStarted = 1302, |
| 3356 VREvent_ApplicationListUpdated = 1303, |
| 3357 VREvent_ApplicationMimeTypeLoad = 1304, |
| 3358 VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, |
| 3359 VREvent_Compositor_MirrorWindowShown = 1400, |
| 3360 VREvent_Compositor_MirrorWindowHidden = 1401, |
| 3361 VREvent_Compositor_ChaperoneBoundsShown = 1410, |
| 3362 VREvent_Compositor_ChaperoneBoundsHidden = 1411, |
| 3363 VREvent_TrackedCamera_StartVideoStream = 1500, |
| 3364 VREvent_TrackedCamera_StopVideoStream = 1501, |
| 3365 VREvent_TrackedCamera_PauseVideoStream = 1502, |
| 3366 VREvent_TrackedCamera_ResumeVideoStream = 1503, |
| 3367 VREvent_TrackedCamera_EditingSurface = 1550, |
| 3368 VREvent_PerformanceTest_EnableCapture = 1600, |
| 3369 VREvent_PerformanceTest_DisableCapture = 1601, |
| 3370 VREvent_PerformanceTest_FidelityLevel = 1602, |
| 3371 VREvent_MessageOverlay_Closed = 1650, |
| 3372 VREvent_VendorSpecific_Reserved_Start = 10000, |
| 3373 VREvent_VendorSpecific_Reserved_End = 19999, |
| 3374 } |
| 3375 public enum EDeviceActivityLevel |
| 3376 { |
| 3377 k_EDeviceActivityLevel_Unknown = -1, |
| 3378 k_EDeviceActivityLevel_Idle = 0, |
| 3379 k_EDeviceActivityLevel_UserInteraction = 1, |
| 3380 k_EDeviceActivityLevel_UserInteraction_Timeout = 2, |
| 3381 k_EDeviceActivityLevel_Standby = 3, |
| 3382 } |
| 3383 public enum EVRButtonId |
| 3384 { |
| 3385 k_EButton_System = 0, |
| 3386 k_EButton_ApplicationMenu = 1, |
| 3387 k_EButton_Grip = 2, |
| 3388 k_EButton_DPad_Left = 3, |
| 3389 k_EButton_DPad_Up = 4, |
| 3390 k_EButton_DPad_Right = 5, |
| 3391 k_EButton_DPad_Down = 6, |
| 3392 k_EButton_A = 7, |
| 3393 k_EButton_ProximitySensor = 31, |
| 3394 k_EButton_Axis0 = 32, |
| 3395 k_EButton_Axis1 = 33, |
| 3396 k_EButton_Axis2 = 34, |
| 3397 k_EButton_Axis3 = 35, |
| 3398 k_EButton_Axis4 = 36, |
| 3399 k_EButton_SteamVR_Touchpad = 32, |
| 3400 k_EButton_SteamVR_Trigger = 33, |
| 3401 k_EButton_Dashboard_Back = 2, |
| 3402 k_EButton_Max = 64, |
| 3403 } |
| 3404 public enum EVRMouseButton |
| 3405 { |
| 3406 Left = 1, |
| 3407 Right = 2, |
| 3408 Middle = 4, |
| 3409 } |
| 3410 public enum EHiddenAreaMeshType |
| 3411 { |
| 3412 k_eHiddenAreaMesh_Standard = 0, |
| 3413 k_eHiddenAreaMesh_Inverse = 1, |
| 3414 k_eHiddenAreaMesh_LineLoop = 2, |
| 3415 k_eHiddenAreaMesh_Max = 3, |
| 3416 } |
| 3417 public enum EVRControllerAxisType |
| 3418 { |
| 3419 k_eControllerAxis_None = 0, |
| 3420 k_eControllerAxis_TrackPad = 1, |
| 3421 k_eControllerAxis_Joystick = 2, |
| 3422 k_eControllerAxis_Trigger = 3, |
| 3423 } |
| 3424 public enum EVRControllerEventOutputType |
| 3425 { |
| 3426 ControllerEventOutput_OSEvents = 0, |
| 3427 ControllerEventOutput_VREvents = 1, |
| 3428 } |
| 3429 public enum ECollisionBoundsStyle |
| 3430 { |
| 3431 COLLISION_BOUNDS_STYLE_BEGINNER = 0, |
| 3432 COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1, |
| 3433 COLLISION_BOUNDS_STYLE_SQUARES = 2, |
| 3434 COLLISION_BOUNDS_STYLE_ADVANCED = 3, |
| 3435 COLLISION_BOUNDS_STYLE_NONE = 4, |
| 3436 COLLISION_BOUNDS_STYLE_COUNT = 5, |
| 3437 } |
| 3438 public enum EVROverlayError |
| 3439 { |
| 3440 None = 0, |
| 3441 UnknownOverlay = 10, |
| 3442 InvalidHandle = 11, |
| 3443 PermissionDenied = 12, |
| 3444 OverlayLimitExceeded = 13, |
| 3445 WrongVisibilityType = 14, |
| 3446 KeyTooLong = 15, |
| 3447 NameTooLong = 16, |
| 3448 KeyInUse = 17, |
| 3449 WrongTransformType = 18, |
| 3450 InvalidTrackedDevice = 19, |
| 3451 InvalidParameter = 20, |
| 3452 ThumbnailCantBeDestroyed = 21, |
| 3453 ArrayTooSmall = 22, |
| 3454 RequestFailed = 23, |
| 3455 InvalidTexture = 24, |
| 3456 UnableToLoadFile = 25, |
| 3457 KeyboardAlreadyInUse = 26, |
| 3458 NoNeighbor = 27, |
| 3459 TooManyMaskPrimitives = 29, |
| 3460 BadMaskPrimitive = 30, |
| 3461 } |
| 3462 public enum EVRApplicationType |
| 3463 { |
| 3464 VRApplication_Other = 0, |
| 3465 VRApplication_Scene = 1, |
| 3466 VRApplication_Overlay = 2, |
| 3467 VRApplication_Background = 3, |
| 3468 VRApplication_Utility = 4, |
| 3469 VRApplication_VRMonitor = 5, |
| 3470 VRApplication_SteamWatchdog = 6, |
| 3471 VRApplication_Max = 7, |
| 3472 } |
| 3473 public enum EVRFirmwareError |
| 3474 { |
| 3475 None = 0, |
| 3476 Success = 1, |
| 3477 Fail = 2, |
| 3478 } |
| 3479 public enum EVRNotificationError |
| 3480 { |
| 3481 OK = 0, |
| 3482 InvalidNotificationId = 100, |
| 3483 NotificationQueueFull = 101, |
| 3484 InvalidOverlayHandle = 102, |
| 3485 SystemWithUserValueAlreadyExists = 103, |
| 3486 } |
| 3487 public enum EVRInitError |
| 3488 { |
| 3489 None = 0, |
| 3490 Unknown = 1, |
| 3491 Init_InstallationNotFound = 100, |
| 3492 Init_InstallationCorrupt = 101, |
| 3493 Init_VRClientDLLNotFound = 102, |
| 3494 Init_FileNotFound = 103, |
| 3495 Init_FactoryNotFound = 104, |
| 3496 Init_InterfaceNotFound = 105, |
| 3497 Init_InvalidInterface = 106, |
| 3498 Init_UserConfigDirectoryInvalid = 107, |
| 3499 Init_HmdNotFound = 108, |
| 3500 Init_NotInitialized = 109, |
| 3501 Init_PathRegistryNotFound = 110, |
| 3502 Init_NoConfigPath = 111, |
| 3503 Init_NoLogPath = 112, |
| 3504 Init_PathRegistryNotWritable = 113, |
| 3505 Init_AppInfoInitFailed = 114, |
| 3506 Init_Retry = 115, |
| 3507 Init_InitCanceledByUser = 116, |
| 3508 Init_AnotherAppLaunching = 117, |
| 3509 Init_SettingsInitFailed = 118, |
| 3510 Init_ShuttingDown = 119, |
| 3511 Init_TooManyObjects = 120, |
| 3512 Init_NoServerForBackgroundApp = 121, |
| 3513 Init_NotSupportedWithCompositor = 122, |
| 3514 Init_NotAvailableToUtilityApps = 123, |
| 3515 Init_Internal = 124, |
| 3516 Init_HmdDriverIdIsNone = 125, |
| 3517 Init_HmdNotFoundPresenceFailed = 126, |
| 3518 Init_VRMonitorNotFound = 127, |
| 3519 Init_VRMonitorStartupFailed = 128, |
| 3520 Init_LowPowerWatchdogNotSupported = 129, |
| 3521 Init_InvalidApplicationType = 130, |
| 3522 Init_NotAvailableToWatchdogApps = 131, |
| 3523 Init_WatchdogDisabledInSettings = 132, |
| 3524 Init_VRDashboardNotFound = 133, |
| 3525 Init_VRDashboardStartupFailed = 134, |
| 3526 Driver_Failed = 200, |
| 3527 Driver_Unknown = 201, |
| 3528 Driver_HmdUnknown = 202, |
| 3529 Driver_NotLoaded = 203, |
| 3530 Driver_RuntimeOutOfDate = 204, |
| 3531 Driver_HmdInUse = 205, |
| 3532 Driver_NotCalibrated = 206, |
| 3533 Driver_CalibrationInvalid = 207, |
| 3534 Driver_HmdDisplayNotFound = 208, |
| 3535 Driver_TrackedDeviceInterfaceUnknown = 209, |
| 3536 Driver_HmdDriverIdOutOfBounds = 211, |
| 3537 Driver_HmdDisplayMirrored = 212, |
| 3538 IPC_ServerInitFailed = 300, |
| 3539 IPC_ConnectFailed = 301, |
| 3540 IPC_SharedStateInitFailed = 302, |
| 3541 IPC_CompositorInitFailed = 303, |
| 3542 IPC_MutexInitFailed = 304, |
| 3543 IPC_Failed = 305, |
| 3544 IPC_CompositorConnectFailed = 306, |
| 3545 IPC_CompositorInvalidConnectResponse = 307, |
| 3546 IPC_ConnectFailedAfterMultipleAttempts = 308, |
| 3547 Compositor_Failed = 400, |
| 3548 Compositor_D3D11HardwareRequired = 401, |
| 3549 Compositor_FirmwareRequiresUpdate = 402, |
| 3550 Compositor_OverlayInitFailed = 403, |
| 3551 Compositor_ScreenshotsInitFailed = 404, |
| 3552 VendorSpecific_UnableToConnectToOculusRuntime = 1000, |
| 3553 VendorSpecific_HmdFound_CantOpenDevice = 1101, |
| 3554 VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, |
| 3555 VendorSpecific_HmdFound_NoStoredConfig = 1103, |
| 3556 VendorSpecific_HmdFound_ConfigTooBig = 1104, |
| 3557 VendorSpecific_HmdFound_ConfigTooSmall = 1105, |
| 3558 VendorSpecific_HmdFound_UnableToInitZLib = 1106, |
| 3559 VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, |
| 3560 VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, |
| 3561 VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, |
| 3562 VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, |
| 3563 VendorSpecific_HmdFound_UserDataAddressRange = 1111, |
| 3564 VendorSpecific_HmdFound_UserDataError = 1112, |
| 3565 VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, |
| 3566 Steam_SteamInstallationNotFound = 2000, |
| 3567 } |
| 3568 public enum EVRScreenshotType |
| 3569 { |
| 3570 None = 0, |
| 3571 Mono = 1, |
| 3572 Stereo = 2, |
| 3573 Cubemap = 3, |
| 3574 MonoPanorama = 4, |
| 3575 StereoPanorama = 5, |
| 3576 } |
| 3577 public enum EVRScreenshotPropertyFilenames |
| 3578 { |
| 3579 Preview = 0, |
| 3580 VR = 1, |
| 3581 } |
| 3582 public enum EVRTrackedCameraError |
| 3583 { |
| 3584 None = 0, |
| 3585 OperationFailed = 100, |
| 3586 InvalidHandle = 101, |
| 3587 InvalidFrameHeaderVersion = 102, |
| 3588 OutOfHandles = 103, |
| 3589 IPCFailure = 104, |
| 3590 NotSupportedForThisDevice = 105, |
| 3591 SharedMemoryFailure = 106, |
| 3592 FrameBufferingFailure = 107, |
| 3593 StreamSetupFailure = 108, |
| 3594 InvalidGLTextureId = 109, |
| 3595 InvalidSharedTextureHandle = 110, |
| 3596 FailedToGetGLTextureId = 111, |
| 3597 SharedTextureFailure = 112, |
| 3598 NoFrameAvailable = 113, |
| 3599 InvalidArgument = 114, |
| 3600 InvalidFrameBufferSize = 115, |
| 3601 } |
| 3602 public enum EVRTrackedCameraFrameType |
| 3603 { |
| 3604 Distorted = 0, |
| 3605 Undistorted = 1, |
| 3606 MaximumUndistorted = 2, |
| 3607 MAX_CAMERA_FRAME_TYPES = 3, |
| 3608 } |
| 3609 public enum EVRApplicationError |
| 3610 { |
| 3611 None = 0, |
| 3612 AppKeyAlreadyExists = 100, |
| 3613 NoManifest = 101, |
| 3614 NoApplication = 102, |
| 3615 InvalidIndex = 103, |
| 3616 UnknownApplication = 104, |
| 3617 IPCFailed = 105, |
| 3618 ApplicationAlreadyRunning = 106, |
| 3619 InvalidManifest = 107, |
| 3620 InvalidApplication = 108, |
| 3621 LaunchFailed = 109, |
| 3622 ApplicationAlreadyStarting = 110, |
| 3623 LaunchInProgress = 111, |
| 3624 OldApplicationQuitting = 112, |
| 3625 TransitionAborted = 113, |
| 3626 IsTemplate = 114, |
| 3627 BufferTooSmall = 200, |
| 3628 PropertyNotSet = 201, |
| 3629 UnknownProperty = 202, |
| 3630 InvalidParameter = 203, |
| 3631 } |
| 3632 public enum EVRApplicationProperty |
| 3633 { |
| 3634 Name_String = 0, |
| 3635 LaunchType_String = 11, |
| 3636 WorkingDirectory_String = 12, |
| 3637 BinaryPath_String = 13, |
| 3638 Arguments_String = 14, |
| 3639 URL_String = 15, |
| 3640 Description_String = 50, |
| 3641 NewsURL_String = 51, |
| 3642 ImagePath_String = 52, |
| 3643 Source_String = 53, |
| 3644 IsDashboardOverlay_Bool = 60, |
| 3645 IsTemplate_Bool = 61, |
| 3646 IsInstanced_Bool = 62, |
| 3647 IsInternal_Bool = 63, |
| 3648 LastLaunchTime_Uint64 = 70, |
| 3649 } |
| 3650 public enum EVRApplicationTransitionState |
| 3651 { |
| 3652 VRApplicationTransition_None = 0, |
| 3653 VRApplicationTransition_OldAppQuitSent = 10, |
| 3654 VRApplicationTransition_WaitingForExternalLaunch = 11, |
| 3655 VRApplicationTransition_NewAppLaunched = 20, |
| 3656 } |
| 3657 public enum ChaperoneCalibrationState |
| 3658 { |
| 3659 OK = 1, |
| 3660 Warning = 100, |
| 3661 Warning_BaseStationMayHaveMoved = 101, |
| 3662 Warning_BaseStationRemoved = 102, |
| 3663 Warning_SeatedBoundsInvalid = 103, |
| 3664 Error = 200, |
| 3665 Error_BaseStationUninitialized = 201, |
| 3666 Error_BaseStationConflict = 202, |
| 3667 Error_PlayAreaInvalid = 203, |
| 3668 Error_CollisionBoundsInvalid = 204, |
| 3669 } |
| 3670 public enum EChaperoneConfigFile |
| 3671 { |
| 3672 Live = 1, |
| 3673 Temp = 2, |
| 3674 } |
| 3675 public enum EChaperoneImportFlags |
| 3676 { |
| 3677 EChaperoneImport_BoundsOnly = 1, |
| 3678 } |
| 3679 public enum EVRCompositorError |
| 3680 { |
| 3681 None = 0, |
| 3682 RequestFailed = 1, |
| 3683 IncompatibleVersion = 100, |
| 3684 DoNotHaveFocus = 101, |
| 3685 InvalidTexture = 102, |
| 3686 IsNotSceneApplication = 103, |
| 3687 TextureIsOnWrongDevice = 104, |
| 3688 TextureUsesUnsupportedFormat = 105, |
| 3689 SharedTexturesNotSupported = 106, |
| 3690 IndexOutOfRange = 107, |
| 3691 AlreadySubmitted = 108, |
| 3692 } |
| 3693 public enum VROverlayInputMethod |
| 3694 { |
| 3695 None = 0, |
| 3696 Mouse = 1, |
| 3697 } |
| 3698 public enum VROverlayTransformType |
| 3699 { |
| 3700 VROverlayTransform_Absolute = 0, |
| 3701 VROverlayTransform_TrackedDeviceRelative = 1, |
| 3702 VROverlayTransform_SystemOverlay = 2, |
| 3703 VROverlayTransform_TrackedComponent = 3, |
| 3704 } |
| 3705 public enum VROverlayFlags |
| 3706 { |
| 3707 None = 0, |
| 3708 Curved = 1, |
| 3709 RGSS4X = 2, |
| 3710 NoDashboardTab = 3, |
| 3711 AcceptsGamepadEvents = 4, |
| 3712 ShowGamepadFocus = 5, |
| 3713 SendVRScrollEvents = 6, |
| 3714 SendVRTouchpadEvents = 7, |
| 3715 ShowTouchPadScrollWheel = 8, |
| 3716 TransferOwnershipToInternalProcess = 9, |
| 3717 SideBySide_Parallel = 10, |
| 3718 SideBySide_Crossed = 11, |
| 3719 Panorama = 12, |
| 3720 StereoPanorama = 13, |
| 3721 SortWithNonSceneOverlays = 14, |
| 3722 VisibleInDashboard = 15, |
| 3723 } |
| 3724 public enum VRMessageOverlayResponse |
| 3725 { |
| 3726 ButtonPress_0 = 0, |
| 3727 ButtonPress_1 = 1, |
| 3728 ButtonPress_2 = 2, |
| 3729 ButtonPress_3 = 3, |
| 3730 CouldntFindSystemOverlay = 4, |
| 3731 CouldntFindOrCreateClientOverlay = 5, |
| 3732 ApplicationQuit = 6, |
| 3733 } |
| 3734 public enum EGamepadTextInputMode |
| 3735 { |
| 3736 k_EGamepadTextInputModeNormal = 0, |
| 3737 k_EGamepadTextInputModePassword = 1, |
| 3738 k_EGamepadTextInputModeSubmit = 2, |
| 3739 } |
| 3740 public enum EGamepadTextInputLineMode |
| 3741 { |
| 3742 k_EGamepadTextInputLineModeSingleLine = 0, |
| 3743 k_EGamepadTextInputLineModeMultipleLines = 1, |
| 3744 } |
| 3745 public enum EOverlayDirection |
| 3746 { |
| 3747 Up = 0, |
| 3748 Down = 1, |
| 3749 Left = 2, |
| 3750 Right = 3, |
| 3751 Count = 4, |
| 3752 } |
| 3753 public enum EVROverlayIntersectionMaskPrimitiveType |
| 3754 { |
| 3755 OverlayIntersectionPrimitiveType_Rectangle = 0, |
| 3756 OverlayIntersectionPrimitiveType_Circle = 1, |
| 3757 } |
| 3758 public enum EVRRenderModelError |
| 3759 { |
| 3760 None = 0, |
| 3761 Loading = 100, |
| 3762 NotSupported = 200, |
| 3763 InvalidArg = 300, |
| 3764 InvalidModel = 301, |
| 3765 NoShapes = 302, |
| 3766 MultipleShapes = 303, |
| 3767 TooManyVertices = 304, |
| 3768 MultipleTextures = 305, |
| 3769 BufferTooSmall = 306, |
| 3770 NotEnoughNormals = 307, |
| 3771 NotEnoughTexCoords = 308, |
| 3772 InvalidTexture = 400, |
| 3773 } |
| 3774 public enum EVRComponentProperty |
| 3775 { |
| 3776 IsStatic = 1, |
| 3777 IsVisible = 2, |
| 3778 IsTouched = 4, |
| 3779 IsPressed = 8, |
| 3780 IsScrolled = 16, |
| 3781 } |
| 3782 public enum EVRNotificationType |
| 3783 { |
| 3784 Transient = 0, |
| 3785 Persistent = 1, |
| 3786 Transient_SystemWithUserValue = 2, |
| 3787 } |
| 3788 public enum EVRNotificationStyle |
| 3789 { |
| 3790 None = 0, |
| 3791 Application = 100, |
| 3792 Contact_Disabled = 200, |
| 3793 Contact_Enabled = 201, |
| 3794 Contact_Active = 202, |
| 3795 } |
| 3796 public enum EVRSettingsError |
| 3797 { |
| 3798 None = 0, |
| 3799 IPCFailed = 1, |
| 3800 WriteFailed = 2, |
| 3801 ReadFailed = 3, |
| 3802 JsonParseFailed = 4, |
| 3803 UnsetSettingHasNoDefault = 5, |
| 3804 } |
| 3805 public enum EVRScreenshotError |
| 3806 { |
| 3807 None = 0, |
| 3808 RequestFailed = 1, |
| 3809 IncompatibleVersion = 100, |
| 3810 NotFound = 101, |
| 3811 BufferTooSmall = 102, |
| 3812 ScreenshotAlreadyInProgress = 108, |
| 3813 } |
| 3814 |
| 3815 [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t |
| 3816 { |
| 3817 [FieldOffset(0)] public VREvent_Reserved_t reserved; |
| 3818 [FieldOffset(0)] public VREvent_Controller_t controller; |
| 3819 [FieldOffset(0)] public VREvent_Mouse_t mouse; |
| 3820 [FieldOffset(0)] public VREvent_Scroll_t scroll; |
| 3821 [FieldOffset(0)] public VREvent_Process_t process; |
| 3822 [FieldOffset(0)] public VREvent_Notification_t notification; |
| 3823 [FieldOffset(0)] public VREvent_Overlay_t overlay; |
| 3824 [FieldOffset(0)] public VREvent_Status_t status; |
| 3825 [FieldOffset(0)] public VREvent_Ipd_t ipd; |
| 3826 [FieldOffset(0)] public VREvent_Chaperone_t chaperone; |
| 3827 [FieldOffset(0)] public VREvent_PerformanceTest_t performanceTest; |
| 3828 [FieldOffset(0)] public VREvent_TouchPadMove_t touchPadMove; |
| 3829 [FieldOffset(0)] public VREvent_SeatedZeroPoseReset_t seatedZeroPoseRese
t; |
| 3830 [FieldOffset(0)] public VREvent_Screenshot_t screenshot; |
| 3831 [FieldOffset(0)] public VREvent_ScreenshotProgress_t screenshotProgress; |
| 3832 [FieldOffset(0)] public VREvent_ApplicationLaunch_t applicationLaunch; |
| 3833 [FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface; |
| 3834 [FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay; |
| 3835 [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be a
t the end due to a mono bug |
| 3836 } |
| 3837 |
| 3838 |
| 3839 [StructLayout(LayoutKind.Explicit)] public struct VROverlayIntersectionMaskPrimi
tive_Data_t |
| 3840 { |
| 3841 [FieldOffset(0)] public IntersectionMaskRectangle_t m_Rectangle; |
| 3842 [FieldOffset(0)] public IntersectionMaskCircle_t m_Circle; |
| 3843 } |
| 3844 |
| 3845 [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t |
| 3846 { |
| 3847 public float m0; //float[3][4] |
| 3848 public float m1; |
| 3849 public float m2; |
| 3850 public float m3; |
| 3851 public float m4; |
| 3852 public float m5; |
| 3853 public float m6; |
| 3854 public float m7; |
| 3855 public float m8; |
| 3856 public float m9; |
| 3857 public float m10; |
| 3858 public float m11; |
| 3859 } |
| 3860 [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t |
| 3861 { |
| 3862 public float m0; //float[4][4] |
| 3863 public float m1; |
| 3864 public float m2; |
| 3865 public float m3; |
| 3866 public float m4; |
| 3867 public float m5; |
| 3868 public float m6; |
| 3869 public float m7; |
| 3870 public float m8; |
| 3871 public float m9; |
| 3872 public float m10; |
| 3873 public float m11; |
| 3874 public float m12; |
| 3875 public float m13; |
| 3876 public float m14; |
| 3877 public float m15; |
| 3878 } |
| 3879 [StructLayout(LayoutKind.Sequential)] public struct HmdVector3_t |
| 3880 { |
| 3881 public float v0; //float[3] |
| 3882 public float v1; |
| 3883 public float v2; |
| 3884 } |
| 3885 [StructLayout(LayoutKind.Sequential)] public struct HmdVector4_t |
| 3886 { |
| 3887 public float v0; //float[4] |
| 3888 public float v1; |
| 3889 public float v2; |
| 3890 public float v3; |
| 3891 } |
| 3892 [StructLayout(LayoutKind.Sequential)] public struct HmdVector3d_t |
| 3893 { |
| 3894 public double v0; //double[3] |
| 3895 public double v1; |
| 3896 public double v2; |
| 3897 } |
| 3898 [StructLayout(LayoutKind.Sequential)] public struct HmdVector2_t |
| 3899 { |
| 3900 public float v0; //float[2] |
| 3901 public float v1; |
| 3902 } |
| 3903 [StructLayout(LayoutKind.Sequential)] public struct HmdQuaternion_t |
| 3904 { |
| 3905 public double w; |
| 3906 public double x; |
| 3907 public double y; |
| 3908 public double z; |
| 3909 } |
| 3910 [StructLayout(LayoutKind.Sequential)] public struct HmdColor_t |
| 3911 { |
| 3912 public float r; |
| 3913 public float g; |
| 3914 public float b; |
| 3915 public float a; |
| 3916 } |
| 3917 [StructLayout(LayoutKind.Sequential)] public struct HmdQuad_t |
| 3918 { |
| 3919 public HmdVector3_t vCorners0; //HmdVector3_t[4] |
| 3920 public HmdVector3_t vCorners1; |
| 3921 public HmdVector3_t vCorners2; |
| 3922 public HmdVector3_t vCorners3; |
| 3923 } |
| 3924 [StructLayout(LayoutKind.Sequential)] public struct HmdRect2_t |
| 3925 { |
| 3926 public HmdVector2_t vTopLeft; |
| 3927 public HmdVector2_t vBottomRight; |
| 3928 } |
| 3929 [StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t |
| 3930 { |
| 3931 public float rfRed0; //float[2] |
| 3932 public float rfRed1; |
| 3933 public float rfGreen0; //float[2] |
| 3934 public float rfGreen1; |
| 3935 public float rfBlue0; //float[2] |
| 3936 public float rfBlue1; |
| 3937 } |
| 3938 [StructLayout(LayoutKind.Sequential)] public struct Texture_t |
| 3939 { |
| 3940 public IntPtr handle; // void * |
| 3941 public ETextureType eType; |
| 3942 public EColorSpace eColorSpace; |
| 3943 } |
| 3944 [StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t |
| 3945 { |
| 3946 public HmdMatrix34_t mDeviceToAbsoluteTracking; |
| 3947 public HmdVector3_t vVelocity; |
| 3948 public HmdVector3_t vAngularVelocity; |
| 3949 public ETrackingResult eTrackingResult; |
| 3950 [MarshalAs(UnmanagedType.I1)] |
| 3951 public bool bPoseIsValid; |
| 3952 [MarshalAs(UnmanagedType.I1)] |
| 3953 public bool bDeviceIsConnected; |
| 3954 } |
| 3955 [StructLayout(LayoutKind.Sequential)] public struct VRTextureBounds_t |
| 3956 { |
| 3957 public float uMin; |
| 3958 public float vMin; |
| 3959 public float uMax; |
| 3960 public float vMax; |
| 3961 } |
| 3962 [StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t |
| 3963 { |
| 3964 public ulong m_nImage; |
| 3965 public IntPtr m_pDevice; // struct VkDevice_T * |
| 3966 public IntPtr m_pPhysicalDevice; // struct VkPhysicalDevice_T * |
| 3967 public IntPtr m_pInstance; // struct VkInstance_T * |
| 3968 public IntPtr m_pQueue; // struct VkQueue_T * |
| 3969 public uint m_nQueueFamilyIndex; |
| 3970 public uint m_nWidth; |
| 3971 public uint m_nHeight; |
| 3972 public uint m_nFormat; |
| 3973 public uint m_nSampleCount; |
| 3974 } |
| 3975 [StructLayout(LayoutKind.Sequential)] public struct D3D12TextureData_t |
| 3976 { |
| 3977 public IntPtr m_pResource; // struct ID3D12Resource * |
| 3978 public IntPtr m_pCommandQueue; // struct ID3D12CommandQueue * |
| 3979 public uint m_nNodeMask; |
| 3980 } |
| 3981 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Controller_t |
| 3982 { |
| 3983 public uint button; |
| 3984 } |
| 3985 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Mouse_t |
| 3986 { |
| 3987 public float x; |
| 3988 public float y; |
| 3989 public uint button; |
| 3990 } |
| 3991 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t |
| 3992 { |
| 3993 public float xdelta; |
| 3994 public float ydelta; |
| 3995 public uint repeatCount; |
| 3996 } |
| 3997 [StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t |
| 3998 { |
| 3999 [MarshalAs(UnmanagedType.I1)] |
| 4000 public bool bFingerDown; |
| 4001 public float flSecondsFingerDown; |
| 4002 public float fValueXFirst; |
| 4003 public float fValueYFirst; |
| 4004 public float fValueXRaw; |
| 4005 public float fValueYRaw; |
| 4006 } |
| 4007 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Notification_t |
| 4008 { |
| 4009 public ulong ulUserValue; |
| 4010 public uint notificationId; |
| 4011 } |
| 4012 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Process_t |
| 4013 { |
| 4014 public uint pid; |
| 4015 public uint oldPid; |
| 4016 [MarshalAs(UnmanagedType.I1)] |
| 4017 public bool bForced; |
| 4018 } |
| 4019 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t |
| 4020 { |
| 4021 public ulong overlayHandle; |
| 4022 } |
| 4023 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t |
| 4024 { |
| 4025 public uint statusState; |
| 4026 } |
| 4027 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Keyboard_t |
| 4028 { |
| 4029 public byte cNewInput0,cNewInput1,cNewInput2,cNewInput3,cNewInput4,cNewI
nput5,cNewInput6,cNewInput7; |
| 4030 public ulong uUserValue; |
| 4031 } |
| 4032 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Ipd_t |
| 4033 { |
| 4034 public float ipdMeters; |
| 4035 } |
| 4036 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Chaperone_t |
| 4037 { |
| 4038 public ulong m_nPreviousUniverse; |
| 4039 public ulong m_nCurrentUniverse; |
| 4040 } |
| 4041 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Reserved_t |
| 4042 { |
| 4043 public ulong reserved0; |
| 4044 public ulong reserved1; |
| 4045 } |
| 4046 [StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t |
| 4047 { |
| 4048 public uint m_nFidelityLevel; |
| 4049 } |
| 4050 [StructLayout(LayoutKind.Sequential)] public struct VREvent_SeatedZeroPoseReset_
t |
| 4051 { |
| 4052 [MarshalAs(UnmanagedType.I1)] |
| 4053 public bool bResetBySystemMenu; |
| 4054 } |
| 4055 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Screenshot_t |
| 4056 { |
| 4057 public uint handle; |
| 4058 public uint type; |
| 4059 } |
| 4060 [StructLayout(LayoutKind.Sequential)] public struct VREvent_ScreenshotProgress_t |
| 4061 { |
| 4062 public float progress; |
| 4063 } |
| 4064 [StructLayout(LayoutKind.Sequential)] public struct VREvent_ApplicationLaunch_t |
| 4065 { |
| 4066 public uint pid; |
| 4067 public uint unArgsHandle; |
| 4068 } |
| 4069 [StructLayout(LayoutKind.Sequential)] public struct VREvent_EditingCameraSurface
_t |
| 4070 { |
| 4071 public ulong overlayHandle; |
| 4072 public uint nVisualMode; |
| 4073 } |
| 4074 [StructLayout(LayoutKind.Sequential)] public struct VREvent_MessageOverlay_t |
| 4075 { |
| 4076 public uint unVRMessageOverlayResponse; |
| 4077 } |
| 4078 [StructLayout(LayoutKind.Sequential)] public struct VREvent_Property_t |
| 4079 { |
| 4080 public ulong container; |
| 4081 public ETrackedDeviceProperty prop; |
| 4082 } |
| 4083 [StructLayout(LayoutKind.Sequential)] public struct VREvent_t |
| 4084 { |
| 4085 public uint eventType; |
| 4086 public uint trackedDeviceIndex; |
| 4087 public float eventAgeSeconds; |
| 4088 public VREvent_Data_t data; |
| 4089 } |
| 4090 [StructLayout(LayoutKind.Sequential)] public struct HiddenAreaMesh_t |
| 4091 { |
| 4092 public IntPtr pVertexData; // const struct vr::HmdVector2_t * |
| 4093 public uint unTriangleCount; |
| 4094 } |
| 4095 [StructLayout(LayoutKind.Sequential)] public struct VRControllerAxis_t |
| 4096 { |
| 4097 public float x; |
| 4098 public float y; |
| 4099 } |
| 4100 [StructLayout(LayoutKind.Sequential)] public struct VRControllerState_t |
| 4101 { |
| 4102 public uint unPacketNum; |
| 4103 public ulong ulButtonPressed; |
| 4104 public ulong ulButtonTouched; |
| 4105 public VRControllerAxis_t rAxis0; //VRControllerAxis_t[5] |
| 4106 public VRControllerAxis_t rAxis1; |
| 4107 public VRControllerAxis_t rAxis2; |
| 4108 public VRControllerAxis_t rAxis3; |
| 4109 public VRControllerAxis_t rAxis4; |
| 4110 } |
| 4111 // This structure is for backwards binary compatibility on Linux and OSX only |
| 4112 [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct VRControllerState_
t_Packed |
| 4113 { |
| 4114 public uint unPacketNum; |
| 4115 public ulong ulButtonPressed; |
| 4116 public ulong ulButtonTouched; |
| 4117 public VRControllerAxis_t rAxis0; //VRControllerAxis_t[5] |
| 4118 public VRControllerAxis_t rAxis1; |
| 4119 public VRControllerAxis_t rAxis2; |
| 4120 public VRControllerAxis_t rAxis3; |
| 4121 public VRControllerAxis_t rAxis4; |
| 4122 public void Unpack(ref VRControllerState_t unpacked) |
| 4123 { |
| 4124 unpacked.unPacketNum = this.unPacketNum; |
| 4125 unpacked.ulButtonPressed = this.ulButtonPressed; |
| 4126 unpacked.ulButtonTouched = this.ulButtonTouched; |
| 4127 unpacked.rAxis0 = this.rAxis0; |
| 4128 unpacked.rAxis1 = this.rAxis1; |
| 4129 unpacked.rAxis2 = this.rAxis2; |
| 4130 unpacked.rAxis3 = this.rAxis3; |
| 4131 unpacked.rAxis4 = this.rAxis4; |
| 4132 } |
| 4133 } |
| 4134 [StructLayout(LayoutKind.Sequential)] public struct Compositor_OverlaySettings |
| 4135 { |
| 4136 public uint size; |
| 4137 [MarshalAs(UnmanagedType.I1)] |
| 4138 public bool curved; |
| 4139 [MarshalAs(UnmanagedType.I1)] |
| 4140 public bool antialias; |
| 4141 public float scale; |
| 4142 public float distance; |
| 4143 public float alpha; |
| 4144 public float uOffset; |
| 4145 public float vOffset; |
| 4146 public float uScale; |
| 4147 public float vScale; |
| 4148 public float gridDivs; |
| 4149 public float gridWidth; |
| 4150 public float gridScale; |
| 4151 public HmdMatrix44_t transform; |
| 4152 } |
| 4153 [StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrameHeader
_t |
| 4154 { |
| 4155 public EVRTrackedCameraFrameType eFrameType; |
| 4156 public uint nWidth; |
| 4157 public uint nHeight; |
| 4158 public uint nBytesPerPixel; |
| 4159 public uint nFrameSequence; |
| 4160 public TrackedDevicePose_t standingTrackedDevicePose; |
| 4161 } |
| 4162 [StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t |
| 4163 { |
| 4164 public IntPtr pchKey; // const char * |
| 4165 public IntPtr pchValue; // const char * |
| 4166 } |
| 4167 [StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming |
| 4168 { |
| 4169 public uint m_nSize; |
| 4170 public uint m_nFrameIndex; |
| 4171 public uint m_nNumFramePresents; |
| 4172 public uint m_nNumMisPresented; |
| 4173 public uint m_nNumDroppedFrames; |
| 4174 public uint m_nReprojectionFlags; |
| 4175 public double m_flSystemTimeInSeconds; |
| 4176 public float m_flPreSubmitGpuMs; |
| 4177 public float m_flPostSubmitGpuMs; |
| 4178 public float m_flTotalRenderGpuMs; |
| 4179 public float m_flCompositorRenderGpuMs; |
| 4180 public float m_flCompositorRenderCpuMs; |
| 4181 public float m_flCompositorIdleCpuMs; |
| 4182 public float m_flClientFrameIntervalMs; |
| 4183 public float m_flPresentCallCpuMs; |
| 4184 public float m_flWaitForPresentCpuMs; |
| 4185 public float m_flSubmitFrameMs; |
| 4186 public float m_flWaitGetPosesCalledMs; |
| 4187 public float m_flNewPosesReadyMs; |
| 4188 public float m_flNewFrameReadyMs; |
| 4189 public float m_flCompositorUpdateStartMs; |
| 4190 public float m_flCompositorUpdateEndMs; |
| 4191 public float m_flCompositorRenderStartMs; |
| 4192 public TrackedDevicePose_t m_HmdPose; |
| 4193 } |
| 4194 [StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats |
| 4195 { |
| 4196 public uint m_nPid; |
| 4197 public uint m_nNumFramePresents; |
| 4198 public uint m_nNumDroppedFrames; |
| 4199 public uint m_nNumReprojectedFrames; |
| 4200 public uint m_nNumFramePresentsOnStartup; |
| 4201 public uint m_nNumDroppedFramesOnStartup; |
| 4202 public uint m_nNumReprojectedFramesOnStartup; |
| 4203 public uint m_nNumLoading; |
| 4204 public uint m_nNumFramePresentsLoading; |
| 4205 public uint m_nNumDroppedFramesLoading; |
| 4206 public uint m_nNumReprojectedFramesLoading; |
| 4207 public uint m_nNumTimedOut; |
| 4208 public uint m_nNumFramePresentsTimedOut; |
| 4209 public uint m_nNumDroppedFramesTimedOut; |
| 4210 public uint m_nNumReprojectedFramesTimedOut; |
| 4211 } |
| 4212 [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_
t |
| 4213 { |
| 4214 public HmdVector3_t vSource; |
| 4215 public HmdVector3_t vDirection; |
| 4216 public ETrackingUniverseOrigin eOrigin; |
| 4217 } |
| 4218 [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionResults
_t |
| 4219 { |
| 4220 public HmdVector3_t vPoint; |
| 4221 public HmdVector3_t vNormal; |
| 4222 public HmdVector2_t vUVs; |
| 4223 public float fDistance; |
| 4224 } |
| 4225 [StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskRectangle_t |
| 4226 { |
| 4227 public float m_flTopLeftX; |
| 4228 public float m_flTopLeftY; |
| 4229 public float m_flWidth; |
| 4230 public float m_flHeight; |
| 4231 } |
| 4232 [StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskCircle_t |
| 4233 { |
| 4234 public float m_flCenterX; |
| 4235 public float m_flCenterY; |
| 4236 public float m_flRadius; |
| 4237 } |
| 4238 [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionMaskPri
mitive_t |
| 4239 { |
| 4240 public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; |
| 4241 public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; |
| 4242 } |
| 4243 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t |
| 4244 { |
| 4245 public HmdMatrix34_t mTrackingToComponentRenderModel; |
| 4246 public HmdMatrix34_t mTrackingToComponentLocal; |
| 4247 public uint uProperties; |
| 4248 } |
| 4249 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_Vertex_t |
| 4250 { |
| 4251 public HmdVector3_t vPosition; |
| 4252 public HmdVector3_t vNormal; |
| 4253 public float rfTextureCoord0; //float[2] |
| 4254 public float rfTextureCoord1; |
| 4255 } |
| 4256 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_TextureMap_t |
| 4257 { |
| 4258 public char unWidth; |
| 4259 public char unHeight; |
| 4260 public IntPtr rubTextureMapData; // const uint8_t * |
| 4261 } |
| 4262 // This structure is for backwards binary compatibility on Linux and OSX only |
| 4263 [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_Textur
eMap_t_Packed |
| 4264 { |
| 4265 public char unWidth; |
| 4266 public char unHeight; |
| 4267 public IntPtr rubTextureMapData; // const uint8_t * |
| 4268 public void Unpack(ref RenderModel_TextureMap_t unpacked) |
| 4269 { |
| 4270 unpacked.unWidth = this.unWidth; |
| 4271 unpacked.unHeight = this.unHeight; |
| 4272 unpacked.rubTextureMapData = this.rubTextureMapData; |
| 4273 } |
| 4274 } |
| 4275 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_t |
| 4276 { |
| 4277 public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t * |
| 4278 public uint unVertexCount; |
| 4279 public IntPtr rIndexData; // const uint16_t * |
| 4280 public uint unTriangleCount; |
| 4281 public int diffuseTextureId; |
| 4282 } |
| 4283 // This structure is for backwards binary compatibility on Linux and OSX only |
| 4284 [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_t_Pack
ed |
| 4285 { |
| 4286 public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t * |
| 4287 public uint unVertexCount; |
| 4288 public IntPtr rIndexData; // const uint16_t * |
| 4289 public uint unTriangleCount; |
| 4290 public int diffuseTextureId; |
| 4291 public void Unpack(ref RenderModel_t unpacked) |
| 4292 { |
| 4293 unpacked.rVertexData = this.rVertexData; |
| 4294 unpacked.unVertexCount = this.unVertexCount; |
| 4295 unpacked.rIndexData = this.rIndexData; |
| 4296 unpacked.unTriangleCount = this.unTriangleCount; |
| 4297 unpacked.diffuseTextureId = this.diffuseTextureId; |
| 4298 } |
| 4299 } |
| 4300 [StructLayout(LayoutKind.Sequential)] public struct RenderModel_ControllerMode_S
tate_t |
| 4301 { |
| 4302 [MarshalAs(UnmanagedType.I1)] |
| 4303 public bool bScrollWheelVisible; |
| 4304 } |
| 4305 [StructLayout(LayoutKind.Sequential)] public struct NotificationBitmap_t |
| 4306 { |
| 4307 public IntPtr m_pImageData; // void * |
| 4308 public int m_nWidth; |
| 4309 public int m_nHeight; |
| 4310 public int m_nBytesPerPixel; |
| 4311 } |
| 4312 [StructLayout(LayoutKind.Sequential)] public struct COpenVRContext |
| 4313 { |
| 4314 public IntPtr m_pVRSystem; // class vr::IVRSystem * |
| 4315 public IntPtr m_pVRChaperone; // class vr::IVRChaperone * |
| 4316 public IntPtr m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup * |
| 4317 public IntPtr m_pVRCompositor; // class vr::IVRCompositor * |
| 4318 public IntPtr m_pVROverlay; // class vr::IVROverlay * |
| 4319 public IntPtr m_pVRResources; // class vr::IVRResources * |
| 4320 public IntPtr m_pVRRenderModels; // class vr::IVRRenderModels * |
| 4321 public IntPtr m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay * |
| 4322 public IntPtr m_pVRSettings; // class vr::IVRSettings * |
| 4323 public IntPtr m_pVRApplications; // class vr::IVRApplications * |
| 4324 public IntPtr m_pVRTrackedCamera; // class vr::IVRTrackedCamera * |
| 4325 public IntPtr m_pVRScreenshots; // class vr::IVRScreenshots * |
| 4326 } |
| 4327 |
| 4328 public class OpenVR |
| 4329 { |
| 4330 |
| 4331 public static uint InitInternal(ref EVRInitError peError, EVRApplication
Type eApplicationType) |
| 4332 { |
| 4333 return OpenVRInterop.InitInternal(ref peError, eApplicationType)
; |
| 4334 } |
| 4335 |
| 4336 public static void ShutdownInternal() |
| 4337 { |
| 4338 OpenVRInterop.ShutdownInternal(); |
| 4339 } |
| 4340 |
| 4341 public static bool IsHmdPresent() |
| 4342 { |
| 4343 return OpenVRInterop.IsHmdPresent(); |
| 4344 } |
| 4345 |
| 4346 public static bool IsRuntimeInstalled() |
| 4347 { |
| 4348 return OpenVRInterop.IsRuntimeInstalled(); |
| 4349 } |
| 4350 |
| 4351 public static string GetStringForHmdError(EVRInitError error) |
| 4352 { |
| 4353 return Marshal.PtrToStringAnsi(OpenVRInterop.GetStringForHmdErro
r(error)); |
| 4354 } |
| 4355 |
| 4356 public static IntPtr GetGenericInterface(string pchInterfaceVersion, ref
EVRInitError peError) |
| 4357 { |
| 4358 return OpenVRInterop.GetGenericInterface(pchInterfaceVersion, re
f peError); |
| 4359 } |
| 4360 |
| 4361 public static bool IsInterfaceVersionValid(string pchInterfaceVersion) |
| 4362 { |
| 4363 return OpenVRInterop.IsInterfaceVersionValid(pchInterfaceVersion
); |
| 4364 } |
| 4365 |
| 4366 public static uint GetInitToken() |
| 4367 { |
| 4368 return OpenVRInterop.GetInitToken(); |
| 4369 } |
| 4370 |
| 4371 public const uint k_unMaxDriverDebugResponseSize = 32768; |
| 4372 public const uint k_unTrackedDeviceIndex_Hmd = 0; |
| 4373 public const uint k_unMaxTrackedDeviceCount = 16; |
| 4374 public const uint k_unTrackedDeviceIndexOther = 4294967294; |
| 4375 public const uint k_unTrackedDeviceIndexInvalid = 4294967295; |
| 4376 public const ulong k_ulInvalidPropertyContainer = 0; |
| 4377 public const uint k_unInvalidPropertyTag = 0; |
| 4378 public const uint k_unFloatPropertyTag = 1; |
| 4379 public const uint k_unInt32PropertyTag = 2; |
| 4380 public const uint k_unUint64PropertyTag = 3; |
| 4381 public const uint k_unBoolPropertyTag = 4; |
| 4382 public const uint k_unStringPropertyTag = 5; |
| 4383 public const uint k_unHmdMatrix34PropertyTag = 20; |
| 4384 public const uint k_unHmdMatrix44PropertyTag = 21; |
| 4385 public const uint k_unHmdVector3PropertyTag = 22; |
| 4386 public const uint k_unHmdVector4PropertyTag = 23; |
| 4387 public const uint k_unHiddenAreaPropertyTag = 30; |
| 4388 public const uint k_unOpenVRInternalReserved_Start = 1000; |
| 4389 public const uint k_unOpenVRInternalReserved_End = 10000; |
| 4390 public const uint k_unMaxPropertyStringSize = 32768; |
| 4391 public const uint k_unControllerStateAxisCount = 5; |
| 4392 public const ulong k_ulOverlayHandleInvalid = 0; |
| 4393 public const uint k_unScreenshotHandleInvalid = 0; |
| 4394 public const string IVRSystem_Version = "IVRSystem_015"; |
| 4395 public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001
"; |
| 4396 public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003"; |
| 4397 public const uint k_unMaxApplicationKeyLength = 128; |
| 4398 public const string k_pch_MimeType_HomeApp = "vr/home"; |
| 4399 public const string k_pch_MimeType_GameTheater = "vr/game_theater"; |
| 4400 public const string IVRApplications_Version = "IVRApplications_006"; |
| 4401 public const string IVRChaperone_Version = "IVRChaperone_003"; |
| 4402 public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; |
| 4403 public const string IVRCompositor_Version = "IVRCompositor_020"; |
| 4404 public const uint k_unVROverlayMaxKeyLength = 128; |
| 4405 public const uint k_unVROverlayMaxNameLength = 128; |
| 4406 public const uint k_unMaxOverlayCount = 64; |
| 4407 public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; |
| 4408 public const string IVROverlay_Version = "IVROverlay_014"; |
| 4409 public const string k_pch_Controller_Component_GDC2015 = "gdc2015"; |
| 4410 public const string k_pch_Controller_Component_Base = "base"; |
| 4411 public const string k_pch_Controller_Component_Tip = "tip"; |
| 4412 public const string k_pch_Controller_Component_HandGrip = "handgrip"; |
| 4413 public const string k_pch_Controller_Component_Status = "status"; |
| 4414 public const string IVRRenderModels_Version = "IVRRenderModels_005"; |
| 4415 public const uint k_unNotificationTextMaxSize = 256; |
| 4416 public const string IVRNotifications_Version = "IVRNotifications_002"; |
| 4417 public const uint k_unMaxSettingsKeyLength = 128; |
| 4418 public const string IVRSettings_Version = "IVRSettings_002"; |
| 4419 public const string k_pch_SteamVR_Section = "steamvr"; |
| 4420 public const string k_pch_SteamVR_RequireHmd_String = "requireHmd"; |
| 4421 public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver
"; |
| 4422 public const string k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; |
| 4423 public const string k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; |
| 4424 public const string k_pch_SteamVR_DebugProcessPipe_String = "debugProces
sPipe"; |
| 4425 public const string k_pch_SteamVR_EnableDistortion_Bool = "enableDistort
ion"; |
| 4426 public const string k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; |
| 4427 public const string k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; |
| 4428 public const string k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "send
SystemButtonToAllApps"; |
| 4429 public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel"; |
| 4430 public const string k_pch_SteamVR_IPD_Float = "ipd"; |
| 4431 public const string k_pch_SteamVR_Background_String = "background"; |
| 4432 public const string k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "ba
ckgroundUseDomeProjection"; |
| 4433 public const string k_pch_SteamVR_BackgroundCameraHeight_Float = "backgr
oundCameraHeight"; |
| 4434 public const string k_pch_SteamVR_BackgroundDomeRadius_Float = "backgrou
ndDomeRadius"; |
| 4435 public const string k_pch_SteamVR_GridColor_String = "gridColor"; |
| 4436 public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"
; |
| 4437 public const string k_pch_SteamVR_ShowStage_Bool = "showStage"; |
| 4438 public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activa
teMultipleDrivers"; |
| 4439 public const string k_pch_SteamVR_DirectMode_Bool = "directMode"; |
| 4440 public const string k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeE
didVid"; |
| 4441 public const string k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeE
didPid"; |
| 4442 public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; |
| 4443 public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float
= "speakersForwardYawOffsetDegrees"; |
| 4444 public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "bas
estationPowerManagement"; |
| 4445 public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillPr
ocesses"; |
| 4446 public const string k_pch_SteamVR_RenderTargetMultiplier_Float = "render
TargetMultiplier"; |
| 4447 public const string k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAs
yncReprojection"; |
| 4448 public const string k_pch_SteamVR_AllowReprojection_Bool = "allowInterle
avedReprojection"; |
| 4449 public const string k_pch_SteamVR_ForceReprojection_Bool = "forceReproje
ction"; |
| 4450 public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFa
deOnBadTracking"; |
| 4451 public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirr
orView"; |
| 4452 public const string k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"
; |
| 4453 public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorVie
wGeometry"; |
| 4454 public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMoni
torFromAppLaunch"; |
| 4455 public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "s
tartCompositorFromAppLaunch"; |
| 4456 public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "st
artDashboardFromAppLaunch"; |
| 4457 public const string k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "
startOverlayAppsFromDashboard"; |
| 4458 public const string k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; |
| 4459 public const string k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitial
DefaultHomeApp"; |
| 4460 public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "C
ycleBackgroundImageTimeSec"; |
| 4461 public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; |
| 4462 public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; |
| 4463 public const string k_pch_Lighthouse_Section = "driver_lighthouse"; |
| 4464 public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; |
| 4465 public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisa
mbiguation"; |
| 4466 public const string k_pch_Lighthouse_DisambiguationDebug_Int32 = "disamb
iguationdebug"; |
| 4467 public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primary
basestation"; |
| 4468 public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; |
| 4469 public const string k_pch_Null_Section = "driver_null"; |
| 4470 public const string k_pch_Null_SerialNumber_String = "serialNumber"; |
| 4471 public const string k_pch_Null_ModelNumber_String = "modelNumber"; |
| 4472 public const string k_pch_Null_WindowX_Int32 = "windowX"; |
| 4473 public const string k_pch_Null_WindowY_Int32 = "windowY"; |
| 4474 public const string k_pch_Null_WindowWidth_Int32 = "windowWidth"; |
| 4475 public const string k_pch_Null_WindowHeight_Int32 = "windowHeight"; |
| 4476 public const string k_pch_Null_RenderWidth_Int32 = "renderWidth"; |
| 4477 public const string k_pch_Null_RenderHeight_Int32 = "renderHeight"; |
| 4478 public const string k_pch_Null_SecondsFromVsyncToPhotons_Float = "second
sFromVsyncToPhotons"; |
| 4479 public const string k_pch_Null_DisplayFrequency_Float = "displayFrequenc
y"; |
| 4480 public const string k_pch_UserInterface_Section = "userinterface"; |
| 4481 public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "Status
AlwaysOnTop"; |
| 4482 public const string k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeT
oTray"; |
| 4483 public const string k_pch_UserInterface_Screenshots_Bool = "screenshots"
; |
| 4484 public const string k_pch_UserInterface_ScreenshotType_Int = "screenshot
Type"; |
| 4485 public const string k_pch_Notifications_Section = "notifications"; |
| 4486 public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDistur
b"; |
| 4487 public const string k_pch_Keyboard_Section = "keyboard"; |
| 4488 public const string k_pch_Keyboard_TutorialCompletions = "TutorialComple
tions"; |
| 4489 public const string k_pch_Keyboard_ScaleX = "ScaleX"; |
| 4490 public const string k_pch_Keyboard_ScaleY = "ScaleY"; |
| 4491 public const string k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; |
| 4492 public const string k_pch_Keyboard_OffsetRightX = "OffsetRightX"; |
| 4493 public const string k_pch_Keyboard_OffsetY = "OffsetY"; |
| 4494 public const string k_pch_Keyboard_Smoothing = "Smoothing"; |
| 4495 public const string k_pch_Perf_Section = "perfcheck"; |
| 4496 public const string k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; |
| 4497 public const string k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; |
| 4498 public const string k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; |
| 4499 public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore
"; |
| 4500 public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnEx
it"; |
| 4501 public const string k_pch_Perf_TestData_Float = "perfTestData"; |
| 4502 public const string k_pch_CollisionBounds_Section = "collisionBounds"; |
| 4503 public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBounds
Style"; |
| 4504 public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "Coll
isionBoundsGroundPerimeterOn"; |
| 4505 public const string k_pch_CollisionBounds_CenterMarkerOn_Bool = "Collisi
onBoundsCenterMarkerOn"; |
| 4506 public const string k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionB
oundsPlaySpaceOn"; |
| 4507 public const string k_pch_CollisionBounds_FadeDistance_Float = "Collisio
nBoundsFadeDistance"; |
| 4508 public const string k_pch_CollisionBounds_ColorGammaR_Int32 = "Collision
BoundsColorGammaR"; |
| 4509 public const string k_pch_CollisionBounds_ColorGammaG_Int32 = "Collision
BoundsColorGammaG"; |
| 4510 public const string k_pch_CollisionBounds_ColorGammaB_Int32 = "Collision
BoundsColorGammaB"; |
| 4511 public const string k_pch_CollisionBounds_ColorGammaA_Int32 = "Collision
BoundsColorGammaA"; |
| 4512 public const string k_pch_Camera_Section = "camera"; |
| 4513 public const string k_pch_Camera_EnableCamera_Bool = "enableCamera"; |
| 4514 public const string k_pch_Camera_EnableCameraInDashboard_Bool = "enableC
ameraInDashboard"; |
| 4515 public const string k_pch_Camera_EnableCameraForCollisionBounds_Bool = "
enableCameraForCollisionBounds"; |
| 4516 public const string k_pch_Camera_EnableCameraForRoomView_Bool = "enableC
ameraForRoomView"; |
| 4517 public const string k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBounds
ColorGammaR"; |
| 4518 public const string k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBounds
ColorGammaG"; |
| 4519 public const string k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBounds
ColorGammaB"; |
| 4520 public const string k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBounds
ColorGammaA"; |
| 4521 public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStr
ength"; |
| 4522 public const string k_pch_audio_Section = "audio"; |
| 4523 public const string k_pch_audio_OnPlaybackDevice_String = "onPlaybackDev
ice"; |
| 4524 public const string k_pch_audio_OnRecordDevice_String = "onRecordDevice"
; |
| 4525 public const string k_pch_audio_OnPlaybackMirrorDevice_String = "onPlayb
ackMirrorDevice"; |
| 4526 public const string k_pch_audio_OffPlaybackDevice_String = "offPlaybackD
evice"; |
| 4527 public const string k_pch_audio_OffRecordDevice_String = "offRecordDevic
e"; |
| 4528 public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; |
| 4529 public const string k_pch_Power_Section = "power"; |
| 4530 public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; |
| 4531 public const string k_pch_Power_TurnOffScreensTimeout_Float = "turnOffSc
reensTimeout"; |
| 4532 public const string k_pch_Power_TurnOffControllersTimeout_Float = "turnO
ffControllersTimeout"; |
| 4533 public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnT
oWatchdogTimeout"; |
| 4534 public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLa
unchSteamVROnButtonPress"; |
| 4535 public const string k_pch_Dashboard_Section = "dashboard"; |
| 4536 public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashbo
ard"; |
| 4537 public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; |
| 4538 public const string k_pch_modelskin_Section = "modelskins"; |
| 4539 public const string k_pch_Driver_Enable_Bool = "enable"; |
| 4540 public const string IVRScreenshots_Version = "IVRScreenshots_001"; |
| 4541 public const string IVRResources_Version = "IVRResources_001"; |
| 4542 |
| 4543 static uint VRToken { get; set; } |
| 4544 |
| 4545 const string FnTable_Prefix = "FnTable:"; |
| 4546 |
| 4547 class COpenVRContext |
| 4548 { |
| 4549 public COpenVRContext() { Clear(); } |
| 4550 |
| 4551 public void Clear() |
| 4552 { |
| 4553 m_pVRSystem = null; |
| 4554 m_pVRChaperone = null; |
| 4555 m_pVRChaperoneSetup = null; |
| 4556 m_pVRCompositor = null; |
| 4557 m_pVROverlay = null; |
| 4558 m_pVRRenderModels = null; |
| 4559 m_pVRExtendedDisplay = null; |
| 4560 m_pVRSettings = null; |
| 4561 m_pVRApplications = null; |
| 4562 m_pVRScreenshots = null; |
| 4563 m_pVRTrackedCamera = null; |
| 4564 } |
| 4565 |
| 4566 void CheckClear() |
| 4567 { |
| 4568 if (VRToken != GetInitToken()) |
| 4569 { |
| 4570 Clear(); |
| 4571 VRToken = GetInitToken(); |
| 4572 } |
| 4573 } |
| 4574 |
| 4575 public CVRSystem VRSystem() |
| 4576 { |
| 4577 CheckClear(); |
| 4578 if (m_pVRSystem == null) |
| 4579 { |
| 4580 var eError = EVRInitError.None; |
| 4581 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRSystem_Version, ref eError); |
| 4582 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4583 m_pVRSystem = new CVRSystem(pInterface); |
| 4584 } |
| 4585 return m_pVRSystem; |
| 4586 } |
| 4587 |
| 4588 public CVRChaperone VRChaperone() |
| 4589 { |
| 4590 CheckClear(); |
| 4591 if (m_pVRChaperone == null) |
| 4592 { |
| 4593 var eError = EVRInitError.None; |
| 4594 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRChaperone_Version, ref eError); |
| 4595 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4596 m_pVRChaperone = new CVRChaperone(pInter
face); |
| 4597 } |
| 4598 return m_pVRChaperone; |
| 4599 } |
| 4600 |
| 4601 public CVRChaperoneSetup VRChaperoneSetup() |
| 4602 { |
| 4603 CheckClear(); |
| 4604 if (m_pVRChaperoneSetup == null) |
| 4605 { |
| 4606 var eError = EVRInitError.None; |
| 4607 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRChaperoneSetup_Version, ref eError); |
| 4608 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4609 m_pVRChaperoneSetup = new CVRChaperoneSe
tup(pInterface); |
| 4610 } |
| 4611 return m_pVRChaperoneSetup; |
| 4612 } |
| 4613 |
| 4614 public CVRCompositor VRCompositor() |
| 4615 { |
| 4616 CheckClear(); |
| 4617 if (m_pVRCompositor == null) |
| 4618 { |
| 4619 var eError = EVRInitError.None; |
| 4620 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRCompositor_Version, ref eError); |
| 4621 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4622 m_pVRCompositor = new CVRCompositor(pInt
erface); |
| 4623 } |
| 4624 return m_pVRCompositor; |
| 4625 } |
| 4626 |
| 4627 public CVROverlay VROverlay() |
| 4628 { |
| 4629 CheckClear(); |
| 4630 if (m_pVROverlay == null) |
| 4631 { |
| 4632 var eError = EVRInitError.None; |
| 4633 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVROverlay_Version, ref eError); |
| 4634 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4635 m_pVROverlay = new CVROverlay(pInterface
); |
| 4636 } |
| 4637 return m_pVROverlay; |
| 4638 } |
| 4639 |
| 4640 public CVRRenderModels VRRenderModels() |
| 4641 { |
| 4642 CheckClear(); |
| 4643 if (m_pVRRenderModels == null) |
| 4644 { |
| 4645 var eError = EVRInitError.None; |
| 4646 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRRenderModels_Version, ref eError); |
| 4647 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4648 m_pVRRenderModels = new CVRRenderModels(
pInterface); |
| 4649 } |
| 4650 return m_pVRRenderModels; |
| 4651 } |
| 4652 |
| 4653 public CVRExtendedDisplay VRExtendedDisplay() |
| 4654 { |
| 4655 CheckClear(); |
| 4656 if (m_pVRExtendedDisplay == null) |
| 4657 { |
| 4658 var eError = EVRInitError.None; |
| 4659 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRExtendedDisplay_Version, ref eError); |
| 4660 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4661 m_pVRExtendedDisplay = new CVRExtendedDi
splay(pInterface); |
| 4662 } |
| 4663 return m_pVRExtendedDisplay; |
| 4664 } |
| 4665 |
| 4666 public CVRSettings VRSettings() |
| 4667 { |
| 4668 CheckClear(); |
| 4669 if (m_pVRSettings == null) |
| 4670 { |
| 4671 var eError = EVRInitError.None; |
| 4672 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRSettings_Version, ref eError); |
| 4673 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4674 m_pVRSettings = new CVRSettings(pInterfa
ce); |
| 4675 } |
| 4676 return m_pVRSettings; |
| 4677 } |
| 4678 |
| 4679 public CVRApplications VRApplications() |
| 4680 { |
| 4681 CheckClear(); |
| 4682 if (m_pVRApplications == null) |
| 4683 { |
| 4684 var eError = EVRInitError.None; |
| 4685 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRApplications_Version, ref eError); |
| 4686 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4687 m_pVRApplications = new CVRApplications(
pInterface); |
| 4688 } |
| 4689 return m_pVRApplications; |
| 4690 } |
| 4691 |
| 4692 public CVRScreenshots VRScreenshots() |
| 4693 { |
| 4694 CheckClear(); |
| 4695 if (m_pVRScreenshots == null) |
| 4696 { |
| 4697 var eError = EVRInitError.None; |
| 4698 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRScreenshots_Version, ref eError); |
| 4699 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4700 m_pVRScreenshots = new CVRScreenshots(pI
nterface); |
| 4701 } |
| 4702 return m_pVRScreenshots; |
| 4703 } |
| 4704 |
| 4705 public CVRTrackedCamera VRTrackedCamera() |
| 4706 { |
| 4707 CheckClear(); |
| 4708 if (m_pVRTrackedCamera == null) |
| 4709 { |
| 4710 var eError = EVRInitError.None; |
| 4711 var pInterface = OpenVRInterop.GetGenericInterfa
ce(FnTable_Prefix+IVRTrackedCamera_Version, ref eError); |
| 4712 if (pInterface != IntPtr.Zero && eError == EVRIn
itError.None) |
| 4713 m_pVRTrackedCamera = new CVRTrackedCamer
a(pInterface); |
| 4714 } |
| 4715 return m_pVRTrackedCamera; |
| 4716 } |
| 4717 |
| 4718 private CVRSystem m_pVRSystem; |
| 4719 private CVRChaperone m_pVRChaperone; |
| 4720 private CVRChaperoneSetup m_pVRChaperoneSetup; |
| 4721 private CVRCompositor m_pVRCompositor; |
| 4722 private CVROverlay m_pVROverlay; |
| 4723 private CVRRenderModels m_pVRRenderModels; |
| 4724 private CVRExtendedDisplay m_pVRExtendedDisplay; |
| 4725 private CVRSettings m_pVRSettings; |
| 4726 private CVRApplications m_pVRApplications; |
| 4727 private CVRScreenshots m_pVRScreenshots; |
| 4728 private CVRTrackedCamera m_pVRTrackedCamera; |
| 4729 }; |
| 4730 |
| 4731 private static COpenVRContext _OpenVRInternal_ModuleContext = null; |
| 4732 static COpenVRContext OpenVRInternal_ModuleContext |
| 4733 { |
| 4734 get |
| 4735 { |
| 4736 if (_OpenVRInternal_ModuleContext == null) |
| 4737 _OpenVRInternal_ModuleContext = new COpenVRConte
xt(); |
| 4738 return _OpenVRInternal_ModuleContext; |
| 4739 } |
| 4740 } |
| 4741 |
| 4742 public static CVRSystem System { get { return OpenVRInternal_ModuleConte
xt.VRSystem(); } } |
| 4743 public static CVRChaperone Chaperone { get { return OpenVRInternal_Modul
eContext.VRChaperone(); } } |
| 4744 public static CVRChaperoneSetup ChaperoneSetup { get { return OpenVRInte
rnal_ModuleContext.VRChaperoneSetup(); } } |
| 4745 public static CVRCompositor Compositor { get { return OpenVRInternal_Mod
uleContext.VRCompositor(); } } |
| 4746 public static CVROverlay Overlay { get { return OpenVRInternal_ModuleCon
text.VROverlay(); } } |
| 4747 public static CVRRenderModels RenderModels { get { return OpenVRInternal
_ModuleContext.VRRenderModels(); } } |
| 4748 public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRIn
ternal_ModuleContext.VRExtendedDisplay(); } } |
| 4749 public static CVRSettings Settings { get { return OpenVRInternal_ModuleC
ontext.VRSettings(); } } |
| 4750 public static CVRApplications Applications { get { return OpenVRInternal
_ModuleContext.VRApplications(); } } |
| 4751 public static CVRScreenshots Screenshots { get { return OpenVRInternal_M
oduleContext.VRScreenshots(); } } |
| 4752 public static CVRTrackedCamera TrackedCamera { get { return OpenVRIntern
al_ModuleContext.VRTrackedCamera(); } } |
| 4753 |
| 4754 /** Finds the active installation of vrclient.dll and initializes it */ |
| 4755 public static CVRSystem Init(ref EVRInitError peError, EVRApplicationTyp
e eApplicationType = EVRApplicationType.VRApplication_Scene) |
| 4756 { |
| 4757 VRToken = InitInternal(ref peError, eApplicationType); |
| 4758 OpenVRInternal_ModuleContext.Clear(); |
| 4759 |
| 4760 if (peError != EVRInitError.None) |
| 4761 return null; |
| 4762 |
| 4763 bool bInterfaceValid = IsInterfaceVersionValid(IVRSystem_Version
); |
| 4764 if (!bInterfaceValid) |
| 4765 { |
| 4766 ShutdownInternal(); |
| 4767 peError = EVRInitError.Init_InterfaceNotFound; |
| 4768 return null; |
| 4769 } |
| 4770 |
| 4771 return OpenVR.System; |
| 4772 } |
| 4773 |
| 4774 /** unloads vrclient.dll. Any interface pointers from the interface are |
| 4775 * invalid after this point */ |
| 4776 public static void Shutdown() |
| 4777 { |
| 4778 ShutdownInternal(); |
| 4779 } |
| 4780 |
| 4781 } |
| 4782 |
| 4783 |
| 4784 |
| 4785 } |
| 4786 |
OLD | NEW |