WOWlet is a free Wownero desktop wallet
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8220 lines
334 KiB

//======= 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)]
internal _SetOverlayAlpha SetOverlayAlpha;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayAlpha(ulong ulOverlayHandle, ref float pfAlpha);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayAlpha GetOverlayAlpha;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTexelAspect(ulong ulOverlayHandle, float fTexelAspect);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTexelAspect SetOverlayTexelAspect;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTexelAspect(ulong ulOverlayHandle, ref float pfTexelAspect);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTexelAspect GetOverlayTexelAspect;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlaySortOrder(ulong ulOverlayHandle, uint unSortOrder);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlaySortOrder SetOverlaySortOrder;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlaySortOrder(ulong ulOverlayHandle, ref uint punSortOrder);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlaySortOrder GetOverlaySortOrder;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayWidthInMeters(ulong ulOverlayHandle, float fWidthInMeters);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayWidthInMeters SetOverlayWidthInMeters;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayWidthInMeters(ulong ulOverlayHandle, ref float pfWidthInMeters);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayWidthInMeters GetOverlayWidthInMeters;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayCurvature(ulong ulOverlayHandle, float fCurvature);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayCurvature SetOverlayCurvature;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayCurvature(ulong ulOverlayHandle, ref float pfCurvature);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayCurvature GetOverlayCurvature;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTextureColorSpace SetOverlayTextureColorSpace;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTextureColorSpace(ulong ulOverlayHandle, ref EColorSpace peTextureColorSpace);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTextureColorSpace GetOverlayTextureColorSpace;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTextureBounds SetOverlayTextureBounds;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTextureBounds GetOverlayTextureBounds;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformType(ulong ulOverlayHandle, ref VROverlayTransformType peTransformType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformType GetOverlayTransformType;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformAbsolute(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformAbsolute SetOverlayTransformAbsolute;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformAbsolute(ulong ulOverlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformAbsolute GetOverlayTransformAbsolute;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformTrackedDeviceRelative SetOverlayTransformTrackedDeviceRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformTrackedDeviceRelative GetOverlayTransformTrackedDeviceRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, uint unDeviceIndex, IntPtr pchComponentName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformTrackedDeviceComponent SetOverlayTransformTrackedDeviceComponent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, ref uint punDeviceIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformTrackedDeviceComponent GetOverlayTransformTrackedDeviceComponent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ref ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformOverlayRelative GetOverlayTransformOverlayRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformCursor(ulong ulCursorOverlayHandle, ref HmdVector2_t pvHotspot);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformCursor SetOverlayTransformCursor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformCursor(ulong ulOverlayHandle, ref HmdVector2_t pvHotspot);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformCursor GetOverlayTransformCursor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformProjection(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform, ref VROverlayProjection_t pProjection, EVREye eEye);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformProjection SetOverlayTransformProjection;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowOverlay ShowOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _HideOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HideOverlay HideOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsOverlayVisible(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsOverlayVisible IsOverlayVisible;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetTransformForOverlayCoordinates(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordinates;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PollNextOverlayEvent PollNextOverlayEvent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayInputMethod(ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayInputMethod GetOverlayInputMethod;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayInputMethod(ulong ulOverlayHandle, VROverlayInputMethod eInputMethod);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayInputMethod SetOverlayInputMethod;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayMouseScale GetOverlayMouseScale;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayMouseScale SetOverlayMouseScale;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _ComputeOverlayIntersection(ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ComputeOverlayIntersection ComputeOverlayIntersection;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsHoverTargetOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsHoverTargetOverlay IsHoverTargetOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _TriggerLaserMouseHapticVibration(ulong ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _TriggerLaserMouseHapticVibration TriggerLaserMouseHapticVibration;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayCursor(ulong ulOverlayHandle, ulong ulCursorHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayCursor SetOverlayCursor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayCursorPositionOverride(ulong ulOverlayHandle, ref HmdVector2_t pvCursor);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayCursorPositionOverride SetOverlayCursorPositionOverride;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ClearOverlayCursorPositionOverride(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ClearOverlayCursorPositionOverride ClearOverlayCursorPositionOverride;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTexture SetOverlayTexture;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ClearOverlayTexture(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ClearOverlayTexture ClearOverlayTexture;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unBytesPerPixel);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayRaw SetOverlayRaw;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayFromFile(ulong ulOverlayHandle, IntPtr pchFilePath);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayFromFile SetOverlayFromFile;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorSpace pColorSpace, ref VRTextureBounds_t pTextureBounds);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTexture GetOverlayTexture;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ReleaseNativeOverlayHandle(ulong ulOverlayHandle, IntPtr pNativeTextureHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseNativeOverlayHandle ReleaseNativeOverlayHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTextureSize(ulong ulOverlayHandle, ref uint pWidth, ref uint pHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTextureSize GetOverlayTextureSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _CreateDashboardOverlay(IntPtr pchOverlayKey, IntPtr pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CreateDashboardOverlay CreateDashboardOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsDashboardVisible();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsDashboardVisible IsDashboardVisible;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsActiveDashboardOverlay(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsActiveDashboardOverlay IsActiveDashboardOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetDashboardOverlaySceneProcess(ulong ulOverlayHandle, uint unProcessId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetDashboardOverlaySceneProcess SetDashboardOverlaySceneProcess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetDashboardOverlaySceneProcess(ulong ulOverlayHandle, ref uint punProcessId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDashboardOverlaySceneProcess GetDashboardOverlaySceneProcess;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _ShowDashboard(IntPtr pchOverlayToShow);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowDashboard ShowDashboard;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetPrimaryDashboardDevice();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPrimaryDashboardDevice GetPrimaryDashboardDevice;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLineInputMode, uint unFlags, IntPtr pchDescription, uint unCharMax, IntPtr pchExistingText, ulong uUserValue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowKeyboard ShowKeyboard;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, uint unFlags, IntPtr pchDescription, uint unCharMax, IntPtr pchExistingText, ulong uUserValue);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowKeyboardForOverlay ShowKeyboardForOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetKeyboardText(System.Text.StringBuilder pchText, uint cchText);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetKeyboardText GetKeyboardText;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _HideKeyboard();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HideKeyboard HideKeyboard;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetKeyboardTransformAbsolute SetKeyboardTransformAbsolute;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetKeyboardPositionForOverlay(ulong ulOverlayHandle, HmdRect2_t avoidRect);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate VRMessageOverlayResponse _ShowMessageOverlay(IntPtr pchText, IntPtr pchCaption, IntPtr pchButton0Text, IntPtr pchButton1Text, IntPtr pchButton2Text, IntPtr pchButton3Text);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowMessageOverlay ShowMessageOverlay;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _CloseMessageOverlay();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CloseMessageOverlay CloseMessageOverlay;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVROverlayView
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _AcquireOverlayView(ulong ulOverlayHandle, ref VRNativeDevice_t pNativeDevice, ref VROverlayView_t pOverlayView, uint unOverlayViewSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AcquireOverlayView AcquireOverlayView;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _ReleaseOverlayView(ref VROverlayView_t pOverlayView);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseOverlayView ReleaseOverlayView;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _PostOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pvrEvent);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PostOverlayEvent PostOverlayEvent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsViewingPermitted(ulong ulOverlayHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsViewingPermitted IsViewingPermitted;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRHeadsetView
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetHeadsetViewSize(uint nWidth, uint nHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetHeadsetViewSize SetHeadsetViewSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetHeadsetViewSize(ref uint pnWidth, ref uint pnHeight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHeadsetViewSize GetHeadsetViewSize;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetHeadsetViewMode(uint eHeadsetViewMode);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetHeadsetViewMode SetHeadsetViewMode;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetHeadsetViewMode();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHeadsetViewMode GetHeadsetViewMode;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetHeadsetViewCropped(bool bCropped);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetHeadsetViewCropped SetHeadsetViewCropped;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetHeadsetViewCropped();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHeadsetViewCropped GetHeadsetViewCropped;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetHeadsetViewAspectRatio();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHeadsetViewAspectRatio GetHeadsetViewAspectRatio;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetHeadsetViewBlendRange(float flStartPct, float flEndPct);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetHeadsetViewBlendRange SetHeadsetViewBlendRange;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetHeadsetViewBlendRange(ref float pStartPct, ref float pEndPct);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetHeadsetViewBlendRange GetHeadsetViewBlendRange;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRRenderModels
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRRenderModelError _LoadRenderModel_Async(IntPtr pchRenderModelName, ref IntPtr ppRenderModel);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LoadRenderModel_Async LoadRenderModel_Async;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FreeRenderModel(IntPtr pRenderModel);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FreeRenderModel FreeRenderModel;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRRenderModelError _LoadTexture_Async(int textureId, ref IntPtr ppTexture);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LoadTexture_Async LoadTexture_Async;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FreeTexture(IntPtr pTexture);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FreeTexture FreeTexture;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRRenderModelError _LoadTextureD3D11_Async(int textureId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LoadTextureD3D11_Async LoadTextureD3D11_Async;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRRenderModelError _LoadIntoTextureD3D11_Async(int textureId, IntPtr pDstTexture);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LoadIntoTextureD3D11_Async LoadIntoTextureD3D11_Async;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _FreeTextureD3D11(IntPtr pD3D11Texture2D);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FreeTextureD3D11 FreeTextureD3D11;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetRenderModelName(uint unRenderModelIndex, System.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRenderModelName GetRenderModelName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetRenderModelCount();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRenderModelCount GetRenderModelCount;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetComponentCount(IntPtr pchRenderModelName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentCount GetComponentCount;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetComponentName(IntPtr pchRenderModelName, uint unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentName GetComponentName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _GetComponentButtonMask(IntPtr pchRenderModelName, IntPtr pchComponentName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentButtonMask GetComponentButtonMask;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetComponentRenderModelName(IntPtr pchRenderModelName, IntPtr pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentRenderModelName GetComponentRenderModelName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetComponentStateForDevicePath(IntPtr pchRenderModelName, IntPtr pchComponentName, ulong devicePath, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentStateForDevicePath GetComponentStateForDevicePath;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetComponentState(IntPtr pchRenderModelName, IntPtr pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentState GetComponentState;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _RenderModelHasComponent(IntPtr pchRenderModelName, IntPtr pchComponentName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RenderModelHasComponent RenderModelHasComponent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetRenderModelThumbnailURL(IntPtr pchRenderModelName, System.Text.StringBuilder pchThumbnailURL, uint unThumbnailURLLen, ref EVRRenderModelError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRenderModelThumbnailURL GetRenderModelThumbnailURL;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetRenderModelOriginalPath(IntPtr pchRenderModelName, System.Text.StringBuilder pchOriginalPath, uint unOriginalPathLen, ref EVRRenderModelError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRenderModelOriginalPath GetRenderModelOriginalPath;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetRenderModelErrorNameFromEnum(EVRRenderModelError error);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetRenderModelErrorNameFromEnum GetRenderModelErrorNameFromEnum;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRNotifications
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRNotificationError _CreateNotification(ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, IntPtr pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CreateNotification CreateNotification;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRNotificationError _RemoveNotification(uint notificationId);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RemoveNotification RemoveNotification;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRSettings
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetSettingsErrorNameFromEnum(EVRSettingsError eError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetBool(IntPtr pchSection, IntPtr pchSettingsKey, bool bValue, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetBool SetBool;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetInt32(IntPtr pchSection, IntPtr pchSettingsKey, int nValue, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetInt32 SetInt32;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetFloat(IntPtr pchSection, IntPtr pchSettingsKey, float flValue, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetFloat SetFloat;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _SetString(IntPtr pchSection, IntPtr pchSettingsKey, IntPtr pchValue, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetString SetString;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetBool(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBool GetBool;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate int _GetInt32(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetInt32 GetInt32;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate float _GetFloat(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetFloat GetFloat;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _GetString(IntPtr pchSection, IntPtr pchSettingsKey, System.Text.StringBuilder pchValue, uint unValueLen, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetString GetString;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _RemoveSection(IntPtr pchSection, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RemoveSection RemoveSection;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate void _RemoveKeyInSection(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RemoveKeyInSection RemoveKeyInSection;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRScreenshots
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRScreenshotError _RequestScreenshot(ref uint pOutScreenshotHandle, EVRScreenshotType type, IntPtr pchPreviewFilename, IntPtr pchVRFilename);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _RequestScreenshot RequestScreenshot;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRScreenshotError _HookScreenshot([In, Out] EVRScreenshotType[] pSupportedTypes, int numTypes);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HookScreenshot HookScreenshot;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRScreenshotType _GetScreenshotPropertyType(uint screenshotHandle, ref EVRScreenshotError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetScreenshotPropertyType GetScreenshotPropertyType;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetScreenshotPropertyFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames filenameType, System.Text.StringBuilder pchFilename, uint cchFilename, ref EVRScreenshotError pError);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetScreenshotPropertyFilename GetScreenshotPropertyFilename;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRScreenshotError _UpdateScreenshotProgress(uint screenshotHandle, float flProgress);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _UpdateScreenshotProgress UpdateScreenshotProgress;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRScreenshotError _TakeStereoScreenshot(ref uint pOutScreenshotHandle, IntPtr pchPreviewFilename, IntPtr pchVRFilename);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _TakeStereoScreenshot TakeStereoScreenshot;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRScreenshotError _SubmitScreenshot(uint screenshotHandle, EVRScreenshotType type, IntPtr pchSourcePreviewFilename, IntPtr pchSourceVRFilename);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SubmitScreenshot SubmitScreenshot;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRResources
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _LoadSharedResource(IntPtr pchResourceName, string pchBuffer, uint unBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _LoadSharedResource LoadSharedResource;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetResourceFullPath(IntPtr pchResourceName, IntPtr pchResourceTypeDirectory, System.Text.StringBuilder pchPathBuffer, uint unBufferLen);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetResourceFullPath GetResourceFullPath;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRDriverManager
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetDriverCount();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDriverCount GetDriverCount;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _GetDriverName(uint nDriver, System.Text.StringBuilder pchValue, uint unBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDriverName GetDriverName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _GetDriverHandle(IntPtr pchDriverName);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDriverHandle GetDriverHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsEnabled(uint nDriver);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsEnabled IsEnabled;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRInput
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _SetActionManifestPath(IntPtr pchActionManifestPath);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetActionManifestPath SetActionManifestPath;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetActionSetHandle(IntPtr pchActionSetName, ref ulong pHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetActionSetHandle GetActionSetHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetActionHandle(IntPtr pchActionName, ref ulong pHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetActionHandle GetActionHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetInputSourceHandle(IntPtr pchInputSourcePath, ref ulong pHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetInputSourceHandle GetInputSourceHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _UpdateActionState([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _UpdateActionState UpdateActionState;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetDigitalActionData(ulong action, ref InputDigitalActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDigitalActionData GetDigitalActionData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetAnalogActionData(ulong action, ref InputAnalogActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetAnalogActionData GetAnalogActionData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetPoseActionDataRelativeToNow(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPoseActionDataRelativeToNow GetPoseActionDataRelativeToNow;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetPoseActionDataForNextFrame(ulong action, ETrackingUniverseOrigin eOrigin, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPoseActionDataForNextFrame GetPoseActionDataForNextFrame;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalActionData(ulong action, ref InputSkeletalActionData_t pActionData, uint unActionDataSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalActionData GetSkeletalActionData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetDominantHand(ref ETrackedControllerRole peDominantHand);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetDominantHand GetDominantHand;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _SetDominantHand(ETrackedControllerRole eDominantHand);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetDominantHand SetDominantHand;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetBoneCount(ulong action, ref uint pBoneCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBoneCount GetBoneCount;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetBoneHierarchy(ulong action, [In, Out] int[] pParentIndices, uint unIndexArayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBoneHierarchy GetBoneHierarchy;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetBoneName(ulong action, int nBoneIndex, System.Text.StringBuilder pchBoneName, uint unNameBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBoneName GetBoneName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalReferenceTransforms(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalReferenceTransforms GetSkeletalReferenceTransforms;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalTrackingLevel(ulong action, ref EVRSkeletalTrackingLevel pSkeletalTrackingLevel);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalTrackingLevel GetSkeletalTrackingLevel;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalBoneData(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalBoneData GetSkeletalBoneData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, EVRSummaryType eSummaryType, ref VRSkeletalSummaryData_t pSkeletalSummaryData);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalSummaryData GetSkeletalSummaryData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetSkeletalBoneDataCompressed(ulong action, EVRSkeletalMotionRange eMotionRange, IntPtr pvCompressedData, uint unCompressedSize, ref uint punRequiredCompressedSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSkeletalBoneDataCompressed GetSkeletalBoneDataCompressed;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _DecompressSkeletalBoneData(IntPtr pvCompressedBuffer, uint unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _DecompressSkeletalBoneData DecompressSkeletalBoneData;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _TriggerHapticVibrationAction(ulong action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, ulong ulRestrictToDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _TriggerHapticVibrationAction TriggerHapticVibrationAction;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetActionOrigins(ulong actionSetHandle, ulong digitalActionHandle, [In, Out] ulong[] originsOut, uint originOutCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetActionOrigins GetActionOrigins;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetOriginLocalizedName(ulong origin, System.Text.StringBuilder pchNameArray, uint unNameArraySize, int unStringSectionsToInclude);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOriginLocalizedName GetOriginLocalizedName;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetOriginTrackedDeviceInfo(ulong origin, ref InputOriginInfo_t pOriginInfo, uint unOriginInfoSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetActionBindingInfo(ulong action, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref uint punReturnedBindingInfoCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetActionBindingInfo GetActionBindingInfo;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _ShowActionOrigins(ulong actionSetHandle, ulong ulActionHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowActionOrigins ShowActionOrigins;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _ShowBindingsForActionSet([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount, ulong originToHighlight);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ShowBindingsForActionSet ShowBindingsForActionSet;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetComponentStateForBinding(IntPtr pchRenderModelName, IntPtr pchComponentName, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref RenderModel_ComponentState_t pComponentState);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetComponentStateForBinding GetComponentStateForBinding;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _IsUsingLegacyInput();
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _IsUsingLegacyInput IsUsingLegacyInput;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _OpenBindingUI(IntPtr pchAppKey, ulong ulActionSetHandle, ulong ulDeviceHandle, bool bShowOnDesktop);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _OpenBindingUI OpenBindingUI;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRInputError _GetBindingVariant(ulong ulDevicePath, System.Text.StringBuilder pchVariantArray, uint unVariantArraySize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetBindingVariant GetBindingVariant;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRIOBuffer
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EIOBufferError _Open(IntPtr pchPath, EIOBufferMode mode, uint unElementSize, uint unElements, ref ulong pulBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Open Open;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EIOBufferError _Close(ulong ulBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Close Close;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EIOBufferError _Read(ulong ulBuffer, IntPtr pDst, uint unBytes, ref uint punRead);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Read Read;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EIOBufferError _Write(ulong ulBuffer, IntPtr pSrc, uint unBytes);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Write Write;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _PropertyContainer(ulong ulBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _PropertyContainer PropertyContainer;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _HasReaders(ulong ulBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HasReaders HasReaders;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRSpatialAnchors
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromDescriptor(IntPtr pchDescriptor, ref uint pHandleOut);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CreateSpatialAnchorFromDescriptor CreateSpatialAnchorFromDescriptor;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromPose(uint unDeviceIndex, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPose, ref uint pHandleOut);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _CreateSpatialAnchorFromPose CreateSpatialAnchorFromPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRSpatialAnchorError _GetSpatialAnchorPose(uint unHandle, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPoseOut);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSpatialAnchorPose GetSpatialAnchorPose;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRSpatialAnchorError _GetSpatialAnchorDescriptor(uint unHandle, System.Text.StringBuilder pchDescriptorOut, ref uint punDescriptorBufferLenInOut);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetSpatialAnchorDescriptor GetSpatialAnchorDescriptor;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRDebug
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRDebugError _EmitVrProfilerEvent(IntPtr pchMessage);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _EmitVrProfilerEvent EmitVrProfilerEvent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRDebugError _BeginVrProfilerEvent(ref ulong pHandleOut);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _BeginVrProfilerEvent BeginVrProfilerEvent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVRDebugError _FinishVrProfilerEvent(ulong hHandle, IntPtr pchMessage);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _FinishVrProfilerEvent FinishVrProfilerEvent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate uint _DriverDebugRequest(uint unDeviceIndex, IntPtr pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _DriverDebugRequest DriverDebugRequest;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRProperties
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedPropertyError _ReadPropertyBatch(ulong ulContainerHandle, ref PropertyRead_t pBatch, uint unBatchEntryCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReadPropertyBatch ReadPropertyBatch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedPropertyError _WritePropertyBatch(ulong ulContainerHandle, ref PropertyWrite_t pBatch, uint unBatchEntryCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _WritePropertyBatch WritePropertyBatch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError error);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ulong _TrackedDeviceToPropertyContainer(uint nDevice);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _TrackedDeviceToPropertyContainer TrackedDeviceToPropertyContainer;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRPaths
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedPropertyError _ReadPathBatch(ulong ulRootHandle, ref PathRead_t pBatch, uint unBatchEntryCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReadPathBatch ReadPathBatch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedPropertyError _WritePathBatch(ulong ulRootHandle, ref PathWrite_t pBatch, uint unBatchEntryCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _WritePathBatch WritePathBatch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedPropertyError _StringToHandle(ref ulong pHandle, IntPtr pchPath);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _StringToHandle StringToHandle;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate ETrackedPropertyError _HandleToString(ulong pHandle, string pchBuffer, uint unBufferSize, ref uint punBufferSizeUsed);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _HandleToString HandleToString;
}
[StructLayout(LayoutKind.Sequential)]
public struct IVRBlockQueue
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _Create(ref ulong pulQueueHandle, IntPtr pchPath, uint unBlockDataSize, uint unBlockHeaderSize, uint unBlockCount);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Create Create;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _Connect(ref ulong pulQueueHandle, IntPtr pchPath);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Connect Connect;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _Destroy(ulong ulQueueHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Destroy Destroy;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _AcquireWriteOnlyBlock(ulong ulQueueHandle, ref ulong pulBlockHandle, ref IntPtr ppvBuffer);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AcquireWriteOnlyBlock AcquireWriteOnlyBlock;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _ReleaseWriteOnlyBlock(ulong ulQueueHandle, ulong ulBlockHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseWriteOnlyBlock ReleaseWriteOnlyBlock;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _WaitAndAcquireReadOnlyBlock(ulong ulQueueHandle, ref ulong pulBlockHandle, ref IntPtr ppvBuffer, EBlockQueueReadType eReadType, uint unTimeoutMs);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _WaitAndAcquireReadOnlyBlock WaitAndAcquireReadOnlyBlock;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _AcquireReadOnlyBlock(ulong ulQueueHandle, ref ulong pulBlockHandle, ref IntPtr ppvBuffer, EBlockQueueReadType eReadType);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _AcquireReadOnlyBlock AcquireReadOnlyBlock;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _ReleaseReadOnlyBlock(ulong ulQueueHandle, ulong ulBlockHandle);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _ReleaseReadOnlyBlock ReleaseReadOnlyBlock;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _QueueHasReader(ulong ulQueueHandle, ref bool pbHasReaders);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _QueueHasReader QueueHasReader;
}
public class Utils
{
public static IntPtr ToUtf8(string managedString)
{
if (managedString == null)
{
return IntPtr.Zero;
}
int size = System.Text.Encoding.UTF8.GetByteCount(managedString) + 1;
if (buffer.Length < size) buffer = new byte[size];
int written = System.Text.Encoding.UTF8.GetBytes(managedString, 0, managedString.Length, buffer, 0);
buffer[written] = 0x00; // null terminate
IntPtr nativeUtf8 = Marshal.AllocHGlobal(written+1);
Marshal.Copy(buffer, 0, nativeUtf8, written+1);
return nativeUtf8;
}
private static byte[] buffer = new byte[1024];
}
public class CVRSystem
{
IVRSystem FnTable;
internal CVRSystem(IntPtr pInterface)
{
FnTable = (IVRSystem)Marshal.PtrToStructure(pInterface, typeof(IVRSystem));
}
public void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnHeight)
{
pnWidth = 0;
pnHeight = 0;
FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight);
}
public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ)
{
HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ);
return result;
}
public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
{
pfLeft = 0;
pfRight = 0;
pfTop = 0;
pfBottom = 0;
FnTable.GetProjectionRaw(eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
}
public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref DistortionCoordinates_t pDistortionCoordinates)
{
bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistortionCoordinates);
return result;
}
public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye)
{
HmdMatrix34_t result = FnTable.GetEyeToHeadTransform(eEye);
return result;
}
public bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref ulong pulFrameCounter)
{
pfSecondsSinceLastVsync = 0;
pulFrameCounter = 0;
bool result = FnTable.GetTimeSinceLastVsync(ref pfSecondsSinceLastVsync,ref pulFrameCounter);
return result;
}
public int GetD3D9AdapterIndex()
{
int result = FnTable.GetD3D9AdapterIndex();
return result;
}
public void GetDXGIOutputInfo(ref int pnAdapterIndex)
{
pnAdapterIndex = 0;
FnTable.GetDXGIOutputInfo(ref pnAdapterIndex);
}
public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType,IntPtr pInstance)
{
pnDevice = 0;
FnTable.GetOutputDevice(ref pnDevice,textureType,pInstance);
}
public bool IsDisplayOnDesktop()
{
bool result = FnTable.IsDisplayOnDesktop();
return result;
}
public bool SetDisplayVisibility(bool bIsVisibleOnDesktop)
{
bool result = FnTable.SetDisplayVisibility(bIsVisibleOnDesktop);
return result;
}
public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray)
{
FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
}
public HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose()
{
HmdMatrix34_t result = FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
return result;
}
public HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose()
{
HmdMatrix34_t result = FnTable.GetRawZeroPoseToStandingAbsoluteTrackingPose();
return result;
}
public uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex)
{
uint result = FnTable.GetSortedTrackedDeviceIndicesOfClass(eTrackedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Length,unRelativeToTrackedDeviceIndex);
return result;
}
public EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId)
{
EDeviceActivityLevel result = FnTable.GetTrackedDeviceActivityLevel(unDeviceId);
return result;
}
public void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform)
{
FnTable.ApplyTransform(ref pOutputPose,ref pTrackedDevicePose,ref pTransform);
}
public uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType)
{
uint result = FnTable.GetTrackedDeviceIndexForControllerRole(unDeviceType);
return result;
}
public ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex)
{
ETrackedControllerRole result = FnTable.GetControllerRoleForTrackedDeviceIndex(unDeviceIndex);
return result;
}
public ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex)
{
ETrackedDeviceClass result = FnTable.GetTrackedDeviceClass(unDeviceIndex);
return result;
}
public bool IsTrackedDeviceConnected(uint unDeviceIndex)
{
bool result = FnTable.IsTrackedDeviceConnected(unDeviceIndex);
return result;
}
public bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
{
bool result = FnTable.GetBoolTrackedDeviceProperty(unDeviceIndex,prop,ref pError);
return result;
}
public float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
{
float result = FnTable.GetFloatTrackedDeviceProperty(unDeviceIndex,prop,ref pError);
return result;
}
public int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
{
int result = FnTable.GetInt32TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
return result;
}
public ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
{
ulong result = FnTable.GetUint64TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
return result;
}
public HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
{
HmdMatrix34_t result = FnTable.GetMatrix34TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
return result;
}
public uint GetArrayTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,uint propType,IntPtr pBuffer,uint unBufferSize,ref ETrackedPropertyError pError)
{
uint result = FnTable.GetArrayTrackedDeviceProperty(unDeviceIndex,prop,propType,pBuffer,unBufferSize,ref pError);
return result;
}
public uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError)
{
uint result = FnTable.GetStringTrackedDeviceProperty(unDeviceIndex,prop,pchValue,unBufferSize,ref pError);
return result;
}
public string GetPropErrorNameFromEnum(ETrackedPropertyError error)
{
IntPtr result = FnTable.GetPropErrorNameFromEnum(error);
return Marshal.PtrToStringAnsi(result);
}
// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
// originally mis-compiled with the wrong packing for Linux and OSX.
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _PollNextEventPacked(ref VREvent_t_Packed pEvent,uint uncbVREvent);
[StructLayout(LayoutKind.Explicit)]
struct PollNextEventUnion
{
[FieldOffset(0)]
public IVRSystem._PollNextEvent pPollNextEvent;
[FieldOffset(0)]
public _PollNextEventPacked pPollNextEventPacked;
}
public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
PollNextEventUnion u;
VREvent_t_Packed event_packed = new VREvent_t_Packed();
u.pPollNextEventPacked = null;
u.pPollNextEvent = FnTable.PollNextEvent;
bool packed_result = u.pPollNextEventPacked(ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed)));
event_packed.Unpack(ref pEvent);
return packed_result;
}
#endif
bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
return result;
}
public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose)
{
bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose);
return result;
}
public string GetEventTypeNameFromEnum(EVREventType eType)
{
IntPtr result = FnTable.GetEventTypeNameFromEnum(eType);
return Marshal.PtrToStringAnsi(result);
}
public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshType type)
{
HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type);
return result;
}
// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
// originally mis-compiled with the wrong packing for Linux and OSX.
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetControllerStatePacked(uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize);
[StructLayout(LayoutKind.Explicit)]
struct GetControllerStateUnion
{
[FieldOffset(0)]
public IVRSystem._GetControllerState pGetControllerState;
[FieldOffset(0)]
public _GetControllerStatePacked pGetControllerStatePacked;
}
public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
GetControllerStateUnion u;
VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
u.pGetControllerStatePacked = null;
u.pGetControllerState = FnTable.GetControllerState;
bool packed_result = u.pGetControllerStatePacked(unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)));
state_packed.Unpack(ref pControllerState);
return packed_result;
}
#endif
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
return result;
}
// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
// originally mis-compiled with the wrong packing for Linux and OSX.
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _GetControllerStateWithPosePacked(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose);
[StructLayout(LayoutKind.Explicit)]
struct GetControllerStateWithPoseUnion
{
[FieldOffset(0)]
public IVRSystem._GetControllerStateWithPose pGetControllerStateWithPose;
[FieldOffset(0)]
public _GetControllerStateWithPosePacked pGetControllerStateWithPosePacked;
}
public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
{
#if !UNITY_METRO
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
{
GetControllerStateWithPoseUnion u;
VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
u.pGetControllerStateWithPosePacked = null;
u.pGetControllerStateWithPose = FnTable.GetControllerStateWithPose;
bool packed_result = u.pGetControllerStateWithPosePacked(eOrigin,unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)),ref pTrackedDevicePose);
state_packed.Unpack(ref pControllerState);
return packed_result;
}
#endif
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
return result;
}
public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,ushort usDurationMicroSec)
{
FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDurationMicroSec);
}
public string GetButtonIdNameFromEnum(EVRButtonId eButtonId)
{
IntPtr result = FnTable.GetButtonIdNameFromEnum(eButtonId);
return Marshal.PtrToStringAnsi(result);
}
public string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType)
{
IntPtr result = FnTable.GetControllerAxisTypeNameFromEnum(eAxisType);
return Marshal.PtrToStringAnsi(result);
}
public bool IsInputAvailable()
{
bool result = FnTable.IsInputAvailable();
return result;
}
public bool IsSteamVRDrawingControllers()
{
bool result = FnTable.IsSteamVRDrawingControllers();
return result;
}
public bool ShouldApplicationPause()
{
bool result = FnTable.ShouldApplicationPause();
return result;
}
public bool ShouldApplicationReduceRenderingWork()
{
bool result = FnTable.ShouldApplicationReduceRenderingWork();
return result;
}
public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex)
{
EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDeviceIndex);
return result;
}
public void AcknowledgeQuit_Exiting()
{
FnTable.AcknowledgeQuit_Exiting();
}
public uint GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer,uint unBufferSize)
{
uint result = FnTable.GetAppContainerFilePaths(pchBuffer,unBufferSize);
return result;
}
public string GetRuntimeVersion()
{
IntPtr result = FnTable.GetRuntimeVersion();
return Marshal.PtrToStringAnsi(result);
}
}
public class CVRExtendedDisplay
{
IVRExtendedDisplay FnTable;
internal CVRExtendedDisplay(IntPtr pInterface)
{
FnTable = (IVRExtendedDisplay)Marshal.PtrToStructure(pInterface, typeof(IVRExtendedDisplay));
}
public void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref uint pnHeight)
{
pnX = 0;
pnY = 0;
pnWidth = 0;
pnHeight = 0;
FnTable.GetWindowBounds(ref pnX,ref pnY,ref pnWidth,ref pnHeight);
}
public void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight)
{
pnX = 0;
pnY = 0;
pnWidth = 0;
pnHeight = 0;
FnTable.GetEyeOutputViewport(eEye,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
}
public void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOutputIndex)
{
pnAdapterIndex = 0;
pnAdapterOutputIndex = 0;
FnTable.GetDXGIOutputInfo(ref pnAdapterIndex,ref pnAdapterOutputIndex);
}
}
public class CVRTrackedCamera
{
IVRTrackedCamera FnTable;
internal CVRTrackedCamera(IntPtr pInterface)
{
FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera));
}
public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError)
{
IntPtr result = FnTable.GetCameraErrorNameFromEnum(eCameraError);
return Marshal.PtrToStringAnsi(result);
}
public EVRTrackedCameraError HasCamera(uint nDeviceIndex,ref bool pHasCamera)
{
pHasCamera = false;
EVRTrackedCameraError result = FnTable.HasCamera(nDeviceIndex,ref pHasCamera);
return result;
}
public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref uint pnWidth,ref uint pnHeight,ref uint pnFrameBufferSize)
{
pnWidth = 0;
pnHeight = 0;
pnFrameBufferSize = 0;
EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize);
return result;
}
public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,uint nCameraIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
{
EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,nCameraIndex,eFrameType,ref pFocalLength,ref pCenter);
return result;
}
public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,uint nCameraIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
{
EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,nCameraIndex,eFrameType,flZNear,flZFar,ref pProjection);
return result;
}
public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex,ref ulong pHandle)
{
pHandle = 0;
EVRTrackedCameraError result = FnTable.AcquireVideoStreamingService(nDeviceIndex,ref pHandle);
return result;
}
public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTrackedCamera)
{
EVRTrackedCameraError result = FnTable.ReleaseVideoStreamingService(hTrackedCamera);
return result;
}
public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pFrameBuffer,uint nFrameBufferSize,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
{
EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrameHeaderSize);
return result;
}
public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref VRTextureBounds_t pTextureBounds,ref uint pnWidth,ref uint pnHeight)
{
pnWidth = 0;
pnHeight = 0;
EVRTrackedCameraError result = FnTable.GetVideoStreamTextureSize(nDeviceIndex,eFrameType,ref pTextureBounds,ref pnWidth,ref pnHeight);
return result;
}
public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
{
EVRTrackedCameraError result = FnTable.GetVideoStreamTextureD3D11(hTrackedCamera,eFrameType,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView,ref pFrameHeader,nFrameHeaderSize);
return result;
}
public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,ref uint pglTextureId,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
{
pglTextureId = 0;
EVRTrackedCameraError result = FnTable.GetVideoStreamTextureGL(hTrackedCamera,eFrameType,ref pglTextureId,ref pFrameHeader,nFrameHeaderSize);
return result;
}
public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera,uint glTextureId)
{
EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera,glTextureId);
return result;
}
public void SetCameraTrackingSpace(ETrackingUniverseOrigin eUniverse)
{
FnTable.SetCameraTrackingSpace(eUniverse);
}
public ETrackingUniverseOrigin GetCameraTrackingSpace()
{
ETrackingUniverseOrigin result = FnTable.GetCameraTrackingSpace();
return result;
}
}
public class CVRApplications
{
IVRApplications FnTable;
internal CVRApplications(IntPtr pInterface)
{
FnTable = (IVRApplications)Marshal.PtrToStructure(pInterface, typeof(IVRApplications));
}
public EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath,bool bTemporary)
{
IntPtr pchApplicationManifestFullPathUtf8 = Utils.ToUtf8(pchApplicationManifestFullPath);
EVRApplicationError result = FnTable.AddApplicationManifest(pchApplicationManifestFullPathUtf8,bTemporary);
Marshal.FreeHGlobal(pchApplicationManifestFullPathUtf8);
return result;
}
public EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath)
{
IntPtr pchApplicationManifestFullPathUtf8 = Utils.ToUtf8(pchApplicationManifestFullPath);
EVRApplicationError result = FnTable.RemoveApplicationManifest(pchApplicationManifestFullPathUtf8);
Marshal.FreeHGlobal(pchApplicationManifestFullPathUtf8);
return result;
}
public bool IsApplicationInstalled(string pchAppKey)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
bool result = FnTable.IsApplicationInstalled(pchAppKeyUtf8);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public uint GetApplicationCount()
{
uint result = FnTable.GetApplicationCount();
return result;
}
public EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
{
EVRApplicationError result = FnTable.GetApplicationKeyByIndex(unApplicationIndex,pchAppKeyBuffer,unAppKeyBufferLen);
return result;
}
public EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
{
EVRApplicationError result = FnTable.GetApplicationKeyByProcessId(unProcessId,pchAppKeyBuffer,unAppKeyBufferLen);
return result;
}
public EVRApplicationError LaunchApplication(string pchAppKey)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
EVRApplicationError result = FnTable.LaunchApplication(pchAppKeyUtf8);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public EVRApplicationError LaunchTemplateApplication(string pchTemplateAppKey,string pchNewAppKey,AppOverrideKeys_t [] pKeys)
{
IntPtr pchTemplateAppKeyUtf8 = Utils.ToUtf8(pchTemplateAppKey);
IntPtr pchNewAppKeyUtf8 = Utils.ToUtf8(pchNewAppKey);
EVRApplicationError result = FnTable.LaunchTemplateApplication(pchTemplateAppKeyUtf8,pchNewAppKeyUtf8,pKeys,(uint) pKeys.Length);
Marshal.FreeHGlobal(pchTemplateAppKeyUtf8);
Marshal.FreeHGlobal(pchNewAppKeyUtf8);
return result;
}
public EVRApplicationError LaunchApplicationFromMimeType(string pchMimeType,string pchArgs)
{
IntPtr pchMimeTypeUtf8 = Utils.ToUtf8(pchMimeType);
IntPtr pchArgsUtf8 = Utils.ToUtf8(pchArgs);
EVRApplicationError result = FnTable.LaunchApplicationFromMimeType(pchMimeTypeUtf8,pchArgsUtf8);
Marshal.FreeHGlobal(pchMimeTypeUtf8);
Marshal.FreeHGlobal(pchArgsUtf8);
return result;
}
public EVRApplicationError LaunchDashboardOverlay(string pchAppKey)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
EVRApplicationError result = FnTable.LaunchDashboardOverlay(pchAppKeyUtf8);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public bool CancelApplicationLaunch(string pchAppKey)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
bool result = FnTable.CancelApplicationLaunch(pchAppKeyUtf8);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public EVRApplicationError IdentifyApplication(uint unProcessId,string pchAppKey)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
EVRApplicationError result = FnTable.IdentifyApplication(unProcessId,pchAppKeyUtf8);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public uint GetApplicationProcessId(string pchAppKey)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
uint result = FnTable.GetApplicationProcessId(pchAppKeyUtf8);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public string GetApplicationsErrorNameFromEnum(EVRApplicationError error)
{
IntPtr result = FnTable.GetApplicationsErrorNameFromEnum(error);
return Marshal.PtrToStringAnsi(result);
}
public uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,System.Text.StringBuilder pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
uint result = FnTable.GetApplicationPropertyString(pchAppKeyUtf8,eProperty,pchPropertyValueBuffer,unPropertyValueBufferLen,ref peError);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
bool result = FnTable.GetApplicationPropertyBool(pchAppKeyUtf8,eProperty,ref peError);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
ulong result = FnTable.GetApplicationPropertyUint64(pchAppKeyUtf8,eProperty,ref peError);
Marshal.FreeHGlobal(pchAppKeyUtf8);
return result;
}
public EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch)
{
IntPtr pchAppKeyUtf8 = Utils.ToUtf8