-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
openvr_api.cs
8220 lines (7703 loc) · 334 KB
/
openvr_api.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: This file contains C#/managed code bindings for the OpenVR interfaces
// This file is auto-generated, do not edit it.
//
//=============================================================================
#if !OPENVR_XR_API
using System;
using System.Runtime.InteropServices;
using Valve.VR;
#if UNITY_5_3_OR_NEWER
using UnityEngine;
#endif
namespace Valve.VR
{
[StructLayout(LayoutKind.Sequential)]
public struct IVRSystem
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetRecommendedRenderTargetSize(ref uint pnWidth, ref uint pnHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetProjectionMatrix GetProjectionMatrix;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetProjectionRaw(EVREye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetProjectionRaw GetProjectionRaw;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float fV, ref DistortionCoordinates_t pDistortionCoordinates);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ComputeDistortion ComputeDistortion;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdMatrix34_t _GetEyeToHeadTransform(EVREye eEye);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetEyeToHeadTransform GetEyeToHeadTransform;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTimeSinceLastVsync GetTimeSinceLastVsync;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate int _GetD3D9AdapterIndex();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetD3D9AdapterIndex GetD3D9AdapterIndex;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDXGIOutputInfo GetDXGIOutputInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType, IntPtr pInstance);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOutputDevice GetOutputDevice;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsDisplayOnDesktop();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsDisplayOnDesktop IsDisplayOnDesktop;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _SetDisplayVisibility(bool bIsVisibleOnDesktop);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetDisplayVisibility SetDisplayVisibility;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, [In, Out] TrackedDevicePose_t[] pTrackedDevicePoseArray, uint unTrackedDevicePoseArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDeviceToAbsoluteTrackingPose GetDeviceToAbsoluteTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdMatrix34_t _GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSeatedZeroPoseToStandingAbsoluteTrackingPose GetSeatedZeroPoseToStandingAbsoluteTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdMatrix34_t _GetRawZeroPoseToStandingAbsoluteTrackingPose();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRawZeroPoseToStandingAbsoluteTrackingPose GetRawZeroPoseToStandingAbsoluteTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSortedTrackedDeviceIndicesOfClass GetSortedTrackedDeviceIndicesOfClass;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EDeviceActivityLevel _GetTrackedDeviceActivityLevel(uint unDeviceId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTrackedDeviceActivityLevel GetTrackedDeviceActivityLevel;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ApplyTransform(ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ApplyTransform ApplyTransform;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTrackedDeviceIndexForControllerRole GetTrackedDeviceIndexForControllerRole;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedControllerRole _GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetControllerRoleForTrackedDeviceIndex GetControllerRoleForTrackedDeviceIndex;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedDeviceClass _GetTrackedDeviceClass(uint unDeviceIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTrackedDeviceClass GetTrackedDeviceClass;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsTrackedDeviceConnected(uint unDeviceIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsTrackedDeviceConnected IsTrackedDeviceConnected;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetBoolTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBoolTrackedDeviceProperty GetBoolTrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetFloatTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFloatTrackedDeviceProperty GetFloatTrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate int _GetInt32TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetInt32TrackedDeviceProperty GetInt32TrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _GetUint64TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetUint64TrackedDeviceProperty GetUint64TrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdMatrix34_t _GetMatrix34TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetMatrix34TrackedDeviceProperty GetMatrix34TrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetArrayTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, uint propType, IntPtr pBuffer, uint unBufferSize, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetArrayTrackedDeviceProperty GetArrayTrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetStringTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBufferSize, ref ETrackedPropertyError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetStringTrackedDeviceProperty GetStringTrackedDeviceProperty;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError error);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _PollNextEvent(ref VREvent_t pEvent, uint uncbVREvent);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PollNextEvent PollNextEvent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _PollNextEventWithPose(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PollNextEventWithPose PollNextEventWithPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetEventTypeNameFromEnum(EVREventType eType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetEventTypeNameFromEnum GetEventTypeNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye, EHiddenAreaMeshType type);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHiddenAreaMesh GetHiddenAreaMesh;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetControllerState GetControllerState;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetControllerStateWithPose GetControllerStateWithPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, ushort usDurationMicroSec);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _TriggerHapticPulse TriggerHapticPulse;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetButtonIdNameFromEnum(EVRButtonId eButtonId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetButtonIdNameFromEnum GetButtonIdNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetControllerAxisTypeNameFromEnum GetControllerAxisTypeNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsInputAvailable();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsInputAvailable IsInputAvailable;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsSteamVRDrawingControllers();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsSteamVRDrawingControllers IsSteamVRDrawingControllers;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ShouldApplicationPause();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShouldApplicationPause ShouldApplicationPause;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ShouldApplicationReduceRenderingWork();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShouldApplicationReduceRenderingWork ShouldApplicationReduceRenderingWork;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PerformFirmwareUpdate PerformFirmwareUpdate;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _AcknowledgeQuit_Exiting();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AcknowledgeQuit_Exiting AcknowledgeQuit_Exiting;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer, uint unBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetAppContainerFilePaths GetAppContainerFilePaths;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetRuntimeVersion();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRuntimeVersion GetRuntimeVersion;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRExtendedDisplay
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetWindowBounds(ref int pnX, ref int pnY, ref uint pnWidth, ref uint pnHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetWindowBounds GetWindowBounds;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetEyeOutputViewport(EVREye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetEyeOutputViewport GetEyeOutputViewport;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex, ref int pnAdapterOutputIndex);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDXGIOutputInfo GetDXGIOutputInfo;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRTrackedCamera
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, ref bool pHasCamera);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HasCamera HasCamera;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCameraFrameSize GetCameraFrameSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, uint nCameraIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCameraIntrinsics GetCameraIntrinsics;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, uint nCameraIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCameraProjection GetCameraProjection;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _AcquireVideoStreamingService(uint nDeviceIndex, ref ulong pHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AcquireVideoStreamingService AcquireVideoStreamingService;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _ReleaseVideoStreamingService(ulong hTrackedCamera);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseVideoStreamingService ReleaseVideoStreamingService;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetVideoStreamFrameBuffer(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVideoStreamTextureSize GetVideoStreamTextureSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVideoStreamTextureD3D11 GetVideoStreamTextureD3D11;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVideoStreamTextureGL GetVideoStreamTextureGL;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRTrackedCameraError _ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetCameraTrackingSpace(ETrackingUniverseOrigin eUniverse);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetCameraTrackingSpace SetCameraTrackingSpace;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackingUniverseOrigin _GetCameraTrackingSpace();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCameraTrackingSpace GetCameraTrackingSpace;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRApplications
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _AddApplicationManifest(IntPtr pchApplicationManifestFullPath, bool bTemporary);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AddApplicationManifest AddApplicationManifest;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _RemoveApplicationManifest(IntPtr pchApplicationManifestFullPath);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RemoveApplicationManifest RemoveApplicationManifest;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsApplicationInstalled(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsApplicationInstalled IsApplicationInstalled;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetApplicationCount();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationCount GetApplicationCount;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _GetApplicationKeyByIndex(uint unApplicationIndex, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationKeyByIndex GetApplicationKeyByIndex;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _GetApplicationKeyByProcessId(uint unProcessId, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationKeyByProcessId GetApplicationKeyByProcessId;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _LaunchApplication(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LaunchApplication LaunchApplication;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _LaunchTemplateApplication(IntPtr pchTemplateAppKey, IntPtr pchNewAppKey, [In, Out] AppOverrideKeys_t[] pKeys, uint unKeys);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LaunchTemplateApplication LaunchTemplateApplication;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _LaunchApplicationFromMimeType(IntPtr pchMimeType, IntPtr pchArgs);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LaunchApplicationFromMimeType LaunchApplicationFromMimeType;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _LaunchDashboardOverlay(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LaunchDashboardOverlay LaunchDashboardOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _CancelApplicationLaunch(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CancelApplicationLaunch CancelApplicationLaunch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _IdentifyApplication(uint unProcessId, IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IdentifyApplication IdentifyApplication;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetApplicationProcessId(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationProcessId GetApplicationProcessId;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetApplicationsErrorNameFromEnum(EVRApplicationError error);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationsErrorNameFromEnum GetApplicationsErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetApplicationPropertyString(IntPtr pchAppKey, EVRApplicationProperty eProperty, System.Text.StringBuilder pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationPropertyString GetApplicationPropertyString;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetApplicationPropertyBool(IntPtr pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationPropertyBool GetApplicationPropertyBool;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _GetApplicationPropertyUint64(IntPtr pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationPropertyUint64 GetApplicationPropertyUint64;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _SetApplicationAutoLaunch(IntPtr pchAppKey, bool bAutoLaunch);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetApplicationAutoLaunch SetApplicationAutoLaunch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetApplicationAutoLaunch(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationAutoLaunch GetApplicationAutoLaunch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _SetDefaultApplicationForMimeType(IntPtr pchAppKey, IntPtr pchMimeType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeType;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetDefaultApplicationForMimeType(IntPtr pchMimeType, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeType;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetApplicationSupportedMimeTypes(IntPtr pchAppKey, System.Text.StringBuilder pchMimeTypesBuffer, uint unMimeTypesBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTypes;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetApplicationsThatSupportMimeType(IntPtr pchMimeType, System.Text.StringBuilder pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationsThatSupportMimeType GetApplicationsThatSupportMimeType;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetApplicationLaunchArguments(uint unHandle, System.Text.StringBuilder pchArgs, uint unArgs);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetApplicationLaunchArguments GetApplicationLaunchArguments;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _GetStartingApplication(System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetStartingApplication GetStartingApplication;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRSceneApplicationState _GetSceneApplicationState();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSceneApplicationState GetSceneApplicationState;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _PerformApplicationPrelaunchCheck(IntPtr pchAppKey);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PerformApplicationPrelaunchCheck PerformApplicationPrelaunchCheck;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetSceneApplicationStateNameFromEnum(EVRSceneApplicationState state);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSceneApplicationStateNameFromEnum GetSceneApplicationStateNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRApplicationError _LaunchInternalProcess(IntPtr pchBinaryPath, IntPtr pchArguments, IntPtr pchWorkingDirectory);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LaunchInternalProcess LaunchInternalProcess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetCurrentSceneProcessId();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCurrentSceneProcessId GetCurrentSceneProcessId;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRChaperone
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ChaperoneCalibrationState _GetCalibrationState();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCalibrationState GetCalibrationState;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetPlayAreaSize(ref float pSizeX, ref float pSizeZ);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPlayAreaSize GetPlayAreaSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetPlayAreaRect(ref HmdQuad_t rect);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPlayAreaRect GetPlayAreaRect;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ReloadInfo();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReloadInfo ReloadInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetSceneColor(HmdColor_t color);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetSceneColor SetSceneColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetBoundsColor(ref HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutputCameraColor);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBoundsColor GetBoundsColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _AreBoundsVisible();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AreBoundsVisible AreBoundsVisible;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ForceBoundsVisible(bool bForce);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ForceBoundsVisible ForceBoundsVisible;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ResetZeroPose(ETrackingUniverseOrigin eTrackingUniverseOrigin);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ResetZeroPose ResetZeroPose;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRChaperoneSetup
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _CommitWorkingCopy(EChaperoneConfigFile configFile);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CommitWorkingCopy CommitWorkingCopy;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _RevertWorkingCopy();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RevertWorkingCopy RevertWorkingCopy;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetWorkingPlayAreaSize(ref float pSizeX, ref float pSizeZ);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetWorkingPlayAreaSize GetWorkingPlayAreaSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetWorkingPlayAreaRect(ref HmdQuad_t rect);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetWorkingPlayAreaRect GetWorkingPlayAreaRect;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetWorkingCollisionBoundsInfo GetWorkingCollisionBoundsInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetLiveCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetLiveCollisionBoundsInfo GetLiveCollisionBoundsInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetWorkingSeatedZeroPoseToRawTrackingPose GetWorkingSeatedZeroPoseToRawTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetWorkingStandingZeroPoseToRawTrackingPose GetWorkingStandingZeroPoseToRawTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetWorkingPlayAreaSize(float sizeX, float sizeZ);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetWorkingPlayAreaSize SetWorkingPlayAreaSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetWorkingCollisionBoundsInfo SetWorkingCollisionBoundsInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetWorkingPerimeter([In, Out] HmdVector2_t[] pPointBuffer, uint unPointCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetWorkingPerimeter SetWorkingPerimeter;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetWorkingSeatedZeroPoseToRawTrackingPose SetWorkingSeatedZeroPoseToRawTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetWorkingStandingZeroPoseToRawTrackingPose SetWorkingStandingZeroPoseToRawTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ReloadFromDisk(EChaperoneConfigFile configFile);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReloadFromDisk ReloadFromDisk;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseToRawTrackingPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBuffer, ref uint pnBufferLength);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ExportLiveToBuffer ExportLiveToBuffer;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ImportFromBufferToWorking(IntPtr pBuffer, uint nImportFlags);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ImportFromBufferToWorking ImportFromBufferToWorking;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ShowWorkingSetPreview();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowWorkingSetPreview ShowWorkingSetPreview;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _HideWorkingSetPreview();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HideWorkingSetPreview HideWorkingSetPreview;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _RoomSetupStarting();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RoomSetupStarting RoomSetupStarting;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRCompositor
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetTrackingSpace(ETrackingUniverseOrigin eOrigin);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetTrackingSpace SetTrackingSpace;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackingUniverseOrigin _GetTrackingSpace();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTrackingSpace GetTrackingSpace;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _WaitGetPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _WaitGetPoses WaitGetPoses;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetLastPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetLastPoses GetLastPoses;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pOutputGamePose);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetLastPoseForTrackedDeviceIndex GetLastPoseForTrackedDeviceIndex;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _Submit(EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Submit Submit;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ClearLastSubmittedFrame();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ClearLastSubmittedFrame ClearLastSubmittedFrame;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _PostPresentHandoff();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PostPresentHandoff PostPresentHandoff;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetFrameTiming(ref Compositor_FrameTiming pTiming, uint unFramesAgo);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFrameTiming GetFrameTiming;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetFrameTimings([In, Out] Compositor_FrameTiming[] pTiming, uint nFrames);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFrameTimings GetFrameTimings;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetFrameTimeRemaining();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFrameTimeRemaining GetFrameTimeRemaining;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetCumulativeStats(ref Compositor_CumulativeStats pStats, uint nStatsSizeInBytes);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCumulativeStats GetCumulativeStats;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FadeToColor FadeToColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCurrentFadeColor GetCurrentFadeColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FadeGrid(float fSeconds, bool bFadeGridIn);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FadeGrid FadeGrid;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetCurrentGridAlpha();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCurrentGridAlpha GetCurrentGridAlpha;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _SetSkyboxOverride([In, Out] Texture_t[] pTextures, uint unTextureCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetSkyboxOverride SetSkyboxOverride;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ClearSkyboxOverride();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ClearSkyboxOverride ClearSkyboxOverride;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _CompositorBringToFront();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CompositorBringToFront CompositorBringToFront;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _CompositorGoToBack();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CompositorGoToBack CompositorGoToBack;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _CompositorQuit();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CompositorQuit CompositorQuit;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsFullscreen();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsFullscreen IsFullscreen;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetCurrentSceneFocusProcess();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCurrentSceneFocusProcess GetCurrentSceneFocusProcess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetLastFrameRenderer();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetLastFrameRenderer GetLastFrameRenderer;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _CanRenderScene();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CanRenderScene CanRenderScene;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ShowMirrorWindow();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowMirrorWindow ShowMirrorWindow;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _HideMirrorWindow();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HideMirrorWindow HideMirrorWindow;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsMirrorWindowVisible();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsMirrorWindowVisible IsMirrorWindowVisible;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _CompositorDumpImages();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CompositorDumpImages CompositorDumpImages;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ShouldAppRenderWithLowResources();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShouldAppRenderWithLowResources ShouldAppRenderWithLowResources;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ForceInterleavedReprojectionOn(bool bOverride);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ForceInterleavedReprojectionOn ForceInterleavedReprojectionOn;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ForceReconnectProcess();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ForceReconnectProcess ForceReconnectProcess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SuspendRendering(bool bSuspend);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SuspendRendering SuspendRendering;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetMirrorTextureD3D11(EVREye eEye, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetMirrorTextureD3D11 GetMirrorTextureD3D11;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseMirrorTextureD3D11 ReleaseMirrorTextureD3D11;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetMirrorTextureGL(EVREye eEye, ref uint pglTextureId, IntPtr pglSharedTextureHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetMirrorTextureGL GetMirrorTextureGL;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr glSharedTextureHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseSharedGLTexture ReleaseSharedGLTexture;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LockGLSharedTextureForAccess LockGLSharedTextureForAccess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue, uint unBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtensionsRequired;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice, System.Text.StringBuilder pchValue, uint unBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetExplicitTimingMode SetExplicitTimingMode;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _SubmitExplicitTimingData();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SubmitExplicitTimingData SubmitExplicitTimingData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsMotionSmoothingEnabled();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsMotionSmoothingEnabled IsMotionSmoothingEnabled;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsMotionSmoothingSupported();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsMotionSmoothingSupported IsMotionSmoothingSupported;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsCurrentSceneFocusAppLoading();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsCurrentSceneFocusAppLoading IsCurrentSceneFocusAppLoading;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _SetStageOverride_Async(IntPtr pchRenderModelPath, ref HmdMatrix34_t pTransform, ref Compositor_StageRenderSettings pRenderSettings, uint nSizeOfRenderSettings);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetStageOverride_Async SetStageOverride_Async;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ClearStageOverride();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ClearStageOverride ClearStageOverride;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetCompositorBenchmarkResults(ref Compositor_BenchmarkResults pBenchmarkResults, uint nSizeOfBenchmarkResults);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetCompositorBenchmarkResults GetCompositorBenchmarkResults;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetLastPosePredictionIDs(ref uint pRenderPosePredictionID, ref uint pGamePosePredictionID);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetLastPosePredictionIDs GetLastPosePredictionIDs;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRCompositorError _GetPosesForFrame(uint unPosePredictionID, [In, Out] TrackedDevicePose_t[] pPoseArray, uint unPoseArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPosesForFrame GetPosesForFrame;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVROverlay
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _FindOverlay(IntPtr pchOverlayKey, ref ulong pOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FindOverlay FindOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _CreateOverlay(IntPtr pchOverlayKey, IntPtr pchOverlayName, ref ulong pOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CreateOverlay CreateOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _DestroyOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _DestroyOverlay DestroyOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetOverlayKey(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayKey GetOverlayKey;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetOverlayName(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayName GetOverlayName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayName(ulong ulOverlayHandle, IntPtr pchName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayName SetOverlayName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayImageData(ulong ulOverlayHandle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayImageData GetOverlayImageData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetOverlayErrorNameFromEnum(EVROverlayError error);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayErrorNameFromEnum GetOverlayErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayRenderingPid(ulong ulOverlayHandle, uint unPID);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayRenderingPid SetOverlayRenderingPid;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetOverlayRenderingPid(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayRenderingPid GetOverlayRenderingPid;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayFlag SetOverlayFlag;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayFlag GetOverlayFlag;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayFlags GetOverlayFlags;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayColor SetOverlayColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayColor(ulong ulOverlayHandle, ref float pfRed, ref float pfGreen, ref float pfBlue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayColor GetOverlayColor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayAlpha(ulong ulOverlayHandle, float fAlpha);
[MarshalAs(UnmanagedType.FunctionPtr)]