upgrade to latest OpenVR 1.0.9 (https://github.com/ValveSoftware/openvr)
enable experimental Mac OSX OpenVR, tested using Apple External Graphics Development Kit.
This commit is contained in:
@@ -143,6 +143,9 @@ enum ETrackingResult
|
||||
TrackingResult_Running_OutOfRange = 201,
|
||||
};
|
||||
|
||||
typedef uint32_t DriverId_t;
|
||||
static const uint32_t k_nDriverNone = 0xFFFFFFFF;
|
||||
|
||||
static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
|
||||
|
||||
/** Used to pass device IDs to API calls */
|
||||
@@ -309,6 +312,10 @@ enum ETrackedDeviceProperty
|
||||
Prop_DisplayMCImageNumChannels_Int32 = 2040,
|
||||
Prop_DisplayMCImageData_Binary = 2041,
|
||||
Prop_SecondsFromPhotonsToVblank_Float = 2042,
|
||||
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
|
||||
Prop_DisplayDebugMode_Bool = 2044,
|
||||
Prop_GraphicsAdapterLuid_Uint64 = 2045,
|
||||
Prop_DriverProvidedChaperonePath_String = 2048,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_Controller
|
||||
Prop_AttachedDeviceId_String = 3000,
|
||||
@@ -330,15 +337,15 @@ enum ETrackedDeviceProperty
|
||||
Prop_ModeLabel_String = 4006,
|
||||
|
||||
// Properties that are used for user interface like icons names
|
||||
Prop_IconPathName_String = 5000, // usually a directory named "icons"
|
||||
Prop_NamedIconPathDeviceOff_String = 5001, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearching_String = 5002, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReady_String = 5004, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReadyAlert_String = 5005, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceNotReady_String = 5006, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceStandby_String = 5007, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceAlertLow_String = 5008, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
|
||||
Prop_NamedIconPathDeviceOff_String = 5001, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearching_String = 5002, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReady_String = 5004, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReadyAlert_String = 5005, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
|
||||
// Properties that are used by helpers, but are opaque to applications
|
||||
Prop_DisplayHiddenArea_Binary_Start = 5100,
|
||||
@@ -458,6 +465,8 @@ enum EVREventType
|
||||
VREvent_WatchdogWakeUpRequested = 109,
|
||||
VREvent_LensDistortionChanged = 110,
|
||||
VREvent_PropertyChanged = 111,
|
||||
VREvent_WirelessDisconnect = 112,
|
||||
VREvent_WirelessReconnect = 113,
|
||||
|
||||
VREvent_ButtonPress = 200, // data is controller
|
||||
VREvent_ButtonUnpress = 201, // data is controller
|
||||
@@ -539,6 +548,7 @@ enum EVREventType
|
||||
VREvent_ModelSkinSettingsHaveChanged = 853,
|
||||
VREvent_EnvironmentSettingsHaveChanged = 854,
|
||||
VREvent_PowerSettingsHaveChanged = 855,
|
||||
VREvent_EnableHomeAppSettingsHaveChanged = 856,
|
||||
|
||||
VREvent_StatusUpdate = 900,
|
||||
|
||||
@@ -1044,6 +1054,8 @@ enum EVRInitError
|
||||
VRInitError_Init_WatchdogDisabledInSettings = 132,
|
||||
VRInitError_Init_VRDashboardNotFound = 133,
|
||||
VRInitError_Init_VRDashboardStartupFailed = 134,
|
||||
VRInitError_Init_VRHomeNotFound = 135,
|
||||
VRInitError_Init_VRHomeStartupFailed = 136,
|
||||
|
||||
VRInitError_Driver_Failed = 200,
|
||||
VRInitError_Driver_Unknown = 201,
|
||||
@@ -1074,6 +1086,7 @@ enum EVRInitError
|
||||
VRInitError_Compositor_FirmwareRequiresUpdate = 402,
|
||||
VRInitError_Compositor_OverlayInitFailed = 403,
|
||||
VRInitError_Compositor_ScreenshotsInitFailed = 404,
|
||||
VRInitError_Compositor_UnableToCreateDevice = 405,
|
||||
|
||||
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
|
||||
|
||||
@@ -1265,6 +1278,22 @@ public:
|
||||
* and swap chain in DX10 and DX11. If an error occurs the index will be set to -1.
|
||||
*/
|
||||
virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0;
|
||||
|
||||
/**
|
||||
* Returns platform- and texture-type specific adapter identification so that applications and the
|
||||
* compositor are creating textures and swap chains on the same GPU. If an error occurs the device
|
||||
* will be set to 0.
|
||||
* [D3D10/11/12 Only (D3D9 Not Supported)]
|
||||
* Returns the adapter LUID that identifies the GPU attached to the HMD. The user should
|
||||
* enumerate all adapters using IDXGIFactory::EnumAdapters and IDXGIAdapter::GetDesc to find
|
||||
* the adapter with the matching LUID, or use IDXGIFactory4::EnumAdapterByLuid.
|
||||
* The discovered IDXGIAdapter should be used to create the device and swap chain.
|
||||
* [Vulkan Only]
|
||||
* Returns the vk::PhysicalDevice that should be used by the application.
|
||||
* [macOS Only]
|
||||
* Returns an id<MTLDevice> that should be used by the application.
|
||||
*/
|
||||
virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType ) = 0;
|
||||
|
||||
// ------------------------------------
|
||||
// Display Mode methods
|
||||
@@ -1482,7 +1511,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
static const char * const IVRSystem_Version = "IVRSystem_015";
|
||||
static const char * const IVRSystem_Version = "IVRSystem_016";
|
||||
|
||||
}
|
||||
|
||||
@@ -1511,6 +1540,7 @@ namespace vr
|
||||
VRApplicationError_OldApplicationQuitting = 112,
|
||||
VRApplicationError_TransitionAborted = 113,
|
||||
VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication)
|
||||
VRApplicationError_SteamVRIsExiting = 115,
|
||||
|
||||
VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data
|
||||
VRApplicationError_PropertyNotSet = 201, // The requested property was not set
|
||||
@@ -1541,6 +1571,7 @@ namespace vr
|
||||
VRApplicationProperty_IsTemplate_Bool = 61,
|
||||
VRApplicationProperty_IsInstanced_Bool = 62,
|
||||
VRApplicationProperty_IsInternal_Bool = 63,
|
||||
VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64,
|
||||
|
||||
VRApplicationProperty_LastLaunchTime_Uint64 = 70,
|
||||
};
|
||||
@@ -1770,7 +1801,7 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
|
||||
static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
|
||||
static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
|
||||
static const char * const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
|
||||
static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
|
||||
static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
|
||||
static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
|
||||
static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
|
||||
@@ -1783,10 +1814,10 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
|
||||
static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
|
||||
static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
|
||||
static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
|
||||
static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
|
||||
static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
|
||||
static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// lighthouse keys
|
||||
@@ -1844,6 +1875,7 @@ namespace vr
|
||||
static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
|
||||
static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
|
||||
static const char * const k_pch_Perf_TestData_Float = "perfTestData";
|
||||
static const char * const k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// collision bounds keys
|
||||
@@ -1889,6 +1921,7 @@ namespace vr
|
||||
static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
|
||||
static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
|
||||
static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
|
||||
static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// dashboard keys
|
||||
@@ -2087,6 +2120,7 @@ enum EVRCompositorError
|
||||
VRCompositorError_SharedTexturesNotSupported = 106,
|
||||
VRCompositorError_IndexOutOfRange = 107,
|
||||
VRCompositorError_AlreadySubmitted = 108,
|
||||
VRCompositorError_InvalidBounds = 109,
|
||||
};
|
||||
|
||||
const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
|
||||
@@ -3350,7 +3384,26 @@ public:
|
||||
static const char * const IVRResources_Version = "IVRResources_001";
|
||||
|
||||
|
||||
}// End
|
||||
}
|
||||
// ivrdrivermanager.h
|
||||
namespace vr
|
||||
{
|
||||
|
||||
class IVRDriverManager
|
||||
{
|
||||
public:
|
||||
virtual uint32_t GetDriverCount() const = 0;
|
||||
|
||||
/** Returns the length of the number of bytes necessary to hold this string including the trailing null. */
|
||||
virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
|
||||
};
|
||||
|
||||
static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
|
||||
// End
|
||||
|
||||
#endif // _OPENVR_API
|
||||
|
||||
@@ -3571,6 +3624,17 @@ namespace vr
|
||||
return m_pVRTrackedCamera;
|
||||
}
|
||||
|
||||
IVRDriverManager *VRDriverManager()
|
||||
{
|
||||
CheckClear();
|
||||
if ( !m_pVRDriverManager )
|
||||
{
|
||||
EVRInitError eError;
|
||||
m_pVRDriverManager = ( IVRDriverManager * )VR_GetGenericInterface( IVRDriverManager_Version, &eError );
|
||||
}
|
||||
return m_pVRDriverManager;
|
||||
}
|
||||
|
||||
private:
|
||||
IVRSystem *m_pVRSystem;
|
||||
IVRChaperone *m_pVRChaperone;
|
||||
@@ -3584,6 +3648,7 @@ namespace vr
|
||||
IVRApplications *m_pVRApplications;
|
||||
IVRTrackedCamera *m_pVRTrackedCamera;
|
||||
IVRScreenshots *m_pVRScreenshots;
|
||||
IVRDriverManager *m_pVRDriverManager;
|
||||
};
|
||||
|
||||
inline COpenVRContext &OpenVRInternal_ModuleContext()
|
||||
@@ -3604,6 +3669,7 @@ namespace vr
|
||||
inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleContext().VRResources(); }
|
||||
inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); }
|
||||
inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); }
|
||||
inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleContext().VRDriverManager(); }
|
||||
|
||||
inline void COpenVRContext::Clear()
|
||||
{
|
||||
@@ -3619,6 +3685,7 @@ namespace vr
|
||||
m_pVRTrackedCamera = nullptr;
|
||||
m_pVRResources = nullptr;
|
||||
m_pVRScreenshots = nullptr;
|
||||
m_pVRDriverManager = nullptr;
|
||||
}
|
||||
|
||||
VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType );
|
||||
|
||||
@@ -55,6 +55,11 @@ public struct IVRSystem
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
internal _GetDXGIOutputInfo GetDXGIOutputInfo;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
|
||||
internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType);
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
internal _GetOutputDevice GetOutputDevice;
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
|
||||
internal delegate bool _IsDisplayOnDesktop();
|
||||
[MarshalAs(UnmanagedType.FunctionPtr)]
|
||||
@@ -1477,6 +1482,21 @@ public struct IVRResources
|
||||
|
||||
}
|
||||
|
||||
[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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class CVRSystem
|
||||
{
|
||||
@@ -1531,6 +1551,11 @@ public class CVRSystem
|
||||
pnAdapterIndex = 0;
|
||||
FnTable.GetDXGIOutputInfo(ref pnAdapterIndex);
|
||||
}
|
||||
public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType)
|
||||
{
|
||||
pnDevice = 0;
|
||||
FnTable.GetOutputDevice(ref pnDevice,textureType);
|
||||
}
|
||||
public bool IsDisplayOnDesktop()
|
||||
{
|
||||
bool result = FnTable.IsDisplayOnDesktop();
|
||||
@@ -1642,6 +1667,7 @@ public class CVRSystem
|
||||
}
|
||||
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))
|
||||
{
|
||||
@@ -1654,6 +1680,7 @@ public class CVRSystem
|
||||
event_packed.Unpack(ref pEvent);
|
||||
return packed_result;
|
||||
}
|
||||
#endif
|
||||
bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
|
||||
return result;
|
||||
}
|
||||
@@ -1686,6 +1713,7 @@ public class CVRSystem
|
||||
}
|
||||
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))
|
||||
{
|
||||
@@ -1698,6 +1726,7 @@ public class CVRSystem
|
||||
state_packed.Unpack(ref pControllerState);
|
||||
return packed_result;
|
||||
}
|
||||
#endif
|
||||
bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
|
||||
return result;
|
||||
}
|
||||
@@ -1715,6 +1744,7 @@ public class CVRSystem
|
||||
}
|
||||
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))
|
||||
{
|
||||
@@ -1727,6 +1757,7 @@ public class CVRSystem
|
||||
state_packed.Unpack(ref pControllerState);
|
||||
return packed_result;
|
||||
}
|
||||
#endif
|
||||
bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
|
||||
return result;
|
||||
}
|
||||
@@ -2680,6 +2711,7 @@ public class CVROverlay
|
||||
}
|
||||
public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
|
||||
{
|
||||
#if !UNITY_METRO
|
||||
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
|
||||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
|
||||
{
|
||||
@@ -2692,6 +2724,7 @@ public class CVROverlay
|
||||
event_packed.Unpack(ref pEvent);
|
||||
return packed_result;
|
||||
}
|
||||
#endif
|
||||
bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent);
|
||||
return result;
|
||||
}
|
||||
@@ -2956,6 +2989,7 @@ public class CVRRenderModels
|
||||
}
|
||||
public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
|
||||
{
|
||||
#if !UNITY_METRO
|
||||
if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
|
||||
(System.Environment.OSVersion.Platform == System.PlatformID.Unix))
|
||||
{
|
||||
@@ -2968,6 +3002,7 @@ public class CVRRenderModels
|
||||
state_packed.Unpack(ref pControllerState);
|
||||
return packed_result;
|
||||
}
|
||||
#endif
|
||||
bool result = FnTable.GetComponentState(pchRenderModelName,pchComponentName,ref pControllerState,ref pState,ref pComponentState);
|
||||
return result;
|
||||
}
|
||||
@@ -3145,6 +3180,26 @@ public class CVRResources
|
||||
}
|
||||
|
||||
|
||||
public class CVRDriverManager
|
||||
{
|
||||
IVRDriverManager FnTable;
|
||||
internal CVRDriverManager(IntPtr pInterface)
|
||||
{
|
||||
FnTable = (IVRDriverManager)Marshal.PtrToStructure(pInterface, typeof(IVRDriverManager));
|
||||
}
|
||||
public uint GetDriverCount()
|
||||
{
|
||||
uint result = FnTable.GetDriverCount();
|
||||
return result;
|
||||
}
|
||||
public uint GetDriverName(uint nDriver,System.Text.StringBuilder pchValue,uint unBufferSize)
|
||||
{
|
||||
uint result = FnTable.GetDriverName(nDriver,pchValue,unBufferSize);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class OpenVRInterop
|
||||
{
|
||||
[DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)]
|
||||
@@ -3296,6 +3351,10 @@ public enum ETrackedDeviceProperty
|
||||
Prop_DisplayMCImageNumChannels_Int32 = 2040,
|
||||
Prop_DisplayMCImageData_Binary = 2041,
|
||||
Prop_SecondsFromPhotonsToVblank_Float = 2042,
|
||||
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
|
||||
Prop_DisplayDebugMode_Bool = 2044,
|
||||
Prop_GraphicsAdapterLuid_Uint64 = 2045,
|
||||
Prop_DriverProvidedChaperonePath_String = 2048,
|
||||
Prop_AttachedDeviceId_String = 3000,
|
||||
Prop_SupportedButtons_Uint64 = 3001,
|
||||
Prop_Axis0Type_Int32 = 3002,
|
||||
@@ -3381,6 +3440,8 @@ public enum EVREventType
|
||||
VREvent_WatchdogWakeUpRequested = 109,
|
||||
VREvent_LensDistortionChanged = 110,
|
||||
VREvent_PropertyChanged = 111,
|
||||
VREvent_WirelessDisconnect = 112,
|
||||
VREvent_WirelessReconnect = 113,
|
||||
VREvent_ButtonPress = 200,
|
||||
VREvent_ButtonUnpress = 201,
|
||||
VREvent_ButtonTouch = 202,
|
||||
@@ -3449,6 +3510,7 @@ public enum EVREventType
|
||||
VREvent_ModelSkinSettingsHaveChanged = 853,
|
||||
VREvent_EnvironmentSettingsHaveChanged = 854,
|
||||
VREvent_PowerSettingsHaveChanged = 855,
|
||||
VREvent_EnableHomeAppSettingsHaveChanged = 856,
|
||||
VREvent_StatusUpdate = 900,
|
||||
VREvent_MCImageUpdated = 1000,
|
||||
VREvent_FirmwareUpdateStarted = 1100,
|
||||
@@ -3632,6 +3694,8 @@ public enum EVRInitError
|
||||
Init_WatchdogDisabledInSettings = 132,
|
||||
Init_VRDashboardNotFound = 133,
|
||||
Init_VRDashboardStartupFailed = 134,
|
||||
Init_VRHomeNotFound = 135,
|
||||
Init_VRHomeStartupFailed = 136,
|
||||
Driver_Failed = 200,
|
||||
Driver_Unknown = 201,
|
||||
Driver_HmdUnknown = 202,
|
||||
@@ -3658,6 +3722,7 @@ public enum EVRInitError
|
||||
Compositor_FirmwareRequiresUpdate = 402,
|
||||
Compositor_OverlayInitFailed = 403,
|
||||
Compositor_ScreenshotsInitFailed = 404,
|
||||
Compositor_UnableToCreateDevice = 405,
|
||||
VendorSpecific_UnableToConnectToOculusRuntime = 1000,
|
||||
VendorSpecific_HmdFound_CantOpenDevice = 1101,
|
||||
VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
|
||||
@@ -3733,6 +3798,7 @@ public enum EVRApplicationError
|
||||
OldApplicationQuitting = 112,
|
||||
TransitionAborted = 113,
|
||||
IsTemplate = 114,
|
||||
SteamVRIsExiting = 115,
|
||||
BufferTooSmall = 200,
|
||||
PropertyNotSet = 201,
|
||||
UnknownProperty = 202,
|
||||
@@ -3754,6 +3820,7 @@ public enum EVRApplicationProperty
|
||||
IsTemplate_Bool = 61,
|
||||
IsInstanced_Bool = 62,
|
||||
IsInternal_Bool = 63,
|
||||
WantsCompositorPauseInStandby_Bool = 64,
|
||||
LastLaunchTime_Uint64 = 70,
|
||||
}
|
||||
public enum EVRApplicationTransitionState
|
||||
@@ -3798,6 +3865,7 @@ public enum EVRCompositorError
|
||||
SharedTexturesNotSupported = 106,
|
||||
IndexOutOfRange = 107,
|
||||
AlreadySubmitted = 108,
|
||||
InvalidBounds = 109,
|
||||
}
|
||||
public enum VROverlayInputMethod
|
||||
{
|
||||
@@ -4479,6 +4547,7 @@ public enum EVRScreenshotError
|
||||
public IntPtr m_pVRApplications; // class vr::IVRApplications *
|
||||
public IntPtr m_pVRTrackedCamera; // class vr::IVRTrackedCamera *
|
||||
public IntPtr m_pVRScreenshots; // class vr::IVRScreenshots *
|
||||
public IntPtr m_pVRDriverManager; // class vr::IVRDriverManager *
|
||||
}
|
||||
|
||||
public class OpenVR
|
||||
@@ -4524,6 +4593,7 @@ public class OpenVR
|
||||
return OpenVRInterop.GetInitToken();
|
||||
}
|
||||
|
||||
public const uint k_nDriverNone = 4294967295;
|
||||
public const uint k_unMaxDriverDebugResponseSize = 32768;
|
||||
public const uint k_unTrackedDeviceIndex_Hmd = 0;
|
||||
public const uint k_unMaxTrackedDeviceCount = 16;
|
||||
@@ -4547,7 +4617,7 @@ public class OpenVR
|
||||
public const uint k_unControllerStateAxisCount = 5;
|
||||
public const ulong k_ulOverlayHandleInvalid = 0;
|
||||
public const uint k_unScreenshotHandleInvalid = 0;
|
||||
public const string IVRSystem_Version = "IVRSystem_015";
|
||||
public const string IVRSystem_Version = "IVRSystem_016";
|
||||
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
|
||||
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_003";
|
||||
public const uint k_unMaxApplicationKeyLength = 128;
|
||||
@@ -4598,7 +4668,7 @@ public class OpenVR
|
||||
public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
|
||||
public const string k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
|
||||
public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
|
||||
public const string k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
|
||||
public const string k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
|
||||
public const string k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
|
||||
public const string k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
|
||||
public const string k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
|
||||
@@ -4611,10 +4681,10 @@ public class OpenVR
|
||||
public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
|
||||
public const string k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
|
||||
public const string k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
|
||||
public const string k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
|
||||
public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
|
||||
public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
|
||||
public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
|
||||
public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
|
||||
public const string k_pch_Lighthouse_Section = "driver_lighthouse";
|
||||
public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
|
||||
public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
|
||||
@@ -4654,6 +4724,7 @@ public class OpenVR
|
||||
public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
|
||||
public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
|
||||
public const string k_pch_Perf_TestData_Float = "perfTestData";
|
||||
public const string k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling";
|
||||
public const string k_pch_CollisionBounds_Section = "collisionBounds";
|
||||
public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
|
||||
public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
|
||||
@@ -4687,6 +4758,7 @@ public class OpenVR
|
||||
public const string k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
|
||||
public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
|
||||
public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
|
||||
public const string k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
|
||||
public const string k_pch_Dashboard_Section = "dashboard";
|
||||
public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
|
||||
public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
|
||||
@@ -4694,6 +4766,7 @@ public class OpenVR
|
||||
public const string k_pch_Driver_Enable_Bool = "enable";
|
||||
public const string IVRScreenshots_Version = "IVRScreenshots_001";
|
||||
public const string IVRResources_Version = "IVRResources_001";
|
||||
public const string IVRDriverManager_Version = "IVRDriverManager_001";
|
||||
|
||||
static uint VRToken { get; set; }
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
,{"typedef": "vr::glInt_t","type": "int32_t"}
|
||||
,{"typedef": "vr::glUInt_t","type": "uint32_t"}
|
||||
,{"typedef": "vr::SharedTextureHandle_t","type": "uint64_t"}
|
||||
,{"typedef": "vr::DriverId_t","type": "uint32_t"}
|
||||
,{"typedef": "vr::TrackedDeviceIndex_t","type": "uint32_t"}
|
||||
,{"typedef": "vr::PropertyContainerHandle_t","type": "uint64_t"}
|
||||
,{"typedef": "vr::PropertyTypeTag_t","type": "uint32_t"}
|
||||
@@ -153,6 +154,10 @@
|
||||
,{"name": "Prop_DisplayMCImageNumChannels_Int32","value": "2040"}
|
||||
,{"name": "Prop_DisplayMCImageData_Binary","value": "2041"}
|
||||
,{"name": "Prop_SecondsFromPhotonsToVblank_Float","value": "2042"}
|
||||
,{"name": "Prop_DriverDirectModeSendsVsyncEvents_Bool","value": "2043"}
|
||||
,{"name": "Prop_DisplayDebugMode_Bool","value": "2044"}
|
||||
,{"name": "Prop_GraphicsAdapterLuid_Uint64","value": "2045"}
|
||||
,{"name": "Prop_DriverProvidedChaperonePath_String","value": "2048"}
|
||||
,{"name": "Prop_AttachedDeviceId_String","value": "3000"}
|
||||
,{"name": "Prop_SupportedButtons_Uint64","value": "3001"}
|
||||
,{"name": "Prop_Axis0Type_Int32","value": "3002"}
|
||||
@@ -234,6 +239,8 @@
|
||||
,{"name": "VREvent_WatchdogWakeUpRequested","value": "109"}
|
||||
,{"name": "VREvent_LensDistortionChanged","value": "110"}
|
||||
,{"name": "VREvent_PropertyChanged","value": "111"}
|
||||
,{"name": "VREvent_WirelessDisconnect","value": "112"}
|
||||
,{"name": "VREvent_WirelessReconnect","value": "113"}
|
||||
,{"name": "VREvent_ButtonPress","value": "200"}
|
||||
,{"name": "VREvent_ButtonUnpress","value": "201"}
|
||||
,{"name": "VREvent_ButtonTouch","value": "202"}
|
||||
@@ -302,6 +309,7 @@
|
||||
,{"name": "VREvent_ModelSkinSettingsHaveChanged","value": "853"}
|
||||
,{"name": "VREvent_EnvironmentSettingsHaveChanged","value": "854"}
|
||||
,{"name": "VREvent_PowerSettingsHaveChanged","value": "855"}
|
||||
,{"name": "VREvent_EnableHomeAppSettingsHaveChanged","value": "856"}
|
||||
,{"name": "VREvent_StatusUpdate","value": "900"}
|
||||
,{"name": "VREvent_MCImageUpdated","value": "1000"}
|
||||
,{"name": "VREvent_FirmwareUpdateStarted","value": "1100"}
|
||||
@@ -473,6 +481,8 @@
|
||||
,{"name": "VRInitError_Init_WatchdogDisabledInSettings","value": "132"}
|
||||
,{"name": "VRInitError_Init_VRDashboardNotFound","value": "133"}
|
||||
,{"name": "VRInitError_Init_VRDashboardStartupFailed","value": "134"}
|
||||
,{"name": "VRInitError_Init_VRHomeNotFound","value": "135"}
|
||||
,{"name": "VRInitError_Init_VRHomeStartupFailed","value": "136"}
|
||||
,{"name": "VRInitError_Driver_Failed","value": "200"}
|
||||
,{"name": "VRInitError_Driver_Unknown","value": "201"}
|
||||
,{"name": "VRInitError_Driver_HmdUnknown","value": "202"}
|
||||
@@ -499,6 +509,7 @@
|
||||
,{"name": "VRInitError_Compositor_FirmwareRequiresUpdate","value": "402"}
|
||||
,{"name": "VRInitError_Compositor_OverlayInitFailed","value": "403"}
|
||||
,{"name": "VRInitError_Compositor_ScreenshotsInitFailed","value": "404"}
|
||||
,{"name": "VRInitError_Compositor_UnableToCreateDevice","value": "405"}
|
||||
,{"name": "VRInitError_VendorSpecific_UnableToConnectToOculusRuntime","value": "1000"}
|
||||
,{"name": "VRInitError_VendorSpecific_HmdFound_CantOpenDevice","value": "1101"}
|
||||
,{"name": "VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart","value": "1102"}
|
||||
@@ -569,6 +580,7 @@
|
||||
,{"name": "VRApplicationError_OldApplicationQuitting","value": "112"}
|
||||
,{"name": "VRApplicationError_TransitionAborted","value": "113"}
|
||||
,{"name": "VRApplicationError_IsTemplate","value": "114"}
|
||||
,{"name": "VRApplicationError_SteamVRIsExiting","value": "115"}
|
||||
,{"name": "VRApplicationError_BufferTooSmall","value": "200"}
|
||||
,{"name": "VRApplicationError_PropertyNotSet","value": "201"}
|
||||
,{"name": "VRApplicationError_UnknownProperty","value": "202"}
|
||||
@@ -589,6 +601,7 @@
|
||||
,{"name": "VRApplicationProperty_IsTemplate_Bool","value": "61"}
|
||||
,{"name": "VRApplicationProperty_IsInstanced_Bool","value": "62"}
|
||||
,{"name": "VRApplicationProperty_IsInternal_Bool","value": "63"}
|
||||
,{"name": "VRApplicationProperty_WantsCompositorPauseInStandby_Bool","value": "64"}
|
||||
,{"name": "VRApplicationProperty_LastLaunchTime_Uint64","value": "70"}
|
||||
]}
|
||||
, {"enumname": "vr::EVRApplicationTransitionState","values": [
|
||||
@@ -628,6 +641,7 @@
|
||||
,{"name": "VRCompositorError_SharedTexturesNotSupported","value": "106"}
|
||||
,{"name": "VRCompositorError_IndexOutOfRange","value": "107"}
|
||||
,{"name": "VRCompositorError_AlreadySubmitted","value": "108"}
|
||||
,{"name": "VRCompositorError_InvalidBounds","value": "109"}
|
||||
]}
|
||||
, {"enumname": "vr::VROverlayInputMethod","values": [
|
||||
{"name": "VROverlayInputMethod_None","value": "0"}
|
||||
@@ -738,6 +752,8 @@
|
||||
]}
|
||||
],
|
||||
"consts":[{
|
||||
"constname": "k_nDriverNone","consttype": "const uint32_t", "constval": "4294967295"}
|
||||
,{
|
||||
"constname": "k_unMaxDriverDebugResponseSize","consttype": "const uint32_t", "constval": "32768"}
|
||||
,{
|
||||
"constname": "k_unTrackedDeviceIndex_Hmd","consttype": "const uint32_t", "constval": "0"}
|
||||
@@ -784,7 +800,7 @@
|
||||
,{
|
||||
"constname": "k_unScreenshotHandleInvalid","consttype": "const uint32_t", "constval": "0"}
|
||||
,{
|
||||
"constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_015"}
|
||||
"constname": "IVRSystem_Version","consttype": "const char *const", "constval": "IVRSystem_016"}
|
||||
,{
|
||||
"constname": "IVRExtendedDisplay_Version","consttype": "const char *const", "constval": "IVRExtendedDisplay_001"}
|
||||
,{
|
||||
@@ -886,7 +902,7 @@
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_NeverKillProcesses_Bool","consttype": "const char *const", "constval": "neverKillProcesses"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_RenderTargetMultiplier_Float","consttype": "const char *const", "constval": "renderTargetMultiplier"}
|
||||
"constname": "k_pch_SteamVR_SupersampleScale_Float","consttype": "const char *const", "constval": "supersampleScale"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_AllowAsyncReprojection_Bool","consttype": "const char *const", "constval": "allowAsyncReprojection"}
|
||||
,{
|
||||
@@ -911,14 +927,14 @@
|
||||
"constname": "k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool","consttype": "const char *const", "constval": "startOverlayAppsFromDashboard"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_EnableHomeApp","consttype": "const char *const", "constval": "enableHomeApp"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_SetInitialDefaultHomeApp","consttype": "const char *const", "constval": "setInitialDefaultHomeApp"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32","consttype": "const char *const", "constval": "CycleBackgroundImageTimeSec"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_RetailDemo_Bool","consttype": "const char *const", "constval": "retailDemo"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_IpdOffset_Float","consttype": "const char *const", "constval": "ipdOffset"}
|
||||
,{
|
||||
"constname": "k_pch_SteamVR_AllowSupersampleFiltering_Bool","consttype": "const char *const", "constval": "allowSupersampleFiltering"}
|
||||
,{
|
||||
"constname": "k_pch_Lighthouse_Section","consttype": "const char *const", "constval": "driver_lighthouse"}
|
||||
,{
|
||||
@@ -997,6 +1013,8 @@
|
||||
"constname": "k_pch_Perf_SaveTimingsOnExit_Bool","consttype": "const char *const", "constval": "saveTimingsOnExit"}
|
||||
,{
|
||||
"constname": "k_pch_Perf_TestData_Float","consttype": "const char *const", "constval": "perfTestData"}
|
||||
,{
|
||||
"constname": "k_pch_Perf_LinuxGPUProfiling_Bool","consttype": "const char *const", "constval": "linuxGPUProfiling"}
|
||||
,{
|
||||
"constname": "k_pch_CollisionBounds_Section","consttype": "const char *const", "constval": "collisionBounds"}
|
||||
,{
|
||||
@@ -1063,6 +1081,8 @@
|
||||
"constname": "k_pch_Power_ReturnToWatchdogTimeout_Float","consttype": "const char *const", "constval": "returnToWatchdogTimeout"}
|
||||
,{
|
||||
"constname": "k_pch_Power_AutoLaunchSteamVROnButtonPress","consttype": "const char *const", "constval": "autoLaunchSteamVROnButtonPress"}
|
||||
,{
|
||||
"constname": "k_pch_Power_PauseCompositorOnStandby_Bool","consttype": "const char *const", "constval": "pauseCompositorOnStandby"}
|
||||
,{
|
||||
"constname": "k_pch_Dashboard_Section","consttype": "const char *const", "constval": "dashboard"}
|
||||
,{
|
||||
@@ -1077,6 +1097,8 @@
|
||||
"constname": "IVRScreenshots_Version","consttype": "const char *const", "constval": "IVRScreenshots_001"}
|
||||
,{
|
||||
"constname": "IVRResources_Version","consttype": "const char *const", "constval": "IVRResources_001"}
|
||||
,{
|
||||
"constname": "IVRDriverManager_Version","consttype": "const char *const", "constval": "IVRDriverManager_001"}
|
||||
],
|
||||
"structs":[{"struct": "vr::HmdMatrix34_t","fields": [
|
||||
{ "fieldname": "m", "fieldtype": "float [3][4]"}]}
|
||||
@@ -1363,7 +1385,8 @@
|
||||
{ "fieldname": "m_pVRSettings", "fieldtype": "class vr::IVRSettings *"},
|
||||
{ "fieldname": "m_pVRApplications", "fieldtype": "class vr::IVRApplications *"},
|
||||
{ "fieldname": "m_pVRTrackedCamera", "fieldtype": "class vr::IVRTrackedCamera *"},
|
||||
{ "fieldname": "m_pVRScreenshots", "fieldtype": "class vr::IVRScreenshots *"}]}
|
||||
{ "fieldname": "m_pVRScreenshots", "fieldtype": "class vr::IVRScreenshots *"},
|
||||
{ "fieldname": "m_pVRDriverManager", "fieldtype": "class vr::IVRDriverManager *"}]}
|
||||
],
|
||||
"methods":[{
|
||||
"classname": "vr::IVRSystem",
|
||||
@@ -1437,6 +1460,15 @@
|
||||
{ "paramname": "pnAdapterIndex" ,"paramtype": "int32_t *"}
|
||||
]
|
||||
}
|
||||
,{
|
||||
"classname": "vr::IVRSystem",
|
||||
"methodname": "GetOutputDevice",
|
||||
"returntype": "void",
|
||||
"params": [
|
||||
{ "paramname": "pnDevice" ,"paramtype": "uint64_t *"},
|
||||
{ "paramname": "textureType" ,"paramtype": "vr::ETextureType"}
|
||||
]
|
||||
}
|
||||
,{
|
||||
"classname": "vr::IVRSystem",
|
||||
"methodname": "IsDisplayOnDesktop",
|
||||
@@ -3844,5 +3876,20 @@
|
||||
{ "paramname": "unBufferLen" ,"paramtype": "uint32_t"}
|
||||
]
|
||||
}
|
||||
,{
|
||||
"classname": "vr::IVRDriverManager",
|
||||
"methodname": "GetDriverCount",
|
||||
"returntype": "uint32_t"
|
||||
}
|
||||
,{
|
||||
"classname": "vr::IVRDriverManager",
|
||||
"methodname": "GetDriverName",
|
||||
"returntype": "uint32_t",
|
||||
"params": [
|
||||
{ "paramname": "nDriver" ,"paramtype": "vr::DriverId_t"},
|
||||
{ "paramname": "pchValue" ,"out_string": " " ,"paramtype": "char *"},
|
||||
{ "paramname": "unBufferSize" ,"paramtype": "uint32_t"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -60,6 +60,7 @@ typedef uint32_t PropertyTypeTag_t;
|
||||
|
||||
// OpenVR Constants
|
||||
|
||||
static const unsigned int k_nDriverNone = 4294967295;
|
||||
static const unsigned int k_unMaxDriverDebugResponseSize = 32768;
|
||||
static const unsigned int k_unTrackedDeviceIndex_Hmd = 0;
|
||||
static const unsigned int k_unMaxTrackedDeviceCount = 16;
|
||||
@@ -83,7 +84,7 @@ static const unsigned int k_unMaxPropertyStringSize = 32768;
|
||||
static const unsigned int k_unControllerStateAxisCount = 5;
|
||||
static const unsigned long k_ulOverlayHandleInvalid = 0;
|
||||
static const unsigned int k_unScreenshotHandleInvalid = 0;
|
||||
static const char * IVRSystem_Version = "IVRSystem_015";
|
||||
static const char * IVRSystem_Version = "IVRSystem_016";
|
||||
static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
|
||||
static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003";
|
||||
static const unsigned int k_unMaxApplicationKeyLength = 128;
|
||||
@@ -134,7 +135,7 @@ static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
|
||||
static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
|
||||
static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
|
||||
static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
|
||||
static const char * k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
|
||||
static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
|
||||
static const char * k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
|
||||
static const char * k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
|
||||
static const char * k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
|
||||
@@ -147,10 +148,10 @@ static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startComp
|
||||
static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
|
||||
static const char * k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
|
||||
static const char * k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
|
||||
static const char * k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
|
||||
static const char * k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
|
||||
static const char * k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
|
||||
static const char * k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
|
||||
static const char * k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
|
||||
static const char * k_pch_Lighthouse_Section = "driver_lighthouse";
|
||||
static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
|
||||
static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
|
||||
@@ -190,6 +191,7 @@ static const char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
|
||||
static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
|
||||
static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
|
||||
static const char * k_pch_Perf_TestData_Float = "perfTestData";
|
||||
static const char * k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling";
|
||||
static const char * k_pch_CollisionBounds_Section = "collisionBounds";
|
||||
static const char * k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
|
||||
static const char * k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
|
||||
@@ -223,6 +225,7 @@ static const char * k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTim
|
||||
static const char * k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
|
||||
static const char * k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
|
||||
static const char * k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
|
||||
static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
|
||||
static const char * k_pch_Dashboard_Section = "dashboard";
|
||||
static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
|
||||
static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
|
||||
@@ -230,6 +233,7 @@ static const char * k_pch_modelskin_Section = "modelskins";
|
||||
static const char * k_pch_Driver_Enable_Bool = "enable";
|
||||
static const char * IVRScreenshots_Version = "IVRScreenshots_001";
|
||||
static const char * IVRResources_Version = "IVRResources_001";
|
||||
static const char * IVRDriverManager_Version = "IVRDriverManager_001";
|
||||
|
||||
// OpenVR Enums
|
||||
|
||||
@@ -370,6 +374,10 @@ typedef enum ETrackedDeviceProperty
|
||||
ETrackedDeviceProperty_Prop_DisplayMCImageNumChannels_Int32 = 2040,
|
||||
ETrackedDeviceProperty_Prop_DisplayMCImageData_Binary = 2041,
|
||||
ETrackedDeviceProperty_Prop_SecondsFromPhotonsToVblank_Float = 2042,
|
||||
ETrackedDeviceProperty_Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
|
||||
ETrackedDeviceProperty_Prop_DisplayDebugMode_Bool = 2044,
|
||||
ETrackedDeviceProperty_Prop_GraphicsAdapterLuid_Uint64 = 2045,
|
||||
ETrackedDeviceProperty_Prop_DriverProvidedChaperonePath_String = 2048,
|
||||
ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
|
||||
ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
|
||||
ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
|
||||
@@ -459,6 +467,8 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_WatchdogWakeUpRequested = 109,
|
||||
EVREventType_VREvent_LensDistortionChanged = 110,
|
||||
EVREventType_VREvent_PropertyChanged = 111,
|
||||
EVREventType_VREvent_WirelessDisconnect = 112,
|
||||
EVREventType_VREvent_WirelessReconnect = 113,
|
||||
EVREventType_VREvent_ButtonPress = 200,
|
||||
EVREventType_VREvent_ButtonUnpress = 201,
|
||||
EVREventType_VREvent_ButtonTouch = 202,
|
||||
@@ -527,6 +537,7 @@ typedef enum EVREventType
|
||||
EVREventType_VREvent_ModelSkinSettingsHaveChanged = 853,
|
||||
EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854,
|
||||
EVREventType_VREvent_PowerSettingsHaveChanged = 855,
|
||||
EVREventType_VREvent_EnableHomeAppSettingsHaveChanged = 856,
|
||||
EVREventType_VREvent_StatusUpdate = 900,
|
||||
EVREventType_VREvent_MCImageUpdated = 1000,
|
||||
EVREventType_VREvent_FirmwareUpdateStarted = 1100,
|
||||
@@ -722,6 +733,8 @@ typedef enum EVRInitError
|
||||
EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132,
|
||||
EVRInitError_VRInitError_Init_VRDashboardNotFound = 133,
|
||||
EVRInitError_VRInitError_Init_VRDashboardStartupFailed = 134,
|
||||
EVRInitError_VRInitError_Init_VRHomeNotFound = 135,
|
||||
EVRInitError_VRInitError_Init_VRHomeStartupFailed = 136,
|
||||
EVRInitError_VRInitError_Driver_Failed = 200,
|
||||
EVRInitError_VRInitError_Driver_Unknown = 201,
|
||||
EVRInitError_VRInitError_Driver_HmdUnknown = 202,
|
||||
@@ -748,6 +761,7 @@ typedef enum EVRInitError
|
||||
EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402,
|
||||
EVRInitError_VRInitError_Compositor_OverlayInitFailed = 403,
|
||||
EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404,
|
||||
EVRInitError_VRInitError_Compositor_UnableToCreateDevice = 405,
|
||||
EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
|
||||
EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
|
||||
EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
|
||||
@@ -828,6 +842,7 @@ typedef enum EVRApplicationError
|
||||
EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112,
|
||||
EVRApplicationError_VRApplicationError_TransitionAborted = 113,
|
||||
EVRApplicationError_VRApplicationError_IsTemplate = 114,
|
||||
EVRApplicationError_VRApplicationError_SteamVRIsExiting = 115,
|
||||
EVRApplicationError_VRApplicationError_BufferTooSmall = 200,
|
||||
EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
|
||||
EVRApplicationError_VRApplicationError_UnknownProperty = 202,
|
||||
@@ -850,6 +865,7 @@ typedef enum EVRApplicationProperty
|
||||
EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61,
|
||||
EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62,
|
||||
EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63,
|
||||
EVRApplicationProperty_VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64,
|
||||
EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70,
|
||||
} EVRApplicationProperty;
|
||||
|
||||
@@ -899,6 +915,7 @@ typedef enum EVRCompositorError
|
||||
EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106,
|
||||
EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
|
||||
EVRCompositorError_VRCompositorError_AlreadySubmitted = 108,
|
||||
EVRCompositorError_VRCompositorError_InvalidBounds = 109,
|
||||
} EVRCompositorError;
|
||||
|
||||
typedef enum VROverlayInputMethod
|
||||
@@ -1047,6 +1064,7 @@ typedef void * glSharedTextureHandle_t;
|
||||
typedef int32_t glInt_t;
|
||||
typedef uint32_t glUInt_t;
|
||||
typedef uint64_t SharedTextureHandle_t;
|
||||
typedef uint32_t DriverId_t;
|
||||
typedef uint32_t TrackedDeviceIndex_t;
|
||||
typedef uint64_t PropertyContainerHandle_t;
|
||||
typedef uint32_t PropertyTypeTag_t;
|
||||
@@ -1503,6 +1521,7 @@ typedef struct COpenVRContext
|
||||
intptr_t m_pVRApplications; // class vr::IVRApplications *
|
||||
intptr_t m_pVRTrackedCamera; // class vr::IVRTrackedCamera *
|
||||
intptr_t m_pVRScreenshots; // class vr::IVRScreenshots *
|
||||
intptr_t m_pVRDriverManager; // class vr::IVRDriverManager *
|
||||
} COpenVRContext;
|
||||
|
||||
|
||||
@@ -1560,6 +1579,7 @@ struct VR_IVRSystem_FnTable
|
||||
bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter);
|
||||
int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)();
|
||||
void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex);
|
||||
void (OPENVR_FNTABLE_CALLTYPE *GetOutputDevice)(uint64_t * pnDevice, ETextureType textureType);
|
||||
bool (OPENVR_FNTABLE_CALLTYPE *IsDisplayOnDesktop)();
|
||||
bool (OPENVR_FNTABLE_CALLTYPE *SetDisplayVisibility)(bool bIsVisibleOnDesktop);
|
||||
void (OPENVR_FNTABLE_CALLTYPE *GetDeviceToAbsoluteTrackingPose)(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, struct TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount);
|
||||
@@ -1882,6 +1902,12 @@ struct VR_IVRResources_FnTable
|
||||
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetResourceFullPath)(char * pchResourceName, char * pchResourceTypeDirectory, char * pchPathBuffer, uint32_t unBufferLen);
|
||||
};
|
||||
|
||||
struct VR_IVRDriverManager_FnTable
|
||||
{
|
||||
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverCount)();
|
||||
uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverName)(DriverId_t nDriver, char * pchValue, uint32_t unBufferSize);
|
||||
};
|
||||
|
||||
|
||||
#if 0
|
||||
// Global entry points
|
||||
|
||||
@@ -143,6 +143,9 @@ enum ETrackingResult
|
||||
TrackingResult_Running_OutOfRange = 201,
|
||||
};
|
||||
|
||||
typedef uint32_t DriverId_t;
|
||||
static const uint32_t k_nDriverNone = 0xFFFFFFFF;
|
||||
|
||||
static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
|
||||
|
||||
/** Used to pass device IDs to API calls */
|
||||
@@ -309,6 +312,10 @@ enum ETrackedDeviceProperty
|
||||
Prop_DisplayMCImageNumChannels_Int32 = 2040,
|
||||
Prop_DisplayMCImageData_Binary = 2041,
|
||||
Prop_SecondsFromPhotonsToVblank_Float = 2042,
|
||||
Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
|
||||
Prop_DisplayDebugMode_Bool = 2044,
|
||||
Prop_GraphicsAdapterLuid_Uint64 = 2045,
|
||||
Prop_DriverProvidedChaperonePath_String = 2048,
|
||||
|
||||
// Properties that are unique to TrackedDeviceClass_Controller
|
||||
Prop_AttachedDeviceId_String = 3000,
|
||||
@@ -330,15 +337,15 @@ enum ETrackedDeviceProperty
|
||||
Prop_ModeLabel_String = 4006,
|
||||
|
||||
// Properties that are used for user interface like icons names
|
||||
Prop_IconPathName_String = 5000, // usually a directory named "icons"
|
||||
Prop_NamedIconPathDeviceOff_String = 5001, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearching_String = 5002, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReady_String = 5004, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReadyAlert_String = 5005, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceNotReady_String = 5006, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceStandby_String = 5007, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceAlertLow_String = 5008, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties.
|
||||
Prop_NamedIconPathDeviceOff_String = 5001, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearching_String = 5002, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReady_String = 5004, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceReadyAlert_String = 5005, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
|
||||
|
||||
// Properties that are used by helpers, but are opaque to applications
|
||||
Prop_DisplayHiddenArea_Binary_Start = 5100,
|
||||
@@ -458,6 +465,8 @@ enum EVREventType
|
||||
VREvent_WatchdogWakeUpRequested = 109,
|
||||
VREvent_LensDistortionChanged = 110,
|
||||
VREvent_PropertyChanged = 111,
|
||||
VREvent_WirelessDisconnect = 112,
|
||||
VREvent_WirelessReconnect = 113,
|
||||
|
||||
VREvent_ButtonPress = 200, // data is controller
|
||||
VREvent_ButtonUnpress = 201, // data is controller
|
||||
@@ -539,6 +548,7 @@ enum EVREventType
|
||||
VREvent_ModelSkinSettingsHaveChanged = 853,
|
||||
VREvent_EnvironmentSettingsHaveChanged = 854,
|
||||
VREvent_PowerSettingsHaveChanged = 855,
|
||||
VREvent_EnableHomeAppSettingsHaveChanged = 856,
|
||||
|
||||
VREvent_StatusUpdate = 900,
|
||||
|
||||
@@ -1044,6 +1054,8 @@ enum EVRInitError
|
||||
VRInitError_Init_WatchdogDisabledInSettings = 132,
|
||||
VRInitError_Init_VRDashboardNotFound = 133,
|
||||
VRInitError_Init_VRDashboardStartupFailed = 134,
|
||||
VRInitError_Init_VRHomeNotFound = 135,
|
||||
VRInitError_Init_VRHomeStartupFailed = 136,
|
||||
|
||||
VRInitError_Driver_Failed = 200,
|
||||
VRInitError_Driver_Unknown = 201,
|
||||
@@ -1074,6 +1086,7 @@ enum EVRInitError
|
||||
VRInitError_Compositor_FirmwareRequiresUpdate = 402,
|
||||
VRInitError_Compositor_OverlayInitFailed = 403,
|
||||
VRInitError_Compositor_ScreenshotsInitFailed = 404,
|
||||
VRInitError_Compositor_UnableToCreateDevice = 405,
|
||||
|
||||
VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
|
||||
|
||||
@@ -1374,7 +1387,7 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
|
||||
static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
|
||||
static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
|
||||
static const char * const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
|
||||
static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
|
||||
static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
|
||||
static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
|
||||
static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
|
||||
@@ -1387,10 +1400,10 @@ namespace vr
|
||||
static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
|
||||
static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
|
||||
static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
|
||||
static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
|
||||
static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
|
||||
static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
|
||||
static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
|
||||
static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// lighthouse keys
|
||||
@@ -1448,6 +1461,7 @@ namespace vr
|
||||
static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
|
||||
static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
|
||||
static const char * const k_pch_Perf_TestData_Float = "perfTestData";
|
||||
static const char * const k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// collision bounds keys
|
||||
@@ -1493,6 +1507,7 @@ namespace vr
|
||||
static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
|
||||
static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
|
||||
static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
|
||||
static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// dashboard keys
|
||||
@@ -2278,6 +2293,9 @@ public:
|
||||
* poses across different drivers. Poses are indexed by their device id, and their associated driver and
|
||||
* other properties can be looked up via IVRProperties. */
|
||||
virtual void GetRawTrackedDevicePoses( float fPredictedSecondsFromNow, TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0;
|
||||
|
||||
/** Notifies the server that a tracked device's display component transforms have been updated. */
|
||||
virtual void TrackedDeviceDisplayTransformUpdated( uint32_t unWhichDevice, HmdMatrix34_t eyeToHeadLeft, HmdMatrix34_t eyeToHeadRight ) = 0;
|
||||
};
|
||||
|
||||
static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_004";
|
||||
@@ -2385,6 +2403,49 @@ namespace vr
|
||||
}
|
||||
|
||||
|
||||
// ivrresources.h
|
||||
namespace vr
|
||||
{
|
||||
|
||||
class IVRResources
|
||||
{
|
||||
public:
|
||||
|
||||
// ------------------------------------
|
||||
// Shared Resource Methods
|
||||
// ------------------------------------
|
||||
|
||||
/** Loads the specified resource into the provided buffer if large enough.
|
||||
* Returns the size in bytes of the buffer required to hold the specified resource. */
|
||||
virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0;
|
||||
|
||||
/** Provides the full path to the specified resource. Resource names can include named directories for
|
||||
* drivers and other things, and this resolves all of those and returns the actual physical path.
|
||||
* pchResourceTypeDirectory is the subdirectory of resources to look in. */
|
||||
virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, char *pchPathBuffer, uint32_t unBufferLen ) = 0;
|
||||
};
|
||||
|
||||
static const char * const IVRResources_Version = "IVRResources_001";
|
||||
|
||||
|
||||
}
|
||||
// ivrdrivermanager.h
|
||||
namespace vr
|
||||
{
|
||||
|
||||
class IVRDriverManager
|
||||
{
|
||||
public:
|
||||
virtual uint32_t GetDriverCount() const = 0;
|
||||
|
||||
/** Returns the length of the number of bytes necessary to hold this string including the trailing null. */
|
||||
virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
|
||||
};
|
||||
|
||||
static const char * const IVRDriverManager_Version = "IVRDriverManager_001";
|
||||
|
||||
} // namespace vr
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2402,6 +2463,8 @@ namespace vr
|
||||
IServerTrackedDeviceProvider_Version,
|
||||
IVRWatchdogProvider_Version,
|
||||
IVRVirtualDisplay_Version,
|
||||
IVRDriverManager_Version,
|
||||
IVRResources_Version,
|
||||
nullptr
|
||||
};
|
||||
|
||||
@@ -2489,14 +2552,37 @@ namespace vr
|
||||
return VRDriverContext()->GetDriverHandle();
|
||||
}
|
||||
|
||||
IVRDriverManager *VRDriverManager()
|
||||
{
|
||||
if ( !m_pVRDriverManager )
|
||||
{
|
||||
EVRInitError eError;
|
||||
m_pVRDriverManager = (IVRDriverManager *)VRDriverContext()->GetGenericInterface( IVRDriverManager_Version, &eError );
|
||||
}
|
||||
return m_pVRDriverManager;
|
||||
}
|
||||
|
||||
IVRResources *VRResources()
|
||||
{
|
||||
if ( !m_pVRResources )
|
||||
{
|
||||
EVRInitError eError;
|
||||
m_pVRResources = (IVRResources *)VRDriverContext()->GetGenericInterface( IVRResources_Version, &eError );
|
||||
}
|
||||
return m_pVRResources;
|
||||
}
|
||||
|
||||
private:
|
||||
IVRSettings *m_pVRSettings;
|
||||
IVRProperties *m_pVRProperties;
|
||||
CVRPropertyHelpers m_propertyHelpers;
|
||||
CVRPropertyHelpers m_propertyHelpers;
|
||||
CVRHiddenAreaHelpers m_hiddenAreaHelpers;
|
||||
IVRServerDriverHost *m_pVRServerDriverHost;
|
||||
IVRWatchdogHost *m_pVRWatchdogHost;
|
||||
IVRDriverLog *m_pVRDriverLog;
|
||||
|
||||
IVRSettings *m_pVRSettings;
|
||||
IVRProperties *m_pVRProperties;
|
||||
IVRServerDriverHost *m_pVRServerDriverHost;
|
||||
IVRWatchdogHost *m_pVRWatchdogHost;
|
||||
IVRDriverLog *m_pVRDriverLog;
|
||||
IVRDriverManager *m_pVRDriverManager;
|
||||
IVRResources *m_pVRResources;
|
||||
};
|
||||
|
||||
inline COpenVRDriverContext &OpenVRInternal_ModuleServerDriverContext()
|
||||
@@ -2513,6 +2599,9 @@ namespace vr
|
||||
inline IVRServerDriverHost *VR_CALLTYPE VRServerDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRServerDriverHost(); }
|
||||
inline IVRWatchdogHost *VR_CALLTYPE VRWatchdogHost() { return OpenVRInternal_ModuleServerDriverContext().VRWatchdogHost(); }
|
||||
inline DriverHandle_t VR_CALLTYPE VRDriverHandle() { return OpenVRInternal_ModuleServerDriverContext().VRDriverHandle(); }
|
||||
inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleServerDriverContext().VRDriverManager(); }
|
||||
inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleServerDriverContext().VRResources(); }
|
||||
|
||||
inline void COpenVRDriverContext::Clear()
|
||||
{
|
||||
m_pVRSettings = nullptr;
|
||||
@@ -2520,6 +2609,8 @@ namespace vr
|
||||
m_pVRServerDriverHost = nullptr;
|
||||
m_pVRDriverLog = nullptr;
|
||||
m_pVRWatchdogHost = nullptr;
|
||||
m_pVRDriverManager = nullptr;
|
||||
m_pVRResources = nullptr;
|
||||
}
|
||||
|
||||
inline EVRInitError COpenVRDriverContext::InitServer()
|
||||
@@ -2528,7 +2619,9 @@ namespace vr
|
||||
if ( !VRServerDriverHost()
|
||||
|| !VRSettings()
|
||||
|| !VRProperties()
|
||||
|| !VRDriverLog() )
|
||||
|| !VRDriverLog()
|
||||
|| !VRDriverManager()
|
||||
|| !VRResources() )
|
||||
return VRInitError_Init_InterfaceNotFound;
|
||||
return VRInitError_None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user