diff --git a/vrclient_x64/Makefile.in b/vrclient_x64/Makefile.in new file mode 100644 index 00000000..690c255e --- /dev/null +++ b/vrclient_x64/Makefile.in @@ -0,0 +1,125 @@ +MODULE = vrclient_x64.dll + +EXTRADEFS = -Wno-unused-variable -Wno-attributes -DGNUC +CPPFLAGS = -std=c++0x + +C_SRCS = \ + vrclient_main.c \ + winIVRSystem.c \ + winIVRApplications.c \ + winIVRSettings.c \ + winIVRChaperone.c \ + winIVRChaperoneSetup.c \ + winIVRCompositor.c \ + winIVRNotifications.c \ + winIVROverlay.c \ + winIVRRenderModels.c \ + winIVRExtendedDisplay.c \ + winIVRTrackedCamera.c \ + winIVRScreenshots.c \ + winIVRResources.c \ + winIVRDriverManager.c \ + winIVRClientCore.c \ + +CPP_SRCS = \ + struct_converters_1011.cpp \ + cppIVRSystem_IVRSystem_017.cpp \ + cppIVRApplications_IVRApplications_006.cpp \ + cppIVRSettings_IVRSettings_002.cpp \ + cppIVRChaperone_IVRChaperone_003.cpp \ + cppIVRChaperoneSetup_IVRChaperoneSetup_005.cpp \ + cppIVRCompositor_IVRCompositor_022.cpp \ + cppIVRNotifications_IVRNotifications_002.cpp \ + cppIVROverlay_IVROverlay_017.cpp \ + cppIVRRenderModels_IVRRenderModels_005.cpp \ + cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp \ + cppIVRTrackedCamera_IVRTrackedCamera_003.cpp \ + cppIVRScreenshots_IVRScreenshots_001.cpp \ + cppIVRResources_IVRResources_001.cpp \ + cppIVRDriverManager_IVRDriverManager_001.cpp \ + cppIVRClientCore_IVRClientCore_003.cpp \ + struct_converters_1010.cpp \ + cppIVRCompositor_IVRCompositor_021.cpp \ + cppIVROverlay_IVROverlay_016.cpp \ + struct_converters_109.cpp \ + cppIVRSystem_IVRSystem_016.cpp \ + cppIVRCompositor_IVRCompositor_020.cpp \ + cppIVRClientCore_IVRClientCore_002.cpp \ + struct_converters_108.cpp \ + struct_converters_107.cpp \ + cppIVRSystem_IVRSystem_015.cpp \ + struct_converters_106.cpp \ + cppIVROverlay_IVROverlay_014.cpp \ + struct_converters_105.cpp \ + cppIVRCompositor_IVRCompositor_019.cpp \ + struct_converters_104.cpp \ + cppIVRSystem_IVRSystem_014.cpp \ + cppIVRCompositor_IVRCompositor_018.cpp \ + cppIVROverlay_IVROverlay_013.cpp \ + struct_converters_103.cpp \ + cppIVRSystem_IVRSystem_012.cpp \ + cppIVRCompositor_IVRCompositor_016.cpp \ + struct_converters_102.cpp \ + cppIVRSettings_IVRSettings_001.cpp \ + struct_converters_101.cpp \ + cppIVRApplications_IVRApplications_005.cpp \ + cppIVRCompositor_IVRCompositor_015.cpp \ + cppIVROverlay_IVROverlay_012.cpp \ + struct_converters_100.cpp \ + cppIVRTrackedCamera_IVRTrackedCamera_002.cpp \ + struct_converters_0920.cpp \ + cppIVRCompositor_IVRCompositor_014.cpp \ + cppIVROverlay_IVROverlay_011.cpp \ + struct_converters_0919.cpp \ + cppIVRCompositor_IVRCompositor_013.cpp \ + struct_converters_0918.cpp \ + cppIVRSystem_IVRSystem_011.cpp \ + cppIVRApplications_IVRApplications_004.cpp \ + cppIVROverlay_IVROverlay_010.cpp \ + cppIVRRenderModels_IVRRenderModels_004.cpp \ + struct_converters_0917.cpp \ + cppIVRCompositor_IVRCompositor_012.cpp \ + struct_converters_0916.cpp \ + cppIVRApplications_IVRApplications_003.cpp \ + cppIVRCompositor_IVRCompositor_011.cpp \ + struct_converters_0915.cpp \ + cppIVRRenderModels_IVRRenderModels_002.cpp \ + struct_converters_0914.cpp \ + cppIVRSystem_IVRSystem_010.cpp \ + cppIVRApplications_IVRApplications_002.cpp \ + cppIVRChaperoneSetup_IVRChaperoneSetup_004.cpp \ + cppIVRCompositor_IVRCompositor_010.cpp \ + cppIVROverlay_IVROverlay_008.cpp \ + cppIVRTrackedCamera_IVRTrackedCamera_001.cpp \ + struct_converters_0913.cpp \ + cppIVRCompositor_IVRCompositor_009.cpp \ + struct_converters_0912.cpp \ + cppIVRSystem_IVRSystem_009.cpp \ + cppIVROverlay_IVROverlay_007.cpp \ + struct_converters_0910.cpp \ + cppIVRSystem_IVRSystem_006.cpp \ + cppIVRApplications_IVRApplications_001.cpp \ + cppIVRChaperone_IVRChaperone_002.cpp \ + cppIVRCompositor_IVRCompositor_008.cpp \ + cppIVRNotifications_IVRNotifications_001.cpp \ + cppIVROverlay_IVROverlay_005.cpp \ + cppIVRRenderModels_IVRRenderModels_001.cpp \ + struct_converters_099.cpp \ + struct_converters_098.cpp \ + cppIVRSystem_IVRSystem_005.cpp \ + cppIVRCompositor_IVRCompositor_007.cpp \ + cppIVROverlay_IVROverlay_004.cpp \ + struct_converters_097.cpp \ + cppIVROverlay_IVROverlay_003.cpp \ + struct_converters_096.cpp \ + struct_converters_094.cpp \ + cppIVROverlay_IVROverlay_002.cpp \ + struct_converters_093.cpp \ + struct_converters_092.cpp \ + cppIVRSystem_IVRSystem_004.cpp \ + cppIVRCompositor_IVRCompositor_006.cpp \ + cppIVROverlay_IVROverlay_001.cpp \ + struct_converters_091.cpp \ + cppIVRSystem_IVRSystem_003.cpp \ + cppIVRCompositor_IVRCompositor_005.cpp \ + struct_converters_090.cpp \ diff --git a/vrclient_x64/Makefile.in.orig b/vrclient_x64/Makefile.in.orig new file mode 100644 index 00000000..a2be0657 --- /dev/null +++ b/vrclient_x64/Makefile.in.orig @@ -0,0 +1,7 @@ +MODULE = vrclient_x64.dll + +EXTRADEFS = -Wno-unused-variable -Wno-attributes -DGNUC +CPPFLAGS = -std=c++0x + +C_SRCS = \ + vrclient_main.c \ diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_001.cpp b/vrclient_x64/cppIVRApplications_IVRApplications_001.cpp new file mode 100644 index 00000000..8e58183a --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_001.cpp @@ -0,0 +1,119 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRApplications_IVRApplications_001.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_AddApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + return ((IVRApplications*)linux_side)->AddApplicationManifest((const char *)pchApplicationManifestFullPath, (bool)bTemporary); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_RemoveApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath) +{ + return ((IVRApplications*)linux_side)->RemoveApplicationManifest((const char *)pchApplicationManifestFullPath); +} + +bool cppIVRApplications_IVRApplications_001_IsApplicationInstalled(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IsApplicationInstalled((const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_001_GetApplicationCount(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetApplicationCount(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_GetApplicationKeyByIndex(void *linux_side, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByIndex((uint32_t)unApplicationIndex, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_GetApplicationKeyByProcessId(void *linux_side, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByProcessId((uint32_t)unProcessId, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_LaunchApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_LaunchDashboardOverlay(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchDashboardOverlay((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_IdentifyApplication(void *linux_side, uint32_t unProcessId, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IdentifyApplication((uint32_t)unProcessId, (const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_001_GetApplicationProcessId(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationProcessId((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_001_GetApplicationsErrorNameFromEnum(void *linux_side, EVRApplicationError error) +{ + return ((IVRApplications*)linux_side)->GetApplicationsErrorNameFromEnum((vr::EVRApplicationError)error); +} + +uint32_t cppIVRApplications_IVRApplications_001_GetApplicationPropertyString(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyString((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (char *)pchPropertyValueBuffer, (uint32_t)unPropertyValueBufferLen, (vr::EVRApplicationError *)peError); +} + +bool cppIVRApplications_IVRApplications_001_GetApplicationPropertyBool(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyBool((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_GetHomeApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetHomeApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_SetHomeApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->SetHomeApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_SetApplicationAutoLaunch(void *linux_side, const char * pchAppKey, bool bAutoLaunch) +{ + return ((IVRApplications*)linux_side)->SetApplicationAutoLaunch((const char *)pchAppKey, (bool)bAutoLaunch); +} + +bool cppIVRApplications_IVRApplications_001_GetApplicationAutoLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationAutoLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_GetStartingApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetStartingApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationTransitionState cppIVRApplications_IVRApplications_001_GetTransitionState(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetTransitionState(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_001_PerformApplicationPrelaunchCheck(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->PerformApplicationPrelaunchCheck((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_001_GetApplicationsTransitionStateNameFromEnum(void *linux_side, EVRApplicationTransitionState state) +{ + return ((IVRApplications*)linux_side)->GetApplicationsTransitionStateNameFromEnum((vr::EVRApplicationTransitionState)state); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_001.h b/vrclient_x64/cppIVRApplications_IVRApplications_001.h new file mode 100644 index 00000000..727ccf0f --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_001.h @@ -0,0 +1,27 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRApplicationError cppIVRApplications_IVRApplications_001_AddApplicationManifest(void *, const char *, bool); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_RemoveApplicationManifest(void *, const char *); +extern bool cppIVRApplications_IVRApplications_001_IsApplicationInstalled(void *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_001_GetApplicationCount(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_GetApplicationKeyByIndex(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_GetApplicationKeyByProcessId(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_LaunchApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_LaunchDashboardOverlay(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_IdentifyApplication(void *, uint32_t, const char *); +extern uint32_t cppIVRApplications_IVRApplications_001_GetApplicationProcessId(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_001_GetApplicationsErrorNameFromEnum(void *, EVRApplicationError); +extern uint32_t cppIVRApplications_IVRApplications_001_GetApplicationPropertyString(void *, const char *, EVRApplicationProperty, char *, uint32_t, EVRApplicationError *); +extern bool cppIVRApplications_IVRApplications_001_GetApplicationPropertyBool(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_GetHomeApplication(void *, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_SetHomeApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_SetApplicationAutoLaunch(void *, const char *, bool); +extern bool cppIVRApplications_IVRApplications_001_GetApplicationAutoLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_GetStartingApplication(void *, char *, uint32_t); +extern EVRApplicationTransitionState cppIVRApplications_IVRApplications_001_GetTransitionState(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_001_PerformApplicationPrelaunchCheck(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_001_GetApplicationsTransitionStateNameFromEnum(void *, EVRApplicationTransitionState); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_002.cpp b/vrclient_x64/cppIVRApplications_IVRApplications_002.cpp new file mode 100644 index 00000000..26c21cf0 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_002.cpp @@ -0,0 +1,114 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRApplications_IVRApplications_002.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_AddApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + return ((IVRApplications*)linux_side)->AddApplicationManifest((const char *)pchApplicationManifestFullPath, (bool)bTemporary); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_RemoveApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath) +{ + return ((IVRApplications*)linux_side)->RemoveApplicationManifest((const char *)pchApplicationManifestFullPath); +} + +bool cppIVRApplications_IVRApplications_002_IsApplicationInstalled(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IsApplicationInstalled((const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_002_GetApplicationCount(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetApplicationCount(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_GetApplicationKeyByIndex(void *linux_side, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByIndex((uint32_t)unApplicationIndex, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_GetApplicationKeyByProcessId(void *linux_side, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByProcessId((uint32_t)unProcessId, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_LaunchApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_LaunchDashboardOverlay(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchDashboardOverlay((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_IdentifyApplication(void *linux_side, uint32_t unProcessId, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IdentifyApplication((uint32_t)unProcessId, (const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_002_GetApplicationProcessId(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationProcessId((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_002_GetApplicationsErrorNameFromEnum(void *linux_side, EVRApplicationError error) +{ + return ((IVRApplications*)linux_side)->GetApplicationsErrorNameFromEnum((vr::EVRApplicationError)error); +} + +uint32_t cppIVRApplications_IVRApplications_002_GetApplicationPropertyString(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyString((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (char *)pchPropertyValueBuffer, (uint32_t)unPropertyValueBufferLen, (vr::EVRApplicationError *)peError); +} + +bool cppIVRApplications_IVRApplications_002_GetApplicationPropertyBool(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyBool((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_SetApplicationAutoLaunch(void *linux_side, const char * pchAppKey, bool bAutoLaunch) +{ + return ((IVRApplications*)linux_side)->SetApplicationAutoLaunch((const char *)pchAppKey, (bool)bAutoLaunch); +} + +bool cppIVRApplications_IVRApplications_002_GetApplicationAutoLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationAutoLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_GetStartingApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetStartingApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationTransitionState cppIVRApplications_IVRApplications_002_GetTransitionState(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetTransitionState(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_002_PerformApplicationPrelaunchCheck(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->PerformApplicationPrelaunchCheck((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_002_GetApplicationsTransitionStateNameFromEnum(void *linux_side, EVRApplicationTransitionState state) +{ + return ((IVRApplications*)linux_side)->GetApplicationsTransitionStateNameFromEnum((vr::EVRApplicationTransitionState)state); +} + +bool cppIVRApplications_IVRApplications_002_IsQuitUserPromptRequested(void *linux_side) +{ + return ((IVRApplications*)linux_side)->IsQuitUserPromptRequested(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_002.h b/vrclient_x64/cppIVRApplications_IVRApplications_002.h new file mode 100644 index 00000000..124fd0a7 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_002.h @@ -0,0 +1,26 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRApplicationError cppIVRApplications_IVRApplications_002_AddApplicationManifest(void *, const char *, bool); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_RemoveApplicationManifest(void *, const char *); +extern bool cppIVRApplications_IVRApplications_002_IsApplicationInstalled(void *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_002_GetApplicationCount(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_GetApplicationKeyByIndex(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_GetApplicationKeyByProcessId(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_LaunchApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_LaunchDashboardOverlay(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_IdentifyApplication(void *, uint32_t, const char *); +extern uint32_t cppIVRApplications_IVRApplications_002_GetApplicationProcessId(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_002_GetApplicationsErrorNameFromEnum(void *, EVRApplicationError); +extern uint32_t cppIVRApplications_IVRApplications_002_GetApplicationPropertyString(void *, const char *, EVRApplicationProperty, char *, uint32_t, EVRApplicationError *); +extern bool cppIVRApplications_IVRApplications_002_GetApplicationPropertyBool(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_SetApplicationAutoLaunch(void *, const char *, bool); +extern bool cppIVRApplications_IVRApplications_002_GetApplicationAutoLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_GetStartingApplication(void *, char *, uint32_t); +extern EVRApplicationTransitionState cppIVRApplications_IVRApplications_002_GetTransitionState(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_002_PerformApplicationPrelaunchCheck(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_002_GetApplicationsTransitionStateNameFromEnum(void *, EVRApplicationTransitionState); +extern bool cppIVRApplications_IVRApplications_002_IsQuitUserPromptRequested(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_003.cpp b/vrclient_x64/cppIVRApplications_IVRApplications_003.cpp new file mode 100644 index 00000000..c95f2b7f --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_003.cpp @@ -0,0 +1,119 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.16/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRApplications_IVRApplications_003.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_AddApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + return ((IVRApplications*)linux_side)->AddApplicationManifest((const char *)pchApplicationManifestFullPath, (bool)bTemporary); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_RemoveApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath) +{ + return ((IVRApplications*)linux_side)->RemoveApplicationManifest((const char *)pchApplicationManifestFullPath); +} + +bool cppIVRApplications_IVRApplications_003_IsApplicationInstalled(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IsApplicationInstalled((const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_003_GetApplicationCount(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetApplicationCount(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_GetApplicationKeyByIndex(void *linux_side, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByIndex((uint32_t)unApplicationIndex, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_GetApplicationKeyByProcessId(void *linux_side, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByProcessId((uint32_t)unProcessId, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_LaunchApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_LaunchDashboardOverlay(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchDashboardOverlay((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_IdentifyApplication(void *linux_side, uint32_t unProcessId, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IdentifyApplication((uint32_t)unProcessId, (const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_003_GetApplicationProcessId(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationProcessId((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_003_GetApplicationsErrorNameFromEnum(void *linux_side, EVRApplicationError error) +{ + return ((IVRApplications*)linux_side)->GetApplicationsErrorNameFromEnum((vr::EVRApplicationError)error); +} + +uint32_t cppIVRApplications_IVRApplications_003_GetApplicationPropertyString(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyString((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (char *)pchPropertyValueBuffer, (uint32_t)unPropertyValueBufferLen, (vr::EVRApplicationError *)peError); +} + +bool cppIVRApplications_IVRApplications_003_GetApplicationPropertyBool(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyBool((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +uint64_t cppIVRApplications_IVRApplications_003_GetApplicationPropertyUint64(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyUint64((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_SetApplicationAutoLaunch(void *linux_side, const char * pchAppKey, bool bAutoLaunch) +{ + return ((IVRApplications*)linux_side)->SetApplicationAutoLaunch((const char *)pchAppKey, (bool)bAutoLaunch); +} + +bool cppIVRApplications_IVRApplications_003_GetApplicationAutoLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationAutoLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_GetStartingApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetStartingApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationTransitionState cppIVRApplications_IVRApplications_003_GetTransitionState(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetTransitionState(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_003_PerformApplicationPrelaunchCheck(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->PerformApplicationPrelaunchCheck((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_003_GetApplicationsTransitionStateNameFromEnum(void *linux_side, EVRApplicationTransitionState state) +{ + return ((IVRApplications*)linux_side)->GetApplicationsTransitionStateNameFromEnum((vr::EVRApplicationTransitionState)state); +} + +bool cppIVRApplications_IVRApplications_003_IsQuitUserPromptRequested(void *linux_side) +{ + return ((IVRApplications*)linux_side)->IsQuitUserPromptRequested(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_003.h b/vrclient_x64/cppIVRApplications_IVRApplications_003.h new file mode 100644 index 00000000..6e9cc8c6 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_003.h @@ -0,0 +1,27 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRApplicationError cppIVRApplications_IVRApplications_003_AddApplicationManifest(void *, const char *, bool); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_RemoveApplicationManifest(void *, const char *); +extern bool cppIVRApplications_IVRApplications_003_IsApplicationInstalled(void *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_003_GetApplicationCount(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_GetApplicationKeyByIndex(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_GetApplicationKeyByProcessId(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_LaunchApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_LaunchDashboardOverlay(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_IdentifyApplication(void *, uint32_t, const char *); +extern uint32_t cppIVRApplications_IVRApplications_003_GetApplicationProcessId(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_003_GetApplicationsErrorNameFromEnum(void *, EVRApplicationError); +extern uint32_t cppIVRApplications_IVRApplications_003_GetApplicationPropertyString(void *, const char *, EVRApplicationProperty, char *, uint32_t, EVRApplicationError *); +extern bool cppIVRApplications_IVRApplications_003_GetApplicationPropertyBool(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern uint64_t cppIVRApplications_IVRApplications_003_GetApplicationPropertyUint64(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_SetApplicationAutoLaunch(void *, const char *, bool); +extern bool cppIVRApplications_IVRApplications_003_GetApplicationAutoLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_GetStartingApplication(void *, char *, uint32_t); +extern EVRApplicationTransitionState cppIVRApplications_IVRApplications_003_GetTransitionState(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_003_PerformApplicationPrelaunchCheck(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_003_GetApplicationsTransitionStateNameFromEnum(void *, EVRApplicationTransitionState); +extern bool cppIVRApplications_IVRApplications_003_IsQuitUserPromptRequested(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_004.cpp b/vrclient_x64/cppIVRApplications_IVRApplications_004.cpp new file mode 100644 index 00000000..a659d2cf --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_004.cpp @@ -0,0 +1,129 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.18/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRApplications_IVRApplications_004.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_AddApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + return ((IVRApplications*)linux_side)->AddApplicationManifest((const char *)pchApplicationManifestFullPath, (bool)bTemporary); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_RemoveApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath) +{ + return ((IVRApplications*)linux_side)->RemoveApplicationManifest((const char *)pchApplicationManifestFullPath); +} + +bool cppIVRApplications_IVRApplications_004_IsApplicationInstalled(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IsApplicationInstalled((const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_004_GetApplicationCount(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetApplicationCount(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_GetApplicationKeyByIndex(void *linux_side, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByIndex((uint32_t)unApplicationIndex, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_GetApplicationKeyByProcessId(void *linux_side, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByProcessId((uint32_t)unProcessId, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_LaunchApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_LaunchDashboardOverlay(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchDashboardOverlay((const char *)pchAppKey); +} + +bool cppIVRApplications_IVRApplications_004_CancelApplicationLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->CancelApplicationLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_IdentifyApplication(void *linux_side, uint32_t unProcessId, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IdentifyApplication((uint32_t)unProcessId, (const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_004_GetApplicationProcessId(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationProcessId((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_004_GetApplicationsErrorNameFromEnum(void *linux_side, EVRApplicationError error) +{ + return ((IVRApplications*)linux_side)->GetApplicationsErrorNameFromEnum((vr::EVRApplicationError)error); +} + +uint32_t cppIVRApplications_IVRApplications_004_GetApplicationPropertyString(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyString((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (char *)pchPropertyValueBuffer, (uint32_t)unPropertyValueBufferLen, (vr::EVRApplicationError *)peError); +} + +bool cppIVRApplications_IVRApplications_004_GetApplicationPropertyBool(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyBool((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +uint64_t cppIVRApplications_IVRApplications_004_GetApplicationPropertyUint64(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyUint64((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_SetApplicationAutoLaunch(void *linux_side, const char * pchAppKey, bool bAutoLaunch) +{ + return ((IVRApplications*)linux_side)->SetApplicationAutoLaunch((const char *)pchAppKey, (bool)bAutoLaunch); +} + +bool cppIVRApplications_IVRApplications_004_GetApplicationAutoLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationAutoLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_GetStartingApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetStartingApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationTransitionState cppIVRApplications_IVRApplications_004_GetTransitionState(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetTransitionState(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_PerformApplicationPrelaunchCheck(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->PerformApplicationPrelaunchCheck((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_004_GetApplicationsTransitionStateNameFromEnum(void *linux_side, EVRApplicationTransitionState state) +{ + return ((IVRApplications*)linux_side)->GetApplicationsTransitionStateNameFromEnum((vr::EVRApplicationTransitionState)state); +} + +bool cppIVRApplications_IVRApplications_004_IsQuitUserPromptRequested(void *linux_side) +{ + return ((IVRApplications*)linux_side)->IsQuitUserPromptRequested(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_004_LaunchInternalProcess(void *linux_side, const char * pchBinaryPath, const char * pchArguments, const char * pchWorkingDirectory) +{ + return ((IVRApplications*)linux_side)->LaunchInternalProcess((const char *)pchBinaryPath, (const char *)pchArguments, (const char *)pchWorkingDirectory); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_004.h b/vrclient_x64/cppIVRApplications_IVRApplications_004.h new file mode 100644 index 00000000..b3b3e668 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_004.h @@ -0,0 +1,29 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRApplicationError cppIVRApplications_IVRApplications_004_AddApplicationManifest(void *, const char *, bool); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_RemoveApplicationManifest(void *, const char *); +extern bool cppIVRApplications_IVRApplications_004_IsApplicationInstalled(void *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_004_GetApplicationCount(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_GetApplicationKeyByIndex(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_GetApplicationKeyByProcessId(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_LaunchApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_LaunchDashboardOverlay(void *, const char *); +extern bool cppIVRApplications_IVRApplications_004_CancelApplicationLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_IdentifyApplication(void *, uint32_t, const char *); +extern uint32_t cppIVRApplications_IVRApplications_004_GetApplicationProcessId(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_004_GetApplicationsErrorNameFromEnum(void *, EVRApplicationError); +extern uint32_t cppIVRApplications_IVRApplications_004_GetApplicationPropertyString(void *, const char *, EVRApplicationProperty, char *, uint32_t, EVRApplicationError *); +extern bool cppIVRApplications_IVRApplications_004_GetApplicationPropertyBool(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern uint64_t cppIVRApplications_IVRApplications_004_GetApplicationPropertyUint64(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_SetApplicationAutoLaunch(void *, const char *, bool); +extern bool cppIVRApplications_IVRApplications_004_GetApplicationAutoLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_GetStartingApplication(void *, char *, uint32_t); +extern EVRApplicationTransitionState cppIVRApplications_IVRApplications_004_GetTransitionState(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_PerformApplicationPrelaunchCheck(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_004_GetApplicationsTransitionStateNameFromEnum(void *, EVRApplicationTransitionState); +extern bool cppIVRApplications_IVRApplications_004_IsQuitUserPromptRequested(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_004_LaunchInternalProcess(void *, const char *, const char *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_005.cpp b/vrclient_x64/cppIVRApplications_IVRApplications_005.cpp new file mode 100644 index 00000000..28d2d288 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_005.cpp @@ -0,0 +1,134 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRApplications_IVRApplications_005.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_AddApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + return ((IVRApplications*)linux_side)->AddApplicationManifest((const char *)pchApplicationManifestFullPath, (bool)bTemporary); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_RemoveApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath) +{ + return ((IVRApplications*)linux_side)->RemoveApplicationManifest((const char *)pchApplicationManifestFullPath); +} + +bool cppIVRApplications_IVRApplications_005_IsApplicationInstalled(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IsApplicationInstalled((const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_005_GetApplicationCount(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetApplicationCount(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_GetApplicationKeyByIndex(void *linux_side, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByIndex((uint32_t)unApplicationIndex, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_GetApplicationKeyByProcessId(void *linux_side, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByProcessId((uint32_t)unProcessId, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchTemplateApplication(void *linux_side, const char * pchTemplateAppKey, const char * pchNewAppKey, AppOverrideKeys_t * pKeys, uint32_t unKeys) +{ + return ((IVRApplications*)linux_side)->LaunchTemplateApplication((const char *)pchTemplateAppKey, (const char *)pchNewAppKey, (const vr::AppOverrideKeys_t *)pKeys, (uint32_t)unKeys); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchDashboardOverlay(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchDashboardOverlay((const char *)pchAppKey); +} + +bool cppIVRApplications_IVRApplications_005_CancelApplicationLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->CancelApplicationLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_IdentifyApplication(void *linux_side, uint32_t unProcessId, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IdentifyApplication((uint32_t)unProcessId, (const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_005_GetApplicationProcessId(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationProcessId((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_005_GetApplicationsErrorNameFromEnum(void *linux_side, EVRApplicationError error) +{ + return ((IVRApplications*)linux_side)->GetApplicationsErrorNameFromEnum((vr::EVRApplicationError)error); +} + +uint32_t cppIVRApplications_IVRApplications_005_GetApplicationPropertyString(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyString((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (char *)pchPropertyValueBuffer, (uint32_t)unPropertyValueBufferLen, (vr::EVRApplicationError *)peError); +} + +bool cppIVRApplications_IVRApplications_005_GetApplicationPropertyBool(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyBool((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +uint64_t cppIVRApplications_IVRApplications_005_GetApplicationPropertyUint64(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyUint64((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_SetApplicationAutoLaunch(void *linux_side, const char * pchAppKey, bool bAutoLaunch) +{ + return ((IVRApplications*)linux_side)->SetApplicationAutoLaunch((const char *)pchAppKey, (bool)bAutoLaunch); +} + +bool cppIVRApplications_IVRApplications_005_GetApplicationAutoLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationAutoLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_GetStartingApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetStartingApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationTransitionState cppIVRApplications_IVRApplications_005_GetTransitionState(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetTransitionState(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_PerformApplicationPrelaunchCheck(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->PerformApplicationPrelaunchCheck((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_005_GetApplicationsTransitionStateNameFromEnum(void *linux_side, EVRApplicationTransitionState state) +{ + return ((IVRApplications*)linux_side)->GetApplicationsTransitionStateNameFromEnum((vr::EVRApplicationTransitionState)state); +} + +bool cppIVRApplications_IVRApplications_005_IsQuitUserPromptRequested(void *linux_side) +{ + return ((IVRApplications*)linux_side)->IsQuitUserPromptRequested(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchInternalProcess(void *linux_side, const char * pchBinaryPath, const char * pchArguments, const char * pchWorkingDirectory) +{ + return ((IVRApplications*)linux_side)->LaunchInternalProcess((const char *)pchBinaryPath, (const char *)pchArguments, (const char *)pchWorkingDirectory); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_005.h b/vrclient_x64/cppIVRApplications_IVRApplications_005.h new file mode 100644 index 00000000..a1985efa --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_005.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRApplicationError cppIVRApplications_IVRApplications_005_AddApplicationManifest(void *, const char *, bool); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_RemoveApplicationManifest(void *, const char *); +extern bool cppIVRApplications_IVRApplications_005_IsApplicationInstalled(void *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_005_GetApplicationCount(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_GetApplicationKeyByIndex(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_GetApplicationKeyByProcessId(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchTemplateApplication(void *, const char *, const char *, AppOverrideKeys_t *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchDashboardOverlay(void *, const char *); +extern bool cppIVRApplications_IVRApplications_005_CancelApplicationLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_IdentifyApplication(void *, uint32_t, const char *); +extern uint32_t cppIVRApplications_IVRApplications_005_GetApplicationProcessId(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_005_GetApplicationsErrorNameFromEnum(void *, EVRApplicationError); +extern uint32_t cppIVRApplications_IVRApplications_005_GetApplicationPropertyString(void *, const char *, EVRApplicationProperty, char *, uint32_t, EVRApplicationError *); +extern bool cppIVRApplications_IVRApplications_005_GetApplicationPropertyBool(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern uint64_t cppIVRApplications_IVRApplications_005_GetApplicationPropertyUint64(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_SetApplicationAutoLaunch(void *, const char *, bool); +extern bool cppIVRApplications_IVRApplications_005_GetApplicationAutoLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_GetStartingApplication(void *, char *, uint32_t); +extern EVRApplicationTransitionState cppIVRApplications_IVRApplications_005_GetTransitionState(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_PerformApplicationPrelaunchCheck(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_005_GetApplicationsTransitionStateNameFromEnum(void *, EVRApplicationTransitionState); +extern bool cppIVRApplications_IVRApplications_005_IsQuitUserPromptRequested(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_005_LaunchInternalProcess(void *, const char *, const char *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_006.cpp b/vrclient_x64/cppIVRApplications_IVRApplications_006.cpp new file mode 100644 index 00000000..c49fda93 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_006.cpp @@ -0,0 +1,169 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRApplications_IVRApplications_006.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_AddApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + return ((IVRApplications*)linux_side)->AddApplicationManifest((const char *)pchApplicationManifestFullPath, (bool)bTemporary); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_RemoveApplicationManifest(void *linux_side, const char * pchApplicationManifestFullPath) +{ + return ((IVRApplications*)linux_side)->RemoveApplicationManifest((const char *)pchApplicationManifestFullPath); +} + +bool cppIVRApplications_IVRApplications_006_IsApplicationInstalled(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IsApplicationInstalled((const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_006_GetApplicationCount(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetApplicationCount(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_GetApplicationKeyByIndex(void *linux_side, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByIndex((uint32_t)unApplicationIndex, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_GetApplicationKeyByProcessId(void *linux_side, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetApplicationKeyByProcessId((uint32_t)unProcessId, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchApplication(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchApplication((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchTemplateApplication(void *linux_side, const char * pchTemplateAppKey, const char * pchNewAppKey, AppOverrideKeys_t * pKeys, uint32_t unKeys) +{ + return ((IVRApplications*)linux_side)->LaunchTemplateApplication((const char *)pchTemplateAppKey, (const char *)pchNewAppKey, (const vr::AppOverrideKeys_t *)pKeys, (uint32_t)unKeys); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchApplicationFromMimeType(void *linux_side, const char * pchMimeType, const char * pchArgs) +{ + return ((IVRApplications*)linux_side)->LaunchApplicationFromMimeType((const char *)pchMimeType, (const char *)pchArgs); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchDashboardOverlay(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->LaunchDashboardOverlay((const char *)pchAppKey); +} + +bool cppIVRApplications_IVRApplications_006_CancelApplicationLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->CancelApplicationLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_IdentifyApplication(void *linux_side, uint32_t unProcessId, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->IdentifyApplication((uint32_t)unProcessId, (const char *)pchAppKey); +} + +uint32_t cppIVRApplications_IVRApplications_006_GetApplicationProcessId(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationProcessId((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_006_GetApplicationsErrorNameFromEnum(void *linux_side, EVRApplicationError error) +{ + return ((IVRApplications*)linux_side)->GetApplicationsErrorNameFromEnum((vr::EVRApplicationError)error); +} + +uint32_t cppIVRApplications_IVRApplications_006_GetApplicationPropertyString(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyString((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (char *)pchPropertyValueBuffer, (uint32_t)unPropertyValueBufferLen, (vr::EVRApplicationError *)peError); +} + +bool cppIVRApplications_IVRApplications_006_GetApplicationPropertyBool(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyBool((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +uint64_t cppIVRApplications_IVRApplications_006_GetApplicationPropertyUint64(void *linux_side, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + return ((IVRApplications*)linux_side)->GetApplicationPropertyUint64((const char *)pchAppKey, (vr::EVRApplicationProperty)eProperty, (vr::EVRApplicationError *)peError); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_SetApplicationAutoLaunch(void *linux_side, const char * pchAppKey, bool bAutoLaunch) +{ + return ((IVRApplications*)linux_side)->SetApplicationAutoLaunch((const char *)pchAppKey, (bool)bAutoLaunch); +} + +bool cppIVRApplications_IVRApplications_006_GetApplicationAutoLaunch(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->GetApplicationAutoLaunch((const char *)pchAppKey); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_SetDefaultApplicationForMimeType(void *linux_side, const char * pchAppKey, const char * pchMimeType) +{ + return ((IVRApplications*)linux_side)->SetDefaultApplicationForMimeType((const char *)pchAppKey, (const char *)pchMimeType); +} + +bool cppIVRApplications_IVRApplications_006_GetDefaultApplicationForMimeType(void *linux_side, const char * pchMimeType, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetDefaultApplicationForMimeType((const char *)pchMimeType, (char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +bool cppIVRApplications_IVRApplications_006_GetApplicationSupportedMimeTypes(void *linux_side, const char * pchAppKey, char * pchMimeTypesBuffer, uint32_t unMimeTypesBuffer) +{ + return ((IVRApplications*)linux_side)->GetApplicationSupportedMimeTypes((const char *)pchAppKey, (char *)pchMimeTypesBuffer, (uint32_t)unMimeTypesBuffer); +} + +uint32_t cppIVRApplications_IVRApplications_006_GetApplicationsThatSupportMimeType(void *linux_side, const char * pchMimeType, char * pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer) +{ + return ((IVRApplications*)linux_side)->GetApplicationsThatSupportMimeType((const char *)pchMimeType, (char *)pchAppKeysThatSupportBuffer, (uint32_t)unAppKeysThatSupportBuffer); +} + +uint32_t cppIVRApplications_IVRApplications_006_GetApplicationLaunchArguments(void *linux_side, uint32_t unHandle, char * pchArgs, uint32_t unArgs) +{ + return ((IVRApplications*)linux_side)->GetApplicationLaunchArguments((uint32_t)unHandle, (char *)pchArgs, (uint32_t)unArgs); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_GetStartingApplication(void *linux_side, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + return ((IVRApplications*)linux_side)->GetStartingApplication((char *)pchAppKeyBuffer, (uint32_t)unAppKeyBufferLen); +} + +vr::EVRApplicationTransitionState cppIVRApplications_IVRApplications_006_GetTransitionState(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetTransitionState(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_PerformApplicationPrelaunchCheck(void *linux_side, const char * pchAppKey) +{ + return ((IVRApplications*)linux_side)->PerformApplicationPrelaunchCheck((const char *)pchAppKey); +} + +const char * cppIVRApplications_IVRApplications_006_GetApplicationsTransitionStateNameFromEnum(void *linux_side, EVRApplicationTransitionState state) +{ + return ((IVRApplications*)linux_side)->GetApplicationsTransitionStateNameFromEnum((vr::EVRApplicationTransitionState)state); +} + +bool cppIVRApplications_IVRApplications_006_IsQuitUserPromptRequested(void *linux_side) +{ + return ((IVRApplications*)linux_side)->IsQuitUserPromptRequested(); +} + +vr::EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchInternalProcess(void *linux_side, const char * pchBinaryPath, const char * pchArguments, const char * pchWorkingDirectory) +{ + return ((IVRApplications*)linux_side)->LaunchInternalProcess((const char *)pchBinaryPath, (const char *)pchArguments, (const char *)pchWorkingDirectory); +} + +uint32_t cppIVRApplications_IVRApplications_006_GetCurrentSceneProcessId(void *linux_side) +{ + return ((IVRApplications*)linux_side)->GetCurrentSceneProcessId(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRApplications_IVRApplications_006.h b/vrclient_x64/cppIVRApplications_IVRApplications_006.h new file mode 100644 index 00000000..a9be49e2 --- /dev/null +++ b/vrclient_x64/cppIVRApplications_IVRApplications_006.h @@ -0,0 +1,37 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRApplicationError cppIVRApplications_IVRApplications_006_AddApplicationManifest(void *, const char *, bool); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_RemoveApplicationManifest(void *, const char *); +extern bool cppIVRApplications_IVRApplications_006_IsApplicationInstalled(void *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_006_GetApplicationCount(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_GetApplicationKeyByIndex(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_GetApplicationKeyByProcessId(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchApplication(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchTemplateApplication(void *, const char *, const char *, AppOverrideKeys_t *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchApplicationFromMimeType(void *, const char *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchDashboardOverlay(void *, const char *); +extern bool cppIVRApplications_IVRApplications_006_CancelApplicationLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_IdentifyApplication(void *, uint32_t, const char *); +extern uint32_t cppIVRApplications_IVRApplications_006_GetApplicationProcessId(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_006_GetApplicationsErrorNameFromEnum(void *, EVRApplicationError); +extern uint32_t cppIVRApplications_IVRApplications_006_GetApplicationPropertyString(void *, const char *, EVRApplicationProperty, char *, uint32_t, EVRApplicationError *); +extern bool cppIVRApplications_IVRApplications_006_GetApplicationPropertyBool(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern uint64_t cppIVRApplications_IVRApplications_006_GetApplicationPropertyUint64(void *, const char *, EVRApplicationProperty, EVRApplicationError *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_SetApplicationAutoLaunch(void *, const char *, bool); +extern bool cppIVRApplications_IVRApplications_006_GetApplicationAutoLaunch(void *, const char *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_SetDefaultApplicationForMimeType(void *, const char *, const char *); +extern bool cppIVRApplications_IVRApplications_006_GetDefaultApplicationForMimeType(void *, const char *, char *, uint32_t); +extern bool cppIVRApplications_IVRApplications_006_GetApplicationSupportedMimeTypes(void *, const char *, char *, uint32_t); +extern uint32_t cppIVRApplications_IVRApplications_006_GetApplicationsThatSupportMimeType(void *, const char *, char *, uint32_t); +extern uint32_t cppIVRApplications_IVRApplications_006_GetApplicationLaunchArguments(void *, uint32_t, char *, uint32_t); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_GetStartingApplication(void *, char *, uint32_t); +extern EVRApplicationTransitionState cppIVRApplications_IVRApplications_006_GetTransitionState(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_PerformApplicationPrelaunchCheck(void *, const char *); +extern const char * cppIVRApplications_IVRApplications_006_GetApplicationsTransitionStateNameFromEnum(void *, EVRApplicationTransitionState); +extern bool cppIVRApplications_IVRApplications_006_IsQuitUserPromptRequested(void *); +extern EVRApplicationError cppIVRApplications_IVRApplications_006_LaunchInternalProcess(void *, const char *, const char *, const char *); +extern uint32_t cppIVRApplications_IVRApplications_006_GetCurrentSceneProcessId(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.cpp b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.cpp new file mode 100644 index 00000000..7cee76b0 --- /dev/null +++ b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.cpp @@ -0,0 +1,94 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRChaperoneSetup_IVRChaperoneSetup_004.h" +#ifdef __cplusplus +extern "C" { +#endif +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_CommitWorkingCopy(void *linux_side, EChaperoneConfigFile configFile) +{ + return ((IVRChaperoneSetup*)linux_side)->CommitWorkingCopy((vr::EChaperoneConfigFile)configFile); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_RevertWorkingCopy(void *linux_side) +{ + ((IVRChaperoneSetup*)linux_side)->RevertWorkingCopy(); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaSize(void *linux_side, float * pSizeX, float * pSizeZ) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingPlayAreaSize((float *)pSizeX, (float *)pSizeZ); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaRect(void *linux_side, HmdQuad_t * rect) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingPlayAreaRect((vr::HmdQuad_t *)rect); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingCollisionBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingCollisionBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t *)punQuadsCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveCollisionBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLiveCollisionBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t *)punQuadsCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingSeatedZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingSeatedZeroPoseToRawTrackingPose((vr::HmdMatrix34_t *)pmatSeatedZeroPoseToRawTrackingPose); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingStandingZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingStandingZeroPoseToRawTrackingPose((vr::HmdMatrix34_t *)pmatStandingZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingPlayAreaSize(void *linux_side, float sizeX, float sizeZ) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingPlayAreaSize((float)sizeX, (float)sizeZ); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingCollisionBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingCollisionBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t)unQuadsCount); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingSeatedZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingSeatedZeroPoseToRawTrackingPose((const vr::HmdMatrix34_t *)pMatSeatedZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingStandingZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingStandingZeroPoseToRawTrackingPose((const vr::HmdMatrix34_t *)pMatStandingZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_ReloadFromDisk(void *linux_side, EChaperoneConfigFile configFile) +{ + ((IVRChaperoneSetup*)linux_side)->ReloadFromDisk((vr::EChaperoneConfigFile)configFile); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveSeatedZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLiveSeatedZeroPoseToRawTrackingPose((vr::HmdMatrix34_t *)pmatSeatedZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingWallTagInfo(void *linux_side, uint8_t * pTagsBuffer, uint32_t unTagCount) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingWallTagInfo((uint8_t *)pTagsBuffer, (uint32_t)unTagCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveWallTagInfo(void *linux_side, uint8_t * pTagsBuffer, uint32_t * punTagCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLiveWallTagInfo((uint8_t *)pTagsBuffer, (uint32_t *)punTagCount); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.h b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.h new file mode 100644 index 00000000..63398e75 --- /dev/null +++ b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.h @@ -0,0 +1,22 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_CommitWorkingCopy(void *, EChaperoneConfigFile); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_RevertWorkingCopy(void *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaSize(void *, float *, float *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaRect(void *, HmdQuad_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingCollisionBoundsInfo(void *, HmdQuad_t *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveCollisionBoundsInfo(void *, HmdQuad_t *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingSeatedZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingStandingZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingPlayAreaSize(void *, float, float); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingCollisionBoundsInfo(void *, HmdQuad_t *, uint32_t); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingSeatedZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingStandingZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_ReloadFromDisk(void *, EChaperoneConfigFile); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveSeatedZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingWallTagInfo(void *, uint8_t *, uint32_t); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveWallTagInfo(void *, uint8_t *, uint32_t *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.cpp b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.cpp new file mode 100644 index 00000000..b70d17dd --- /dev/null +++ b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.cpp @@ -0,0 +1,114 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRChaperoneSetup_IVRChaperoneSetup_005.h" +#ifdef __cplusplus +extern "C" { +#endif +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_CommitWorkingCopy(void *linux_side, EChaperoneConfigFile configFile) +{ + return ((IVRChaperoneSetup*)linux_side)->CommitWorkingCopy((vr::EChaperoneConfigFile)configFile); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_RevertWorkingCopy(void *linux_side) +{ + ((IVRChaperoneSetup*)linux_side)->RevertWorkingCopy(); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaSize(void *linux_side, float * pSizeX, float * pSizeZ) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingPlayAreaSize((float *)pSizeX, (float *)pSizeZ); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaRect(void *linux_side, HmdQuad_t * rect) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingPlayAreaRect((vr::HmdQuad_t *)rect); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingCollisionBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingCollisionBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t *)punQuadsCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLiveCollisionBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t *)punQuadsCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingSeatedZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingSeatedZeroPoseToRawTrackingPose((vr::HmdMatrix34_t *)pmatSeatedZeroPoseToRawTrackingPose); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingStandingZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose) +{ + return ((IVRChaperoneSetup*)linux_side)->GetWorkingStandingZeroPoseToRawTrackingPose((vr::HmdMatrix34_t *)pmatStandingZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPlayAreaSize(void *linux_side, float sizeX, float sizeZ) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingPlayAreaSize((float)sizeX, (float)sizeZ); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingCollisionBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t)unQuadsCount); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingSeatedZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingSeatedZeroPoseToRawTrackingPose((const vr::HmdMatrix34_t *)pMatSeatedZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingStandingZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingStandingZeroPoseToRawTrackingPose((const vr::HmdMatrix34_t *)pMatStandingZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_ReloadFromDisk(void *linux_side, EChaperoneConfigFile configFile) +{ + ((IVRChaperoneSetup*)linux_side)->ReloadFromDisk((vr::EChaperoneConfigFile)configFile); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveSeatedZeroPoseToRawTrackingPose(void *linux_side, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLiveSeatedZeroPoseToRawTrackingPose((vr::HmdMatrix34_t *)pmatSeatedZeroPoseToRawTrackingPose); +} + +void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsTagsInfo(void *linux_side, uint8_t * pTagsBuffer, uint32_t unTagCount) +{ + ((IVRChaperoneSetup*)linux_side)->SetWorkingCollisionBoundsTagsInfo((uint8_t *)pTagsBuffer, (uint32_t)unTagCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsTagsInfo(void *linux_side, uint8_t * pTagsBuffer, uint32_t * punTagCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLiveCollisionBoundsTagsInfo((uint8_t *)pTagsBuffer, (uint32_t *)punTagCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPhysicalBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount) +{ + return ((IVRChaperoneSetup*)linux_side)->SetWorkingPhysicalBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t)unQuadsCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLivePhysicalBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + return ((IVRChaperoneSetup*)linux_side)->GetLivePhysicalBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t *)punQuadsCount); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_ExportLiveToBuffer(void *linux_side, char * pBuffer, uint32_t * pnBufferLength) +{ + return ((IVRChaperoneSetup*)linux_side)->ExportLiveToBuffer((char *)pBuffer, (uint32_t *)pnBufferLength); +} + +bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_ImportFromBufferToWorking(void *linux_side, const char * pBuffer, uint32_t nImportFlags) +{ + return ((IVRChaperoneSetup*)linux_side)->ImportFromBufferToWorking((const char *)pBuffer, (uint32_t)nImportFlags); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.h b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.h new file mode 100644 index 00000000..fe1b3bc3 --- /dev/null +++ b/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.h @@ -0,0 +1,26 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_CommitWorkingCopy(void *, EChaperoneConfigFile); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_RevertWorkingCopy(void *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaSize(void *, float *, float *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaRect(void *, HmdQuad_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingCollisionBoundsInfo(void *, HmdQuad_t *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsInfo(void *, HmdQuad_t *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingSeatedZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingStandingZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPlayAreaSize(void *, float, float); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsInfo(void *, HmdQuad_t *, uint32_t); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingSeatedZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingStandingZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_ReloadFromDisk(void *, EChaperoneConfigFile); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveSeatedZeroPoseToRawTrackingPose(void *, HmdMatrix34_t *); +extern void cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsTagsInfo(void *, uint8_t *, uint32_t); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsTagsInfo(void *, uint8_t *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPhysicalBoundsInfo(void *, HmdQuad_t *, uint32_t); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLivePhysicalBoundsInfo(void *, HmdQuad_t *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_ExportLiveToBuffer(void *, char *, uint32_t *); +extern bool cppIVRChaperoneSetup_IVRChaperoneSetup_005_ImportFromBufferToWorking(void *, const char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperone_IVRChaperone_002.cpp b/vrclient_x64/cppIVRChaperone_IVRChaperone_002.cpp new file mode 100644 index 00000000..6a97926d --- /dev/null +++ b/vrclient_x64/cppIVRChaperone_IVRChaperone_002.cpp @@ -0,0 +1,59 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRChaperone_IVRChaperone_002.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::ChaperoneCalibrationState cppIVRChaperone_IVRChaperone_002_GetCalibrationState(void *linux_side) +{ + return ((IVRChaperone*)linux_side)->GetCalibrationState(); +} + +bool cppIVRChaperone_IVRChaperone_002_GetSoftBoundsInfo(void *linux_side, ChaperoneSoftBoundsInfo_t * pInfo) +{ + return ((IVRChaperone*)linux_side)->GetSoftBoundsInfo((vr::ChaperoneSoftBoundsInfo_t *)pInfo); +} + +bool cppIVRChaperone_IVRChaperone_002_GetHardBoundsInfo(void *linux_side, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + return ((IVRChaperone*)linux_side)->GetHardBoundsInfo((vr::HmdQuad_t *)pQuadsBuffer, (uint32_t *)punQuadsCount); +} + +bool cppIVRChaperone_IVRChaperone_002_GetSeatedBoundsInfo(void *linux_side, ChaperoneSeatedBoundsInfo_t * pInfo) +{ + return ((IVRChaperone*)linux_side)->GetSeatedBoundsInfo((vr::ChaperoneSeatedBoundsInfo_t *)pInfo); +} + +void cppIVRChaperone_IVRChaperone_002_ReloadInfo(void *linux_side) +{ + ((IVRChaperone*)linux_side)->ReloadInfo(); +} + +void cppIVRChaperone_IVRChaperone_002_SetSceneColor(void *linux_side, HmdColor_t color) +{ + ((IVRChaperone*)linux_side)->SetSceneColor((vr::HmdColor_t)color); +} + +void cppIVRChaperone_IVRChaperone_002_GetBoundsColor(void *linux_side, HmdColor_t * pOutputColorArray, int nNumOutputColors) +{ + ((IVRChaperone*)linux_side)->GetBoundsColor((vr::HmdColor_t *)pOutputColorArray, (int)nNumOutputColors); +} + +bool cppIVRChaperone_IVRChaperone_002_AreBoundsVisible(void *linux_side) +{ + return ((IVRChaperone*)linux_side)->AreBoundsVisible(); +} + +void cppIVRChaperone_IVRChaperone_002_ForceBoundsVisible(void *linux_side, bool bForce) +{ + ((IVRChaperone*)linux_side)->ForceBoundsVisible((bool)bForce); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperone_IVRChaperone_002.h b/vrclient_x64/cppIVRChaperone_IVRChaperone_002.h new file mode 100644 index 00000000..29762a07 --- /dev/null +++ b/vrclient_x64/cppIVRChaperone_IVRChaperone_002.h @@ -0,0 +1,15 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern ChaperoneCalibrationState cppIVRChaperone_IVRChaperone_002_GetCalibrationState(void *); +extern bool cppIVRChaperone_IVRChaperone_002_GetSoftBoundsInfo(void *, ChaperoneSoftBoundsInfo_t *); +extern bool cppIVRChaperone_IVRChaperone_002_GetHardBoundsInfo(void *, HmdQuad_t *, uint32_t *); +extern bool cppIVRChaperone_IVRChaperone_002_GetSeatedBoundsInfo(void *, ChaperoneSeatedBoundsInfo_t *); +extern void cppIVRChaperone_IVRChaperone_002_ReloadInfo(void *); +extern void cppIVRChaperone_IVRChaperone_002_SetSceneColor(void *, HmdColor_t); +extern void cppIVRChaperone_IVRChaperone_002_GetBoundsColor(void *, HmdColor_t *, int); +extern bool cppIVRChaperone_IVRChaperone_002_AreBoundsVisible(void *); +extern void cppIVRChaperone_IVRChaperone_002_ForceBoundsVisible(void *, bool); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp b/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp new file mode 100644 index 00000000..bcb48e40 --- /dev/null +++ b/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp @@ -0,0 +1,54 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRChaperone_IVRChaperone_003.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::ChaperoneCalibrationState cppIVRChaperone_IVRChaperone_003_GetCalibrationState(void *linux_side) +{ + return ((IVRChaperone*)linux_side)->GetCalibrationState(); +} + +bool cppIVRChaperone_IVRChaperone_003_GetPlayAreaSize(void *linux_side, float * pSizeX, float * pSizeZ) +{ + return ((IVRChaperone*)linux_side)->GetPlayAreaSize((float *)pSizeX, (float *)pSizeZ); +} + +bool cppIVRChaperone_IVRChaperone_003_GetPlayAreaRect(void *linux_side, HmdQuad_t * rect) +{ + return ((IVRChaperone*)linux_side)->GetPlayAreaRect((vr::HmdQuad_t *)rect); +} + +void cppIVRChaperone_IVRChaperone_003_ReloadInfo(void *linux_side) +{ + ((IVRChaperone*)linux_side)->ReloadInfo(); +} + +void cppIVRChaperone_IVRChaperone_003_SetSceneColor(void *linux_side, HmdColor_t color) +{ + ((IVRChaperone*)linux_side)->SetSceneColor((vr::HmdColor_t)color); +} + +void cppIVRChaperone_IVRChaperone_003_GetBoundsColor(void *linux_side, HmdColor_t * pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t * pOutputCameraColor) +{ + ((IVRChaperone*)linux_side)->GetBoundsColor((vr::HmdColor_t *)pOutputColorArray, (int)nNumOutputColors, (float)flCollisionBoundsFadeDistance, (vr::HmdColor_t *)pOutputCameraColor); +} + +bool cppIVRChaperone_IVRChaperone_003_AreBoundsVisible(void *linux_side) +{ + return ((IVRChaperone*)linux_side)->AreBoundsVisible(); +} + +void cppIVRChaperone_IVRChaperone_003_ForceBoundsVisible(void *linux_side, bool bForce) +{ + ((IVRChaperone*)linux_side)->ForceBoundsVisible((bool)bForce); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRChaperone_IVRChaperone_003.h b/vrclient_x64/cppIVRChaperone_IVRChaperone_003.h new file mode 100644 index 00000000..3d21d118 --- /dev/null +++ b/vrclient_x64/cppIVRChaperone_IVRChaperone_003.h @@ -0,0 +1,14 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern ChaperoneCalibrationState cppIVRChaperone_IVRChaperone_003_GetCalibrationState(void *); +extern bool cppIVRChaperone_IVRChaperone_003_GetPlayAreaSize(void *, float *, float *); +extern bool cppIVRChaperone_IVRChaperone_003_GetPlayAreaRect(void *, HmdQuad_t *); +extern void cppIVRChaperone_IVRChaperone_003_ReloadInfo(void *); +extern void cppIVRChaperone_IVRChaperone_003_SetSceneColor(void *, HmdColor_t); +extern void cppIVRChaperone_IVRChaperone_003_GetBoundsColor(void *, HmdColor_t *, int, float, HmdColor_t *); +extern bool cppIVRChaperone_IVRChaperone_003_AreBoundsVisible(void *); +extern void cppIVRChaperone_IVRChaperone_003_ForceBoundsVisible(void *, bool); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRClientCore_IVRClientCore_002.cpp b/vrclient_x64/cppIVRClientCore_IVRClientCore_002.cpp new file mode 100644 index 00000000..9c8e5f0f --- /dev/null +++ b/vrclient_x64/cppIVRClientCore_IVRClientCore_002.cpp @@ -0,0 +1,49 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.9/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRClientCore_IVRClientCore_002.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRInitError cppIVRClientCore_IVRClientCore_002_Init(void *linux_side, EVRApplicationType eApplicationType) +{ + return ((IVRClientCore*)linux_side)->Init((vr::EVRApplicationType)eApplicationType); +} + +void cppIVRClientCore_IVRClientCore_002_Cleanup(void *linux_side) +{ + ((IVRClientCore*)linux_side)->Cleanup(); +} + +vr::EVRInitError cppIVRClientCore_IVRClientCore_002_IsInterfaceVersionValid(void *linux_side, const char * pchInterfaceVersion) +{ + return ((IVRClientCore*)linux_side)->IsInterfaceVersionValid((const char *)pchInterfaceVersion); +} + +void * cppIVRClientCore_IVRClientCore_002_GetGenericInterface(void *linux_side, const char * pchNameAndVersion, EVRInitError * peError) +{ + return ((IVRClientCore*)linux_side)->GetGenericInterface((const char *)pchNameAndVersion, (vr::EVRInitError *)peError); +} + +bool cppIVRClientCore_IVRClientCore_002_BIsHmdPresent(void *linux_side) +{ + return ((IVRClientCore*)linux_side)->BIsHmdPresent(); +} + +const char * cppIVRClientCore_IVRClientCore_002_GetEnglishStringForHmdError(void *linux_side, EVRInitError eError) +{ + return ((IVRClientCore*)linux_side)->GetEnglishStringForHmdError((vr::EVRInitError)eError); +} + +const char * cppIVRClientCore_IVRClientCore_002_GetIDForVRInitError(void *linux_side, EVRInitError eError) +{ + return ((IVRClientCore*)linux_side)->GetIDForVRInitError((vr::EVRInitError)eError); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRClientCore_IVRClientCore_002.h b/vrclient_x64/cppIVRClientCore_IVRClientCore_002.h new file mode 100644 index 00000000..5ff562ab --- /dev/null +++ b/vrclient_x64/cppIVRClientCore_IVRClientCore_002.h @@ -0,0 +1,13 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRInitError cppIVRClientCore_IVRClientCore_002_Init(void *, EVRApplicationType); +extern void cppIVRClientCore_IVRClientCore_002_Cleanup(void *); +extern EVRInitError cppIVRClientCore_IVRClientCore_002_IsInterfaceVersionValid(void *, const char *); +extern void * cppIVRClientCore_IVRClientCore_002_GetGenericInterface(void *, const char *, EVRInitError *); +extern bool cppIVRClientCore_IVRClientCore_002_BIsHmdPresent(void *); +extern const char * cppIVRClientCore_IVRClientCore_002_GetEnglishStringForHmdError(void *, EVRInitError); +extern const char * cppIVRClientCore_IVRClientCore_002_GetIDForVRInitError(void *, EVRInitError); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp b/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp new file mode 100644 index 00000000..40b40bb7 --- /dev/null +++ b/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp @@ -0,0 +1,49 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRClientCore_IVRClientCore_003.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRInitError cppIVRClientCore_IVRClientCore_003_Init(void *linux_side, EVRApplicationType eApplicationType, const char * pStartupInfo) +{ + return ((IVRClientCore*)linux_side)->Init((vr::EVRApplicationType)eApplicationType, (const char *)pStartupInfo); +} + +void cppIVRClientCore_IVRClientCore_003_Cleanup(void *linux_side) +{ + ((IVRClientCore*)linux_side)->Cleanup(); +} + +vr::EVRInitError cppIVRClientCore_IVRClientCore_003_IsInterfaceVersionValid(void *linux_side, const char * pchInterfaceVersion) +{ + return ((IVRClientCore*)linux_side)->IsInterfaceVersionValid((const char *)pchInterfaceVersion); +} + +void * cppIVRClientCore_IVRClientCore_003_GetGenericInterface(void *linux_side, const char * pchNameAndVersion, EVRInitError * peError) +{ + return ((IVRClientCore*)linux_side)->GetGenericInterface((const char *)pchNameAndVersion, (vr::EVRInitError *)peError); +} + +bool cppIVRClientCore_IVRClientCore_003_BIsHmdPresent(void *linux_side) +{ + return ((IVRClientCore*)linux_side)->BIsHmdPresent(); +} + +const char * cppIVRClientCore_IVRClientCore_003_GetEnglishStringForHmdError(void *linux_side, EVRInitError eError) +{ + return ((IVRClientCore*)linux_side)->GetEnglishStringForHmdError((vr::EVRInitError)eError); +} + +const char * cppIVRClientCore_IVRClientCore_003_GetIDForVRInitError(void *linux_side, EVRInitError eError) +{ + return ((IVRClientCore*)linux_side)->GetIDForVRInitError((vr::EVRInitError)eError); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRClientCore_IVRClientCore_003.h b/vrclient_x64/cppIVRClientCore_IVRClientCore_003.h new file mode 100644 index 00000000..c15add3c --- /dev/null +++ b/vrclient_x64/cppIVRClientCore_IVRClientCore_003.h @@ -0,0 +1,13 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRInitError cppIVRClientCore_IVRClientCore_003_Init(void *, EVRApplicationType, const char *); +extern void cppIVRClientCore_IVRClientCore_003_Cleanup(void *); +extern EVRInitError cppIVRClientCore_IVRClientCore_003_IsInterfaceVersionValid(void *, const char *); +extern void * cppIVRClientCore_IVRClientCore_003_GetGenericInterface(void *, const char *, EVRInitError *); +extern bool cppIVRClientCore_IVRClientCore_003_BIsHmdPresent(void *); +extern const char * cppIVRClientCore_IVRClientCore_003_GetEnglishStringForHmdError(void *, EVRInitError); +extern const char * cppIVRClientCore_IVRClientCore_003_GetIDForVRInitError(void *, EVRInitError); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_005.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_005.cpp new file mode 100644 index 00000000..c0aa4965 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_005.cpp @@ -0,0 +1,134 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_005.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRCompositor_IVRCompositor_005_GetLastError(void *linux_side, char * pchBuffer, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetLastError((char *)pchBuffer, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_005_SetVSync(void *linux_side, bool bVSync) +{ + ((IVRCompositor*)linux_side)->SetVSync((bool)bVSync); +} + +bool cppIVRCompositor_IVRCompositor_005_GetVSync(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetVSync(); +} + +void cppIVRCompositor_IVRCompositor_005_SetGamma(void *linux_side, float fGamma) +{ + ((IVRCompositor*)linux_side)->SetGamma((float)fGamma); +} + +float cppIVRCompositor_IVRCompositor_005_GetGamma(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetGamma(); +} + +void cppIVRCompositor_IVRCompositor_005_SetGraphicsDevice(void *linux_side, Compositor_DeviceType eType, void * pDevice) +{ + ((IVRCompositor*)linux_side)->SetGraphicsDevice((vr::Compositor_DeviceType)eType, (void *)pDevice); +} + +void cppIVRCompositor_IVRCompositor_005_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount) +{ + ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pPoseArray, (uint32_t)unPoseArrayCount); +} + +void cppIVRCompositor_IVRCompositor_005_Submit(void *linux_side, Hmd_Eye eEye, void * pTexture, Compositor_TextureBounds * pBounds) +{ + ((IVRCompositor*)linux_side)->Submit((vr::Hmd_Eye)eEye, (void *)pTexture, (vr::Compositor_TextureBounds *)pBounds); +} + +void cppIVRCompositor_IVRCompositor_005_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_005_GetOverlayDefaults(void *linux_side, Compositor_OverlaySettings * pSettings) +{ + ((IVRCompositor*)linux_side)->GetOverlayDefaults((vr::Compositor_OverlaySettings *)pSettings); +} + +void cppIVRCompositor_IVRCompositor_005_SetOverlay(void *linux_side, void * pTexture, Compositor_OverlaySettings * pSettings) +{ + ((IVRCompositor*)linux_side)->SetOverlay((void *)pTexture, (vr::Compositor_OverlaySettings *)pSettings); +} + +void cppIVRCompositor_IVRCompositor_005_SetOverlayRaw(void *linux_side, void * buffer, uint32_t width, uint32_t height, uint32_t depth, Compositor_OverlaySettings * pSettings) +{ + ((IVRCompositor*)linux_side)->SetOverlayRaw((void *)buffer, (uint32_t)width, (uint32_t)height, (uint32_t)depth, (vr::Compositor_OverlaySettings *)pSettings); +} + +void cppIVRCompositor_IVRCompositor_005_SetOverlayFromFile(void *linux_side, const char * pchFilePath, Compositor_OverlaySettings * pSettings) +{ + ((IVRCompositor*)linux_side)->SetOverlayFromFile((const char *)pchFilePath, (vr::Compositor_OverlaySettings *)pSettings); +} + +void cppIVRCompositor_IVRCompositor_005_ClearOverlay(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearOverlay(); +} + +bool cppIVRCompositor_IVRCompositor_005_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +void cppIVRCompositor_IVRCompositor_005_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_005_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +void cppIVRCompositor_IVRCompositor_005_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_005_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_005_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_005_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +bool cppIVRCompositor_IVRCompositor_005_ComputeOverlayIntersection(void *linux_side, Compositor_OverlaySettings * pSettings, float fAspectRatio, TrackingUniverseOrigin eOrigin, HmdVector3_t vSource, HmdVector3_t vDirection, HmdVector2_t * pvecIntersectionUV, HmdVector3_t * pvecIntersectionTrackingSpace) +{ + return ((IVRCompositor*)linux_side)->ComputeOverlayIntersection((const vr::Compositor_OverlaySettings *)pSettings, (float)fAspectRatio, (vr::TrackingUniverseOrigin)eOrigin, (vr::HmdVector3_t)vSource, (vr::HmdVector3_t)vDirection, (vr::HmdVector2_t *)pvecIntersectionUV, (vr::HmdVector3_t *)pvecIntersectionTrackingSpace); +} + +void cppIVRCompositor_IVRCompositor_005_SetTrackingSpace(void *linux_side, TrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::TrackingUniverseOrigin)eOrigin); +} + +vr::TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_005_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_005.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_005.h new file mode 100644 index 00000000..c345946d --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_005.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRCompositor_IVRCompositor_005_GetLastError(void *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_005_SetVSync(void *, bool); +extern bool cppIVRCompositor_IVRCompositor_005_GetVSync(void *); +extern void cppIVRCompositor_IVRCompositor_005_SetGamma(void *, float); +extern float cppIVRCompositor_IVRCompositor_005_GetGamma(void *); +extern void cppIVRCompositor_IVRCompositor_005_SetGraphicsDevice(void *, Compositor_DeviceType, void *); +extern void cppIVRCompositor_IVRCompositor_005_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_005_Submit(void *, Hmd_Eye, void *, Compositor_TextureBounds *); +extern void cppIVRCompositor_IVRCompositor_005_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_005_GetOverlayDefaults(void *, Compositor_OverlaySettings *); +extern void cppIVRCompositor_IVRCompositor_005_SetOverlay(void *, void *, Compositor_OverlaySettings *); +extern void cppIVRCompositor_IVRCompositor_005_SetOverlayRaw(void *, void *, uint32_t, uint32_t, uint32_t, Compositor_OverlaySettings *); +extern void cppIVRCompositor_IVRCompositor_005_SetOverlayFromFile(void *, const char *, Compositor_OverlaySettings *); +extern void cppIVRCompositor_IVRCompositor_005_ClearOverlay(void *); +extern bool cppIVRCompositor_IVRCompositor_005_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_005_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_005_FadeGrid(void *, float, bool); +extern void cppIVRCompositor_IVRCompositor_005_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_005_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_005_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_005_IsFullscreen(void *); +extern bool cppIVRCompositor_IVRCompositor_005_ComputeOverlayIntersection(void *, Compositor_OverlaySettings *, float, TrackingUniverseOrigin, HmdVector3_t, HmdVector3_t, HmdVector2_t *, HmdVector3_t *); +extern void cppIVRCompositor_IVRCompositor_005_SetTrackingSpace(void *, TrackingUniverseOrigin); +extern TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_005_GetTrackingSpace(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_006.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_006.cpp new file mode 100644 index 00000000..e3d84f45 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_006.cpp @@ -0,0 +1,114 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.2/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_006.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRCompositor_IVRCompositor_006_GetLastError(void *linux_side, char * pchBuffer, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetLastError((char *)pchBuffer, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_006_SetVSync(void *linux_side, bool bVSync) +{ + ((IVRCompositor*)linux_side)->SetVSync((bool)bVSync); +} + +bool cppIVRCompositor_IVRCompositor_006_GetVSync(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetVSync(); +} + +void cppIVRCompositor_IVRCompositor_006_SetGamma(void *linux_side, float fGamma) +{ + ((IVRCompositor*)linux_side)->SetGamma((float)fGamma); +} + +float cppIVRCompositor_IVRCompositor_006_GetGamma(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetGamma(); +} + +void cppIVRCompositor_IVRCompositor_006_SetGraphicsDevice(void *linux_side, Compositor_DeviceType eType, void * pDevice) +{ + ((IVRCompositor*)linux_side)->SetGraphicsDevice((vr::Compositor_DeviceType)eType, (void *)pDevice); +} + +vr::VRCompositorError cppIVRCompositor_IVRCompositor_006_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::VRCompositorError cppIVRCompositor_IVRCompositor_006_Submit(void *linux_side, Hmd_Eye eEye, void * pTexture, VRTextureBounds_t * pBounds) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::Hmd_Eye)eEye, (void *)pTexture, (vr::VRTextureBounds_t *)pBounds); +} + +void cppIVRCompositor_IVRCompositor_006_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +bool cppIVRCompositor_IVRCompositor_006_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +void cppIVRCompositor_IVRCompositor_006_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_006_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +void cppIVRCompositor_IVRCompositor_006_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_006_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_006_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_006_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +void cppIVRCompositor_IVRCompositor_006_SetTrackingSpace(void *linux_side, TrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::TrackingUniverseOrigin)eOrigin); +} + +vr::TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_006_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +uint32_t cppIVRCompositor_IVRCompositor_006_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +bool cppIVRCompositor_IVRCompositor_006_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_006.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_006.h new file mode 100644 index 00000000..f8ed46d9 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_006.h @@ -0,0 +1,26 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRCompositor_IVRCompositor_006_GetLastError(void *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_006_SetVSync(void *, bool); +extern bool cppIVRCompositor_IVRCompositor_006_GetVSync(void *); +extern void cppIVRCompositor_IVRCompositor_006_SetGamma(void *, float); +extern float cppIVRCompositor_IVRCompositor_006_GetGamma(void *); +extern void cppIVRCompositor_IVRCompositor_006_SetGraphicsDevice(void *, Compositor_DeviceType, void *); +extern VRCompositorError cppIVRCompositor_IVRCompositor_006_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern VRCompositorError cppIVRCompositor_IVRCompositor_006_Submit(void *, Hmd_Eye, void *, VRTextureBounds_t *); +extern void cppIVRCompositor_IVRCompositor_006_ClearLastSubmittedFrame(void *); +extern bool cppIVRCompositor_IVRCompositor_006_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_006_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_006_FadeGrid(void *, float, bool); +extern void cppIVRCompositor_IVRCompositor_006_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_006_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_006_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_006_IsFullscreen(void *); +extern void cppIVRCompositor_IVRCompositor_006_SetTrackingSpace(void *, TrackingUniverseOrigin); +extern TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_006_GetTrackingSpace(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_006_GetCurrentSceneFocusProcess(void *); +extern bool cppIVRCompositor_IVRCompositor_006_CanRenderScene(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_007.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_007.cpp new file mode 100644 index 00000000..2c6f0e87 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_007.cpp @@ -0,0 +1,109 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.8/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_007.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRCompositor_IVRCompositor_007_GetLastError(void *linux_side, char * pchBuffer, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetLastError((char *)pchBuffer, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_007_SetVSync(void *linux_side, bool bVSync) +{ + ((IVRCompositor*)linux_side)->SetVSync((bool)bVSync); +} + +bool cppIVRCompositor_IVRCompositor_007_GetVSync(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetVSync(); +} + +void cppIVRCompositor_IVRCompositor_007_SetGamma(void *linux_side, float fGamma) +{ + ((IVRCompositor*)linux_side)->SetGamma((float)fGamma); +} + +float cppIVRCompositor_IVRCompositor_007_GetGamma(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetGamma(); +} + +vr::VRCompositorError cppIVRCompositor_IVRCompositor_007_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::VRCompositorError cppIVRCompositor_IVRCompositor_007_Submit(void *linux_side, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void * pTexture, VRTextureBounds_t * pBounds) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::Hmd_Eye)eEye, (vr::GraphicsAPIConvention)eTextureType, (void *)pTexture, (const vr::VRTextureBounds_t *)pBounds); +} + +void cppIVRCompositor_IVRCompositor_007_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +bool cppIVRCompositor_IVRCompositor_007_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +void cppIVRCompositor_IVRCompositor_007_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_007_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +void cppIVRCompositor_IVRCompositor_007_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_007_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_007_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_007_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +void cppIVRCompositor_IVRCompositor_007_SetTrackingSpace(void *linux_side, TrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::TrackingUniverseOrigin)eOrigin); +} + +vr::TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_007_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +uint32_t cppIVRCompositor_IVRCompositor_007_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +bool cppIVRCompositor_IVRCompositor_007_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_007.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_007.h new file mode 100644 index 00000000..adfa3dae --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_007.h @@ -0,0 +1,25 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRCompositor_IVRCompositor_007_GetLastError(void *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_007_SetVSync(void *, bool); +extern bool cppIVRCompositor_IVRCompositor_007_GetVSync(void *); +extern void cppIVRCompositor_IVRCompositor_007_SetGamma(void *, float); +extern float cppIVRCompositor_IVRCompositor_007_GetGamma(void *); +extern VRCompositorError cppIVRCompositor_IVRCompositor_007_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern VRCompositorError cppIVRCompositor_IVRCompositor_007_Submit(void *, Hmd_Eye, GraphicsAPIConvention, void *, VRTextureBounds_t *); +extern void cppIVRCompositor_IVRCompositor_007_ClearLastSubmittedFrame(void *); +extern bool cppIVRCompositor_IVRCompositor_007_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_007_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_007_FadeGrid(void *, float, bool); +extern void cppIVRCompositor_IVRCompositor_007_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_007_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_007_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_007_IsFullscreen(void *); +extern void cppIVRCompositor_IVRCompositor_007_SetTrackingSpace(void *, TrackingUniverseOrigin); +extern TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_007_GetTrackingSpace(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_007_GetCurrentSceneFocusProcess(void *); +extern bool cppIVRCompositor_IVRCompositor_007_CanRenderScene(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_008.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_008.cpp new file mode 100644 index 00000000..dc60243a --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_008.cpp @@ -0,0 +1,144 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_008.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRCompositor_IVRCompositor_008_GetLastError(void *linux_side, char * pchBuffer, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetLastError((char *)pchBuffer, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_008_SetVSync(void *linux_side, bool bVSync) +{ + ((IVRCompositor*)linux_side)->SetVSync((bool)bVSync); +} + +bool cppIVRCompositor_IVRCompositor_008_GetVSync(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetVSync(); +} + +void cppIVRCompositor_IVRCompositor_008_SetGamma(void *linux_side, float fGamma) +{ + ((IVRCompositor*)linux_side)->SetGamma((float)fGamma); +} + +float cppIVRCompositor_IVRCompositor_008_GetGamma(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetGamma(); +} + +vr::VRCompositorError cppIVRCompositor_IVRCompositor_008_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::VRCompositorError cppIVRCompositor_IVRCompositor_008_Submit(void *linux_side, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void * pTexture, VRTextureBounds_t * pBounds, VRSubmitFlags_t nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::Hmd_Eye)eEye, (vr::GraphicsAPIConvention)eTextureType, (void *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::VRSubmitFlags_t)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_008_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +bool cppIVRCompositor_IVRCompositor_008_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +void cppIVRCompositor_IVRCompositor_008_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_008_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +void cppIVRCompositor_IVRCompositor_008_SetSkyboxOverride(void *linux_side, GraphicsAPIConvention eTextureType, void * pFront, void * pBack, void * pLeft, void * pRight, void * pTop, void * pBottom) +{ + ((IVRCompositor*)linux_side)->SetSkyboxOverride((vr::GraphicsAPIConvention)eTextureType, (void *)pFront, (void *)pBack, (void *)pLeft, (void *)pRight, (void *)pTop, (void *)pBottom); +} + +void cppIVRCompositor_IVRCompositor_008_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_008_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_008_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_008_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_008_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +void cppIVRCompositor_IVRCompositor_008_SetTrackingSpace(void *linux_side, TrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::TrackingUniverseOrigin)eOrigin); +} + +vr::TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_008_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +uint32_t cppIVRCompositor_IVRCompositor_008_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +bool cppIVRCompositor_IVRCompositor_008_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_008_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_008_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_008_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +float cppIVRCompositor_IVRCompositor_008_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +uint32_t cppIVRCompositor_IVRCompositor_008_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_008.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_008.h new file mode 100644 index 00000000..b23e106f --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_008.h @@ -0,0 +1,32 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRCompositor_IVRCompositor_008_GetLastError(void *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_008_SetVSync(void *, bool); +extern bool cppIVRCompositor_IVRCompositor_008_GetVSync(void *); +extern void cppIVRCompositor_IVRCompositor_008_SetGamma(void *, float); +extern float cppIVRCompositor_IVRCompositor_008_GetGamma(void *); +extern VRCompositorError cppIVRCompositor_IVRCompositor_008_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern VRCompositorError cppIVRCompositor_IVRCompositor_008_Submit(void *, Hmd_Eye, GraphicsAPIConvention, void *, VRTextureBounds_t *, VRSubmitFlags_t); +extern void cppIVRCompositor_IVRCompositor_008_ClearLastSubmittedFrame(void *); +extern bool cppIVRCompositor_IVRCompositor_008_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_008_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_008_FadeGrid(void *, float, bool); +extern void cppIVRCompositor_IVRCompositor_008_SetSkyboxOverride(void *, GraphicsAPIConvention, void *, void *, void *, void *, void *, void *); +extern void cppIVRCompositor_IVRCompositor_008_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_008_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_008_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_008_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_008_IsFullscreen(void *); +extern void cppIVRCompositor_IVRCompositor_008_SetTrackingSpace(void *, TrackingUniverseOrigin); +extern TrackingUniverseOrigin cppIVRCompositor_IVRCompositor_008_GetTrackingSpace(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_008_GetCurrentSceneFocusProcess(void *); +extern bool cppIVRCompositor_IVRCompositor_008_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_008_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_008_HideMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_008_CompositorDumpImages(void *); +extern float cppIVRCompositor_IVRCompositor_008_GetFrameTimeRemaining(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_008_GetLastFrameRenderer(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_009.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_009.cpp new file mode 100644 index 00000000..6c51cf9e --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_009.cpp @@ -0,0 +1,134 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.13/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_009.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_009_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_009_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_009_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_009_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_009_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_009_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_009_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_009_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_009_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_009_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_009_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_009_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_009_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_009_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_009_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_009_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_009_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_009_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_009_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_009_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_009_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_009_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_009_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_009_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_009.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_009.h new file mode 100644 index 00000000..677c854a --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_009.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_009_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_009_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_009_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_009_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_009_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_009_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_009_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_009_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_009_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_009_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_009_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_009_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_009_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_009_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_009_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_009_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_009_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_009_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_009_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_009_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_009_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_009_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_009_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_009_CompositorDumpImages(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_010.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_010.cpp new file mode 100644 index 00000000..13ae704c --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_010.cpp @@ -0,0 +1,134 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_010.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_010_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_010_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_010_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_010_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_010_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_010_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_010_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_010_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_010_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_010_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_010_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_010_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_010_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_010_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_010_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_010_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_010_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_010_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_010_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_010_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_010.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_010.h new file mode 100644 index 00000000..58348748 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_010.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_010_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_010_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_010_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_010_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_010_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_010_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_010_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_010_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_010_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_010_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_010_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_010_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_010_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_010_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_010_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_010_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_010_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_010_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_010_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_010_CompositorDumpImages(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_011.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_011.cpp new file mode 100644 index 00000000..737bf6de --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_011.cpp @@ -0,0 +1,134 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.16/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_011.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_011_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_011_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_011_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_011_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_011_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_011_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_011_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_011_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_011_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_011_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_011_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_011_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_011_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_011_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_011_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_011_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_011_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_011_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_011_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_011_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_011_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_011_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_011_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_011_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_011.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_011.h new file mode 100644 index 00000000..20ef827f --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_011.h @@ -0,0 +1,30 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_011_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_011_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_011_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_011_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_011_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_011_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_011_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_011_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_011_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_011_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_011_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_011_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_011_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_011_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_011_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_011_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_011_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_011_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_011_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_011_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_011_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_011_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_011_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_011_CompositorDumpImages(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_012.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_012.cpp new file mode 100644 index 00000000..1bcf975d --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_012.cpp @@ -0,0 +1,144 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.17/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_012.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_012_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_012_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_012_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_012_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_012_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_012_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_012_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_012_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_012_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_012_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_012_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_012_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_012_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_012_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_012_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_012_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_012_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_012_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_012_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_012_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_012_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_012_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_012_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_012_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_012_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_012_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_012.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_012.h new file mode 100644 index 00000000..287b9bbc --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_012.h @@ -0,0 +1,32 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_012_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_012_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_012_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_012_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_012_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_012_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_012_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_012_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_012_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_012_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_012_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_012_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_012_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_012_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_012_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_012_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_012_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_012_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_012_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_012_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_012_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_012_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_012_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_012_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_012_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_012_ShouldAppRenderWithLowResources(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_013.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_013.cpp new file mode 100644 index 00000000..af2676ac --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_013.cpp @@ -0,0 +1,149 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.19/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_013.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_013_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_013_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_013_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_013_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_013_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_013_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_013_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_013_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_013_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_013_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_013_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_013_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_013_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_013_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_013_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_013_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_013_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_013_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_013_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_013_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_013_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_013_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_013_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_013_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_013_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_013_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_013_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_013.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_013.h new file mode 100644 index 00000000..9e6a3a47 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_013.h @@ -0,0 +1,33 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_013_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_013_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_013_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_013_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_013_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_013_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_013_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_013_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_013_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_013_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_013_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_013_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_013_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_013_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_013_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_013_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_013_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_013_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_013_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_013_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_013_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_013_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_013_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_013_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_013_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_013_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_013_ForceInterleavedReprojectionOn(void *, bool); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_014.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_014.cpp new file mode 100644 index 00000000..3c728158 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_014.cpp @@ -0,0 +1,159 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.20/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_014.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_014_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_014_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_014_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_014_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_014_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_014_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_014_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_014_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_014_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_014_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_014_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_014_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_014_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_014_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_014_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_014_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_014_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_014_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_014_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_014_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_014_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_014_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_014_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_014_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_014_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_014_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_014_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_014_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_014_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_014.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_014.h new file mode 100644 index 00000000..0cba547d --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_014.h @@ -0,0 +1,35 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_014_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_014_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_014_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_014_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_014_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_014_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_014_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_014_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_014_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_014_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_014_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_014_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_014_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_014_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_014_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_014_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_014_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_014_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_014_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_014_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_014_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_014_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_014_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_014_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_014_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_014_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_014_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_014_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_014_SuspendRendering(void *, bool); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_015.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_015.cpp new file mode 100644 index 00000000..ab63da3c --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_015.cpp @@ -0,0 +1,199 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_015.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_015_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_015_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_015_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_015_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_015_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_015_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_015_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_015_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_015_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_015_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_015_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_015_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_015_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_015_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_015_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_015_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_015_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_015_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_015_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_015_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_015_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_015_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_015_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_015_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_015_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_RequestScreenshot(void *linux_side, EVRScreenshotType type, const char * pchDestinationFileName, const char * pchVRDestinationFileName) +{ + return ((IVRCompositor*)linux_side)->RequestScreenshot((vr::EVRScreenshotType)type, (const char *)pchDestinationFileName, (const char *)pchVRDestinationFileName); +} + +vr::EVRScreenshotType cppIVRCompositor_IVRCompositor_015_GetCurrentScreenshotType(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentScreenshotType(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_015_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_015_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_015_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_015.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_015.h new file mode 100644 index 00000000..f657dab7 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_015.h @@ -0,0 +1,43 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_015_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_015_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_015_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_015_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_015_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_015_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_015_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_015_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_015_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_015_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_015_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_015_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_015_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_015_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_015_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_015_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_015_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_015_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_015_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_015_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_015_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_015_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_015_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_015_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_015_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_RequestScreenshot(void *, EVRScreenshotType, const char *, const char *); +extern EVRScreenshotType cppIVRCompositor_IVRCompositor_015_GetCurrentScreenshotType(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_015_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_015_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_015_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_015_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_016.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_016.cpp new file mode 100644 index 00000000..6a11a719 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_016.cpp @@ -0,0 +1,189 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.3/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_016.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_016_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_016_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_016_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_016_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_016_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +float cppIVRCompositor_IVRCompositor_016_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_016_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_016_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_016_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_016_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_016_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_016_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_016_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_016_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_016_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_016_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_016_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_016_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_016_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_016_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_016_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_016_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_016_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_016_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_016_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_016_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_016_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_016_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_016.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_016.h new file mode 100644 index 00000000..4710ab13 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_016.h @@ -0,0 +1,41 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_016_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_016_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_016_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_016_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_016_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_016_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_016_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_016_FadeToColor(void *, float, float, float, float, float, bool); +extern void cppIVRCompositor_IVRCompositor_016_FadeGrid(void *, float, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_016_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_016_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_016_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_016_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_016_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_016_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_016_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_016_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_016_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_016_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_016_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_016_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_016_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_016_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_016_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_016_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_016_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_016_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_016_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_016_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_018.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_018.cpp new file mode 100644 index 00000000..35d5107e --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_018.cpp @@ -0,0 +1,204 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.4/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_018.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_018_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_018_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_018_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_018_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_018_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_018_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_018_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_018_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_018_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_018_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_018_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_018_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_018_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_018_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_018_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_018_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_018_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_018_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_018_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_018_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_018_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_018_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_018_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_018_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_018_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_018_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_018_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_018_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_018_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_018_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_018_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_018.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_018.h new file mode 100644 index 00000000..5cefc734 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_018.h @@ -0,0 +1,44 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_018_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_018_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_018_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_018_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_018_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_018_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_018_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_018_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_018_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_018_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_018_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_018_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_018_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_018_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_018_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_018_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_018_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_018_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_018_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_018_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_018_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_018_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_018_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_018_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_018_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_018_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_018_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_018_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_018_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_018_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_018_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_018_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_019.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_019.cpp new file mode 100644 index 00000000..82875776 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_019.cpp @@ -0,0 +1,214 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.5/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_019.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_019_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_019_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_019_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_019_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_019_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_019_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_019_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_019_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_019_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_019_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_019_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_019_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_019_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_019_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_019_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_019_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_019_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_019_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_019_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_019_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_019_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_019_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_019_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_019_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_019_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_019_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_019_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_019_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_019_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_019_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_019_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +uint32_t cppIVRCompositor_IVRCompositor_019_GetVulkanInstanceExtensionsRequired(void *linux_side, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanInstanceExtensionsRequired((char *)pchValue, (uint32_t)unBufferSize); +} + +uint32_t cppIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired(void *linux_side, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanDeviceExtensionsRequired((VkPhysicalDevice_T *)pPhysicalDevice, (char *)pchValue, (uint32_t)unBufferSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_019.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_019.h new file mode 100644 index 00000000..a65b9f08 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_019.h @@ -0,0 +1,46 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_019_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_019_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_019_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_019_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_019_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_019_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_019_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_019_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_019_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_019_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_019_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_019_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_019_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_019_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_019_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_019_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_019_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_019_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_019_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_019_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_019_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_019_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_019_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_019_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_019_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_019_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_019_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_019_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_019_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_019_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_019_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_019_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern uint32_t cppIVRCompositor_IVRCompositor_019_GetVulkanInstanceExtensionsRequired(void *, char *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired(void *, VkPhysicalDevice_T *, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_020.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_020.cpp new file mode 100644 index 00000000..833fc844 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_020.cpp @@ -0,0 +1,219 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.9/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_020.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_020_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_020_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_020_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_020_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_020_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_020_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_020_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_020_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_020_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_020_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_020_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_020_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_020_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_020_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_020_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_020_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_020_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_020_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_020_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_020_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_020_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_020_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_020_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_020_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_020_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_020_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_020_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_020_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +void cppIVRCompositor_IVRCompositor_020_ReleaseMirrorTextureD3D11(void *linux_side, void * pD3D11ShaderResourceView) +{ + ((IVRCompositor*)linux_side)->ReleaseMirrorTextureD3D11((void *)pD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_020_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_020_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_020_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +uint32_t cppIVRCompositor_IVRCompositor_020_GetVulkanInstanceExtensionsRequired(void *linux_side, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanInstanceExtensionsRequired((char *)pchValue, (uint32_t)unBufferSize); +} + +uint32_t cppIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired(void *linux_side, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanDeviceExtensionsRequired((VkPhysicalDevice_T *)pPhysicalDevice, (char *)pchValue, (uint32_t)unBufferSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_020.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_020.h new file mode 100644 index 00000000..0c4165f3 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_020.h @@ -0,0 +1,47 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_020_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_020_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_020_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_020_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_020_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_020_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_020_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_020_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_020_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_020_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_020_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_020_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_020_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_020_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_020_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_020_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_020_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_020_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_020_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_020_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_020_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_020_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_020_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_020_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_020_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_020_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_020_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_020_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern void cppIVRCompositor_IVRCompositor_020_ReleaseMirrorTextureD3D11(void *, void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_020_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_020_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_020_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_020_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern uint32_t cppIVRCompositor_IVRCompositor_020_GetVulkanInstanceExtensionsRequired(void *, char *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired(void *, VkPhysicalDevice_T *, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_021.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_021.cpp new file mode 100644 index 00000000..7796340f --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_021.cpp @@ -0,0 +1,229 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.10/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_021.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_021_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_021_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_021_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_021_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_021_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_021_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_021_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_021_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_021_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_021_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_021_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_021_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_021_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_021_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_021_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_021_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_021_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_021_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_021_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_021_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_021_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_021_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_021_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_021_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_021_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_021_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_021_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_021_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +void cppIVRCompositor_IVRCompositor_021_ReleaseMirrorTextureD3D11(void *linux_side, void * pD3D11ShaderResourceView) +{ + ((IVRCompositor*)linux_side)->ReleaseMirrorTextureD3D11((void *)pD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_021_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_021_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_021_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +uint32_t cppIVRCompositor_IVRCompositor_021_GetVulkanInstanceExtensionsRequired(void *linux_side, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanInstanceExtensionsRequired((char *)pchValue, (uint32_t)unBufferSize); +} + +uint32_t cppIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired(void *linux_side, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanDeviceExtensionsRequired((VkPhysicalDevice_T *)pPhysicalDevice, (char *)pchValue, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_021_SetExplicitTimingMode(void *linux_side, bool bExplicitTimingMode) +{ + ((IVRCompositor*)linux_side)->SetExplicitTimingMode((bool)bExplicitTimingMode); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_021_SubmitExplicitTimingData(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->SubmitExplicitTimingData(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_021.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_021.h new file mode 100644 index 00000000..865d06bd --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_021.h @@ -0,0 +1,49 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_021_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_021_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_021_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_021_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_021_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_021_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_021_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_021_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_021_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_021_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_021_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_021_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_021_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_021_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_021_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_021_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_021_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_021_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_021_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_021_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_021_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_021_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_021_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_021_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_021_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_021_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_021_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_021_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern void cppIVRCompositor_IVRCompositor_021_ReleaseMirrorTextureD3D11(void *, void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_021_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_021_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_021_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern uint32_t cppIVRCompositor_IVRCompositor_021_GetVulkanInstanceExtensionsRequired(void *, char *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired(void *, VkPhysicalDevice_T *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_021_SetExplicitTimingMode(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_021_SubmitExplicitTimingData(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_022.cpp b/vrclient_x64/cppIVRCompositor_IVRCompositor_022.cpp new file mode 100644 index 00000000..5426878f --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_022.cpp @@ -0,0 +1,229 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_022.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_022_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_022_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_022_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_022_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_022_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_022_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_022_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_022_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_022_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_022_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_022_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_022_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_022_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_022_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_022_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_022_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_022_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_022_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_022_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_022_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_022_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_022_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_022_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_022_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_022_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_022_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_022_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_022_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +void cppIVRCompositor_IVRCompositor_022_ReleaseMirrorTextureD3D11(void *linux_side, void * pD3D11ShaderResourceView) +{ + ((IVRCompositor*)linux_side)->ReleaseMirrorTextureD3D11((void *)pD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_022_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_022_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_022_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +uint32_t cppIVRCompositor_IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void *linux_side, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanInstanceExtensionsRequired((char *)pchValue, (uint32_t)unBufferSize); +} + +uint32_t cppIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *linux_side, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanDeviceExtensionsRequired((VkPhysicalDevice_T *)pPhysicalDevice, (char *)pchValue, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_022_SetExplicitTimingMode(void *linux_side, EVRCompositorTimingMode eTimingMode) +{ + ((IVRCompositor*)linux_side)->SetExplicitTimingMode((vr::EVRCompositorTimingMode)eTimingMode); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_022_SubmitExplicitTimingData(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->SubmitExplicitTimingData(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRCompositor_IVRCompositor_022.h b/vrclient_x64/cppIVRCompositor_IVRCompositor_022.h new file mode 100644 index 00000000..9d4d3710 --- /dev/null +++ b/vrclient_x64/cppIVRCompositor_IVRCompositor_022.h @@ -0,0 +1,49 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_022_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_022_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_022_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_022_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_022_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_022_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_022_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_022_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_022_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_022_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_022_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_022_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_022_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_022_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_022_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_022_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_022_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_022_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_022_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_022_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_022_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_022_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_022_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_022_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_022_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_022_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_022_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_022_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern void cppIVRCompositor_IVRCompositor_022_ReleaseMirrorTextureD3D11(void *, void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_022_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_022_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_022_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern uint32_t cppIVRCompositor_IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void *, char *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *, VkPhysicalDevice_T *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_022_SetExplicitTimingMode(void *, EVRCompositorTimingMode); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_022_SubmitExplicitTimingData(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp b/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp new file mode 100644 index 00000000..9b51cd7b --- /dev/null +++ b/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp @@ -0,0 +1,24 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRDriverManager_IVRDriverManager_001.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRDriverManager_IVRDriverManager_001_GetDriverCount(void *linux_side) +{ + return ((IVRDriverManager*)linux_side)->GetDriverCount(); +} + +uint32_t cppIVRDriverManager_IVRDriverManager_001_GetDriverName(void *linux_side, DriverId_t nDriver, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRDriverManager*)linux_side)->GetDriverName((vr::DriverId_t)nDriver, (char *)pchValue, (uint32_t)unBufferSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.h b/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.h new file mode 100644 index 00000000..bcdd23df --- /dev/null +++ b/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.h @@ -0,0 +1,8 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRDriverManager_IVRDriverManager_001_GetDriverCount(void *); +extern uint32_t cppIVRDriverManager_IVRDriverManager_001_GetDriverName(void *, DriverId_t, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp b/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp new file mode 100644 index 00000000..79dd36cb --- /dev/null +++ b/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp @@ -0,0 +1,29 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRExtendedDisplay_IVRExtendedDisplay_001.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetWindowBounds(void *linux_side, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRExtendedDisplay*)linux_side)->GetWindowBounds((int32_t *)pnX, (int32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetEyeOutputViewport(void *linux_side, EVREye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRExtendedDisplay*)linux_side)->GetEyeOutputViewport((vr::EVREye)eEye, (uint32_t *)pnX, (uint32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + ((IVRExtendedDisplay*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex, (int32_t *)pnAdapterOutputIndex); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.h b/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.h new file mode 100644 index 00000000..fcd66fad --- /dev/null +++ b/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.h @@ -0,0 +1,9 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetWindowBounds(void *, int32_t *, int32_t *, uint32_t *, uint32_t *); +extern void cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetEyeOutputViewport(void *, EVREye, uint32_t *, uint32_t *, uint32_t *, uint32_t *); +extern void cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetDXGIOutputInfo(void *, int32_t *, int32_t *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRNotifications_IVRNotifications_001.cpp b/vrclient_x64/cppIVRNotifications_IVRNotifications_001.cpp new file mode 100644 index 00000000..12f30992 --- /dev/null +++ b/vrclient_x64/cppIVRNotifications_IVRNotifications_001.cpp @@ -0,0 +1,29 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRNotifications_IVRNotifications_001.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRNotifications_IVRNotifications_001_GetErrorString(void *linux_side, NotificationError_t error, char * pchBuffer, uint32_t unBufferSize) +{ + return ((IVRNotifications*)linux_side)->GetErrorString((vr::NotificationError_t)error, (char *)pchBuffer, (uint32_t)unBufferSize); +} + +vr::NotificationError_t cppIVRNotifications_IVRNotifications_001_CreateNotification(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char * strType, const char * strText, const char * strCategory, NotificationBitmap * photo, VRNotificationId * notificationId) +{ + return ((IVRNotifications*)linux_side)->CreateNotification((vr::VROverlayHandle_t)ulOverlayHandle, (uint64_t)ulUserValue, (const char *)strType, (const char *)strText, (const char *)strCategory, (const vr::NotificationBitmap *)photo, (vr::VRNotificationId *)notificationId); +} + +vr::NotificationError_t cppIVRNotifications_IVRNotifications_001_DismissNotification(void *linux_side, VRNotificationId notificationId) +{ + return ((IVRNotifications*)linux_side)->DismissNotification((vr::VRNotificationId)notificationId); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRNotifications_IVRNotifications_001.h b/vrclient_x64/cppIVRNotifications_IVRNotifications_001.h new file mode 100644 index 00000000..9a404159 --- /dev/null +++ b/vrclient_x64/cppIVRNotifications_IVRNotifications_001.h @@ -0,0 +1,9 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRNotifications_IVRNotifications_001_GetErrorString(void *, NotificationError_t, char *, uint32_t); +extern NotificationError_t cppIVRNotifications_IVRNotifications_001_CreateNotification(void *, VROverlayHandle_t, uint64_t, const char *, const char *, const char *, NotificationBitmap *, VRNotificationId *); +extern NotificationError_t cppIVRNotifications_IVRNotifications_001_DismissNotification(void *, VRNotificationId); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp b/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp new file mode 100644 index 00000000..345a4295 --- /dev/null +++ b/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp @@ -0,0 +1,24 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRNotifications_IVRNotifications_002.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRNotificationError cppIVRNotifications_IVRNotifications_002_CreateNotification(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char * pchText, EVRNotificationStyle style, NotificationBitmap_t * pImage, VRNotificationId * pNotificationId) +{ + return ((IVRNotifications*)linux_side)->CreateNotification((vr::VROverlayHandle_t)ulOverlayHandle, (uint64_t)ulUserValue, (vr::EVRNotificationType)type, (const char *)pchText, (vr::EVRNotificationStyle)style, (const vr::NotificationBitmap_t *)pImage, (vr::VRNotificationId *)pNotificationId); +} + +vr::EVRNotificationError cppIVRNotifications_IVRNotifications_002_RemoveNotification(void *linux_side, VRNotificationId notificationId) +{ + return ((IVRNotifications*)linux_side)->RemoveNotification((vr::VRNotificationId)notificationId); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRNotifications_IVRNotifications_002.h b/vrclient_x64/cppIVRNotifications_IVRNotifications_002.h new file mode 100644 index 00000000..810886e4 --- /dev/null +++ b/vrclient_x64/cppIVRNotifications_IVRNotifications_002.h @@ -0,0 +1,8 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRNotificationError cppIVRNotifications_IVRNotifications_002_CreateNotification(void *, VROverlayHandle_t, uint64_t, EVRNotificationType, const char *, EVRNotificationStyle, NotificationBitmap_t *, VRNotificationId *); +extern EVRNotificationError cppIVRNotifications_IVRNotifications_002_RemoveNotification(void *, VRNotificationId); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp new file mode 100644 index 00000000..b55ff286 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_001.cpp @@ -0,0 +1,218 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.2/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_001.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::VROverlayError cppIVROverlay_IVROverlay_001_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_001_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +const char * cppIVROverlay_IVROverlay_001_GetOverlayErrorNameFromEnum(void *linux_side, VROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::VROverlayError)error); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + return ((IVROverlay*)linux_side)->SetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float)fGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + return ((IVROverlay*)linux_side)->GetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayVisibility(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayVisibility * peOverlayVisibility) +{ + return ((IVROverlay*)linux_side)->GetOverlayVisibility((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayVisibility *)peOverlayVisibility); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayVisibility(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayVisibility eOverlayVisibility) +{ + return ((IVROverlay*)linux_side)->SetOverlayVisibility((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayVisibility)eOverlayVisibility); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_001_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_001_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_092 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_092_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_001_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_001_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pTexture); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +bool cppIVROverlay_IVROverlay_001_IsSystemOverlayVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsSystemOverlayVisible(); +} + +bool cppIVROverlay_IVROverlay_001_IsActiveSystemOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveSystemOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_SetSystemOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetSystemOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_001_GetSystemOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetSystemOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_001.h b/vrclient_x64/cppIVROverlay_IVROverlay_001.h new file mode 100644 index 00000000..255ac71e --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_001.h @@ -0,0 +1,46 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern VROverlayError cppIVROverlay_IVROverlay_001_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_DestroyOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_001_GetHighQualityOverlay(void *); +extern const char * cppIVROverlay_IVROverlay_001_GetOverlayErrorNameFromEnum(void *, VROverlayError); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayGamma(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayGamma(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayVisibility(void *, VROverlayHandle_t, VROverlayVisibility *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayVisibility(void *, VROverlayHandle_t, VROverlayVisibility); +extern VROverlayError cppIVROverlay_IVROverlay_001_ShowOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_001_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_001_IsOverlayVisible(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_001_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_092 *); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_001_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_001_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayTexture(void *, VROverlayHandle_t, void *); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern bool cppIVROverlay_IVROverlay_001_IsSystemOverlayVisible(void *); +extern bool cppIVROverlay_IVROverlay_001_IsActiveSystemOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_001_SetSystemOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_001_GetSystemOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp new file mode 100644 index 00000000..60e21c7d --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_002.cpp @@ -0,0 +1,228 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.4/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_002.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::VROverlayError cppIVROverlay_IVROverlay_002_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_002_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +const char * cppIVROverlay_IVROverlay_002_GetOverlayErrorNameFromEnum(void *linux_side, VROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::VROverlayError)error); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + return ((IVROverlay*)linux_side)->SetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float)fGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + return ((IVROverlay*)linux_side)->GetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_002_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_002_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_094 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_094_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_002_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_002_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (vr::GraphicsAPIConvention)eTextureType, (void *)pTexture); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_002_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_002_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_002_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_002.h b/vrclient_x64/cppIVROverlay_IVROverlay_002.h new file mode 100644 index 00000000..3dec2b3c --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_002.h @@ -0,0 +1,48 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern VROverlayError cppIVROverlay_IVROverlay_002_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_DestroyOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_002_GetHighQualityOverlay(void *); +extern const char * cppIVROverlay_IVROverlay_002_GetOverlayErrorNameFromEnum(void *, VROverlayError); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayGamma(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayGamma(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_ShowOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_002_IsOverlayVisible(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_002_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_094 *); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_002_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_002_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayTexture(void *, VROverlayHandle_t, GraphicsAPIConvention, void *); +extern VROverlayError cppIVROverlay_IVROverlay_002_ClearOverlayTexture(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern VROverlayError cppIVROverlay_IVROverlay_002_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_002_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_002_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_002_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp new file mode 100644 index 00000000..ef91a074 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_003.cpp @@ -0,0 +1,248 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.7/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_003.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::VROverlayError cppIVROverlay_IVROverlay_003_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_003_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_003_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::VROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_003_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::VROverlayError *)pError); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_003_GetOverlayErrorNameFromEnum(void *linux_side, VROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::VROverlayError)error); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + return ((IVROverlay*)linux_side)->SetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float)fGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + return ((IVROverlay*)linux_side)->GetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_003_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_003_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_097 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_097_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_003_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_003_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (vr::GraphicsAPIConvention)eTextureType, (void *)pTexture); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_003_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_003_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_003_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_003_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_003.h b/vrclient_x64/cppIVROverlay_IVROverlay_003.h new file mode 100644 index 00000000..0258f401 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_003.h @@ -0,0 +1,52 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern VROverlayError cppIVROverlay_IVROverlay_003_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_DestroyOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_003_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_003_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, VROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_003_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, VROverlayError *); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_003_GetOverlayErrorNameFromEnum(void *, VROverlayError); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayGamma(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayGamma(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_ShowOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_003_IsOverlayVisible(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_003_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_097 *); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_003_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_003_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayTexture(void *, VROverlayHandle_t, GraphicsAPIConvention, void *); +extern VROverlayError cppIVROverlay_IVROverlay_003_ClearOverlayTexture(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern VROverlayError cppIVROverlay_IVROverlay_003_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_003_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_003_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_003_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_003_ShowDashboard(void *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp new file mode 100644 index 00000000..7434c13d --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_004.cpp @@ -0,0 +1,258 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.8/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_004.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::VROverlayError cppIVROverlay_IVROverlay_004_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_004_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_004_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::VROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_004_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::VROverlayError *)pError); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_004_GetOverlayErrorNameFromEnum(void *linux_side, VROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::VROverlayError)error); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + return ((IVROverlay*)linux_side)->SetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float)fGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + return ((IVROverlay*)linux_side)->GetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_004_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_004_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_098 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_098_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_004_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_004_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (vr::GraphicsAPIConvention)eTextureType, (void *)pTexture); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_004_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_004_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_004_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_004_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_004.h b/vrclient_x64/cppIVROverlay_IVROverlay_004.h new file mode 100644 index 00000000..8a0f4104 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_004.h @@ -0,0 +1,54 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern VROverlayError cppIVROverlay_IVROverlay_004_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_DestroyOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_004_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_004_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, VROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_004_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, VROverlayError *); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_004_GetOverlayErrorNameFromEnum(void *, VROverlayError); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayGamma(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayGamma(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_ShowOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_004_IsOverlayVisible(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_004_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_098 *); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_004_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_004_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayTexture(void *, VROverlayHandle_t, GraphicsAPIConvention, void *); +extern VROverlayError cppIVROverlay_IVROverlay_004_ClearOverlayTexture(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern VROverlayError cppIVROverlay_IVROverlay_004_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_004_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_004_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_004_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_004_ShowDashboard(void *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp new file mode 100644 index 00000000..5f6d267c --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_005.cpp @@ -0,0 +1,278 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_005.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::VROverlayError cppIVROverlay_IVROverlay_005_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_005_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_005_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::VROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_005_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::VROverlayError *)pError); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_005_GetOverlayErrorNameFromEnum(void *linux_side, VROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::VROverlayError)error); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + return ((IVROverlay*)linux_side)->SetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float)fGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayGamma(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + return ((IVROverlay*)linux_side)->GetOverlayGamma((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfGamma); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_005_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_005_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0910 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_0910_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_005_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_005_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_005_IsFocusOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsFocusOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (vr::GraphicsAPIConvention)eTextureType, (void *)pTexture); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_005_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_005_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_005_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::VROverlayError cppIVROverlay_IVROverlay_005_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode); +} + +uint32_t cppIVROverlay_IVROverlay_005_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_005_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_005.h b/vrclient_x64/cppIVROverlay_IVROverlay_005.h new file mode 100644 index 00000000..39b893d4 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_005.h @@ -0,0 +1,58 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern VROverlayError cppIVROverlay_IVROverlay_005_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_DestroyOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_005_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_005_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, VROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_005_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, VROverlayError *); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_005_GetOverlayErrorNameFromEnum(void *, VROverlayError); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayGamma(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayGamma(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, TrackingUniverseOrigin *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_ShowOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_005_IsOverlayVisible(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_005_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_0910 *); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_005_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_005_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_005_IsFocusOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayTexture(void *, VROverlayHandle_t, GraphicsAPIConvention, void *); +extern VROverlayError cppIVROverlay_IVROverlay_005_ClearOverlayTexture(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern VROverlayError cppIVROverlay_IVROverlay_005_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_005_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_005_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern VROverlayError cppIVROverlay_IVROverlay_005_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_005_ShowDashboard(void *, const char *); +extern VROverlayError cppIVROverlay_IVROverlay_005_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool); +extern uint32_t cppIVROverlay_IVROverlay_005_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_005_HideKeyboard(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp new file mode 100644 index 00000000..f0e470da --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_007.cpp @@ -0,0 +1,303 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.12/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_007.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_007_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_007_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_007_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_007_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_007_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_007_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_007_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0912 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_0912_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_007_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_007_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_007_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_007_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_007_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_007_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_007_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_007_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_007_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_007_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_007.h b/vrclient_x64/cppIVROverlay_IVROverlay_007.h new file mode 100644 index 00000000..60de2b29 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_007.h @@ -0,0 +1,63 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_007_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_007_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_007_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_007_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_007_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_007_IsOverlayVisible(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_007_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_0912 *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_007_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_007_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_007_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_007_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_007_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_007_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_007_ShowDashboard(void *, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_007_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_007_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_007_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_007_HideKeyboard(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp new file mode 100644 index 00000000..2ca6e6d2 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_008.cpp @@ -0,0 +1,318 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_008.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_008_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_008_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_008_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_008_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_008_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_008_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_008_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0914 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin); + struct_VREvent_t_0914_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_008_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_008_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_008_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_008_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_008_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_008_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_008_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_008_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_008_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_008_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_008_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_008_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_008.h b/vrclient_x64/cppIVROverlay_IVROverlay_008.h new file mode 100644 index 00000000..fb0821b7 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_008.h @@ -0,0 +1,66 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_008_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_008_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_008_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_008_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_008_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_008_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_008_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_0914 *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_008_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_008_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_008_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_008_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_008_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_008_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_008_ShowDashboard(void *, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_008_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_008_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_008_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_008_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_008_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_008_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp new file mode 100644 index 00000000..d4040f6a --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_010.cpp @@ -0,0 +1,333 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.18/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_010.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_010_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_010_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_010_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_010_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_010_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_010_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_010_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0918 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_0918_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_010_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_010_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_010_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_010_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_010_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_010_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_010_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_010_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_010_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_010_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_010_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_010_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_010_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_010.h b/vrclient_x64/cppIVROverlay_IVROverlay_010.h new file mode 100644 index 00000000..fbcc95f2 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_010.h @@ -0,0 +1,69 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_010_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_010_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_010_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_010_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_010_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_010_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_010_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_0918 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_010_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_010_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_010_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_010_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_010_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_010_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_010_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_010_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_010_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_010_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_010_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_010_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_010_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_010_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp new file mode 100644 index 00000000..548bd2f3 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_011.cpp @@ -0,0 +1,353 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.20/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_011.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_011_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_011_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_011_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_011_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_011_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_011_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_011_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_011_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0920 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_0920_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_011_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_011_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_011_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_011_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::EGraphicsAPIConvention *)pAPI, (vr::EColorSpace *)pColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_011_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_011_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_011_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_011_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_011_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_011_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_011_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_011_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_011_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_011.h b/vrclient_x64/cppIVROverlay_IVROverlay_011.h new file mode 100644 index 00000000..c37df21c --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_011.h @@ -0,0 +1,73 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_011_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_011_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_011_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_011_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_011_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_011_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_011_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_011_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_0920 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_011_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_011_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_011_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_011_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, EGraphicsAPIConvention *, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_011_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_011_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_011_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_011_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_011_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_011_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_011_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_011_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_011_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_011_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp new file mode 100644 index 00000000..71e7e5af --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_012.cpp @@ -0,0 +1,358 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_012.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_012_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_012_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_012_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_012_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_012_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_012_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_012_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_012_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_101 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_101_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_012_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_012_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_012_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_012_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::EGraphicsAPIConvention *)pAPI, (vr::EColorSpace *)pColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_012_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_012_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_012_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_012_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_012_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_012_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_012_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_012_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_012_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_012.h b/vrclient_x64/cppIVROverlay_IVROverlay_012.h new file mode 100644 index 00000000..519011e5 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_012.h @@ -0,0 +1,74 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_012_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_012_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_012_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_012_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_012_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_012_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_012_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_012_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_101 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_012_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_012_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_012_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_012_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, EGraphicsAPIConvention *, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_012_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_012_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_012_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_012_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_012_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_012_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_012_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_012_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_012_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_012_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp new file mode 100644 index 00000000..0ed8798b --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_013.cpp @@ -0,0 +1,383 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.4/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_013.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_013_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_013_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_013_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_013_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_013_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_013_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float)fTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + return ((IVROverlay*)linux_side)->SetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + return ((IVROverlay*)linux_side)->GetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_013_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_013_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_104 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_104_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_013_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_013_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_013_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_013_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::EGraphicsAPIConvention *)pAPI, (vr::EColorSpace *)pColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_013_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_013_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_013_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_013_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_013_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_013_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_013_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_013_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayIntersectionMask(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + return ((IVROverlay*)linux_side)->SetOverlayIntersectionMask((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayIntersectionMaskPrimitive_t *)pMaskPrimitives, (uint32_t)unNumMaskPrimitives, (uint32_t)unPrimitiveSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_013.h b/vrclient_x64/cppIVROverlay_IVROverlay_013.h new file mode 100644 index 00000000..91f2d359 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_013.h @@ -0,0 +1,79 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_013_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_013_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_013_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_013_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_013_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_013_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTexelAspect(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTexelAspect(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_013_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_013_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_104 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_013_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_013_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_013_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_013_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, EGraphicsAPIConvention *, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_013_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_013_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_013_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_013_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_013_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_013_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_013_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_013_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_013_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +extern EVROverlayError cppIVROverlay_IVROverlay_013_SetOverlayIntersectionMask(void *, VROverlayHandle_t, VROverlayIntersectionMaskPrimitive_t *, uint32_t, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp new file mode 100644 index 00000000..6b921d51 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_014.cpp @@ -0,0 +1,393 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.6/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_014.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_014_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_014_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_014_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_014_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_014_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_014_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float)fTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + return ((IVROverlay*)linux_side)->SetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + return ((IVROverlay*)linux_side)->GetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_014_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_014_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_106 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_106_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_014_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_014_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_014_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_014_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::ETextureType *)pAPIType, (vr::EColorSpace *)pColorSpace, (vr::VRTextureBounds_t *)pTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_014_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_014_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_014_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_014_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_014_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_014_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_014_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_014_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayIntersectionMask(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + return ((IVROverlay*)linux_side)->SetOverlayIntersectionMask((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayIntersectionMaskPrimitive_t *)pMaskPrimitives, (uint32_t)unNumMaskPrimitives, (uint32_t)unPrimitiveSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayFlags(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlags((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pFlags); +} + +vr::VRMessageOverlayResponse cppIVROverlay_IVROverlay_014_ShowMessageOverlay(void *linux_side, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + return ((IVROverlay*)linux_side)->ShowMessageOverlay((const char *)pchText, (const char *)pchCaption, (const char *)pchButton0Text, (const char *)pchButton1Text, (const char *)pchButton2Text, (const char *)pchButton3Text); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_014.h b/vrclient_x64/cppIVROverlay_IVROverlay_014.h new file mode 100644 index 00000000..7579f9e2 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_014.h @@ -0,0 +1,81 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_014_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_014_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_014_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_014_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_014_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_014_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTexelAspect(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTexelAspect(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_014_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_014_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_106 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_014_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_014_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_014_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_014_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, ETextureType *, EColorSpace *, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_014_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_014_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_014_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_014_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_014_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_014_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_014_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_014_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_014_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_SetOverlayIntersectionMask(void *, VROverlayHandle_t, VROverlayIntersectionMaskPrimitive_t *, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_014_GetOverlayFlags(void *, VROverlayHandle_t, uint32_t *); +extern VRMessageOverlayResponse cppIVROverlay_IVROverlay_014_ShowMessageOverlay(void *, const char *, const char *, const char *, const char *, const char *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp new file mode 100644 index 00000000..1483dcfd --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_016.cpp @@ -0,0 +1,423 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.10/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_016.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_016_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_016_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_016_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_016_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + return ((IVROverlay*)linux_side)->SetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_016_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_016_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float)fTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + return ((IVROverlay*)linux_side)->SetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + return ((IVROverlay*)linux_side)->GetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +uint32_t cppIVROverlay_IVROverlay_016_GetOverlayRenderModel(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderModel((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::HmdColor_t *)pColor, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayRenderModel(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderModel((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchRenderModel, (const vr::HmdColor_t *)pColor); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t *)ulOverlayHandleParent, (vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t)ulOverlayHandleParent, (const vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_016_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_016_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1010 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_1010_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_016_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_016_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_016_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_016_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::ETextureType *)pAPIType, (vr::EColorSpace *)pColorSpace, (vr::VRTextureBounds_t *)pTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_016_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_016_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_016_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_016_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_016_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_016_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_016_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_016_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayIntersectionMask(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + return ((IVROverlay*)linux_side)->SetOverlayIntersectionMask((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayIntersectionMaskPrimitive_t *)pMaskPrimitives, (uint32_t)unNumMaskPrimitives, (uint32_t)unPrimitiveSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayFlags(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlags((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pFlags); +} + +vr::VRMessageOverlayResponse cppIVROverlay_IVROverlay_016_ShowMessageOverlay(void *linux_side, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + return ((IVROverlay*)linux_side)->ShowMessageOverlay((const char *)pchText, (const char *)pchCaption, (const char *)pchButton0Text, (const char *)pchButton1Text, (const char *)pchButton2Text, (const char *)pchButton3Text); +} + +void cppIVROverlay_IVROverlay_016_CloseMessageOverlay(void *linux_side) +{ + ((IVROverlay*)linux_side)->CloseMessageOverlay(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_016.h b/vrclient_x64/cppIVROverlay_IVROverlay_016.h new file mode 100644 index 00000000..34bc91f7 --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_016.h @@ -0,0 +1,87 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_016_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_016_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_016_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_016_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayName(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_016_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_016_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTexelAspect(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTexelAspect(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern uint32_t cppIVROverlay_IVROverlay_016_GetOverlayRenderModel(void *, VROverlayHandle_t, char *, uint32_t, HmdColor_t *, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayRenderModel(void *, VROverlayHandle_t, const char *, HmdColor_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_016_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_016_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_1010 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_016_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_016_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_016_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_016_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, ETextureType *, EColorSpace *, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_016_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_016_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_016_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_016_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_016_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_016_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_016_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_016_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_016_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_SetOverlayIntersectionMask(void *, VROverlayHandle_t, VROverlayIntersectionMaskPrimitive_t *, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_016_GetOverlayFlags(void *, VROverlayHandle_t, uint32_t *); +extern VRMessageOverlayResponse cppIVROverlay_IVROverlay_016_ShowMessageOverlay(void *, const char *, const char *, const char *, const char *, const char *, const char *); +extern void cppIVROverlay_IVROverlay_016_CloseMessageOverlay(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp b/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp new file mode 100644 index 00000000..5a74ffea --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_017.cpp @@ -0,0 +1,433 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_017.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_017_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetHighQualityOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->SetHighQualityOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_017_GetHighQualityOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetHighQualityOverlay(); +} + +uint32_t cppIVROverlay_IVROverlay_017_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_017_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + return ((IVROverlay*)linux_side)->SetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_017_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_017_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float)fTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + return ((IVROverlay*)linux_side)->SetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + return ((IVROverlay*)linux_side)->GetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fMinDistanceInMeters, (float)fMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayAutoCurveDistanceRangeInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayAutoCurveDistanceRangeInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfMinDistanceInMeters, (float *)pfMaxDistanceInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +uint32_t cppIVROverlay_IVROverlay_017_GetOverlayRenderModel(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderModel((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::HmdColor_t *)pColor, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayRenderModel(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderModel((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchRenderModel, (const vr::HmdColor_t *)pColor); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t *)ulOverlayHandleParent, (vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t)ulOverlayHandleParent, (const vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_017_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_017_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1011 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, &lin, sizeof(lin)); + struct_VREvent_t_1011_lin_to_win(&lin, pEvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_017_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_017_HandleControllerOverlayInteractionAsMouse(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + return ((IVROverlay*)linux_side)->HandleControllerOverlayInteractionAsMouse((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex); +} + +bool cppIVROverlay_IVROverlay_017_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::VROverlayHandle_t cppIVROverlay_IVROverlay_017_GetGamepadFocusOverlay(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetGamepadFocusOverlay(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetGamepadFocusOverlay(void *linux_side, VROverlayHandle_t ulNewFocusOverlay) +{ + return ((IVROverlay*)linux_side)->SetGamepadFocusOverlay((vr::VROverlayHandle_t)ulNewFocusOverlay); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + return ((IVROverlay*)linux_side)->SetOverlayNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom, (vr::VROverlayHandle_t)ulTo); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_MoveGamepadFocusToNeighbor(void *linux_side, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + return ((IVROverlay*)linux_side)->MoveGamepadFocusToNeighbor((vr::EOverlayDirection)eDirection, (vr::VROverlayHandle_t)ulFrom); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayDualAnalogTransform(void *linux_side, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * vCenter, float fRadius) +{ + return ((IVROverlay*)linux_side)->SetOverlayDualAnalogTransform((vr::VROverlayHandle_t)ulOverlay, (vr::EDualAnalogWhich)eWhich, *vCenter, (float)fRadius); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayDualAnalogTransform(void *linux_side, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +{ + return ((IVROverlay*)linux_side)->GetOverlayDualAnalogTransform((vr::VROverlayHandle_t)ulOverlay, (vr::EDualAnalogWhich)eWhich, (vr::HmdVector2_t *)pvCenter, (float *)pfRadius); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unDepth); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::ETextureType *)pAPIType, (vr::EColorSpace *)pColorSpace, (vr::VRTextureBounds_t *)pTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_017_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_017_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_017_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_017_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_017_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_017_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_017_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_017_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayIntersectionMask(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + return ((IVROverlay*)linux_side)->SetOverlayIntersectionMask((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayIntersectionMaskPrimitive_t *)pMaskPrimitives, (uint32_t)unNumMaskPrimitives, (uint32_t)unPrimitiveSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayFlags(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlags((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pFlags); +} + +vr::VRMessageOverlayResponse cppIVROverlay_IVROverlay_017_ShowMessageOverlay(void *linux_side, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + return ((IVROverlay*)linux_side)->ShowMessageOverlay((const char *)pchText, (const char *)pchCaption, (const char *)pchButton0Text, (const char *)pchButton1Text, (const char *)pchButton2Text, (const char *)pchButton3Text); +} + +void cppIVROverlay_IVROverlay_017_CloseMessageOverlay(void *linux_side) +{ + ((IVROverlay*)linux_side)->CloseMessageOverlay(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVROverlay_IVROverlay_017.h b/vrclient_x64/cppIVROverlay_IVROverlay_017.h new file mode 100644 index 00000000..6dac702f --- /dev/null +++ b/vrclient_x64/cppIVROverlay_IVROverlay_017.h @@ -0,0 +1,89 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_017_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_DestroyOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetHighQualityOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_017_GetHighQualityOverlay(void *); +extern uint32_t cppIVROverlay_IVROverlay_017_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_017_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayName(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_017_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_017_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTexelAspect(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTexelAspect(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayAutoCurveDistanceRangeInMeters(void *, VROverlayHandle_t, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern uint32_t cppIVROverlay_IVROverlay_017_GetOverlayRenderModel(void *, VROverlayHandle_t, char *, uint32_t, HmdColor_t *, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayRenderModel(void *, VROverlayHandle_t, const char *, HmdColor_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_017_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_017_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_1011 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_017_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_017_HandleControllerOverlayInteractionAsMouse(void *, VROverlayHandle_t, TrackedDeviceIndex_t); +extern bool cppIVROverlay_IVROverlay_017_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern VROverlayHandle_t cppIVROverlay_IVROverlay_017_GetGamepadFocusOverlay(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetGamepadFocusOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayNeighbor(void *, EOverlayDirection, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_MoveGamepadFocusToNeighbor(void *, EOverlayDirection, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayDualAnalogTransform(void *, VROverlayHandle_t, EDualAnalogWhich, HmdVector2_t *, float); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayDualAnalogTransform(void *, VROverlayHandle_t, EDualAnalogWhich, HmdVector2_t *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, ETextureType *, EColorSpace *, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_017_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_017_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_017_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_017_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_017_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_017_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_017_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_017_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_017_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_SetOverlayIntersectionMask(void *, VROverlayHandle_t, VROverlayIntersectionMaskPrimitive_t *, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_017_GetOverlayFlags(void *, VROverlayHandle_t, uint32_t *); +extern VRMessageOverlayResponse cppIVROverlay_IVROverlay_017_ShowMessageOverlay(void *, const char *, const char *, const char *, const char *, const char *, const char *); +extern void cppIVROverlay_IVROverlay_017_CloseMessageOverlay(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.cpp b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.cpp new file mode 100644 index 00000000..7f5b46ca --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.cpp @@ -0,0 +1,34 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRRenderModels_IVRRenderModels_001.h" +#ifdef __cplusplus +extern "C" { +#endif +bool cppIVRRenderModels_IVRRenderModels_001_LoadRenderModel(void *linux_side, const char * pchRenderModelName, winRenderModel_t_0910 * pRenderModel) +{ + return ((IVRRenderModels*)linux_side)->LoadRenderModel((const char *)pchRenderModelName, struct_RenderModel_t_0910_unwrap(pRenderModel)); +} + +void cppIVRRenderModels_IVRRenderModels_001_FreeRenderModel(void *linux_side, winRenderModel_t_0910 * pRenderModel) +{ + ((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_0910_unwrap(pRenderModel)); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_001_GetRenderModelName(void *linux_side, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelName((uint32_t)unRenderModelIndex, (char *)pchRenderModelName, (uint32_t)unRenderModelNameLen); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_001_GetRenderModelCount(void *linux_side) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelCount(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.h b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.h new file mode 100644 index 00000000..3349d616 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.h @@ -0,0 +1,10 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern bool cppIVRRenderModels_IVRRenderModels_001_LoadRenderModel(void *, const char *, winRenderModel_t_0910 *); +extern void cppIVRRenderModels_IVRRenderModels_001_FreeRenderModel(void *, winRenderModel_t_0910 *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_001_GetRenderModelName(void *, uint32_t, char *, uint32_t); +extern uint32_t cppIVRRenderModels_IVRRenderModels_001_GetRenderModelCount(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp new file mode 100644 index 00000000..af0a0579 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp @@ -0,0 +1,84 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.15/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRRenderModels_IVRRenderModels_002.h" +#ifdef __cplusplus +extern "C" { +#endif +bool cppIVRRenderModels_IVRRenderModels_002_LoadRenderModel(void *linux_side, const char * pchRenderModelName, winRenderModel_t_0915 ** ppRenderModel) +{ + RenderModel_t *lin; + bool _ret; + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel((const char *)pchRenderModelName, &lin); + if(_ret == 0) + *ppRenderModel = struct_RenderModel_t_0915_wrap(lin); + return _ret; +} + +void cppIVRRenderModels_IVRRenderModels_002_FreeRenderModel(void *linux_side, winRenderModel_t_0915 * pRenderModel) +{ + ((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_0915_unwrap(pRenderModel)); +} + +bool cppIVRRenderModels_IVRRenderModels_002_LoadTexture(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_0915 ** ppTexture) +{ + RenderModel_TextureMap_t *lin; + bool _ret; + _ret = ((IVRRenderModels*)linux_side)->LoadTexture((vr::TextureID_t)textureId, &lin); + if(_ret == 0) + *ppTexture = struct_RenderModel_TextureMap_t_0915_wrap(lin); + return _ret; +} + +void cppIVRRenderModels_IVRRenderModels_002_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_0915 * pTexture) +{ + ((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_0915_unwrap(pTexture)); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_002_GetRenderModelName(void *linux_side, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelName((uint32_t)unRenderModelIndex, (char *)pchRenderModelName, (uint32_t)unRenderModelNameLen); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_002_GetRenderModelCount(void *linux_side) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelCount(); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_002_GetComponentCount(void *linux_side, const char * pchRenderModelName) +{ + return ((IVRRenderModels*)linux_side)->GetComponentCount((const char *)pchRenderModelName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_002_GetComponentName(void *linux_side, const char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetComponentName((const char *)pchRenderModelName, (uint32_t)unComponentIndex, (char *)pchComponentName, (uint32_t)unComponentNameLen); +} + +uint64_t cppIVRRenderModels_IVRRenderModels_002_GetComponentButtonMask(void *linux_side, const char * pchRenderModelName, const char * pchComponentName) +{ + return ((IVRRenderModels*)linux_side)->GetComponentButtonMask((const char *)pchRenderModelName, (const char *)pchComponentName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_002_GetComponentRenderModelName(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetComponentRenderModelName((const char *)pchRenderModelName, (const char *)pchComponentName, (char *)pchComponentRenderModelName, (uint32_t)unComponentRenderModelNameLen); +} + +bool cppIVRRenderModels_IVRRenderModels_002_GetComponentState(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, VRControllerState_t * pControllerState, RenderModel_ComponentState_t * pComponentState) +{ + return ((IVRRenderModels*)linux_side)->GetComponentState((const char *)pchRenderModelName, (const char *)pchComponentName, (const vr::VRControllerState_t *)pControllerState, (vr::RenderModel_ComponentState_t *)pComponentState); +} + +bool cppIVRRenderModels_IVRRenderModels_002_RenderModelHasComponent(void *linux_side, const char * pchRenderModelName, const char * pchComponentName) +{ + return ((IVRRenderModels*)linux_side)->RenderModelHasComponent((const char *)pchRenderModelName, (const char *)pchComponentName); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.h b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.h new file mode 100644 index 00000000..149ca8c1 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.h @@ -0,0 +1,18 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern bool cppIVRRenderModels_IVRRenderModels_002_LoadRenderModel(void *, const char *, winRenderModel_t_0915 **); +extern void cppIVRRenderModels_IVRRenderModels_002_FreeRenderModel(void *, winRenderModel_t_0915 *); +extern bool cppIVRRenderModels_IVRRenderModels_002_LoadTexture(void *, TextureID_t, winRenderModel_TextureMap_t_0915 **); +extern void cppIVRRenderModels_IVRRenderModels_002_FreeTexture(void *, winRenderModel_TextureMap_t_0915 *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_002_GetRenderModelName(void *, uint32_t, char *, uint32_t); +extern uint32_t cppIVRRenderModels_IVRRenderModels_002_GetRenderModelCount(void *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_002_GetComponentCount(void *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_002_GetComponentName(void *, const char *, uint32_t, char *, uint32_t); +extern uint64_t cppIVRRenderModels_IVRRenderModels_002_GetComponentButtonMask(void *, const char *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_002_GetComponentRenderModelName(void *, const char *, const char *, char *, uint32_t); +extern bool cppIVRRenderModels_IVRRenderModels_002_GetComponentState(void *, const char *, const char *, VRControllerState_t *, RenderModel_ComponentState_t *); +extern bool cppIVRRenderModels_IVRRenderModels_002_RenderModelHasComponent(void *, const char *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp new file mode 100644 index 00000000..200852f9 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp @@ -0,0 +1,94 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.18/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRRenderModels_IVRRenderModels_004.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadRenderModel_Async(void *linux_side, const char * pchRenderModelName, winRenderModel_t_0918 ** ppRenderModel) +{ + RenderModel_t *lin; + vr::EVRRenderModelError _ret; + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, &lin); + if(_ret == 0) + *ppRenderModel = struct_RenderModel_t_0918_wrap(lin); + return _ret; +} + +void cppIVRRenderModels_IVRRenderModels_004_FreeRenderModel(void *linux_side, winRenderModel_t_0918 * pRenderModel) +{ + ((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_0918_unwrap(pRenderModel)); +} + +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadTexture_Async(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_0918 ** ppTexture) +{ + RenderModel_TextureMap_t *lin; + vr::EVRRenderModelError _ret; + _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, &lin); + if(_ret == 0) + *ppTexture = struct_RenderModel_TextureMap_t_0918_wrap(lin); + return _ret; +} + +void cppIVRRenderModels_IVRRenderModels_004_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_0918 * pTexture) +{ + ((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_0918_unwrap(pTexture)); +} + +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadTextureD3D11_Async(void *linux_side, TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D) +{ + return ((IVRRenderModels*)linux_side)->LoadTextureD3D11_Async((vr::TextureID_t)textureId, (void *)pD3D11Device, (void **)ppD3D11Texture2D); +} + +void cppIVRRenderModels_IVRRenderModels_004_FreeTextureD3D11(void *linux_side, void * pD3D11Texture2D) +{ + ((IVRRenderModels*)linux_side)->FreeTextureD3D11((void *)pD3D11Texture2D); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_004_GetRenderModelName(void *linux_side, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelName((uint32_t)unRenderModelIndex, (char *)pchRenderModelName, (uint32_t)unRenderModelNameLen); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_004_GetRenderModelCount(void *linux_side) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelCount(); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_004_GetComponentCount(void *linux_side, const char * pchRenderModelName) +{ + return ((IVRRenderModels*)linux_side)->GetComponentCount((const char *)pchRenderModelName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_004_GetComponentName(void *linux_side, const char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetComponentName((const char *)pchRenderModelName, (uint32_t)unComponentIndex, (char *)pchComponentName, (uint32_t)unComponentNameLen); +} + +uint64_t cppIVRRenderModels_IVRRenderModels_004_GetComponentButtonMask(void *linux_side, const char * pchRenderModelName, const char * pchComponentName) +{ + return ((IVRRenderModels*)linux_side)->GetComponentButtonMask((const char *)pchRenderModelName, (const char *)pchComponentName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_004_GetComponentRenderModelName(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetComponentRenderModelName((const char *)pchRenderModelName, (const char *)pchComponentName, (char *)pchComponentRenderModelName, (uint32_t)unComponentRenderModelNameLen); +} + +bool cppIVRRenderModels_IVRRenderModels_004_GetComponentState(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, VRControllerState_t * pControllerState, RenderModel_ControllerMode_State_t * pState, RenderModel_ComponentState_t * pComponentState) +{ + return ((IVRRenderModels*)linux_side)->GetComponentState((const char *)pchRenderModelName, (const char *)pchComponentName, (const vr::VRControllerState_t *)pControllerState, (const vr::RenderModel_ControllerMode_State_t *)pState, (vr::RenderModel_ComponentState_t *)pComponentState); +} + +bool cppIVRRenderModels_IVRRenderModels_004_RenderModelHasComponent(void *linux_side, const char * pchRenderModelName, const char * pchComponentName) +{ + return ((IVRRenderModels*)linux_side)->RenderModelHasComponent((const char *)pchRenderModelName, (const char *)pchComponentName); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.h b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.h new file mode 100644 index 00000000..8ae9d947 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.h @@ -0,0 +1,20 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadRenderModel_Async(void *, const char *, winRenderModel_t_0918 **); +extern void cppIVRRenderModels_IVRRenderModels_004_FreeRenderModel(void *, winRenderModel_t_0918 *); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadTexture_Async(void *, TextureID_t, winRenderModel_TextureMap_t_0918 **); +extern void cppIVRRenderModels_IVRRenderModels_004_FreeTexture(void *, winRenderModel_TextureMap_t_0918 *); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_004_LoadTextureD3D11_Async(void *, TextureID_t, void *, void **); +extern void cppIVRRenderModels_IVRRenderModels_004_FreeTextureD3D11(void *, void *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_004_GetRenderModelName(void *, uint32_t, char *, uint32_t); +extern uint32_t cppIVRRenderModels_IVRRenderModels_004_GetRenderModelCount(void *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_004_GetComponentCount(void *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_004_GetComponentName(void *, const char *, uint32_t, char *, uint32_t); +extern uint64_t cppIVRRenderModels_IVRRenderModels_004_GetComponentButtonMask(void *, const char *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_004_GetComponentRenderModelName(void *, const char *, const char *, char *, uint32_t); +extern bool cppIVRRenderModels_IVRRenderModels_004_GetComponentState(void *, const char *, const char *, VRControllerState_t *, RenderModel_ControllerMode_State_t *, RenderModel_ComponentState_t *); +extern bool cppIVRRenderModels_IVRRenderModels_004_RenderModelHasComponent(void *, const char *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp new file mode 100644 index 00000000..ca32d5c6 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp @@ -0,0 +1,114 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRRenderModels_IVRRenderModels_005.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadRenderModel_Async(void *linux_side, const char * pchRenderModelName, winRenderModel_t_1011 ** ppRenderModel) +{ + RenderModel_t *lin; + vr::EVRRenderModelError _ret; + _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, &lin); + if(_ret == 0) + *ppRenderModel = struct_RenderModel_t_1011_wrap(lin); + return _ret; +} + +void cppIVRRenderModels_IVRRenderModels_005_FreeRenderModel(void *linux_side, winRenderModel_t_1011 * pRenderModel) +{ + ((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_1011_unwrap(pRenderModel)); +} + +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadTexture_Async(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_1011 ** ppTexture) +{ + RenderModel_TextureMap_t *lin; + vr::EVRRenderModelError _ret; + _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, &lin); + if(_ret == 0) + *ppTexture = struct_RenderModel_TextureMap_t_1011_wrap(lin); + return _ret; +} + +void cppIVRRenderModels_IVRRenderModels_005_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_1011 * pTexture) +{ + ((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_1011_unwrap(pTexture)); +} + +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadTextureD3D11_Async(void *linux_side, TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D) +{ + return ((IVRRenderModels*)linux_side)->LoadTextureD3D11_Async((vr::TextureID_t)textureId, (void *)pD3D11Device, (void **)ppD3D11Texture2D); +} + +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadIntoTextureD3D11_Async(void *linux_side, TextureID_t textureId, void * pDstTexture) +{ + return ((IVRRenderModels*)linux_side)->LoadIntoTextureD3D11_Async((vr::TextureID_t)textureId, (void *)pDstTexture); +} + +void cppIVRRenderModels_IVRRenderModels_005_FreeTextureD3D11(void *linux_side, void * pD3D11Texture2D) +{ + ((IVRRenderModels*)linux_side)->FreeTextureD3D11((void *)pD3D11Texture2D); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelName(void *linux_side, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelName((uint32_t)unRenderModelIndex, (char *)pchRenderModelName, (uint32_t)unRenderModelNameLen); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelCount(void *linux_side) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelCount(); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetComponentCount(void *linux_side, const char * pchRenderModelName) +{ + return ((IVRRenderModels*)linux_side)->GetComponentCount((const char *)pchRenderModelName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetComponentName(void *linux_side, const char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetComponentName((const char *)pchRenderModelName, (uint32_t)unComponentIndex, (char *)pchComponentName, (uint32_t)unComponentNameLen); +} + +uint64_t cppIVRRenderModels_IVRRenderModels_005_GetComponentButtonMask(void *linux_side, const char * pchRenderModelName, const char * pchComponentName) +{ + return ((IVRRenderModels*)linux_side)->GetComponentButtonMask((const char *)pchRenderModelName, (const char *)pchComponentName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetComponentRenderModelName(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen) +{ + return ((IVRRenderModels*)linux_side)->GetComponentRenderModelName((const char *)pchRenderModelName, (const char *)pchComponentName, (char *)pchComponentRenderModelName, (uint32_t)unComponentRenderModelNameLen); +} + +bool cppIVRRenderModels_IVRRenderModels_005_GetComponentState(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, VRControllerState_t * pControllerState, RenderModel_ControllerMode_State_t * pState, RenderModel_ComponentState_t * pComponentState) +{ + return ((IVRRenderModels*)linux_side)->GetComponentState((const char *)pchRenderModelName, (const char *)pchComponentName, (const vr::VRControllerState_t *)pControllerState, (const vr::RenderModel_ControllerMode_State_t *)pState, (vr::RenderModel_ComponentState_t *)pComponentState); +} + +bool cppIVRRenderModels_IVRRenderModels_005_RenderModelHasComponent(void *linux_side, const char * pchRenderModelName, const char * pchComponentName) +{ + return ((IVRRenderModels*)linux_side)->RenderModelHasComponent((const char *)pchRenderModelName, (const char *)pchComponentName); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelThumbnailURL(void *linux_side, const char * pchRenderModelName, char * pchThumbnailURL, uint32_t unThumbnailURLLen, EVRRenderModelError * peError) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelThumbnailURL((const char *)pchRenderModelName, (char *)pchThumbnailURL, (uint32_t)unThumbnailURLLen, (vr::EVRRenderModelError *)peError); +} + +uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelOriginalPath(void *linux_side, const char * pchRenderModelName, char * pchOriginalPath, uint32_t unOriginalPathLen, EVRRenderModelError * peError) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelOriginalPath((const char *)pchRenderModelName, (char *)pchOriginalPath, (uint32_t)unOriginalPathLen, (vr::EVRRenderModelError *)peError); +} + +const char * cppIVRRenderModels_IVRRenderModels_005_GetRenderModelErrorNameFromEnum(void *linux_side, EVRRenderModelError error) +{ + return ((IVRRenderModels*)linux_side)->GetRenderModelErrorNameFromEnum((vr::EVRRenderModelError)error); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.h b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.h new file mode 100644 index 00000000..fb6ee8c8 --- /dev/null +++ b/vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.h @@ -0,0 +1,24 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadRenderModel_Async(void *, const char *, winRenderModel_t_1011 **); +extern void cppIVRRenderModels_IVRRenderModels_005_FreeRenderModel(void *, winRenderModel_t_1011 *); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadTexture_Async(void *, TextureID_t, winRenderModel_TextureMap_t_1011 **); +extern void cppIVRRenderModels_IVRRenderModels_005_FreeTexture(void *, winRenderModel_TextureMap_t_1011 *); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadTextureD3D11_Async(void *, TextureID_t, void *, void **); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_005_LoadIntoTextureD3D11_Async(void *, TextureID_t, void *); +extern void cppIVRRenderModels_IVRRenderModels_005_FreeTextureD3D11(void *, void *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelName(void *, uint32_t, char *, uint32_t); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelCount(void *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetComponentCount(void *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetComponentName(void *, const char *, uint32_t, char *, uint32_t); +extern uint64_t cppIVRRenderModels_IVRRenderModels_005_GetComponentButtonMask(void *, const char *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetComponentRenderModelName(void *, const char *, const char *, char *, uint32_t); +extern bool cppIVRRenderModels_IVRRenderModels_005_GetComponentState(void *, const char *, const char *, VRControllerState_t *, RenderModel_ControllerMode_State_t *, RenderModel_ComponentState_t *); +extern bool cppIVRRenderModels_IVRRenderModels_005_RenderModelHasComponent(void *, const char *, const char *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelThumbnailURL(void *, const char *, char *, uint32_t, EVRRenderModelError *); +extern uint32_t cppIVRRenderModels_IVRRenderModels_005_GetRenderModelOriginalPath(void *, const char *, char *, uint32_t, EVRRenderModelError *); +extern const char * cppIVRRenderModels_IVRRenderModels_005_GetRenderModelErrorNameFromEnum(void *, EVRRenderModelError); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRResources_IVRResources_001.cpp b/vrclient_x64/cppIVRResources_IVRResources_001.cpp new file mode 100644 index 00000000..783f6bc0 --- /dev/null +++ b/vrclient_x64/cppIVRResources_IVRResources_001.cpp @@ -0,0 +1,24 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRResources_IVRResources_001.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRResources_IVRResources_001_LoadSharedResource(void *linux_side, const char * pchResourceName, char * pchBuffer, uint32_t unBufferLen) +{ + return ((IVRResources*)linux_side)->LoadSharedResource((const char *)pchResourceName, (char *)pchBuffer, (uint32_t)unBufferLen); +} + +uint32_t cppIVRResources_IVRResources_001_GetResourceFullPath(void *linux_side, const char * pchResourceName, const char * pchResourceTypeDirectory, char * pchPathBuffer, uint32_t unBufferLen) +{ + return ((IVRResources*)linux_side)->GetResourceFullPath((const char *)pchResourceName, (const char *)pchResourceTypeDirectory, (char *)pchPathBuffer, (uint32_t)unBufferLen); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRResources_IVRResources_001.h b/vrclient_x64/cppIVRResources_IVRResources_001.h new file mode 100644 index 00000000..e5945ef5 --- /dev/null +++ b/vrclient_x64/cppIVRResources_IVRResources_001.h @@ -0,0 +1,8 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRResources_IVRResources_001_LoadSharedResource(void *, const char *, char *, uint32_t); +extern uint32_t cppIVRResources_IVRResources_001_GetResourceFullPath(void *, const char *, const char *, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp b/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp new file mode 100644 index 00000000..7cf83695 --- /dev/null +++ b/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp @@ -0,0 +1,49 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRScreenshots_IVRScreenshots_001.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_RequestScreenshot(void *linux_side, ScreenshotHandle_t * pOutScreenshotHandle, EVRScreenshotType type, const char * pchPreviewFilename, const char * pchVRFilename) +{ + return ((IVRScreenshots*)linux_side)->RequestScreenshot((vr::ScreenshotHandle_t *)pOutScreenshotHandle, (vr::EVRScreenshotType)type, (const char *)pchPreviewFilename, (const char *)pchVRFilename); +} + +vr::EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_HookScreenshot(void *linux_side, EVRScreenshotType * pSupportedTypes, int numTypes) +{ + return ((IVRScreenshots*)linux_side)->HookScreenshot((const vr::EVRScreenshotType *)pSupportedTypes, (int)numTypes); +} + +vr::EVRScreenshotType cppIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyType(void *linux_side, ScreenshotHandle_t screenshotHandle, EVRScreenshotError * pError) +{ + return ((IVRScreenshots*)linux_side)->GetScreenshotPropertyType((vr::ScreenshotHandle_t)screenshotHandle, (vr::EVRScreenshotError *)pError); +} + +uint32_t cppIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyFilename(void *linux_side, ScreenshotHandle_t screenshotHandle, EVRScreenshotPropertyFilenames filenameType, char * pchFilename, uint32_t cchFilename, EVRScreenshotError * pError) +{ + return ((IVRScreenshots*)linux_side)->GetScreenshotPropertyFilename((vr::ScreenshotHandle_t)screenshotHandle, (vr::EVRScreenshotPropertyFilenames)filenameType, (char *)pchFilename, (uint32_t)cchFilename, (vr::EVRScreenshotError *)pError); +} + +vr::EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_UpdateScreenshotProgress(void *linux_side, ScreenshotHandle_t screenshotHandle, float flProgress) +{ + return ((IVRScreenshots*)linux_side)->UpdateScreenshotProgress((vr::ScreenshotHandle_t)screenshotHandle, (float)flProgress); +} + +vr::EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_TakeStereoScreenshot(void *linux_side, ScreenshotHandle_t * pOutScreenshotHandle, const char * pchPreviewFilename, const char * pchVRFilename) +{ + return ((IVRScreenshots*)linux_side)->TakeStereoScreenshot((vr::ScreenshotHandle_t *)pOutScreenshotHandle, (const char *)pchPreviewFilename, (const char *)pchVRFilename); +} + +vr::EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_SubmitScreenshot(void *linux_side, ScreenshotHandle_t screenshotHandle, EVRScreenshotType type, const char * pchSourcePreviewFilename, const char * pchSourceVRFilename) +{ + return ((IVRScreenshots*)linux_side)->SubmitScreenshot((vr::ScreenshotHandle_t)screenshotHandle, (vr::EVRScreenshotType)type, (const char *)pchSourcePreviewFilename, (const char *)pchSourceVRFilename); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.h b/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.h new file mode 100644 index 00000000..0cfb5424 --- /dev/null +++ b/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.h @@ -0,0 +1,13 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_RequestScreenshot(void *, ScreenshotHandle_t *, EVRScreenshotType, const char *, const char *); +extern EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_HookScreenshot(void *, EVRScreenshotType *, int); +extern EVRScreenshotType cppIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyType(void *, ScreenshotHandle_t, EVRScreenshotError *); +extern uint32_t cppIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyFilename(void *, ScreenshotHandle_t, EVRScreenshotPropertyFilenames, char *, uint32_t, EVRScreenshotError *); +extern EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_UpdateScreenshotProgress(void *, ScreenshotHandle_t, float); +extern EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_TakeStereoScreenshot(void *, ScreenshotHandle_t *, const char *, const char *); +extern EVRScreenshotError cppIVRScreenshots_IVRScreenshots_001_SubmitScreenshot(void *, ScreenshotHandle_t, EVRScreenshotType, const char *, const char *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSettings_IVRSettings_001.cpp b/vrclient_x64/cppIVRSettings_IVRSettings_001.cpp new file mode 100644 index 00000000..c4da56c2 --- /dev/null +++ b/vrclient_x64/cppIVRSettings_IVRSettings_001.cpp @@ -0,0 +1,74 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.2/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSettings_IVRSettings_001.h" +#ifdef __cplusplus +extern "C" { +#endif +const char * cppIVRSettings_IVRSettings_001_GetSettingsErrorNameFromEnum(void *linux_side, EVRSettingsError eError) +{ + return ((IVRSettings*)linux_side)->GetSettingsErrorNameFromEnum((vr::EVRSettingsError)eError); +} + +bool cppIVRSettings_IVRSettings_001_Sync(void *linux_side, bool bForce, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->Sync((bool)bForce, (vr::EVRSettingsError *)peError); +} + +bool cppIVRSettings_IVRSettings_001_GetBool(void *linux_side, const char * pchSection, const char * pchSettingsKey, bool bDefaultValue, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetBool((const char *)pchSection, (const char *)pchSettingsKey, (bool)bDefaultValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_SetBool(void *linux_side, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetBool((const char *)pchSection, (const char *)pchSettingsKey, (bool)bValue, (vr::EVRSettingsError *)peError); +} + +int32_t cppIVRSettings_IVRSettings_001_GetInt32(void *linux_side, const char * pchSection, const char * pchSettingsKey, int32_t nDefaultValue, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetInt32((const char *)pchSection, (const char *)pchSettingsKey, (int32_t)nDefaultValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_SetInt32(void *linux_side, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetInt32((const char *)pchSection, (const char *)pchSettingsKey, (int32_t)nValue, (vr::EVRSettingsError *)peError); +} + +float cppIVRSettings_IVRSettings_001_GetFloat(void *linux_side, const char * pchSection, const char * pchSettingsKey, float flDefaultValue, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetFloat((const char *)pchSection, (const char *)pchSettingsKey, (float)flDefaultValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_SetFloat(void *linux_side, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetFloat((const char *)pchSection, (const char *)pchSettingsKey, (float)flValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_GetString(void *linux_side, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, const char * pchDefaultValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->GetString((const char *)pchSection, (const char *)pchSettingsKey, (char *)pchValue, (uint32_t)unValueLen, (const char *)pchDefaultValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_SetString(void *linux_side, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetString((const char *)pchSection, (const char *)pchSettingsKey, (const char *)pchValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_RemoveSection(void *linux_side, const char * pchSection, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->RemoveSection((const char *)pchSection, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_001_RemoveKeyInSection(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->RemoveKeyInSection((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSettings_IVRSettings_001.h b/vrclient_x64/cppIVRSettings_IVRSettings_001.h new file mode 100644 index 00000000..761ce90b --- /dev/null +++ b/vrclient_x64/cppIVRSettings_IVRSettings_001.h @@ -0,0 +1,18 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern const char * cppIVRSettings_IVRSettings_001_GetSettingsErrorNameFromEnum(void *, EVRSettingsError); +extern bool cppIVRSettings_IVRSettings_001_Sync(void *, bool, EVRSettingsError *); +extern bool cppIVRSettings_IVRSettings_001_GetBool(void *, const char *, const char *, bool, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_SetBool(void *, const char *, const char *, bool, EVRSettingsError *); +extern int32_t cppIVRSettings_IVRSettings_001_GetInt32(void *, const char *, const char *, int32_t, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_SetInt32(void *, const char *, const char *, int32_t, EVRSettingsError *); +extern float cppIVRSettings_IVRSettings_001_GetFloat(void *, const char *, const char *, float, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_SetFloat(void *, const char *, const char *, float, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_GetString(void *, const char *, const char *, char *, uint32_t, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_SetString(void *, const char *, const char *, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_RemoveSection(void *, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_001_RemoveKeyInSection(void *, const char *, const char *, EVRSettingsError *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSettings_IVRSettings_002.cpp b/vrclient_x64/cppIVRSettings_IVRSettings_002.cpp new file mode 100644 index 00000000..19698f34 --- /dev/null +++ b/vrclient_x64/cppIVRSettings_IVRSettings_002.cpp @@ -0,0 +1,74 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSettings_IVRSettings_002.h" +#ifdef __cplusplus +extern "C" { +#endif +const char * cppIVRSettings_IVRSettings_002_GetSettingsErrorNameFromEnum(void *linux_side, EVRSettingsError eError) +{ + return ((IVRSettings*)linux_side)->GetSettingsErrorNameFromEnum((vr::EVRSettingsError)eError); +} + +bool cppIVRSettings_IVRSettings_002_Sync(void *linux_side, bool bForce, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->Sync((bool)bForce, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_SetBool(void *linux_side, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetBool((const char *)pchSection, (const char *)pchSettingsKey, (bool)bValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_SetInt32(void *linux_side, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetInt32((const char *)pchSection, (const char *)pchSettingsKey, (int32_t)nValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_SetFloat(void *linux_side, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetFloat((const char *)pchSection, (const char *)pchSettingsKey, (float)flValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_SetString(void *linux_side, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetString((const char *)pchSection, (const char *)pchSettingsKey, (const char *)pchValue, (vr::EVRSettingsError *)peError); +} + +bool cppIVRSettings_IVRSettings_002_GetBool(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetBool((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +int32_t cppIVRSettings_IVRSettings_002_GetInt32(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetInt32((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +float cppIVRSettings_IVRSettings_002_GetFloat(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetFloat((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_GetString(void *linux_side, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->GetString((const char *)pchSection, (const char *)pchSettingsKey, (char *)pchValue, (uint32_t)unValueLen, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_RemoveSection(void *linux_side, const char * pchSection, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->RemoveSection((const char *)pchSection, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_002_RemoveKeyInSection(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->RemoveKeyInSection((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSettings_IVRSettings_002.h b/vrclient_x64/cppIVRSettings_IVRSettings_002.h new file mode 100644 index 00000000..d89e0ea9 --- /dev/null +++ b/vrclient_x64/cppIVRSettings_IVRSettings_002.h @@ -0,0 +1,18 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern const char * cppIVRSettings_IVRSettings_002_GetSettingsErrorNameFromEnum(void *, EVRSettingsError); +extern bool cppIVRSettings_IVRSettings_002_Sync(void *, bool, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_SetBool(void *, const char *, const char *, bool, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_SetInt32(void *, const char *, const char *, int32_t, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_SetFloat(void *, const char *, const char *, float, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_SetString(void *, const char *, const char *, const char *, EVRSettingsError *); +extern bool cppIVRSettings_IVRSettings_002_GetBool(void *, const char *, const char *, EVRSettingsError *); +extern int32_t cppIVRSettings_IVRSettings_002_GetInt32(void *, const char *, const char *, EVRSettingsError *); +extern float cppIVRSettings_IVRSettings_002_GetFloat(void *, const char *, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_GetString(void *, const char *, const char *, char *, uint32_t, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_RemoveSection(void *, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_002_RemoveKeyInSection(void *, const char *, const char *, EVRSettingsError *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp new file mode 100644 index 00000000..8fbbaad4 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_003.cpp @@ -0,0 +1,220 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_003.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_003_GetWindowBounds(void *linux_side, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetWindowBounds((int32_t *)pnX, (int32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_003_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_003_GetEyeOutputViewport(void *linux_side, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetEyeOutputViewport((vr::Hmd_Eye)eEye, (uint32_t *)pnX, (uint32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_003_GetProjectionMatrix(void *linux_side, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::Hmd_Eye)eEye, (float)fNearZ, (float)fFarZ, (vr::GraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_003_GetProjectionRaw(void *linux_side, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::Hmd_Eye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_003_ComputeDistortion(void *linux_side, Hmd_Eye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::Hmd_Eye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_003_GetEyeToHeadTransform(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_003_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_003_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_003_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex, (int32_t *)pnAdapterOutputIndex); +} + +bool cppIVRSystem_IVRSystem_003_AttachToWindow(void *linux_side, void * hWnd) +{ + return ((IVRSystem*)linux_side)->AttachToWindow((void *)hWnd); +} + +void cppIVRSystem_IVRSystem_003_GetDeviceToAbsoluteTrackingPose(void *linux_side, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::TrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_003_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_003_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +bool cppIVRSystem_IVRSystem_003_LoadRenderModel(void *linux_side, const char * pchRenderModelName, winRenderModel_t_091 * pRenderModel) +{ + return ((IVRSystem*)linux_side)->LoadRenderModel((const char *)pchRenderModelName, struct_RenderModel_t_091_unwrap(pRenderModel)); +} + +void cppIVRSystem_IVRSystem_003_FreeRenderModel(void *linux_side, winRenderModel_t_091 * pRenderModel) +{ + ((IVRSystem*)linux_side)->FreeRenderModel(struct_RenderModel_t_091_unwrap(pRenderModel)); +} + +vr::TrackedDeviceClass cppIVRSystem_IVRSystem_003_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_003_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_003_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_003_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_003_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_003_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_003_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_003_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::TrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_003_GetPropErrorNameFromEnum(void *linux_side, TrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::TrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_003_PollNextEvent(void *linux_side, winVREvent_t_091 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); + struct_VREvent_t_091_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_003_PollNextEventWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, winVREvent_t_091 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_091_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_003_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_003_GetHiddenAreaMesh(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_003_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_091 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_091_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_003_GetControllerStateWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_091 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_091_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_003_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_003_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_003_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_003_HandleControllerOverlayInteractionAsMouse(void *linux_side, Compositor_OverlaySettings * overlaySettings, HmdVector2_t vecWindowClientPositionOnScreen, HmdVector2_t vecWindowClientSize, TrackedDeviceIndex_t unControllerDeviceIndex, EVRControllerEventOutputType eOutputType) +{ + return ((IVRSystem*)linux_side)->HandleControllerOverlayInteractionAsMouse(*overlaySettings, (vr::HmdVector2_t)vecWindowClientPositionOnScreen, (vr::HmdVector2_t)vecWindowClientSize, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (vr::EVRControllerEventOutputType)eOutputType); +} + +bool cppIVRSystem_IVRSystem_003_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_003_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_003_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_003.h b/vrclient_x64/cppIVRSystem_IVRSystem_003.h new file mode 100644 index 00000000..dd7ef8f9 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_003.h @@ -0,0 +1,44 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_003_GetWindowBounds(void *, int32_t *, int32_t *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_003_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_003_GetEyeOutputViewport(void *, Hmd_Eye, uint32_t *, uint32_t *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_003_GetProjectionMatrix(void *, Hmd_Eye, float, float, GraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_003_GetProjectionRaw(void *, Hmd_Eye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_003_ComputeDistortion(void *, Hmd_Eye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_003_GetEyeToHeadTransform(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_003_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_003_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_003_GetDXGIOutputInfo(void *, int32_t *, int32_t *); +extern bool cppIVRSystem_IVRSystem_003_AttachToWindow(void *, void *); +extern void cppIVRSystem_IVRSystem_003_GetDeviceToAbsoluteTrackingPose(void *, TrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_003_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_003_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern bool cppIVRSystem_IVRSystem_003_LoadRenderModel(void *, const char *, winRenderModel_t_091 *); +extern void cppIVRSystem_IVRSystem_003_FreeRenderModel(void *, winRenderModel_t_091 *); +extern TrackedDeviceClass cppIVRSystem_IVRSystem_003_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_003_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_003_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_003_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_003_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_003_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_003_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_003_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, char *, uint32_t, TrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_003_GetPropErrorNameFromEnum(void *, TrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_003_PollNextEvent(void *, winVREvent_t_091 *); +extern bool cppIVRSystem_IVRSystem_003_PollNextEventWithPose(void *, TrackingUniverseOrigin, winVREvent_t_091 *, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_003_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_003_GetHiddenAreaMesh(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_003_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_091 *); +extern bool cppIVRSystem_IVRSystem_003_GetControllerStateWithPose(void *, TrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_091 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_003_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_003_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_003_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_003_HandleControllerOverlayInteractionAsMouse(void *, Compositor_OverlaySettings *, HmdVector2_t, HmdVector2_t, TrackedDeviceIndex_t, EVRControllerEventOutputType); +extern bool cppIVRSystem_IVRSystem_003_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_003_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_003_IsInputFocusCapturedByAnotherProcess(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp new file mode 100644 index 00000000..36f84a78 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_004.cpp @@ -0,0 +1,210 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.2/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_004.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_004_GetWindowBounds(void *linux_side, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetWindowBounds((int32_t *)pnX, (int32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_004_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_004_GetEyeOutputViewport(void *linux_side, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetEyeOutputViewport((vr::Hmd_Eye)eEye, (uint32_t *)pnX, (uint32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_004_GetProjectionMatrix(void *linux_side, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::Hmd_Eye)eEye, (float)fNearZ, (float)fFarZ, (vr::GraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_004_GetProjectionRaw(void *linux_side, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::Hmd_Eye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_004_ComputeDistortion(void *linux_side, Hmd_Eye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::Hmd_Eye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_004_GetEyeToHeadTransform(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_004_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_004_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_004_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex, (int32_t *)pnAdapterOutputIndex); +} + +bool cppIVRSystem_IVRSystem_004_AttachToWindow(void *linux_side, void * hWnd) +{ + return ((IVRSystem*)linux_side)->AttachToWindow((void *)hWnd); +} + +void cppIVRSystem_IVRSystem_004_GetDeviceToAbsoluteTrackingPose(void *linux_side, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::TrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_004_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_004_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::TrackedDeviceClass cppIVRSystem_IVRSystem_004_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_004_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_004_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_004_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_004_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_004_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_004_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_004_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::TrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_004_GetPropErrorNameFromEnum(void *linux_side, TrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::TrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_004_PollNextEvent(void *linux_side, winVREvent_t_092 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); + struct_VREvent_t_092_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_004_PollNextEventWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, winVREvent_t_092 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_092_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_004_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_004_GetHiddenAreaMesh(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_004_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_092 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_092_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_004_GetControllerStateWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_092 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_092_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_004_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_004_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_004_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_004_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_004_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_004_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_004_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_004.h b/vrclient_x64/cppIVRSystem_IVRSystem_004.h new file mode 100644 index 00000000..a249b4a9 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_004.h @@ -0,0 +1,42 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_004_GetWindowBounds(void *, int32_t *, int32_t *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_004_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_004_GetEyeOutputViewport(void *, Hmd_Eye, uint32_t *, uint32_t *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_004_GetProjectionMatrix(void *, Hmd_Eye, float, float, GraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_004_GetProjectionRaw(void *, Hmd_Eye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_004_ComputeDistortion(void *, Hmd_Eye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_004_GetEyeToHeadTransform(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_004_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_004_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_004_GetDXGIOutputInfo(void *, int32_t *, int32_t *); +extern bool cppIVRSystem_IVRSystem_004_AttachToWindow(void *, void *); +extern void cppIVRSystem_IVRSystem_004_GetDeviceToAbsoluteTrackingPose(void *, TrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_004_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_004_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern TrackedDeviceClass cppIVRSystem_IVRSystem_004_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_004_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_004_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_004_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_004_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_004_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_004_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_004_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, char *, uint32_t, TrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_004_GetPropErrorNameFromEnum(void *, TrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_004_PollNextEvent(void *, winVREvent_t_092 *); +extern bool cppIVRSystem_IVRSystem_004_PollNextEventWithPose(void *, TrackingUniverseOrigin, winVREvent_t_092 *, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_004_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_004_GetHiddenAreaMesh(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_004_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_092 *); +extern bool cppIVRSystem_IVRSystem_004_GetControllerStateWithPose(void *, TrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_092 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_004_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_004_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_004_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_004_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_004_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_004_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_004_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp new file mode 100644 index 00000000..a42b5bc8 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_005.cpp @@ -0,0 +1,215 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.8/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_005.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_005_GetWindowBounds(void *linux_side, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetWindowBounds((int32_t *)pnX, (int32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_005_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_005_GetEyeOutputViewport(void *linux_side, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetEyeOutputViewport((vr::Hmd_Eye)eEye, (uint32_t *)pnX, (uint32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_005_GetProjectionMatrix(void *linux_side, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::Hmd_Eye)eEye, (float)fNearZ, (float)fFarZ, (vr::GraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_005_GetProjectionRaw(void *linux_side, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::Hmd_Eye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_005_ComputeDistortion(void *linux_side, Hmd_Eye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::Hmd_Eye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_005_GetEyeToHeadTransform(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_005_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_005_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_005_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex, (int32_t *)pnAdapterOutputIndex); +} + +bool cppIVRSystem_IVRSystem_005_AttachToWindow(void *linux_side, void * hWnd) +{ + return ((IVRSystem*)linux_side)->AttachToWindow((void *)hWnd); +} + +void cppIVRSystem_IVRSystem_005_GetDeviceToAbsoluteTrackingPose(void *linux_side, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::TrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_005_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_005_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_005_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, TrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::TrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::TrackedDeviceClass cppIVRSystem_IVRSystem_005_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_005_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_005_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_005_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_005_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_005_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_005_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_005_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::TrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_005_GetPropErrorNameFromEnum(void *linux_side, TrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::TrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_005_PollNextEvent(void *linux_side, winVREvent_t_098 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); + struct_VREvent_t_098_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_005_PollNextEventWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, winVREvent_t_098 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_098_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_005_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_005_GetHiddenAreaMesh(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_005_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_098 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_098_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_005_GetControllerStateWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_098 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_098_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_005_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_005_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_005_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_005_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_005_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_005_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_005_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_005.h b/vrclient_x64/cppIVRSystem_IVRSystem_005.h new file mode 100644 index 00000000..4f68c17b --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_005.h @@ -0,0 +1,43 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_005_GetWindowBounds(void *, int32_t *, int32_t *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_005_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_005_GetEyeOutputViewport(void *, Hmd_Eye, uint32_t *, uint32_t *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_005_GetProjectionMatrix(void *, Hmd_Eye, float, float, GraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_005_GetProjectionRaw(void *, Hmd_Eye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_005_ComputeDistortion(void *, Hmd_Eye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_005_GetEyeToHeadTransform(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_005_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_005_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_005_GetDXGIOutputInfo(void *, int32_t *, int32_t *); +extern bool cppIVRSystem_IVRSystem_005_AttachToWindow(void *, void *); +extern void cppIVRSystem_IVRSystem_005_GetDeviceToAbsoluteTrackingPose(void *, TrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_005_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_005_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_005_GetSortedTrackedDeviceIndicesOfClass(void *, TrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern TrackedDeviceClass cppIVRSystem_IVRSystem_005_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_005_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_005_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_005_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_005_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_005_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_005_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_005_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, char *, uint32_t, TrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_005_GetPropErrorNameFromEnum(void *, TrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_005_PollNextEvent(void *, winVREvent_t_098 *); +extern bool cppIVRSystem_IVRSystem_005_PollNextEventWithPose(void *, TrackingUniverseOrigin, winVREvent_t_098 *, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_005_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_005_GetHiddenAreaMesh(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_005_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_098 *); +extern bool cppIVRSystem_IVRSystem_005_GetControllerStateWithPose(void *, TrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_098 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_005_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_005_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_005_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_005_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_005_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_005_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_005_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp new file mode 100644 index 00000000..74f44195 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_006.cpp @@ -0,0 +1,240 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_006.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_006_GetWindowBounds(void *linux_side, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetWindowBounds((int32_t *)pnX, (int32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_006_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRSystem_IVRSystem_006_GetEyeOutputViewport(void *linux_side, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetEyeOutputViewport((vr::Hmd_Eye)eEye, (uint32_t *)pnX, (uint32_t *)pnY, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_006_GetProjectionMatrix(void *linux_side, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::Hmd_Eye)eEye, (float)fNearZ, (float)fFarZ, (vr::GraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_006_GetProjectionRaw(void *linux_side, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::Hmd_Eye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_006_ComputeDistortion(void *linux_side, Hmd_Eye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::Hmd_Eye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetEyeToHeadTransform(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_006_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_006_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_006_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex, (int32_t *)pnAdapterOutputIndex); +} + +bool cppIVRSystem_IVRSystem_006_AttachToWindow(void *linux_side, void * hWnd) +{ + return ((IVRSystem*)linux_side)->AttachToWindow((void *)hWnd); +} + +void cppIVRSystem_IVRSystem_006_GetDeviceToAbsoluteTrackingPose(void *linux_side, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::TrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_006_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_006_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, TrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::TrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_006_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +vr::TrackedDeviceClass cppIVRSystem_IVRSystem_006_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_006_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_006_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_006_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_006_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_006_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (vr::TrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_006_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::TrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_006_GetPropErrorNameFromEnum(void *linux_side, TrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::TrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_006_PollNextEvent(void *linux_side, winVREvent_t_0910 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); + struct_VREvent_t_0910_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_006_PollNextEventWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, winVREvent_t_0910 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::TrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_0910_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_006_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_006_GetHiddenAreaMesh(void *linux_side, Hmd_Eye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::Hmd_Eye)eEye); +} + +bool cppIVRSystem_IVRSystem_006_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0910 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_0910_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_006_GetControllerStateWithPose(void *linux_side, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0910 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::TrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_0910_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_006_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_006_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_006_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_006_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_006_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_006_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_006_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::VRFirmwareError cppIVRSystem_IVRSystem_006_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_006_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_006_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_006.h b/vrclient_x64/cppIVRSystem_IVRSystem_006.h new file mode 100644 index 00000000..77563bec --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_006.h @@ -0,0 +1,48 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_006_GetWindowBounds(void *, int32_t *, int32_t *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_006_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern void cppIVRSystem_IVRSystem_006_GetEyeOutputViewport(void *, Hmd_Eye, uint32_t *, uint32_t *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_006_GetProjectionMatrix(void *, Hmd_Eye, float, float, GraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_006_GetProjectionRaw(void *, Hmd_Eye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_006_ComputeDistortion(void *, Hmd_Eye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetEyeToHeadTransform(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_006_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_006_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_006_GetDXGIOutputInfo(void *, int32_t *, int32_t *); +extern bool cppIVRSystem_IVRSystem_006_AttachToWindow(void *, void *); +extern void cppIVRSystem_IVRSystem_006_GetDeviceToAbsoluteTrackingPose(void *, TrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_006_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_006_GetSortedTrackedDeviceIndicesOfClass(void *, TrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_006_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern TrackedDeviceClass cppIVRSystem_IVRSystem_006_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_006_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_006_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_006_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_006_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_006_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_006_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, TrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_006_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, TrackedDeviceProperty, char *, uint32_t, TrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_006_GetPropErrorNameFromEnum(void *, TrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_006_PollNextEvent(void *, winVREvent_t_0910 *); +extern bool cppIVRSystem_IVRSystem_006_PollNextEventWithPose(void *, TrackingUniverseOrigin, winVREvent_t_0910 *, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_006_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_006_GetHiddenAreaMesh(void *, Hmd_Eye); +extern bool cppIVRSystem_IVRSystem_006_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_0910 *); +extern bool cppIVRSystem_IVRSystem_006_GetControllerStateWithPose(void *, TrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_0910 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_006_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_006_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_006_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_006_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_006_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_006_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_006_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern VRFirmwareError cppIVRSystem_IVRSystem_006_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_006_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_006_SetDisplayVisibility(void *, bool); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp new file mode 100644 index 00000000..a1a6d678 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_009.cpp @@ -0,0 +1,240 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.12/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_009.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_009_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_009_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ, (vr::EGraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_009_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_009_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_009_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_009_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_009_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +bool cppIVRSystem_IVRSystem_009_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_009_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_009_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_009_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_009_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_009_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_009_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_009_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_009_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_009_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_009_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_009_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_009_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_009_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_009_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_009_PollNextEvent(void *linux_side, winVREvent_t_0912 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); + struct_VREvent_t_0912_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_009_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_0912 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_0912_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_009_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_009_GetHiddenAreaMesh(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_009_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0912 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_0912_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_009_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0912 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_0912_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_009_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_009_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_009_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_009_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_009_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_009_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_009_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_009_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_009_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_009_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_009.h b/vrclient_x64/cppIVRSystem_IVRSystem_009.h new file mode 100644 index 00000000..1b70b8ef --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_009.h @@ -0,0 +1,48 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_009_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_009_GetProjectionMatrix(void *, EVREye, float, float, EGraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_009_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_009_ComputeDistortion(void *, EVREye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_009_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_009_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_009_GetDXGIOutputInfo(void *, int32_t *); +extern bool cppIVRSystem_IVRSystem_009_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_009_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_009_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_009_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_009_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_009_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_009_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_009_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_009_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_009_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_009_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_009_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_009_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_009_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_009_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_009_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_009_PollNextEvent(void *, winVREvent_t_0912 *); +extern bool cppIVRSystem_IVRSystem_009_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_0912 *, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_009_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_009_GetHiddenAreaMesh(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_009_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_0912 *); +extern bool cppIVRSystem_IVRSystem_009_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_0912 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_009_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_009_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_009_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_009_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_009_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_009_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_009_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_009_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_009_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_009_AcknowledgeQuit_UserPrompt(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp new file mode 100644 index 00000000..022827cb --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_010.cpp @@ -0,0 +1,260 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_010.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_010_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_010_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ, (vr::EGraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_010_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_010_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_010_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_010_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_010_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +bool cppIVRSystem_IVRSystem_010_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_010_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_010_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_010_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_010_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_010_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_010_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_010_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_010_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_010_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_010_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_010_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_010_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_010_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_010_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_010_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_010_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_010_PollNextEvent(void *linux_side, winVREvent_t_0914 * pEvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin); + struct_VREvent_t_0914_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_010_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_0914 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_0914_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_010_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_010_GetHiddenAreaMesh(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_010_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0914 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_0914_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_010_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0914 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_0914_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_010_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_010_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_010_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_010_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_010_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_010_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_010_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_010_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_010_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_010_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +void cppIVRSystem_IVRSystem_010_PerformanceTestEnableCapture(void *linux_side, bool bEnable) +{ + ((IVRSystem*)linux_side)->PerformanceTestEnableCapture((bool)bEnable); +} + +void cppIVRSystem_IVRSystem_010_PerformanceTestReportFidelityLevelChange(void *linux_side, int nFidelityLevel) +{ + ((IVRSystem*)linux_side)->PerformanceTestReportFidelityLevelChange((int)nFidelityLevel); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_010.h b/vrclient_x64/cppIVRSystem_IVRSystem_010.h new file mode 100644 index 00000000..5bdb2d96 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_010.h @@ -0,0 +1,52 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_010_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_010_GetProjectionMatrix(void *, EVREye, float, float, EGraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_010_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_010_ComputeDistortion(void *, EVREye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_010_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_010_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_010_GetDXGIOutputInfo(void *, int32_t *); +extern bool cppIVRSystem_IVRSystem_010_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_010_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_010_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_010_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_010_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_010_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_010_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_010_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_010_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_010_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_010_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_010_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_010_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_010_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_010_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_010_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_010_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_010_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_010_PollNextEvent(void *, winVREvent_t_0914 *); +extern bool cppIVRSystem_IVRSystem_010_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_0914 *, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_010_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_010_GetHiddenAreaMesh(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_010_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_0914 *); +extern bool cppIVRSystem_IVRSystem_010_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_0914 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_010_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_010_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_010_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_010_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_010_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_010_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_010_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_010_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_010_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_010_AcknowledgeQuit_UserPrompt(void *); +extern void cppIVRSystem_IVRSystem_010_PerformanceTestEnableCapture(void *, bool); +extern void cppIVRSystem_IVRSystem_010_PerformanceTestReportFidelityLevelChange(void *, int); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp new file mode 100644 index 00000000..8efda809 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_011.cpp @@ -0,0 +1,260 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.18/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_011.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_011_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_011_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ, (vr::EGraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_011_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_011_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_011_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_011_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_011_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +bool cppIVRSystem_IVRSystem_011_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_011_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_011_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_011_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_011_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_011_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_011_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_011_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_011_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_011_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_011_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_011_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_011_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_011_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_011_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_011_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_011_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_011_PollNextEvent(void *linux_side, winVREvent_t_0918 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); + struct_VREvent_t_0918_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_011_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_0918 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_0918_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_011_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_011_GetHiddenAreaMesh(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_011_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0918 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_0918_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_011_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0918 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_0918_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_011_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_011_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_011_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_011_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_011_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_011_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_011_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_011_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_011_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_011_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +void cppIVRSystem_IVRSystem_011_PerformanceTestEnableCapture(void *linux_side, bool bEnable) +{ + ((IVRSystem*)linux_side)->PerformanceTestEnableCapture((bool)bEnable); +} + +void cppIVRSystem_IVRSystem_011_PerformanceTestReportFidelityLevelChange(void *linux_side, int nFidelityLevel) +{ + ((IVRSystem*)linux_side)->PerformanceTestReportFidelityLevelChange((int)nFidelityLevel); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_011.h b/vrclient_x64/cppIVRSystem_IVRSystem_011.h new file mode 100644 index 00000000..4f380c51 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_011.h @@ -0,0 +1,52 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_011_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_011_GetProjectionMatrix(void *, EVREye, float, float, EGraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_011_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_011_ComputeDistortion(void *, EVREye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_011_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_011_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_011_GetDXGIOutputInfo(void *, int32_t *); +extern bool cppIVRSystem_IVRSystem_011_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_011_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_011_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_011_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_011_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_011_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_011_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_011_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_011_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_011_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_011_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_011_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_011_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_011_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_011_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_011_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_011_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_011_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_011_PollNextEvent(void *, winVREvent_t_0918 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_011_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_0918 *, uint32_t, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_011_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_011_GetHiddenAreaMesh(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_011_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_0918 *); +extern bool cppIVRSystem_IVRSystem_011_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_0918 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_011_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_011_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_011_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_011_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_011_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_011_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_011_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_011_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_011_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_011_AcknowledgeQuit_UserPrompt(void *); +extern void cppIVRSystem_IVRSystem_011_PerformanceTestEnableCapture(void *, bool); +extern void cppIVRSystem_IVRSystem_011_PerformanceTestReportFidelityLevelChange(void *, int); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp new file mode 100644 index 00000000..67a76a5f --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_012.cpp @@ -0,0 +1,250 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.3/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_012.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_012_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_012_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ, (vr::EGraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_012_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +vr::DistortionCoordinates_t cppIVRSystem_IVRSystem_012_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_012_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_012_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_012_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +bool cppIVRSystem_IVRSystem_012_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_012_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_012_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_012_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_012_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_012_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_012_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_012_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_012_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_012_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_012_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_012_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_012_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_012_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_012_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_012_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_012_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_012_PollNextEvent(void *linux_side, winVREvent_t_103 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); + struct_VREvent_t_103_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_012_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_103 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_103_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_012_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_012_GetHiddenAreaMesh(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_012_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_103 * pControllerState) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin); + struct_VRControllerState001_t_103_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_012_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_103 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_103_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_012_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_012_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_012_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_012_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_012_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_012_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_012_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_012_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_012_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_012_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_012.h b/vrclient_x64/cppIVRSystem_IVRSystem_012.h new file mode 100644 index 00000000..f833e061 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_012.h @@ -0,0 +1,50 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_012_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_012_GetProjectionMatrix(void *, EVREye, float, float, EGraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_012_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern DistortionCoordinates_t cppIVRSystem_IVRSystem_012_ComputeDistortion(void *, EVREye, float, float); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_012_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_012_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_012_GetDXGIOutputInfo(void *, int32_t *); +extern bool cppIVRSystem_IVRSystem_012_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_012_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_012_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_012_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_012_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_012_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_012_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_012_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_012_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_012_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_012_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_012_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_012_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_012_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_012_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_012_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_012_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_012_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_012_PollNextEvent(void *, winVREvent_t_103 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_012_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_103 *, uint32_t, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_012_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_012_GetHiddenAreaMesh(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_012_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_103 *); +extern bool cppIVRSystem_IVRSystem_012_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_103 *, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_012_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_012_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_012_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_012_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_012_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_012_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_012_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_012_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_012_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_012_AcknowledgeQuit_UserPrompt(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp new file mode 100644 index 00000000..bfb627fe --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_014.cpp @@ -0,0 +1,250 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.4/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_014.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_014_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_014_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ, (vr::EGraphicsAPIConvention)eProjType); +} + +void cppIVRSystem_IVRSystem_014_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +bool cppIVRSystem_IVRSystem_014_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV, (vr::DistortionCoordinates_t *)pDistortionCoordinates); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_014_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_014_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_014_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +bool cppIVRSystem_IVRSystem_014_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_014_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_014_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_014_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_014_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_014_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_014_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_014_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_014_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_014_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_014_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_014_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_014_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_014_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_014_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_014_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_014_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_014_PollNextEvent(void *linux_side, winVREvent_t_104 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); + struct_VREvent_t_104_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_014_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_104 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_104_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_014_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_014_GetHiddenAreaMesh(void *linux_side, EVREye eEye, EHiddenAreaMeshType type) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type); +} + +bool cppIVRSystem_IVRSystem_014_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_104 * pControllerState, uint32_t unControllerStateSize) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize); + struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_014_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_104 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_104_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_014_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_014_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_014_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_014_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_014_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_014_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_014_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_014_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_014_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_014_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_014.h b/vrclient_x64/cppIVRSystem_IVRSystem_014.h new file mode 100644 index 00000000..0d207a3d --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_014.h @@ -0,0 +1,50 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_014_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_014_GetProjectionMatrix(void *, EVREye, float, float, EGraphicsAPIConvention); +extern void cppIVRSystem_IVRSystem_014_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern bool cppIVRSystem_IVRSystem_014_ComputeDistortion(void *, EVREye, float, float, DistortionCoordinates_t *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_014_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_014_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_014_GetDXGIOutputInfo(void *, int32_t *); +extern bool cppIVRSystem_IVRSystem_014_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_014_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_014_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_014_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_014_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_014_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_014_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_014_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_014_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_014_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_014_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_014_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_014_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_014_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_014_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_014_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_014_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_014_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_014_PollNextEvent(void *, winVREvent_t_104 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_014_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_104 *, uint32_t, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_014_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_014_GetHiddenAreaMesh(void *, EVREye, EHiddenAreaMeshType); +extern bool cppIVRSystem_IVRSystem_014_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_104 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_014_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_104 *, uint32_t, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_014_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_014_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_014_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_014_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_014_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_014_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_014_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_014_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_014_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_014_AcknowledgeQuit_UserPrompt(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp new file mode 100644 index 00000000..aa713b1f --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_015.cpp @@ -0,0 +1,250 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.7/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_015.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_015_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ); +} + +void cppIVRSystem_IVRSystem_015_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +bool cppIVRSystem_IVRSystem_015_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV, (vr::DistortionCoordinates_t *)pDistortionCoordinates); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_015_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_015_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_015_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +bool cppIVRSystem_IVRSystem_015_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_015_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_015_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_015_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_015_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_015_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_015_PollNextEvent(void *linux_side, winVREvent_t_107 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); + struct_VREvent_t_107_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_015_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_107 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_107_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_015_GetHiddenAreaMesh(void *linux_side, EVREye eEye, EHiddenAreaMeshType type) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type); +} + +bool cppIVRSystem_IVRSystem_015_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_107 * pControllerState, uint32_t unControllerStateSize) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize); + struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_015_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_107 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_107_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_015_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_015_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_015_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_015_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_015_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_015.h b/vrclient_x64/cppIVRSystem_IVRSystem_015.h new file mode 100644 index 00000000..f42a0fd8 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_015.h @@ -0,0 +1,50 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_015_GetProjectionMatrix(void *, EVREye, float, float); +extern void cppIVRSystem_IVRSystem_015_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern bool cppIVRSystem_IVRSystem_015_ComputeDistortion(void *, EVREye, float, float, DistortionCoordinates_t *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_015_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_015_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_015_GetDXGIOutputInfo(void *, int32_t *); +extern bool cppIVRSystem_IVRSystem_015_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_015_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_015_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_015_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_015_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_015_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_015_PollNextEvent(void *, winVREvent_t_107 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_015_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_107 *, uint32_t, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_015_GetHiddenAreaMesh(void *, EVREye, EHiddenAreaMeshType); +extern bool cppIVRSystem_IVRSystem_015_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_107 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_015_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_107 *, uint32_t, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_015_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_015_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_015_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_015_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_015_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp new file mode 100644 index 00000000..9c6c3a64 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_016.cpp @@ -0,0 +1,255 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.9/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_016.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_016_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_016_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ); +} + +void cppIVRSystem_IVRSystem_016_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +bool cppIVRSystem_IVRSystem_016_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV, (vr::DistortionCoordinates_t *)pDistortionCoordinates); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_016_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_016_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_016_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +void cppIVRSystem_IVRSystem_016_GetOutputDevice(void *linux_side, uint64_t * pnDevice, ETextureType textureType) +{ + ((IVRSystem*)linux_side)->GetOutputDevice((uint64_t *)pnDevice, (vr::ETextureType)textureType); +} + +bool cppIVRSystem_IVRSystem_016_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_016_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_016_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_016_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_016_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_016_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_016_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_016_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_016_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_016_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_016_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_016_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_016_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_016_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_016_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_016_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_016_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_016_PollNextEvent(void *linux_side, winVREvent_t_109 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); + struct_VREvent_t_109_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_016_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_109 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_109_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_016_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_016_GetHiddenAreaMesh(void *linux_side, EVREye eEye, EHiddenAreaMeshType type) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type); +} + +bool cppIVRSystem_IVRSystem_016_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_109 * pControllerState, uint32_t unControllerStateSize) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize); + struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_016_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_109 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_109_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_016_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_016_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_016_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_016_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_016_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_016_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_016_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_016_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_016_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_016_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_016.h b/vrclient_x64/cppIVRSystem_IVRSystem_016.h new file mode 100644 index 00000000..0ecc16be --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_016.h @@ -0,0 +1,51 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_016_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_016_GetProjectionMatrix(void *, EVREye, float, float); +extern void cppIVRSystem_IVRSystem_016_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern bool cppIVRSystem_IVRSystem_016_ComputeDistortion(void *, EVREye, float, float, DistortionCoordinates_t *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_016_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_016_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_016_GetDXGIOutputInfo(void *, int32_t *); +extern void cppIVRSystem_IVRSystem_016_GetOutputDevice(void *, uint64_t *, ETextureType); +extern bool cppIVRSystem_IVRSystem_016_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_016_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_016_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_016_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_016_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_016_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_016_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_016_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_016_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_016_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_016_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_016_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_016_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_016_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_016_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_016_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_016_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_016_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_016_PollNextEvent(void *, winVREvent_t_109 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_016_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_109 *, uint32_t, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_016_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_016_GetHiddenAreaMesh(void *, EVREye, EHiddenAreaMeshType); +extern bool cppIVRSystem_IVRSystem_016_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_109 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_016_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_109 *, uint32_t, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_016_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_016_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_016_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_016_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_016_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_016_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_016_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_016_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_016_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_016_AcknowledgeQuit_UserPrompt(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp b/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp new file mode 100644 index 00000000..de8ab764 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_017.cpp @@ -0,0 +1,255 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSystem_IVRSystem_017.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRSystem_IVRSystem_017_GetRecommendedRenderTargetSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRSystem*)linux_side)->GetRecommendedRenderTargetSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::HmdMatrix44_t cppIVRSystem_IVRSystem_017_GetProjectionMatrix(void *linux_side, EVREye eEye, float fNearZ, float fFarZ) +{ + return ((IVRSystem*)linux_side)->GetProjectionMatrix((vr::EVREye)eEye, (float)fNearZ, (float)fFarZ); +} + +void cppIVRSystem_IVRSystem_017_GetProjectionRaw(void *linux_side, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + ((IVRSystem*)linux_side)->GetProjectionRaw((vr::EVREye)eEye, (float *)pfLeft, (float *)pfRight, (float *)pfTop, (float *)pfBottom); +} + +bool cppIVRSystem_IVRSystem_017_ComputeDistortion(void *linux_side, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + return ((IVRSystem*)linux_side)->ComputeDistortion((vr::EVREye)eEye, (float)fU, (float)fV, (vr::DistortionCoordinates_t *)pDistortionCoordinates); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetEyeToHeadTransform(void *linux_side, EVREye eEye) +{ + return ((IVRSystem*)linux_side)->GetEyeToHeadTransform((vr::EVREye)eEye); +} + +bool cppIVRSystem_IVRSystem_017_GetTimeSinceLastVsync(void *linux_side, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + return ((IVRSystem*)linux_side)->GetTimeSinceLastVsync((float *)pfSecondsSinceLastVsync, (uint64_t *)pulFrameCounter); +} + +int32_t cppIVRSystem_IVRSystem_017_GetD3D9AdapterIndex(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetD3D9AdapterIndex(); +} + +void cppIVRSystem_IVRSystem_017_GetDXGIOutputInfo(void *linux_side, int32_t * pnAdapterIndex) +{ + ((IVRSystem*)linux_side)->GetDXGIOutputInfo((int32_t *)pnAdapterIndex); +} + +void cppIVRSystem_IVRSystem_017_GetOutputDevice(void *linux_side, uint64_t * pnDevice, ETextureType textureType, VkInstance_T * pInstance) +{ + ((IVRSystem*)linux_side)->GetOutputDevice((uint64_t *)pnDevice, (vr::ETextureType)textureType, (VkInstance_T *)pInstance); +} + +bool cppIVRSystem_IVRSystem_017_IsDisplayOnDesktop(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsDisplayOnDesktop(); +} + +bool cppIVRSystem_IVRSystem_017_SetDisplayVisibility(void *linux_side, bool bIsVisibleOnDesktop) +{ + return ((IVRSystem*)linux_side)->SetDisplayVisibility((bool)bIsVisibleOnDesktop); +} + +void cppIVRSystem_IVRSystem_017_GetDeviceToAbsoluteTrackingPose(void *linux_side, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + ((IVRSystem*)linux_side)->GetDeviceToAbsoluteTrackingPose((vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsToPhotonsFromNow, (vr::TrackedDevicePose_t *)pTrackedDevicePoseArray, (uint32_t)unTrackedDevicePoseArrayCount); +} + +void cppIVRSystem_IVRSystem_017_ResetSeatedZeroPose(void *linux_side) +{ + ((IVRSystem*)linux_side)->ResetSeatedZeroPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *linux_side) +{ + return ((IVRSystem*)linux_side)->GetRawZeroPoseToStandingAbsoluteTrackingPose(); +} + +uint32_t cppIVRSystem_IVRSystem_017_GetSortedTrackedDeviceIndicesOfClass(void *linux_side, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetSortedTrackedDeviceIndicesOfClass((vr::ETrackedDeviceClass)eTrackedDeviceClass, (vr::TrackedDeviceIndex_t *)punTrackedDeviceIndexArray, (uint32_t)unTrackedDeviceIndexArrayCount, (vr::TrackedDeviceIndex_t)unRelativeToTrackedDeviceIndex); +} + +vr::EDeviceActivityLevel cppIVRSystem_IVRSystem_017_GetTrackedDeviceActivityLevel(void *linux_side, TrackedDeviceIndex_t unDeviceId) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceActivityLevel((vr::TrackedDeviceIndex_t)unDeviceId); +} + +void cppIVRSystem_IVRSystem_017_ApplyTransform(void *linux_side, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + ((IVRSystem*)linux_side)->ApplyTransform((vr::TrackedDevicePose_t *)pOutputPose, (const vr::TrackedDevicePose_t *)pTrackedDevicePose, (const vr::HmdMatrix34_t *)pTransform); +} + +vr::TrackedDeviceIndex_t cppIVRSystem_IVRSystem_017_GetTrackedDeviceIndexForControllerRole(void *linux_side, ETrackedControllerRole unDeviceType) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceIndexForControllerRole((vr::ETrackedControllerRole)unDeviceType); +} + +vr::ETrackedControllerRole cppIVRSystem_IVRSystem_017_GetControllerRoleForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetControllerRoleForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +vr::ETrackedDeviceClass cppIVRSystem_IVRSystem_017_GetTrackedDeviceClass(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->GetTrackedDeviceClass((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_017_IsTrackedDeviceConnected(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->IsTrackedDeviceConnected((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +bool cppIVRSystem_IVRSystem_017_GetBoolTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetBoolTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +float cppIVRSystem_IVRSystem_017_GetFloatTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetFloatTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +int32_t cppIVRSystem_IVRSystem_017_GetInt32TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetInt32TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint64_t cppIVRSystem_IVRSystem_017_GetUint64TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetUint64TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +vr::HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetMatrix34TrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetMatrix34TrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (vr::ETrackedPropertyError *)pError); +} + +uint32_t cppIVRSystem_IVRSystem_017_GetStringTrackedDeviceProperty(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + return ((IVRSystem*)linux_side)->GetStringTrackedDeviceProperty((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::ETrackedDeviceProperty)prop, (char *)pchValue, (uint32_t)unBufferSize, (vr::ETrackedPropertyError *)pError); +} + +const char * cppIVRSystem_IVRSystem_017_GetPropErrorNameFromEnum(void *linux_side, ETrackedPropertyError error) +{ + return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); +} + +bool cppIVRSystem_IVRSystem_017_PollNextEvent(void *linux_side, winVREvent_t_1011 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEvent(&lin, sizeof(lin)); + struct_VREvent_t_1011_lin_to_win(&lin, pEvent); + return _ret; +} + +bool cppIVRSystem_IVRSystem_017_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_1011 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + VREvent_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, &lin, sizeof(lin), (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VREvent_t_1011_lin_to_win(&lin, pEvent); + return _ret; +} + +const char * cppIVRSystem_IVRSystem_017_GetEventTypeNameFromEnum(void *linux_side, EVREventType eType) +{ + return ((IVRSystem*)linux_side)->GetEventTypeNameFromEnum((vr::EVREventType)eType); +} + +vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_017_GetHiddenAreaMesh(void *linux_side, EVREye eEye, EHiddenAreaMeshType type) +{ + return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type); +} + +bool cppIVRSystem_IVRSystem_017_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1011 * pControllerState, uint32_t unControllerStateSize) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize); + struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState); + return _ret; +} + +bool cppIVRSystem_IVRSystem_017_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1011 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + VRControllerState001_t lin; + bool _ret; + _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, &lin, (uint32_t)unControllerStateSize, (vr::TrackedDevicePose_t *)pTrackedDevicePose); + struct_VRControllerState001_t_1011_lin_to_win(&lin, pControllerState); + return _ret; +} + +void cppIVRSystem_IVRSystem_017_TriggerHapticPulse(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + ((IVRSystem*)linux_side)->TriggerHapticPulse((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, (uint32_t)unAxisId, (unsigned short)usDurationMicroSec); +} + +const char * cppIVRSystem_IVRSystem_017_GetButtonIdNameFromEnum(void *linux_side, EVRButtonId eButtonId) +{ + return ((IVRSystem*)linux_side)->GetButtonIdNameFromEnum((vr::EVRButtonId)eButtonId); +} + +const char * cppIVRSystem_IVRSystem_017_GetControllerAxisTypeNameFromEnum(void *linux_side, EVRControllerAxisType eAxisType) +{ + return ((IVRSystem*)linux_side)->GetControllerAxisTypeNameFromEnum((vr::EVRControllerAxisType)eAxisType); +} + +bool cppIVRSystem_IVRSystem_017_CaptureInputFocus(void *linux_side) +{ + return ((IVRSystem*)linux_side)->CaptureInputFocus(); +} + +void cppIVRSystem_IVRSystem_017_ReleaseInputFocus(void *linux_side) +{ + ((IVRSystem*)linux_side)->ReleaseInputFocus(); +} + +bool cppIVRSystem_IVRSystem_017_IsInputFocusCapturedByAnotherProcess(void *linux_side) +{ + return ((IVRSystem*)linux_side)->IsInputFocusCapturedByAnotherProcess(); +} + +uint32_t cppIVRSystem_IVRSystem_017_DriverDebugRequest(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + return ((IVRSystem*)linux_side)->DriverDebugRequest((vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchRequest, (char *)pchResponseBuffer, (uint32_t)unResponseBufferSize); +} + +vr::EVRFirmwareError cppIVRSystem_IVRSystem_017_PerformFirmwareUpdate(void *linux_side, TrackedDeviceIndex_t unDeviceIndex) +{ + return ((IVRSystem*)linux_side)->PerformFirmwareUpdate((vr::TrackedDeviceIndex_t)unDeviceIndex); +} + +void cppIVRSystem_IVRSystem_017_AcknowledgeQuit_Exiting(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_Exiting(); +} + +void cppIVRSystem_IVRSystem_017_AcknowledgeQuit_UserPrompt(void *linux_side) +{ + ((IVRSystem*)linux_side)->AcknowledgeQuit_UserPrompt(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRSystem_IVRSystem_017.h b/vrclient_x64/cppIVRSystem_IVRSystem_017.h new file mode 100644 index 00000000..9adbf179 --- /dev/null +++ b/vrclient_x64/cppIVRSystem_IVRSystem_017.h @@ -0,0 +1,51 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRSystem_IVRSystem_017_GetRecommendedRenderTargetSize(void *, uint32_t *, uint32_t *); +extern HmdMatrix44_t cppIVRSystem_IVRSystem_017_GetProjectionMatrix(void *, EVREye, float, float); +extern void cppIVRSystem_IVRSystem_017_GetProjectionRaw(void *, EVREye, float *, float *, float *, float *); +extern bool cppIVRSystem_IVRSystem_017_ComputeDistortion(void *, EVREye, float, float, DistortionCoordinates_t *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetEyeToHeadTransform(void *, EVREye); +extern bool cppIVRSystem_IVRSystem_017_GetTimeSinceLastVsync(void *, float *, uint64_t *); +extern int32_t cppIVRSystem_IVRSystem_017_GetD3D9AdapterIndex(void *); +extern void cppIVRSystem_IVRSystem_017_GetDXGIOutputInfo(void *, int32_t *); +extern void cppIVRSystem_IVRSystem_017_GetOutputDevice(void *, uint64_t *, ETextureType, VkInstance_T *); +extern bool cppIVRSystem_IVRSystem_017_IsDisplayOnDesktop(void *); +extern bool cppIVRSystem_IVRSystem_017_SetDisplayVisibility(void *, bool); +extern void cppIVRSystem_IVRSystem_017_GetDeviceToAbsoluteTrackingPose(void *, ETrackingUniverseOrigin, float, TrackedDevicePose_t *, uint32_t); +extern void cppIVRSystem_IVRSystem_017_ResetSeatedZeroPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(void *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetRawZeroPoseToStandingAbsoluteTrackingPose(void *); +extern uint32_t cppIVRSystem_IVRSystem_017_GetSortedTrackedDeviceIndicesOfClass(void *, ETrackedDeviceClass, TrackedDeviceIndex_t *, uint32_t, TrackedDeviceIndex_t); +extern EDeviceActivityLevel cppIVRSystem_IVRSystem_017_GetTrackedDeviceActivityLevel(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_017_ApplyTransform(void *, TrackedDevicePose_t *, TrackedDevicePose_t *, HmdMatrix34_t *); +extern TrackedDeviceIndex_t cppIVRSystem_IVRSystem_017_GetTrackedDeviceIndexForControllerRole(void *, ETrackedControllerRole); +extern ETrackedControllerRole cppIVRSystem_IVRSystem_017_GetControllerRoleForTrackedDeviceIndex(void *, TrackedDeviceIndex_t); +extern ETrackedDeviceClass cppIVRSystem_IVRSystem_017_GetTrackedDeviceClass(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_017_IsTrackedDeviceConnected(void *, TrackedDeviceIndex_t); +extern bool cppIVRSystem_IVRSystem_017_GetBoolTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern float cppIVRSystem_IVRSystem_017_GetFloatTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern int32_t cppIVRSystem_IVRSystem_017_GetInt32TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint64_t cppIVRSystem_IVRSystem_017_GetUint64TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern HmdMatrix34_t cppIVRSystem_IVRSystem_017_GetMatrix34TrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, ETrackedPropertyError *); +extern uint32_t cppIVRSystem_IVRSystem_017_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); +extern const char * cppIVRSystem_IVRSystem_017_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); +extern bool cppIVRSystem_IVRSystem_017_PollNextEvent(void *, winVREvent_t_1011 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_017_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_1011 *, uint32_t, TrackedDevicePose_t *); +extern const char * cppIVRSystem_IVRSystem_017_GetEventTypeNameFromEnum(void *, EVREventType); +extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_017_GetHiddenAreaMesh(void *, EVREye, EHiddenAreaMeshType); +extern bool cppIVRSystem_IVRSystem_017_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_1011 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_017_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_1011 *, uint32_t, TrackedDevicePose_t *); +extern void cppIVRSystem_IVRSystem_017_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); +extern const char * cppIVRSystem_IVRSystem_017_GetButtonIdNameFromEnum(void *, EVRButtonId); +extern const char * cppIVRSystem_IVRSystem_017_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); +extern bool cppIVRSystem_IVRSystem_017_CaptureInputFocus(void *); +extern void cppIVRSystem_IVRSystem_017_ReleaseInputFocus(void *); +extern bool cppIVRSystem_IVRSystem_017_IsInputFocusCapturedByAnotherProcess(void *); +extern uint32_t cppIVRSystem_IVRSystem_017_DriverDebugRequest(void *, TrackedDeviceIndex_t, const char *, char *, uint32_t); +extern EVRFirmwareError cppIVRSystem_IVRSystem_017_PerformFirmwareUpdate(void *, TrackedDeviceIndex_t); +extern void cppIVRSystem_IVRSystem_017_AcknowledgeQuit_Exiting(void *); +extern void cppIVRSystem_IVRSystem_017_AcknowledgeQuit_UserPrompt(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.cpp b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.cpp new file mode 100644 index 00000000..bf5c0a5c --- /dev/null +++ b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.cpp @@ -0,0 +1,104 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRTrackedCamera_IVRTrackedCamera_001.h" +#ifdef __cplusplus +extern "C" { +#endif +bool cppIVRTrackedCamera_IVRTrackedCamera_001_HasCamera(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->HasCamera((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFirmwareDescription(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, char * pBuffer, uint32_t nBufferLen) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraFirmwareDescription((vr::TrackedDeviceIndex_t)nDeviceIndex, (char *)pBuffer, (uint32_t)nBufferLen); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFrameDimensions(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraFrameDimensions((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::ECameraVideoStreamFormat)nVideoStreamFormat, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_SetCameraVideoStreamFormat(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat) +{ + return ((IVRTrackedCamera*)linux_side)->SetCameraVideoStreamFormat((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::ECameraVideoStreamFormat)nVideoStreamFormat); +} + +vr::ECameraVideoStreamFormat cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraVideoStreamFormat(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraVideoStreamFormat((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_EnableCameraForStreaming(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, bool bEnable) +{ + return ((IVRTrackedCamera*)linux_side)->EnableCameraForStreaming((vr::TrackedDeviceIndex_t)nDeviceIndex, (bool)bEnable); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_StartVideoStream(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->StartVideoStream((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_StopVideoStream(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->StopVideoStream((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamActive(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->IsVideoStreamActive((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +float cppIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamElapsedTime(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamElapsedTime((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +const vr::CameraVideoStreamFrame_t * cppIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamFrame(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamFrame((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_ReleaseVideoStreamFrame(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, CameraVideoStreamFrame_t * pFrameImage) +{ + return ((IVRTrackedCamera*)linux_side)->ReleaseVideoStreamFrame((vr::TrackedDeviceIndex_t)nDeviceIndex, (const vr::CameraVideoStreamFrame_t *)pFrameImage); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_SetAutoExposure(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, bool bEnable) +{ + return ((IVRTrackedCamera*)linux_side)->SetAutoExposure((vr::TrackedDeviceIndex_t)nDeviceIndex, (bool)bEnable); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_PauseVideoStream(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->PauseVideoStream((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_ResumeVideoStream(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->ResumeVideoStream((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamPaused(void *linux_side, TrackedDeviceIndex_t nDeviceIndex) +{ + return ((IVRTrackedCamera*)linux_side)->IsVideoStreamPaused((vr::TrackedDeviceIndex_t)nDeviceIndex); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraDistortion(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float * pflOutputU, float * pflOutputV) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraDistortion((vr::TrackedDeviceIndex_t)nDeviceIndex, (float)flInputU, (float)flInputV, (float *)pflOutputU, (float *)pflOutputV); +} + +bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraProjection(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, HmdMatrix44_t * pProjection) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraProjection((vr::TrackedDeviceIndex_t)nDeviceIndex, (float)flWidthPixels, (float)flHeightPixels, (float)flZNear, (float)flZFar, (vr::HmdMatrix44_t *)pProjection); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.h b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.h new file mode 100644 index 00000000..83d7a191 --- /dev/null +++ b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.h @@ -0,0 +1,24 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_HasCamera(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFirmwareDescription(void *, TrackedDeviceIndex_t, char *, uint32_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFrameDimensions(void *, TrackedDeviceIndex_t, ECameraVideoStreamFormat, uint32_t *, uint32_t *); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_SetCameraVideoStreamFormat(void *, TrackedDeviceIndex_t, ECameraVideoStreamFormat); +extern ECameraVideoStreamFormat cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraVideoStreamFormat(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_EnableCameraForStreaming(void *, TrackedDeviceIndex_t, bool); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_StartVideoStream(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_StopVideoStream(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamActive(void *, TrackedDeviceIndex_t); +extern float cppIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamElapsedTime(void *, TrackedDeviceIndex_t); +extern const CameraVideoStreamFrame_t * cppIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamFrame(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_ReleaseVideoStreamFrame(void *, TrackedDeviceIndex_t, CameraVideoStreamFrame_t *); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_SetAutoExposure(void *, TrackedDeviceIndex_t, bool); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_PauseVideoStream(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_ResumeVideoStream(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamPaused(void *, TrackedDeviceIndex_t); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraDistortion(void *, TrackedDeviceIndex_t, float, float, float *, float *); +extern bool cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraProjection(void *, TrackedDeviceIndex_t, float, float, float, float, HmdMatrix44_t *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.cpp b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.cpp new file mode 100644 index 00000000..ec024795 --- /dev/null +++ b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.cpp @@ -0,0 +1,54 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.0/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRTrackedCamera_IVRTrackedCamera_002.h" +#ifdef __cplusplus +extern "C" { +#endif +const char * cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraErrorNameFromEnum(void *linux_side, EVRTrackedCameraError eCameraError) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraErrorNameFromEnum((vr::EVRTrackedCameraError)eCameraError); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_HasCamera(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera) +{ + return ((IVRTrackedCamera*)linux_side)->HasCamera((vr::TrackedDeviceIndex_t)nDeviceIndex, (bool *)pHasCamera); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraFrameSize(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraFrameSize((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (uint32_t *)pnWidth, (uint32_t *)pnHeight, (uint32_t *)pnFrameBufferSize); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraIntrinisics(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraIntrinisics((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (vr::HmdVector2_t *)pFocalLength, (vr::HmdVector2_t *)pCenter); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraProjection(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraProjection((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (float)flZNear, (float)flZFar, (vr::HmdMatrix44_t *)pProjection); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_AcquireVideoStreamingService(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle) +{ + return ((IVRTrackedCamera*)linux_side)->AcquireVideoStreamingService((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::TrackedCameraHandle_t *)pHandle); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_ReleaseVideoStreamingService(void *linux_side, TrackedCameraHandle_t hTrackedCamera) +{ + return ((IVRTrackedCamera*)linux_side)->ReleaseVideoStreamingService((vr::TrackedCameraHandle_t)hTrackedCamera); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetVideoStreamFrameBuffer(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamFrameBuffer((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (void *)pFrameBuffer, (uint32_t)nFrameBufferSize, (vr::CameraVideoStreamFrameHeader_t *)pFrameHeader, (uint32_t)nFrameHeaderSize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.h b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.h new file mode 100644 index 00000000..a2d99489 --- /dev/null +++ b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.h @@ -0,0 +1,14 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern const char * cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraErrorNameFromEnum(void *, EVRTrackedCameraError); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_HasCamera(void *, TrackedDeviceIndex_t, bool *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraFrameSize(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, uint32_t *, uint32_t *, uint32_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraIntrinisics(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, HmdVector2_t *, HmdVector2_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraProjection(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, float, float, HmdMatrix44_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_AcquireVideoStreamingService(void *, TrackedDeviceIndex_t, TrackedCameraHandle_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_ReleaseVideoStreamingService(void *, TrackedCameraHandle_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_002_GetVideoStreamFrameBuffer(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, uint32_t, CameraVideoStreamFrameHeader_t *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.cpp b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.cpp new file mode 100644 index 00000000..e50b6dea --- /dev/null +++ b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.cpp @@ -0,0 +1,74 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRTrackedCamera_IVRTrackedCamera_003.h" +#ifdef __cplusplus +extern "C" { +#endif +const char * cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraErrorNameFromEnum(void *linux_side, EVRTrackedCameraError eCameraError) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraErrorNameFromEnum((vr::EVRTrackedCameraError)eCameraError); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_HasCamera(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera) +{ + return ((IVRTrackedCamera*)linux_side)->HasCamera((vr::TrackedDeviceIndex_t)nDeviceIndex, (bool *)pHasCamera); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraFrameSize(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraFrameSize((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (uint32_t *)pnWidth, (uint32_t *)pnHeight, (uint32_t *)pnFrameBufferSize); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraIntrinsics(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraIntrinsics((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (vr::HmdVector2_t *)pFocalLength, (vr::HmdVector2_t *)pCenter); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraProjection(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection) +{ + return ((IVRTrackedCamera*)linux_side)->GetCameraProjection((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (float)flZNear, (float)flZFar, (vr::HmdMatrix44_t *)pProjection); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_AcquireVideoStreamingService(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle) +{ + return ((IVRTrackedCamera*)linux_side)->AcquireVideoStreamingService((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::TrackedCameraHandle_t *)pHandle); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamingService(void *linux_side, TrackedCameraHandle_t hTrackedCamera) +{ + return ((IVRTrackedCamera*)linux_side)->ReleaseVideoStreamingService((vr::TrackedCameraHandle_t)hTrackedCamera); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamFrameBuffer(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamFrameBuffer((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (void *)pFrameBuffer, (uint32_t)nFrameBufferSize, (vr::CameraVideoStreamFrameHeader_t *)pFrameHeader, (uint32_t)nFrameHeaderSize); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureSize(void *linux_side, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, VRTextureBounds_t * pTextureBounds, uint32_t * pnWidth, uint32_t * pnHeight) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamTextureSize((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (vr::VRTextureBounds_t *)pTextureBounds, (uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureD3D11(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamTextureD3D11((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView, (vr::CameraVideoStreamFrameHeader_t *)pFrameHeader, (uint32_t)nFrameHeaderSize); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureGL(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + return ((IVRTrackedCamera*)linux_side)->GetVideoStreamTextureGL((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (vr::glUInt_t *)pglTextureId, (vr::CameraVideoStreamFrameHeader_t *)pFrameHeader, (uint32_t)nFrameHeaderSize); +} + +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamTextureGL(void *linux_side, TrackedCameraHandle_t hTrackedCamera, glUInt_t glTextureId) +{ + return ((IVRTrackedCamera*)linux_side)->ReleaseVideoStreamTextureGL((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::glUInt_t)glTextureId); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.h b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.h new file mode 100644 index 00000000..14a1a7b0 --- /dev/null +++ b/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.h @@ -0,0 +1,18 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern const char * cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraErrorNameFromEnum(void *, EVRTrackedCameraError); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_HasCamera(void *, TrackedDeviceIndex_t, bool *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraFrameSize(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, uint32_t *, uint32_t *, uint32_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraIntrinsics(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, HmdVector2_t *, HmdVector2_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraProjection(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, float, float, HmdMatrix44_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_AcquireVideoStreamingService(void *, TrackedDeviceIndex_t, TrackedCameraHandle_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamingService(void *, TrackedCameraHandle_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamFrameBuffer(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, uint32_t, CameraVideoStreamFrameHeader_t *, uint32_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureSize(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, VRTextureBounds_t *, uint32_t *, uint32_t *); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureD3D11(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, void **, CameraVideoStreamFrameHeader_t *, uint32_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureGL(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, glUInt_t *, CameraVideoStreamFrameHeader_t *, uint32_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamTextureGL(void *, TrackedCameraHandle_t, glUInt_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/cxx.h b/vrclient_x64/cxx.h new file mode 100644 index 00000000..a2f59d7c --- /dev/null +++ b/vrclient_x64/cxx.h @@ -0,0 +1,449 @@ +/* + * Copyright 2012 Piotr Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* Copied from dlls/msvcrt/cxx.h */ +#undef __thiscall +#ifdef __i386__ /* thiscall functions are i386-specific */ + +#define THISCALL(func) __thiscall_ ## func +#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func) +#define __thiscall __stdcall +#define DEFINE_THISCALL_WRAPPER(func,args) \ + extern void THISCALL(func)(void); \ + __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ + "popl %eax\n\t" \ + "pushl %ecx\n\t" \ + "pushl %eax\n\t" \ + "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) +#else /* __i386__ */ + +#define THISCALL(func) func +#define THISCALL_NAME(func) __ASM_NAME(#func) +#define __thiscall __cdecl +#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */ + +#endif /* __i386__ */ + +#ifdef _WIN64 + +#define VTABLE_ADD_FUNC(name) "\t.quad " THISCALL_NAME(name) "\n" + +#define __ASM_VTABLE(name,funcs) \ + __asm__(".data\n" \ + "\t.align 8\n" \ + "\t.quad 0\n" \ + "\t.globl " __ASM_NAME(#name "_vtable") "\n" \ + __ASM_NAME(#name "_vtable") ":\n" \ + funcs "\n\t.text") + +#else + +#define VTABLE_ADD_FUNC(name) "\t.long " THISCALL_NAME(name) "\n" + +#define __ASM_VTABLE(name,funcs) \ + __asm__(".data\n" \ + "\t.align 4\n" \ + "\t.long 0\n" \ + "\t.globl " __ASM_NAME(#name "_vtable") "\n" \ + __ASM_NAME(#name "_vtable") ":\n" \ + funcs "\n\t.text") + +#endif /* _WIN64 */ + +#ifndef __x86_64__ + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + static const type_info name ## _type_info = { \ + &MSVCP_type_info_vtable, \ + NULL, \ + mangled_name \ + }; \ +\ +static const rtti_base_descriptor name ## _rtti_base_descriptor = { \ + &name ##_type_info, \ + base_classes_no, \ + { 0, -1, 0}, \ + 64 \ +}; \ +\ +static const rtti_base_array name ## _rtti_base_array = { \ + { \ + &name ## _rtti_base_descriptor, \ + cl1, \ + cl2, \ + cl3, \ + cl4, \ + cl5, \ + cl6, \ + cl7, \ + cl8, \ + cl9, \ + } \ +}; \ +\ +static const rtti_object_hierarchy name ## _hierarchy = { \ + 0, \ + 0, \ + base_classes_no+1, \ + &name ## _rtti_base_array \ +}; \ +\ +const rtti_object_locator name ## _rtti = { \ + 0, \ + off, \ + 0, \ + &name ## _type_info, \ + &name ## _hierarchy \ +}; + +#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ +\ +static const cxx_type_info type ## _cxx_type_info = { \ + 0, \ + & type ##_type_info, \ + { 0, -1, 0 }, \ + sizeof(type), \ + (cxx_copy_ctor)THISCALL(MSVCP_ ## type ##_copy_ctor) \ +}; \ +\ +static const cxx_type_info_table type ## _cxx_type_table = { \ + base_no+1, \ + { \ + & type ## _cxx_type_info, \ + cl1, \ + cl2 \ + } \ +}; \ +\ +static const cxx_exception_type type ## _cxx_type = { \ + 0, \ + (cxx_copy_ctor)THISCALL(dtor), \ + NULL, \ + & type ## _cxx_type_table \ +}; + +#else + +#define DEFINE_RTTI_DATA(name, off, base_classes_no, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + static const type_info name ## _type_info = { \ + &MSVCP_type_info_vtable, \ + NULL, \ + mangled_name \ + }; \ +\ +static rtti_base_descriptor name ## _rtti_base_descriptor = { \ + 0xdeadbeef, \ + base_classes_no, \ + { 0, -1, 0}, \ + 64 \ +}; \ +\ +static rtti_base_array name ## _rtti_base_array = { \ + { \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + } \ +}; \ +\ +static rtti_object_hierarchy name ## _hierarchy = { \ + 0, \ + 0, \ + base_classes_no+1, \ + 0xdeadbeef \ +}; \ +\ +rtti_object_locator name ## _rtti = { \ + 1, \ + off, \ + 0, \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef \ +};\ +\ +static void init_ ## name ## _rtti(char *base) \ +{ \ + name ## _rtti_base_descriptor.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti_base_array.bases[0] = (char*)&name ## _rtti_base_descriptor - base; \ + name ## _rtti_base_array.bases[1] = (char*)cl1 - base; \ + name ## _rtti_base_array.bases[2] = (char*)cl2 - base; \ + name ## _rtti_base_array.bases[3] = (char*)cl3 - base; \ + name ## _rtti_base_array.bases[4] = (char*)cl4 - base; \ + name ## _rtti_base_array.bases[5] = (char*)cl5 - base; \ + name ## _rtti_base_array.bases[6] = (char*)cl6 - base; \ + name ## _rtti_base_array.bases[7] = (char*)cl7 - base; \ + name ## _rtti_base_array.bases[8] = (char*)cl8 - base; \ + name ## _rtti_base_array.bases[9] = (char*)cl9 - base; \ + name ## _hierarchy.base_classes = (char*)&name ## _rtti_base_array - base; \ + name ## _rtti.type_descriptor = (char*)&name ## _type_info - base; \ + name ## _rtti.type_hierarchy = (char*)&name ## _hierarchy - base; \ + name ## _rtti.object_locator = (char*)&name ## _rtti - base; \ +} + +#define DEFINE_CXX_DATA(type, base_no, cl1, cl2, dtor) \ +\ +static cxx_type_info type ## _cxx_type_info = { \ + 0, \ + 0xdeadbeef, \ + { 0, -1, 0 }, \ + sizeof(type), \ + 0xdeadbeef \ +}; \ +\ +static cxx_type_info_table type ## _cxx_type_table = { \ + base_no+1, \ + { \ + 0xdeadbeef, \ + 0xdeadbeef, \ + 0xdeadbeef \ + } \ +}; \ +\ +static cxx_exception_type type ##_cxx_type = { \ + 0, \ + 0xdeadbeef, \ + 0, \ + 0xdeadbeef \ +}; \ +\ +static void init_ ## type ## _cxx(char *base) \ +{ \ + type ## _cxx_type_info.type_info = (char *)&type ## _type_info - base; \ + type ## _cxx_type_info.copy_ctor = (char *)MSVCP_ ## type ## _copy_ctor - base; \ + type ## _cxx_type_table.info[0] = (char *)&type ## _cxx_type_info - base; \ + type ## _cxx_type_table.info[1] = (char *)cl1 - base; \ + type ## _cxx_type_table.info[2] = (char *)cl2 - base; \ + type ## _cxx_type.destructor = (char *)dtor - base; \ + type ## _cxx_type.type_info_table = (char *)&type ## _cxx_type_table - base; \ +} + +#endif + +#define DEFINE_RTTI_DATA0(name, off, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) +#define DEFINE_RTTI_DATA1(name, off, cl1, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 1, cl1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) +#define DEFINE_RTTI_DATA2(name, off, cl1, cl2, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 2, cl1, cl2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) +#define DEFINE_RTTI_DATA3(name, off, cl1, cl2, cl3, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 3, cl1, cl2, cl3, NULL, NULL, NULL, NULL, NULL, NULL, mangled_name) +#define DEFINE_RTTI_DATA4(name, off, cl1, cl2, cl3, cl4, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 4, cl1, cl2, cl3, cl4, NULL, NULL, NULL, NULL, NULL, mangled_name) +#define DEFINE_RTTI_DATA8(name, off, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 8, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, NULL, mangled_name) +#define DEFINE_RTTI_DATA9(name, off, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) \ + DEFINE_RTTI_DATA(name, off, 9, cl1, cl2, cl3, cl4, cl5, cl6, cl7, cl8, cl9, mangled_name) + +#define DEFINE_CXX_DATA0(name, dtor) \ + DEFINE_CXX_DATA(name, 0, NULL, NULL, dtor) +#define DEFINE_CXX_DATA1(name, cl1, dtor) \ + DEFINE_CXX_DATA(name, 1, cl1, NULL, dtor) +#define DEFINE_CXX_DATA2(name, cl1, cl2, dtor) \ + DEFINE_CXX_DATA(name, 2, cl1, cl2, dtor) + +#ifdef __i386__ + +#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (WINAPI*)type)&vtbl_wrapper_##off)args + +extern void *vtbl_wrapper_0; +extern void *vtbl_wrapper_4; +extern void *vtbl_wrapper_8; +extern void *vtbl_wrapper_12; +extern void *vtbl_wrapper_16; +extern void *vtbl_wrapper_20; +extern void *vtbl_wrapper_24; +extern void *vtbl_wrapper_28; +extern void *vtbl_wrapper_32; +extern void *vtbl_wrapper_36; +extern void *vtbl_wrapper_40; +extern void *vtbl_wrapper_44; +extern void *vtbl_wrapper_48; +extern void *vtbl_wrapper_52; +extern void *vtbl_wrapper_56; + +#else + +#define CALL_VTBL_FUNC(this, off, ret, type, args) ((ret (__cdecl***)type)this)[0][off/4]args + +#endif + +/* exception object */ +typedef void (*vtable_ptr)(void); +typedef struct __exception +{ + const vtable_ptr *vtable; + char *name; /* Name of this exception, always a new copy for each object */ + int do_free; /* Whether to free 'name' in our dtor */ +} exception; + +/* Internal: throws selected exception */ +typedef enum __exception_type { + EXCEPTION_RERAISE, + EXCEPTION, + EXCEPTION_BAD_ALLOC, + EXCEPTION_BAD_CAST, + EXCEPTION_LOGIC_ERROR, + EXCEPTION_LENGTH_ERROR, + EXCEPTION_OUT_OF_RANGE, + EXCEPTION_INVALID_ARGUMENT, + EXCEPTION_RUNTIME_ERROR, + EXCEPTION_FAILURE, +} exception_type; +void throw_exception(exception_type, const char *); + +/* rtti */ +typedef struct __type_info +{ + const vtable_ptr *vtable; + char *name; /* Unmangled name, allocated lazily */ + char mangled[128]; /* Variable length, but we declare it large enough for static RTTI */ +} type_info; + +extern const vtable_ptr MSVCP_type_info_vtable; + +/* offsets for computing the this pointer */ +typedef struct +{ + int this_offset; /* offset of base class this pointer from start of object */ + int vbase_descr; /* offset of virtual base class descriptor */ + int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ +} this_ptr_offsets; + +/* dlls/msvcrt/cppexcept.h */ +typedef void (*cxx_copy_ctor)(void); + +#ifndef __x86_64__ + +typedef struct _rtti_base_descriptor +{ + const type_info *type_descriptor; + int num_base_classes; + this_ptr_offsets offsets; /* offsets for computing the this pointer */ + unsigned int attributes; +} rtti_base_descriptor; + +typedef struct _rtti_base_array +{ + const rtti_base_descriptor *bases[10]; /* First element is the class itself */ +} rtti_base_array; + +typedef struct _rtti_object_hierarchy +{ + unsigned int signature; + unsigned int attributes; + int array_len; /* Size of the array pointed to by 'base_classes' */ + const rtti_base_array *base_classes; +} rtti_object_hierarchy; + +typedef struct _rtti_object_locator +{ + unsigned int signature; + int base_class_offset; + unsigned int flags; + const type_info *type_descriptor; + const rtti_object_hierarchy *type_hierarchy; +} rtti_object_locator; + +typedef struct +{ + UINT flags; + const type_info *type_info; + this_ptr_offsets offsets; + unsigned int size; + cxx_copy_ctor copy_ctor; +} cxx_type_info; + +typedef struct +{ + UINT count; + const cxx_type_info *info[3]; +} cxx_type_info_table; + +typedef struct +{ + UINT flags; + void (*destructor)(void); + void* /*cxx_exc_custom_handler*/ custom_handler; + const cxx_type_info_table *type_info_table; +} cxx_exception_type; + +#else + +typedef struct +{ + unsigned int type_descriptor; + int num_base_classes; + this_ptr_offsets offsets; /* offsets for computing the this pointer */ + unsigned int attributes; +} rtti_base_descriptor; + +typedef struct +{ + unsigned int bases[10]; /* First element is the class itself */ +} rtti_base_array; + +typedef struct +{ + unsigned int signature; + unsigned int attributes; + int array_len; /* Size of the array pointed to by 'base_classes' */ + unsigned int base_classes; +} rtti_object_hierarchy; + +typedef struct +{ + unsigned int signature; + int base_class_offset; + unsigned int flags; + unsigned int type_descriptor; + unsigned int type_hierarchy; + unsigned int object_locator; +} rtti_object_locator; + +typedef struct +{ + UINT flags; + unsigned int type_info; + this_ptr_offsets offsets; + unsigned int size; + unsigned int copy_ctor; +} cxx_type_info; + +typedef struct +{ + UINT count; + unsigned int info[3]; +} cxx_type_info_table; + +typedef struct +{ + UINT flags; + unsigned int destructor; + unsigned int custom_handler; + unsigned int type_info_table; +} cxx_exception_type; + +#endif diff --git a/vrclient_x64/gen.sh b/vrclient_x64/gen.sh new file mode 100755 index 00000000..2a5653c0 --- /dev/null +++ b/vrclient_x64/gen.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +rm win*.h +rm win*.c +rm win*.dat +rm cpp*.cpp +rm cpp*.h +rm struct*.h +rm struct*.cpp + +h=$(md5sum Makefile.in) +cp Makefile.in.orig Makefile.in +cp ../vrclient/Makefile.in.orig ../vrclient/Makefile.in + +./gen_wrapper.py +if [ "$h" != "$(md5sum Makefile.in)" ]; then + echo "Don't forget to \"make depend\" at the top of the tree!" +fi diff --git a/vrclient_x64/gen_wrapper.py b/vrclient_x64/gen_wrapper.py new file mode 100755 index 00000000..192d0e26 --- /dev/null +++ b/vrclient_x64/gen_wrapper.py @@ -0,0 +1,565 @@ +#!/usr/bin/python2 + +#NOTE: If you make modifications here, consider whether they should +#be duplicated in ../lsteamclient/gen_wrapper.py + +import pprint +import sys +import clang.cindex +import os +import re + +sdk_versions = [ + "v1.0.11", + "v1.0.10", + "v1.0.9", + "v1.0.8", + "v1.0.7", + "v1.0.6", + "v1.0.5", + "v1.0.4", + "v1.0.3", + "v1.0.2", + "v1.0.1", + "v1.0.0", + "v0.9.20", + "v0.9.19", + "v0.9.18", + "v0.9.17", + "v0.9.16", + "v0.9.15", + "v0.9.14", + "v0.9.13", + "v0.9.12", +# "v0.9.11", problematic GetComponentState, may cause crash since we don't implement it + "v0.9.10", + "v0.9.9", + "v0.9.8", + "v0.9.7", + "v0.9.6", +# "v0.9.5", doesn't compile, fixed in 0.9.6 + "v0.9.4", + "0.9.3", + "0.9.2", + "0.9.1", + "0.9.0", +] + +files = [ + ("openvr.h", + [ #classes + "IVRApplications", + "IVRChaperone", + "IVRChaperoneSetup", + "IVRCompositor", + "IVRDriverManager", + "IVRExtendedDisplay", + "IVRNotifications", + "IVROverlay", + "IVRRenderModels", + "IVRResources", + "IVRScreenshots", + "IVRSettings", + "IVRSystem", + "IVRTrackedCamera", + ], [ #user-allocated structs + "VRControllerState001_t", + "VREvent_t", + ], [ #vrclient-allocated structs + "RenderModel_t", + "RenderModel_TextureMap_t", + ] + ), + ("ivrclientcore.h", + [ #classes + "IVRClientCore", + ], [ #user-allocated structs + ], [ #vrclient-allocated structs + ] + ), +] + +aliases = { + #Some interface versions are not present in the public SDK + #headers, but are actually requested by games. It would be nice + #to verify that these interface versions are actually binary + #compatible. Lacking that, we hope the next highest version + #is compatible. +# "SteamClient012":["SteamClient013"], +# "SteamUtils004":["SteamUtils003"], # TimeShift uses SteamUtils003 + + + #leaving these commented-out. let's see if they turn up in practice, + #and handle them correctly if so. + +# "SteamFriends011":["SteamFriends010"], +# "SteamFriends013":["SteamFriends012"], +# "SteamGameServer008":["SteamGameServer007", "SteamGameServer006"], +# "SteamMatchMaking004":["SteamMatchMaking003"], +# "SteamMatchMaking006":["SteamMatchMaking005"], +# "STEAMREMOTESTORAGE_INTERFACE_VERSION004":["STEAMREMOTESTORAGE_INTERFACE_VERSION003"], +# "STEAMREMOTESTORAGE_INTERFACE_VERSION008":["STEAMREMOTESTORAGE_INTERFACE_VERSION007"], +# "STEAMREMOTESTORAGE_INTERFACE_VERSION010":["STEAMREMOTESTORAGE_INTERFACE_VERSION009"], +# "STEAMUGC_INTERFACE_VERSION005":["STEAMUGC_INTERFACE_VERSION004"], +# "STEAMUGC_INTERFACE_VERSION007":["STEAMUGC_INTERFACE_VERSION006"], +# "SteamUser016":["SteamUser015"], +# "STEAMUSERSTATS_INTERFACE_VERSION009":["STEAMUSERSTATS_INTERFACE_VERSION008"], +} + +# TODO: we could do this automatically by creating temp files and +# having clang parse those and detect when the MS-style padding results +# in identical struct widths. But there's only a couple, so let's cheat... +skip_structs = [ +# "RemoteStorageGetPublishedFileDetailsResult_t_9740", +# "SteamUGCQueryCompleted_t_20", +# "SteamUGCRequestUGCDetailsResult_t_9764" +] + +print_sizes = [] + +class_versions = {} + +def display_sdkver(s): + if s.startswith("v"): + s = s[1:] + return s.replace(".", "") + +def strip_ns(name): + return name.replace("vr::","") + +def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, existing_methods): + used_name = method.spelling + idx = '2' + while used_name in existing_methods: + used_name = "%s_%s" % (method.spelling, idx) + idx = chr(ord(idx) + 1) + returns_record = method.result_type.get_canonical().kind == clang.cindex.TypeKind.RECORD + if returns_record: + parambytes = 8 #_this + return pointer + else: + parambytes = 4 #_this + for param in list(method.get_children()): + if param.kind == clang.cindex.CursorKind.PARM_DECL: + parambytes += param.type.get_size() + cfile.write("DEFINE_THISCALL_WRAPPER(%s_%s, %s)\n" % (winclassname, used_name, parambytes)) + cpp_h.write("extern ") + if strip_ns(method.result_type.spelling).startswith("IVR"): + cfile.write("win%s " % (strip_ns(method.result_type.spelling))) + cpp.write("void *") + cpp_h.write("void *") + elif returns_record: + cfile.write("%s *" % strip_ns(method.result_type.spelling)) + cpp.write("%s " % method.result_type.spelling) + cpp_h.write("%s " % strip_ns(method.result_type.spelling)) + else: + cfile.write("%s " % strip_ns(method.result_type.spelling)) + cpp.write("%s " % method.result_type.spelling) + cpp_h.write("%s " % strip_ns(method.result_type.spelling)) + cfile.write('__thiscall %s_%s(%s *_this' % (winclassname, used_name, winclassname)) + cpp.write("%s_%s(void *linux_side" % (cppname, used_name)) + cpp_h.write("%s_%s(void *" % (cppname, used_name)) + if returns_record: + cfile.write(", %s *_r" % strip_ns(method.result_type.spelling)) + unnamed = 'a' + do_lin_to_win = None + do_wrap = None + do_unwrap = None + for param in list(method.get_children()): + if param.kind == clang.cindex.CursorKind.PARM_DECL: + if param.type.kind == clang.cindex.TypeKind.POINTER and \ + param.type.get_pointee().kind == clang.cindex.TypeKind.UNEXPOSED: + #unspecified function pointer + typename = "void *" + else: + typename = param.type.spelling.split("::")[-1].replace("&", "*"); + if param.type.kind == clang.cindex.TypeKind.POINTER: + if strip_ns(param.type.get_pointee().get_canonical().spelling) in user_structs: + do_lin_to_win = (strip_ns(param.type.get_pointee().get_canonical().spelling), param.spelling) + typename = "win" + do_lin_to_win[0] + "_" + display_sdkver(sdkver) + " *" + elif strip_ns(param.type.get_pointee().get_canonical().spelling) in system_structs: + do_unwrap = (strip_ns(param.type.get_pointee().get_canonical().spelling), param.spelling) + typename = "win" + do_unwrap[0] + "_" + display_sdkver(sdkver) + " *" + elif param.type.get_pointee().kind == clang.cindex.TypeKind.POINTER and \ + strip_ns(param.type.get_pointee().get_pointee().get_canonical().spelling) in system_structs: + do_wrap = (strip_ns(param.type.get_pointee().get_pointee().get_canonical().spelling), param.spelling) + typename = "win" + do_wrap[0] + "_" + display_sdkver(sdkver) + " **" + if param.spelling == "": + cfile.write(", %s _%s" % (typename, unnamed)) + cpp.write(", %s _%s" % (typename, unnamed)) + cpp_h.write(", %s" % typename) + unnamed = chr(ord(unnamed) + 1) + else: + cfile.write(", %s %s" % (typename, param.spelling)) + cpp.write(", %s %s" % (typename, param.spelling)) + cpp_h.write(", %s" % (typename)) + cfile.write(")\n{\n") + cpp.write(")\n{\n") + cpp_h.write(");\n") + + char_param_is_unix_path = "GetAppInstallDir" in used_name or \ + "GetItemInstallInfo" in used_name + path_param_name = None + path_size_param_name = None + + if char_param_is_unix_path: + cfile.write(" uint32 path_result;\n") + + if do_lin_to_win: + cpp.write(" %s lin;\n" % do_lin_to_win[0]) + cpp.write(" %s _ret;\n" % method.result_type.spelling) + + if do_wrap: + cpp.write(" %s *lin;\n" % do_wrap[0]) + cpp.write(" %s _ret;\n" % method.result_type.spelling) + + cfile.write(" TRACE(\"%p\\n\", _this);\n") + + if method.result_type.kind == clang.cindex.TypeKind.VOID: + cfile.write(" ") + cpp.write(" ") + elif char_param_is_unix_path: + cfile.write(" path_result = ") + cpp.write(" return ") + elif returns_record: + cfile.write(" *_r = ") + cpp.write(" return ") + elif do_lin_to_win: + cfile.write(" return ") + cpp.write(" _ret = ") + elif do_wrap: + cfile.write(" return ") + cpp.write(" _ret = ") + else: + cfile.write(" return ") + cpp.write(" return ") + + should_gen_wrapper = strip_ns(method.result_type.spelling).startswith("IVR") or \ + used_name.startswith("GetGenericInterface") + if should_gen_wrapper: + cfile.write("create_win_interface(pchNameAndVersion,\n ") + + cfile.write("%s_%s(_this->linux_side" % (cppname, used_name)) + cpp.write("((%s*)linux_side)->%s(" % (classname, method.spelling)) + unnamed = 'a' + first = True + next_is_size = False + for param in list(method.get_children()): + if param.kind == clang.cindex.CursorKind.PARM_DECL: + if not first: + cpp.write(", ") + else: + first = False + if char_param_is_unix_path: + if param.type.spelling == "char *": + path_param_name = param.spelling + elif not path_param_name is None and \ + (param.type.spelling == "uint32" or + param.type.spelling == "int"): + path_size_param_name = param.spelling + if param.spelling == "": + cfile.write(", _%s" % unnamed) + cpp.write("(%s)_%s" % (param.type.spelling, unnamed)) + unnamed = chr(ord(unnamed) + 1) + else: + cfile.write(", %s" % param.spelling) + if do_lin_to_win and do_lin_to_win[1] == param.spelling or \ + do_wrap and do_wrap[1] == param.spelling: + cpp.write("&lin") + if do_lin_to_win and do_lin_to_win[0] == "VREvent_t": + next_is_size = True + elif do_unwrap and do_unwrap[1] == param.spelling: + cpp.write("struct_%s_%s_unwrap(%s)" % (strip_ns(do_unwrap[0]), display_sdkver(sdkver), do_unwrap[1])) + elif next_is_size: + next_is_size = False + if param.type.spelling == "uint32_t": + cpp.write("sizeof(lin)") + else: + cpp.write("(%s)%s" % (param.type.spelling, param.spelling)) + elif "&" in param.type.spelling: + cpp.write("*%s" % param.spelling) + else: + cpp.write("(%s)%s" % (param.type.spelling, param.spelling)) + if should_gen_wrapper: + cfile.write(")") + cfile.write(");\n") + cpp.write(");\n") + if returns_record: + cfile.write(" return _r;\n") + if char_param_is_unix_path and not path_param_name is None and not path_size_param_name is None: + cfile.write(" return steamclient_unix_path_to_dos_path(path_result, %s, %s);\n" % (path_param_name, path_size_param_name)) + if do_lin_to_win: + cpp.write(" struct_%s_%s_lin_to_win(&lin, %s);\n" % (strip_ns(do_lin_to_win[0]), display_sdkver(sdkver), do_lin_to_win[1])) + cpp.write(" return _ret;\n") + if do_wrap: + cpp.write(" if(_ret == 0)\n") + cpp.write(" *%s = struct_%s_%s_wrap(lin);\n" % (do_wrap[1], strip_ns(do_wrap[0]), display_sdkver(sdkver))) + cpp.write(" return _ret;\n") + cfile.write("}\n\n") + cpp.write("}\n\n") + return used_name + +def get_iface_version(classname): + if classname in iface_versions.keys(): + ver = iface_versions[classname] + else: + ver = "UNVERSIONED" + if classname in class_versions.keys() and ver in class_versions[classname]: + return (ver, True) + if not classname in class_versions.keys(): + class_versions[classname] = [] + class_versions[classname].append(ver) + return (ver, False) + +def handle_class(sdkver, classnode): + print("handle_class: " + classnode.displayname) + children = list(classnode.get_children()) + if len(children) == 0: + return + (iface_version, already_generated) = get_iface_version(classnode.spelling) + if already_generated: + return + winname = "win%s" % classnode.spelling + if not winname in generated_c_files: + generated_c_files.append(winname) + cppname = "cpp%s_%s" % (classnode.spelling, iface_version) + generated_cpp_files.append(cppname) + + file_exists = os.path.isfile("%s.c" % winname) + cfile = open("%s.c" % winname, "a") + if not file_exists: + cfile.write("""/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +""") + + cpp = open("%s.cpp" % cppname, "w") + cpp.write("#include \"vrclient_private.h\"\n") + cpp.write("#include \"vrclient_defs.h\"\n") + if os.path.isfile("openvr_%s/ivrclientcore.h" % sdkver): + cpp.write("#include \"openvr_%s/ivrclientcore.h\"\n" % sdkver) + else: + cpp.write("#include \"openvr_%s/openvr.h\"\n" % sdkver) + cpp.write("using namespace vr;\n") + cpp.write("extern \"C\" {\n") + cpp.write("#include \"struct_converters.h\"\n") + cpp.write("}\n") + cpp.write("#include \"%s.h\"\n" % cppname) + cpp.write("#ifdef __cplusplus\nextern \"C\" {\n#endif\n") + + cpp_h = open("%s.h" % cppname, "w") + cpp_h.write("#ifdef __cplusplus\nextern \"C\" {\n#endif\n") + + winclassname = "win%s_%s" % (classnode.spelling, iface_version) + cfile.write("#include \"%s.h\"\n\n" % cppname) + cfile.write("typedef struct __%s {\n" % winclassname) + cfile.write(" vtable_ptr *vtable;\n") + cfile.write(" void *linux_side;\n") + cfile.write("} %s;\n\n" % winclassname) + methods = [] + for child in children: + if child.kind == clang.cindex.CursorKind.CXX_METHOD: + methods.append(handle_method(cfile, classnode.spelling, winclassname, cppname, child, cpp, cpp_h, methods)) + + cfile.write("extern vtable_ptr %s_vtable;\n\n" % winclassname) + cfile.write("#ifndef __GNUC__\n") + cfile.write("void __asm_dummy_vtables(void) {\n") + cfile.write("#endif\n") + cfile.write(" __ASM_VTABLE(%s,\n" % winclassname) + for method in methods: + cfile.write(" VTABLE_ADD_FUNC(%s_%s)\n" % (winclassname, method)) + cfile.write(" );\n") + cfile.write("#ifndef __GNUC__\n") + cfile.write("}\n") + cfile.write("#endif\n\n") + cfile.write("%s *create_%s(void *linux_side)\n{\n" % (winclassname, winclassname)) + cfile.write(" %s *r = HeapAlloc(GetProcessHeap(), 0, sizeof(%s));\n" % (winclassname, winclassname)) + cfile.write(" TRACE(\"-> %p\\n\", r);\n") + cfile.write(" r->vtable = &%s_vtable;\n" % winclassname) + cfile.write(" r->linux_side = linux_side;\n") + cfile.write(" return r;\n}\n\n") + + cpp.write("#ifdef __cplusplus\n}\n#endif\n") + cpp_h.write("#ifdef __cplusplus\n}\n#endif\n") + + constructors = open("win_constructors.h", "a") + constructors.write("extern void *create_%s(void *);\n" % winclassname) + + constructors = open("win_constructors_table.dat", "a") + constructors.write(" {\"%s\", &create_%s},\n" % (iface_version, winclassname)) + if iface_version in aliases.keys(): + for alias in aliases[iface_version]: + constructors.write(" {\"%s\", &create_%s}, /* alias */\n" % (alias, winclassname)) + + +generated_struct_handlers = [] +cpp_files_need_close_brace = [] + +LIN_TO_WIN=1 +WRAPPERS=2 + +#because of struct packing differences between win32 and linux, we +#need to convert these structs from their linux layout to the win32 +#layout. +#TODO: could we optimize this by detecting if the structs are the +#same layout at generation-time? +def handle_struct(sdkver, struct, which): + handler_name = "%s_%s" % (struct.displayname, display_sdkver(sdkver)) + + if handler_name in generated_struct_handlers: + # we already have a handler for the struct struct of this size + return + + filename_base = "struct_converters_%s" % display_sdkver(sdkver) + cppname = "%s.cpp" % filename_base + file_exists = os.path.isfile(cppname) + cppfile = open(cppname, "a") + if not file_exists: + generated_cpp_files.append(filename_base) + cppfile.write("#include \n"); + cppfile.write("#include \n"); + cppfile.write("#include \"vrclient_private.h\"\n") + cppfile.write("#include \"vrclient_defs.h\"\n") + cppfile.write("#include \"openvr_%s/openvr.h\"\n" % sdkver) + cppfile.write("using namespace vr;\n") + cppfile.write("extern \"C\" {\n") + cppfile.write("#include \"struct_converters.h\"\n") + cpp_files_need_close_brace.append(cppname) + + hfile = open("struct_converters.h", "a") + + hfile.write("typedef struct win%s win%s;\n" % (handler_name, handler_name)) + + cppfile.write("struct win%s {\n" % handler_name) + for m in struct.get_children(): + if m.kind == clang.cindex.CursorKind.FIELD_DECL: + if m.type.kind == clang.cindex.TypeKind.CONSTANTARRAY: + cppfile.write(" %s %s[%u];\n" % (m.type.element_type.spelling, m.displayname, m.type.element_count)) + else: + cppfile.write(" %s %s;\n" % (m.type.spelling, m.displayname)) + if which == WRAPPERS: + cppfile.write("\n %s *linux_side;\n" % struct.displayname) + cppfile.write("} __attribute__ ((ms_struct));\n\n") + + if which == LIN_TO_WIN: + hfile.write("extern void struct_%s_lin_to_win(void *l, void *w);\n" % handler_name) + cppfile.write("void struct_%s_lin_to_win(void *l, void *w)\n{\n" % handler_name) + cppfile.write(" struct win%s *win = (struct win%s *)w;\n" % (handler_name, handler_name)) + elif which == WRAPPERS: + hfile.write("extern struct win%s *struct_%s_wrap(void *l);\n" % (handler_name, handler_name)) + cppfile.write("struct win%s *struct_%s_wrap(void *l)\n{\n" % (handler_name, handler_name)) + cppfile.write(" struct win%s *win = (struct win%s *)malloc(sizeof(*win));\n" % (handler_name, handler_name)) + + cppfile.write(" %s *lin = (%s *)l;\n" % (struct.displayname, struct.displayname)) + + for m in struct.get_children(): + if m.kind == clang.cindex.CursorKind.FIELD_DECL: + if m.type.kind == clang.cindex.TypeKind.CONSTANTARRAY: + #TODO: if this is a struct, or packed differently, we'll have to + # copy each element in a for-loop + cppfile.write(" memcpy(win->%s, lin->%s, sizeof(win->%s));\n" % (m.displayname, m.displayname, m.displayname)) + else: + cppfile.write(" win->%s = lin->%s;\n" % (m.displayname, m.displayname)) + + if which == WRAPPERS: + cppfile.write(" win->linux_side = lin;\n"); + cppfile.write(" return win;\n") + + cppfile.write("}\n\n") + + if which == WRAPPERS: + hfile.write("extern %s *struct_%s_unwrap(win%s *w);\n" % (struct.displayname, handler_name, handler_name)) + cppfile.write("struct %s *struct_%s_unwrap(win%s *w)\n{\n" % (struct.displayname, handler_name, handler_name)) + cppfile.write(" %s *ret = w->linux_side;\n" % struct.displayname) + cppfile.write(" free(w);\n") + cppfile.write(" return ret;\n") + cppfile.write("}\n\n") + + generated_struct_handlers.append(handler_name) + + + + +#clang.cindex.Config.set_library_file("/usr/lib/llvm-3.8/lib/libclang-3.8.so.1"); + +generated_c_files = [] +generated_cpp_files = [] + +prog = re.compile("^.*const\s*char.* (\w*)_Version.*\"(.*)\"") +for sdkver in sdk_versions: + iface_versions = {} + print("sdkver is: " + sdkver) + for f in os.listdir("openvr_%s" % sdkver): + x = open("openvr_%s/%s" % (sdkver, f), "r") + for l in x: + if "_Version" in l: + result = prog.match(l) + if result: + iface, version = result.group(1, 2) + iface_versions[iface] = version + + for fname, classes, user_structs, system_structs in files: + # Parse as 32-bit C++ + input_name = "openvr_%s/%s" % (sdkver, fname) + sys.stdout.write("about to parse %s\n" % input_name) + if not os.path.isfile(input_name): + continue + index = clang.cindex.Index.create() + tu = index.parse(input_name, args=['-x', 'c++', '-std=c++11', '-DGNUC', '-Iopenvr_%s/' % sdkver, '-I/usr/lib/clang/5.0.0/include/']) + + diagnostics = list(tu.diagnostics) + if len(diagnostics) > 0: + print 'There were parse errors' + pprint.pprint(diagnostics) + else: + children = list(tu.cursor.get_children()) + for child in children: + if child.kind == clang.cindex.CursorKind.NAMESPACE and child.displayname == "vr": + for vrchild in list(child.get_children()): + if vrchild.kind == clang.cindex.CursorKind.CLASS_DECL and vrchild.displayname in classes: + handle_class(sdkver, vrchild) + if vrchild.kind == clang.cindex.CursorKind.STRUCT_DECL or \ + vrchild.kind == clang.cindex.CursorKind.CLASS_DECL: + if strip_ns(vrchild.displayname) in user_structs: + handle_struct(sdkver, vrchild, LIN_TO_WIN) + elif strip_ns(vrchild.displayname) in system_structs: + handle_struct(sdkver, vrchild, WRAPPERS) + if vrchild.displayname in print_sizes: + sys.stdout.write("size of %s is %u\n" % (vrchild.displayname, vrchild.type.get_size())) + +for f in cpp_files_need_close_brace: + m = open(f, "a") + m.write("\n}\n") + + +m = open("Makefile.in", "a") +for f in generated_c_files: + m.write("\t%s.c \\\n" % f) +m.write("\nCPP_SRCS = \\\n") +for f in generated_cpp_files: + m.write("\t%s.cpp \\\n" % f) + +m = open("../vrclient/Makefile.in", "a") +for f in generated_c_files: + m.write("\t%s.c \\\n" % f) +m.write("\nCPP_SRCS = \\\n") +for f in generated_cpp_files: + m.write("\t%s.cpp \\\n" % f) diff --git a/vrclient_x64/make_sdks.sh b/vrclient_x64/make_sdks.sh new file mode 100755 index 00000000..741f2b6c --- /dev/null +++ b/vrclient_x64/make_sdks.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +#run from within openvr.git + +for f in $(git tag); do + mkdir openvr_$f + git show $f:./headers/openvr.h | grep -v 'pragma once' > openvr_$f/openvr.h + git show $f:./src/ivrclientcore.h | grep -v 'pragma once' > openvr_$f/ivrclientcore.h + if [ x"$(head openvr_$f/ivrclientcore.h)" = x"" ]; then + rm openvr_$f/ivrclientcore.h + fi +done diff --git a/vrclient_x64/openvr_0.9.0/openvr.h b/vrclient_x64/openvr_0.9.0/openvr.h new file mode 100644 index 00000000..1be199f9 --- /dev/null +++ b/vrclient_x64/openvr_0.9.0/openvr.h @@ -0,0 +1,1094 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +} + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + // ------------------------------------ + // RenderModel methods + // ------------------------------------ + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. When using + * system event output the caller should ensure that it has focus so that it receives the system events. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( const vr::Compositor_OverlaySettings & overlaySettings, + vr::HmdVector2_t vecWindowClientPositionOnScreen, vr::HmdVector2_t vecWindowClientSize, + vr::TrackedDeviceIndex_t unControllerDeviceIndex, + vr::EVRControllerEventOutputType eOutputType + ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_003"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Identifies the graphics API for the associated device */ +enum Compositor_DeviceType +{ + Compositor_DeviceType_None, + Compositor_DeviceType_D3D9, + Compositor_DeviceType_D3D9Ex, + Compositor_DeviceType_D3D10, + Compositor_DeviceType_D3D11, + Compositor_DeviceType_OpenGL +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct Compositor_TextureBounds +{ + float uMin, vMin; + float uMax, vMax; +}; + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Sets the graphics device or context for the application that is going to feed + * images to the compositor. The type of the pDevice parameter must match the + * type that is provided: + * Compositor_DeviceType_D3D9 IDirect3DDevice9* + * Compositor_DeviceType_D3D9Ex IDirect3DDevice9Ex* + * Compositor_DeviceType_D3D10 ID3D10Device* + * Compositor_DeviceType_D3D11 ID3D11Device* + * Compositor_DeviceType_OpenGL HGLRC + * + * Note: D3D9 and D3D9Ex are not implemented at this time + */ + virtual void SetGraphicsDevice( Compositor_DeviceType eType, void* pDevice ) = 0; + + /** Returns pose(s) to use to render scene. */ + virtual void WaitGetPoses( VR_ARRAY_COUNT(unPoseArrayCount) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual void Submit( Hmd_Eye eEye, void* pTexture, Compositor_TextureBounds* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** returns the default settings that will be used for the overlay texture. Fetching these defaults + * can be useful if you mostly want the default values but want to change a few settings. */ + virtual void GetOverlayDefaults( Compositor_OverlaySettings* pSettings ) = 0; + + /** Texture to draw over the scene at distortion time. This texture will appear over the world on a quad. + * The pSettings parameter controls the size and position of the quad. */ + virtual void SetOverlay(void* pTexture, Compositor_OverlaySettings* pSettings ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data that can be sent */ + virtual void SetOverlayRaw(void* buffer, uint32_t width, uint32_t height, uint32_t depth, Compositor_OverlaySettings* pSettings ) = 0; + + /** Separate interface for providing the image through a filename: + * can be png or jpg, and should not be bigger than 1920x1080 */ + virtual void SetOverlayFromFile( const char *pchFilePath, Compositor_OverlaySettings* pSettings ) = 0; + + /** Removes the scene overlay texture. */ + virtual void ClearOverlay() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( const Compositor_OverlaySettings* pSettings, float fAspectRatio, vr::TrackingUniverseOrigin eOrigin, vr::HmdVector3_t vSource, vr::HmdVector3_t vDirection, vr::HmdVector2_t *pvecIntersectionUV, vr::HmdVector3_t *pvecIntersectionTrackingSpace ) = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_005"; + +} // namespace vr + + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + // figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + +} diff --git a/vrclient_x64/openvr_0.9.1/openvr.h b/vrclient_x64/openvr_0.9.1/openvr.h new file mode 100644 index 00000000..1be199f9 --- /dev/null +++ b/vrclient_x64/openvr_0.9.1/openvr.h @@ -0,0 +1,1094 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +} + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + // ------------------------------------ + // RenderModel methods + // ------------------------------------ + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. When using + * system event output the caller should ensure that it has focus so that it receives the system events. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( const vr::Compositor_OverlaySettings & overlaySettings, + vr::HmdVector2_t vecWindowClientPositionOnScreen, vr::HmdVector2_t vecWindowClientSize, + vr::TrackedDeviceIndex_t unControllerDeviceIndex, + vr::EVRControllerEventOutputType eOutputType + ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_003"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Identifies the graphics API for the associated device */ +enum Compositor_DeviceType +{ + Compositor_DeviceType_None, + Compositor_DeviceType_D3D9, + Compositor_DeviceType_D3D9Ex, + Compositor_DeviceType_D3D10, + Compositor_DeviceType_D3D11, + Compositor_DeviceType_OpenGL +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct Compositor_TextureBounds +{ + float uMin, vMin; + float uMax, vMax; +}; + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Sets the graphics device or context for the application that is going to feed + * images to the compositor. The type of the pDevice parameter must match the + * type that is provided: + * Compositor_DeviceType_D3D9 IDirect3DDevice9* + * Compositor_DeviceType_D3D9Ex IDirect3DDevice9Ex* + * Compositor_DeviceType_D3D10 ID3D10Device* + * Compositor_DeviceType_D3D11 ID3D11Device* + * Compositor_DeviceType_OpenGL HGLRC + * + * Note: D3D9 and D3D9Ex are not implemented at this time + */ + virtual void SetGraphicsDevice( Compositor_DeviceType eType, void* pDevice ) = 0; + + /** Returns pose(s) to use to render scene. */ + virtual void WaitGetPoses( VR_ARRAY_COUNT(unPoseArrayCount) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual void Submit( Hmd_Eye eEye, void* pTexture, Compositor_TextureBounds* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** returns the default settings that will be used for the overlay texture. Fetching these defaults + * can be useful if you mostly want the default values but want to change a few settings. */ + virtual void GetOverlayDefaults( Compositor_OverlaySettings* pSettings ) = 0; + + /** Texture to draw over the scene at distortion time. This texture will appear over the world on a quad. + * The pSettings parameter controls the size and position of the quad. */ + virtual void SetOverlay(void* pTexture, Compositor_OverlaySettings* pSettings ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data that can be sent */ + virtual void SetOverlayRaw(void* buffer, uint32_t width, uint32_t height, uint32_t depth, Compositor_OverlaySettings* pSettings ) = 0; + + /** Separate interface for providing the image through a filename: + * can be png or jpg, and should not be bigger than 1920x1080 */ + virtual void SetOverlayFromFile( const char *pchFilePath, Compositor_OverlaySettings* pSettings ) = 0; + + /** Removes the scene overlay texture. */ + virtual void ClearOverlay() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( const Compositor_OverlaySettings* pSettings, float fAspectRatio, vr::TrackingUniverseOrigin eOrigin, vr::HmdVector3_t vSource, vr::HmdVector3_t vDirection, vr::HmdVector2_t *pvecIntersectionUV, vr::HmdVector3_t *pvecIntersectionTrackingSpace ) = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_005"; + +} // namespace vr + + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + // figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + +} diff --git a/vrclient_x64/openvr_0.9.13/openvr.h b/vrclient_x64/openvr_0.9.13/openvr.h new file mode 100644 index 00000000..84f39067 --- /dev/null +++ b/vrclient_x64/openvr_0.9.13/openvr.h @@ -0,0 +1,2522 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_BackgroundSettingHasChanged = 850, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + EVRState statusState; +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_But = 1100, + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// vrtrackedcameratypes.h +#ifndef _VRTRACKEDCAMERATYPES_H +#define _VRTRACKEDCAMERATYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ECameraVideoStreamFormat +{ + CVS_FORMAT_UNKNOWN = 0, + CVS_FORMAT_RAW10 = 1, // 10 bits per pixel + CVS_FORMAT_NV12 = 2, // 12 bits per pixel + CVS_FORMAT_RGB24 = 3, // 24 bits per pixel + CVS_MAX_FORMATS +}; + +#ifdef _MSC_VER +#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) +#else +#define VR_CAMERA_DECL_ALIGN( x ) // +#endif + +VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t +{ + ECameraVideoStreamFormat m_nStreamFormat; + + uint32_t m_nWidth; + uint32_t m_nHeight; + + uint32_t m_nFrameSequence; // Starts from 0 when stream starts. + uint32_t m_nTimeStamp; // Driver provided time stamp per driver centric time base + + uint32_t m_nBufferIndex; // Identifies which buffer the image data is hosted + uint32_t m_nBufferCount; // Total number of configured buffers + + uint32_t m_nImageDataSize; // Based on stream format, width, height + + double m_flFrameElapsedTime; // Starts from 0 when stream starts. In seconds. + double m_flFrameCaptureTime; // Relative to when the frame was exposed/captured. + + bool m_bPoseIsValid; // Supplied by HMD layer when used as a tracked camera + vr::HmdMatrix34_t m_matDeviceToAbsoluteTracking; + + float m_Pad[4]; + + void *m_pImageData; +}; + +#pragma pack( pop ) + +} + +#endif // _VRTRACKEDCAMERATYPES_H +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_010"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_002"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; + float m_flHandoffStartMs; + float m_flHandoffEndMs; + float m_flCompositorUpdateCpuMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_009"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1 + }; + + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_008"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties +*/ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present +*/ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. + **/ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. + */ + virtual bool LoadTexture( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. + */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise + */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, RenderModel_ComponentState_t *pComponentState ) = 0; + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +#pragma pack( pop ) + +class IVRTrackedCamera +{ +public: + virtual bool HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool GetCameraFirmwareDescription( vr::TrackedDeviceIndex_t nDeviceIndex, char *pBuffer, uint32_t nBufferLen ) = 0; + + // An invalid or unsupported format returns false. Frame dimensions imply sensor size. + virtual bool GetCameraFrameDimensions( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // Caller can request a specific streaming format prior to enable. The request may be ignored if camera has been granted exclusive use by lower level systems. + // Format cannot be changed after camera has been enabled. An unsupported or rejected format returns false. + // Use CVS_FORMAT_UNKNOWN for defaults. + virtual bool SetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; + virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Camera must be enabled prior to streaming. Enabling causes frame buffering allocations and locks attributes. + virtual bool EnableCameraForStreaming( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + virtual bool StartVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool StopVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamActive( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Starts at 0 and advances in seconds when stream started and valid. A stopped stream returns 0. + // A paused stream is still considered active and the elapsed time advances. + virtual float GetVideoStreamElapsedTime( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Caller acquires ref-counted frames for exclusive use and releases when finished. Failure to release frames degrades frame buffering. + // NULL implies no frame available. + virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ReleaseVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex, const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; + + virtual bool SetAutoExposure( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + // A stream can only be paused after it is started. The pause state is cleared after stopping. + // The camera may not support pause/resume semantics due to HW limitations. + virtual bool SupportsPauseResume( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool PauseVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ResumeVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamPaused( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + virtual bool GetCameraDistortion( vr::TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; + virtual bool GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_001"; + +} +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::EVRInitError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( vr::EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( vr::EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::EVRInitError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRChaperoneSetup pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRTrackedCamera pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera(); + + /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. + * This function will also return NULL if the VR Compositor is running as the extended display + * interface is incompatible with the compositor. */ + VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); + + + + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; +} diff --git a/vrclient_x64/openvr_0.9.2/openvr.h b/vrclient_x64/openvr_0.9.2/openvr.h new file mode 100644 index 00000000..ea5065b1 --- /dev/null +++ b/vrclient_x64/openvr_0.9.2/openvr.h @@ -0,0 +1,1394 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_SystemOverlayActivated = 502, + VREvent_SystemOverlayDeactivated = 503, + VREvent_SystemOverlayThumbSelected = 504, // Handled by vrcompositor and never sent to applications - data is overlay + + + VREvent_Notification_Dismissed = 600, + VREvent_Notification_BeginInteraction = 601, + VREvent_Notification_Scroll = 602, + VREvent_Notification_ClickOn = 603, + VREvent_Notification_ClickOff = 604, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + float x, y; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_004"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Identifies the graphics API for the associated device */ +enum Compositor_DeviceType +{ + Compositor_DeviceType_None, + Compositor_DeviceType_D3D9, + Compositor_DeviceType_D3D9Ex, + Compositor_DeviceType_D3D10, + Compositor_DeviceType_D3D11, + Compositor_DeviceType_OpenGL +}; + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Sets the graphics device or context for the application that is going to feed + * images to the compositor. The type of the pDevice parameter must match the + * type that is provided: + * Compositor_DeviceType_D3D9 IDirect3DDevice9* + * Compositor_DeviceType_D3D9Ex IDirect3DDevice9Ex* + * Compositor_DeviceType_D3D10 ID3D10Device* + * Compositor_DeviceType_D3D11 ID3D11Device* + * Compositor_DeviceType_OpenGL HGLRC + * + * Note: D3D9 is not currently supported (use D3D9Ex instead). + */ + virtual void SetGraphicsDevice( Compositor_DeviceType eType, void* pDevice ) = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, void* pTexture, VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_006"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** used to refer to a single VR overlay */ + typedef uint64_t VROverlayHandle_t; + + static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** Errors that can occur around VR overlays */ + enum VROverlayError + { + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + }; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Overlay visibility setting controls when the overlay is visible. */ + enum VROverlayVisibility + { + VROverlayVisibility_Manual = 0, // There is no automatic visibility for the overlay + VROverlayVisibility_SystemOverlay = 1, // Visibility, input, and transform are controlled by the system button. + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + }; + + struct VROverlayIntersectionParams_t + { + vr::HmdVector3_t vSource; + vr::HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + vr::HmdVector3_t vPoint; + vr::HmdVector3_t vNormal; + vr::HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, vr::VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, vr::VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayVisibility( VROverlayHandle_t ulOverlayHandle, VROverlayVisibility *peOverlayVisibility ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayVisibility( VROverlayHandle_t ulOverlayHandle, VROverlayVisibility eOverlayVisibility ) = 0; + + /** Shows the VR overlay. This only has an effect on VROverlayVisibility_Manual overlays */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. This only has an effect on VROverlayVisibility_Manual overlays */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. This could be because it has manual visibility or + * because the system button was pressed */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, vr::TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void *pTexture ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. IVRCompositor::SetGraphicsDevice must be called before this function. This function + * can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: + * can be png or jpg, and should not be bigger than 1920x1080. IVRCompositor::SetGraphicsDevice + * must be called before this function. This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // System Overlay Methods + // ---------------------------------------------- + + /** Returns true if the system overlay is visible */ + virtual bool IsSystemOverlayVisible() = 0; + + /** returns true if the system overlay is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveSystemOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the system overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetSystemOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this system overlay requires to have scene focus */ + virtual VROverlayError GetSystemOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_001"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + // figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + +} diff --git a/vrclient_x64/openvr_0.9.3/openvr.h b/vrclient_x64/openvr_0.9.3/openvr.h new file mode 100644 index 00000000..93722076 --- /dev/null +++ b/vrclient_x64/openvr_0.9.3/openvr.h @@ -0,0 +1,1439 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_005"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_007"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** used to refer to a single VR overlay */ + typedef uint64_t VROverlayHandle_t; + + static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Errors that can occur around VR overlays */ + enum VROverlayError + { + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + }; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this system overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_002"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.10/openvr.h b/vrclient_x64/openvr_v0.9.10/openvr.h new file mode 100644 index 00000000..ce3d2afb --- /dev/null +++ b/vrclient_x64/openvr_v0.9.10/openvr.h @@ -0,0 +1,2093 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_VendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Camera calibration parameters + Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + Prop_TrackedCamera_IntrinsicsK3_Float = 5008, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum VRSubmitFlags_t +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01 +}; + + +/** Status of the overall system or tracked objects */ +enum VRState_t +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + VRState_t statusState; +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[12]; // Up to 11 bytes of new input + uint32_t uFlags; // Possible flags about the new input +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum VROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays +}; + + +/** error codes for firmware */ +enum VRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + HmdError_Init_AppInfoInitFailed = 114, + HmdError_Init_Retry = 115, // Used internally to cause retries to vrserver + HmdError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + HmdError_Init_AnotherAppLaunching = 117, + HmdError_Init_SettingsInitFailed = 118, + HmdError_Init_ShuttingDown = 119, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + HmdError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + HmdError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + HmdError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + HmdError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + HmdError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + HmdError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + HmdError_VendorSpecific_HmdFound_UserDataError = 1112, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the HMD. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::VRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_006"; + +} + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns the application key for the home application. The buffer should be at least k_unMaxApplicationKeyLength bytes long. */ + virtual EVRApplicationError GetHomeApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Sets the application key for the home application */ + virtual EVRApplicationError SetHomeApplication( const char *pchAppKey ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + + }; + + static const char * const IVRApplications_Version = "IVRApplications_001"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "notifyInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "notifyOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds, VRSubmitFlags_t nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough). */ + virtual void SetSkyboxOverride( GraphicsAPIConvention eTextureType, void *pFront, void *pBack, void *pLeft, void *pRight, void *pTop, void *pBottom ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirrow window. */ + virtual void HideMirrorWindow() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_008"; + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1, + k_eNotificationError_InvalidParam = 2, +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; +static const uint32_t k_unNotificationCatagoryMaxSize = 32; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char *strType, const char *strText, const char *strCategory, const NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1 + }; + + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay has input focus. An overlay has input focus when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsFocusOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual VROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_005"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Starts a process and returns the PID or 0 if the process failed to start. */ + virtual uint32_t StartVRProcess( const char *pchExecutable, const char **pchArguments, uint32_t unArgumentCount, const char *pchWorkingDirectory) = 0; + + /** Sets the master process for OpenVR. When the master process exits VRServer will send quit messages to every other process + * to start the shutdown process */ + virtual void SetMasterProcessToThis() = 0; + + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.11/openvr.h b/vrclient_x64/openvr_v0.9.11/openvr.h new file mode 100644 index 00000000..11cc9a6a --- /dev/null +++ b/vrclient_x64/openvr_v0.9.11/openvr.h @@ -0,0 +1,2359 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_VendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Camera calibration parameters + Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + Prop_TrackedCamera_IntrinsicsK3_Float = 5008, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum VRSubmitFlags_t +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum VRState_t +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + VRState_t statusState; +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum VROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays +}; + + +/** error codes for firmware */ +enum VRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + HmdError_Init_AppInfoInitFailed = 114, + HmdError_Init_Retry = 115, // Used internally to cause retries to vrserver + HmdError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + HmdError_Init_AnotherAppLaunching = 117, + HmdError_Init_SettingsInitFailed = 118, + HmdError_Init_ShuttingDown = 119, + HmdError_Init_TooManyObjects = 120, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + HmdError_IPC_Failed = 305, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_VendorSpecific_HmdFound_But = 1100, + HmdError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + HmdError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + HmdError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + HmdError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + HmdError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + HmdError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + HmdError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + HmdError_VendorSpecific_HmdFound_UserDataError = 1112, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// vrtrackedcameratypes.h +#ifndef _VRTRACKEDCAMERATYPES_H +#define _VRTRACKEDCAMERATYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ECameraVideoStreamFormat +{ + CVS_FORMAT_UNKNOWN = 0, + CVS_FORMAT_RAW10 = 1, // 10 bits per pixel + CVS_FORMAT_NV12 = 2, // 12 bits per pixel + CVS_FORMAT_RGB24 = 3, // 24 bits per pixel + CVS_MAX_FORMATS +}; + +#ifdef _MSC_VER +#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) +#else +#define VR_CAMERA_DECL_ALIGN( x ) // +#endif + +VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t +{ + ECameraVideoStreamFormat m_nStreamFormat; + + uint32_t m_nWidth; + uint32_t m_nHeight; + + uint32_t m_nFrameSequence; // Starts from 0 when stream starts. + uint32_t m_nTimeStamp; // Driver provided time stamp per driver centric time base + + uint32_t m_nBufferIndex; // Identifies which buffer the image data is hosted + uint32_t m_nBufferCount; // Total number of configured buffers + + uint32_t m_nImageDataSize; // Based on stream format, width, height + + double m_flFrameTime; // Starts from 0 when stream starts. In seconds. + + bool m_bPoseValid; // Supplied by HMD layer when used as a tracked camera + float m_HMDPoseMatrix[16]; + + void *m_pImageData; +}; + +struct TrackedCameraCalibrationDevOnly_t +{ + double m_flIntrinsicsFX; + double m_flIntrinsicsFY; + double m_flIntrinsicsCX; + double m_flIntrinsicsCY; + double m_flIntrinsicsK1; + double m_flIntrinsicsK2; + double m_flIntrinsicsP1; + double m_flIntrinsicsP2; + double m_flIntrinsicsK3; +}; + +#pragma pack( pop ) + +} + +#endif // _VRTRACKEDCAMERATYPES_H +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the HMD. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t & trackedDevicePose, const HmdMatrix34_t & transform ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::VRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_007"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns the application key for the home application. The buffer should be at least k_unMaxApplicationKeyLength bytes long. */ + virtual EVRApplicationError GetHomeApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Sets the application key for the home application */ + virtual EVRApplicationError SetHomeApplication( const char *pchAppKey ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + + }; + + static const char * const IVRApplications_Version = "IVRApplications_001"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "notifyInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "notifyOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** DEPRECATED - SOFT BOUNDS (use in IVRChaperone_002 and earlier) +* Corners are in clockwise order. +* Tracking space center (0,0,0) is the center of the Soft Bounds. +* It's a a rectangle. +* 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +/** DEPRECATED */ +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Soft Bounds. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in clockwise order. + * Standing center (0,0,0) is the center of the Soft Bounds. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; + float m_flHandoffStartMs; + float m_flHandoffEndMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds, VRSubmitFlags_t nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough). */ + virtual void SetSkyboxOverride( GraphicsAPIConvention eTextureType, void *pFront, void *pBack, void *pLeft, void *pRight, void *pTop, void *pBottom ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirrow window. */ + virtual void HideMirrorWindow() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual VRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_008"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1, + k_eNotificationError_InvalidParam = 2, +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; +static const uint32_t k_unNotificationCatagoryMaxSize = 32; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char *strType, const char *strText, const char *strCategory, const NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + VROverlayFlags_AcceptsGamepadEvents = 4, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1 + }; + + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual VROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual VROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual VROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual VROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual VROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_006"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller + + +/** Describes the component render model */ +struct ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; + HmdMatrix34_t mTrackingToComponentLocal; + bool bIsStatic; + bool bIsVisible; +}; + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise + */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, vr::VRControllerState_t controllerState, ComponentState_t *pComponentState ) = 0; + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Starts a process and returns the PID or 0 if the process failed to start. */ + virtual uint32_t StartVRProcess( const char *pchExecutable, const char **pchArguments, uint32_t unArgumentCount, const char *pchWorkingDirectory) = 0; + + /** Sets the master process for OpenVR. When the master process exits VRServer will send quit messages to every other process + * to start the shutdown process */ + virtual void SetMasterProcessToThis() = 0; + + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +} +// ivrtrackedcamera.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +#pragma pack( pop ) + +class IVRTrackedCamera +{ +public: + virtual bool HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool GetCameraFirmwareDescription( vr::TrackedDeviceIndex_t nDeviceIndex, char *pBuffer, uint32_t nBufferLen ) = 0; + + // An invalid or unsupported format returns false. Frame dimensions imply sensor size. + virtual bool GetCameraFrameDimensions( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // Caller can request a specific streaming format prior to enable. The request may be ignored if camera has been granted exclusive use by lower level systems. + // Format cannot be changed after camera has been enabled. An unsupported or rejected format returns false. + // Use CVS_FORMAT_UNKNOWN for defaults. + virtual bool SetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; + virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Camera must be enabled prior to streaming. Enabling causes frame buffering allocations and locks attributes. + virtual bool EnableCameraForStreaming( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + virtual bool StartVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool StopVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamActive( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Starts at 0 and advances in seconds when stream started and valid. A stopped stream returns 0. + // A paused stream is still considered active and the elapsed time advances. + virtual float GetVideoStreamElapsedTime( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Caller acquires ref-counted frames for exclusive use and releases when finished. Failure to release frames degrades frame buffering. + // NULL implies no frame available. + virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ReleaseVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex, const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; + + virtual bool SetAutoExposure( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + // A stream can only be paused after it is started. The pause state is cleared after stopping. + // The camera may not support pause/resume semantics due to HW limitations. + virtual bool SupportsPauseResume( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool PauseVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ResumeVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamPaused( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + /** Returns the current IVRTrackedCamera pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera(); +} diff --git a/vrclient_x64/openvr_v0.9.12/openvr.h b/vrclient_x64/openvr_v0.9.12/openvr.h new file mode 100644 index 00000000..d3cfeb54 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.12/openvr.h @@ -0,0 +1,2571 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + EVRState statusState; +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_But = 1100, + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// vrtrackedcameratypes.h +#ifndef _VRTRACKEDCAMERATYPES_H +#define _VRTRACKEDCAMERATYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ECameraVideoStreamFormat +{ + CVS_FORMAT_UNKNOWN = 0, + CVS_FORMAT_RAW10 = 1, // 10 bits per pixel + CVS_FORMAT_NV12 = 2, // 12 bits per pixel + CVS_FORMAT_RGB24 = 3, // 24 bits per pixel + CVS_MAX_FORMATS +}; + +#ifdef _MSC_VER +#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) +#else +#define VR_CAMERA_DECL_ALIGN( x ) // +#endif + +VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t +{ + ECameraVideoStreamFormat m_nStreamFormat; + + uint32_t m_nWidth; + uint32_t m_nHeight; + + uint32_t m_nFrameSequence; // Starts from 0 when stream starts. + uint32_t m_nTimeStamp; // Driver provided time stamp per driver centric time base + + uint32_t m_nBufferIndex; // Identifies which buffer the image data is hosted + uint32_t m_nBufferCount; // Total number of configured buffers + + uint32_t m_nImageDataSize; // Based on stream format, width, height + + double m_flFrameElapsedTime; // Starts from 0 when stream starts. In seconds. + double m_flFrameCaptureTime; // Relative to when the frame was exposed/captured. + + bool m_bPoseIsValid; // Supplied by HMD layer when used as a tracked camera + vr::HmdMatrix34_t m_matDeviceToAbsoluteTracking; + + float m_Pad[4]; + + void *m_pImageData; +}; + +#pragma pack( pop ) + +} + +#endif // _VRTRACKEDCAMERATYPES_H +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the HMD. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_009"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_002"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; + float m_flHandoffStartMs; + float m_flHandoffEndMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_009"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1 + }; + + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_007"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties +*/ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present +*/ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. + **/ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. + */ + virtual bool LoadTexture( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. + */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise + */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, RenderModel_ComponentState_t *pComponentState ) = 0; + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; + +} + + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Starts a process and returns the PID or 0 if the process failed to start. */ + virtual uint32_t StartVRProcess( const char *pchExecutable, const char **pchArguments, uint32_t unArgumentCount, const char *pchWorkingDirectory) = 0; + + /** Sets the master process for OpenVR. When the master process exits VRServer will send quit messages to every other process + * to start the shutdown process */ + virtual void SetMasterProcessToThis() = 0; + + /** Tells the application system to start all autolaunched dashboard overlays */ + virtual void StartAutolaunchOverlays() = 0; + + /** Tells the specified OpenVR process to quit. The process ID must be valid. Quitting all processes by passing 0 is not supported. + * Returns false if the request could not be sent. */ + virtual bool ForceQuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Aborts a process quit/application transition at the user's request. */ + virtual void AbortTransition() = 0; + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +} +// ivrtrackedcamera.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +#pragma pack( pop ) + +class IVRTrackedCamera +{ +public: + virtual bool HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool GetCameraFirmwareDescription( vr::TrackedDeviceIndex_t nDeviceIndex, char *pBuffer, uint32_t nBufferLen ) = 0; + + // An invalid or unsupported format returns false. Frame dimensions imply sensor size. + virtual bool GetCameraFrameDimensions( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // Caller can request a specific streaming format prior to enable. The request may be ignored if camera has been granted exclusive use by lower level systems. + // Format cannot be changed after camera has been enabled. An unsupported or rejected format returns false. + // Use CVS_FORMAT_UNKNOWN for defaults. + virtual bool SetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; + virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Camera must be enabled prior to streaming. Enabling causes frame buffering allocations and locks attributes. + virtual bool EnableCameraForStreaming( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + virtual bool StartVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool StopVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamActive( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Starts at 0 and advances in seconds when stream started and valid. A stopped stream returns 0. + // A paused stream is still considered active and the elapsed time advances. + virtual float GetVideoStreamElapsedTime( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Caller acquires ref-counted frames for exclusive use and releases when finished. Failure to release frames degrades frame buffering. + // NULL implies no frame available. + virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ReleaseVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex, const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; + + virtual bool SetAutoExposure( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + // A stream can only be paused after it is started. The pause state is cleared after stopping. + // The camera may not support pause/resume semantics due to HW limitations. + virtual bool SupportsPauseResume( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool PauseVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ResumeVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamPaused( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + virtual bool GetCameraDistortion( vr::TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; + virtual bool GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_001"; + +} +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::EVRInitError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( vr::EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( vr::EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::EVRInitError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRChaperoneSetup pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + /** Returns the current IVRTrackedCamera pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera(); + + /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. + * This function will also return NULL if the VR Compositor is running as the extended display + * interface is incompatible with the compositor. */ + VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); + + + + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; +} diff --git a/vrclient_x64/openvr_v0.9.13/openvr.h b/vrclient_x64/openvr_v0.9.13/openvr.h new file mode 100644 index 00000000..84f39067 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.13/openvr.h @@ -0,0 +1,2522 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_BackgroundSettingHasChanged = 850, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + EVRState statusState; +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_But = 1100, + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// vrtrackedcameratypes.h +#ifndef _VRTRACKEDCAMERATYPES_H +#define _VRTRACKEDCAMERATYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ECameraVideoStreamFormat +{ + CVS_FORMAT_UNKNOWN = 0, + CVS_FORMAT_RAW10 = 1, // 10 bits per pixel + CVS_FORMAT_NV12 = 2, // 12 bits per pixel + CVS_FORMAT_RGB24 = 3, // 24 bits per pixel + CVS_MAX_FORMATS +}; + +#ifdef _MSC_VER +#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) +#else +#define VR_CAMERA_DECL_ALIGN( x ) // +#endif + +VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t +{ + ECameraVideoStreamFormat m_nStreamFormat; + + uint32_t m_nWidth; + uint32_t m_nHeight; + + uint32_t m_nFrameSequence; // Starts from 0 when stream starts. + uint32_t m_nTimeStamp; // Driver provided time stamp per driver centric time base + + uint32_t m_nBufferIndex; // Identifies which buffer the image data is hosted + uint32_t m_nBufferCount; // Total number of configured buffers + + uint32_t m_nImageDataSize; // Based on stream format, width, height + + double m_flFrameElapsedTime; // Starts from 0 when stream starts. In seconds. + double m_flFrameCaptureTime; // Relative to when the frame was exposed/captured. + + bool m_bPoseIsValid; // Supplied by HMD layer when used as a tracked camera + vr::HmdMatrix34_t m_matDeviceToAbsoluteTracking; + + float m_Pad[4]; + + void *m_pImageData; +}; + +#pragma pack( pop ) + +} + +#endif // _VRTRACKEDCAMERATYPES_H +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_010"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_002"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; + float m_flHandoffStartMs; + float m_flHandoffEndMs; + float m_flCompositorUpdateCpuMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_009"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1 + }; + + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_008"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties +*/ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present +*/ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. + **/ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. + */ + virtual bool LoadTexture( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. + */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise + */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, RenderModel_ComponentState_t *pComponentState ) = 0; + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +#pragma pack( pop ) + +class IVRTrackedCamera +{ +public: + virtual bool HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool GetCameraFirmwareDescription( vr::TrackedDeviceIndex_t nDeviceIndex, char *pBuffer, uint32_t nBufferLen ) = 0; + + // An invalid or unsupported format returns false. Frame dimensions imply sensor size. + virtual bool GetCameraFrameDimensions( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // Caller can request a specific streaming format prior to enable. The request may be ignored if camera has been granted exclusive use by lower level systems. + // Format cannot be changed after camera has been enabled. An unsupported or rejected format returns false. + // Use CVS_FORMAT_UNKNOWN for defaults. + virtual bool SetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; + virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Camera must be enabled prior to streaming. Enabling causes frame buffering allocations and locks attributes. + virtual bool EnableCameraForStreaming( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + virtual bool StartVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool StopVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamActive( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Starts at 0 and advances in seconds when stream started and valid. A stopped stream returns 0. + // A paused stream is still considered active and the elapsed time advances. + virtual float GetVideoStreamElapsedTime( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Caller acquires ref-counted frames for exclusive use and releases when finished. Failure to release frames degrades frame buffering. + // NULL implies no frame available. + virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ReleaseVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex, const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; + + virtual bool SetAutoExposure( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + // A stream can only be paused after it is started. The pause state is cleared after stopping. + // The camera may not support pause/resume semantics due to HW limitations. + virtual bool SupportsPauseResume( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool PauseVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ResumeVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamPaused( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + virtual bool GetCameraDistortion( vr::TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; + virtual bool GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_001"; + +} +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::EVRInitError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( vr::EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( vr::EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::EVRInitError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRChaperoneSetup pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRTrackedCamera pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera(); + + /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. + * This function will also return NULL if the VR Compositor is running as the extended display + * interface is incompatible with the compositor. */ + VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); + + + + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; +} diff --git a/vrclient_x64/openvr_v0.9.14/openvr.h b/vrclient_x64/openvr_v0.9.14/openvr.h new file mode 100644 index 00000000..a8404a16 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.14/openvr.h @@ -0,0 +1,2554 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_BackgroundSettingHasChanged = 850, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + EVRState statusState; +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_But = 1100, + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// vrtrackedcameratypes.h +#ifndef _VRTRACKEDCAMERATYPES_H +#define _VRTRACKEDCAMERATYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ECameraVideoStreamFormat +{ + CVS_FORMAT_UNKNOWN = 0, + CVS_FORMAT_RAW10 = 1, // 10 bits per pixel + CVS_FORMAT_NV12 = 2, // 12 bits per pixel + CVS_FORMAT_RGB24 = 3, // 24 bits per pixel + CVS_MAX_FORMATS +}; + +#ifdef _MSC_VER +#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) ) +#else +#define VR_CAMERA_DECL_ALIGN( x ) // +#endif + +VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t +{ + ECameraVideoStreamFormat m_nStreamFormat; + + uint32_t m_nWidth; + uint32_t m_nHeight; + + uint32_t m_nImageDataSize; // Based on stream format, width, height + + uint32_t m_nFrameSequence; // Starts from 0 when stream starts. + + uint32_t m_nISPFrameTimeStamp; // Driver provided time stamp per driver centric time base + uint32_t m_nISPReferenceTimeStamp; + uint32_t m_nSyncCounter; + + uint32_t m_nExposureTime; + + uint32_t m_nBufferIndex; // Identifies which buffer the image data is hosted + uint32_t m_nBufferCount; // Total number of configured buffers + + double m_flFrameElapsedTime; // Starts from 0 when stream starts. In seconds. + + double m_flFrameCaptureTime; // Relative to when the frame was exposed/captured. + uint64_t m_nFrameCaptureTicks; + + bool m_bPoseIsValid; // Supplied by HMD layer when used as a tracked camera + vr::HmdMatrix34_t m_matDeviceToAbsoluteTracking; + + float m_Pad[4]; + + void *m_pImageData; +}; + +#pragma pack( pop ) + +} + +#endif // _VRTRACKEDCAMERATYPES_H +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + + // ------------------------------------ + // Performance Test methods + // ------------------------------------ + + /** Performance Testing applications can call this to enable/disable when frame timing data should be + * captured for the Perf Test Report. */ + virtual void PerformanceTestEnableCapture( bool bEnable ) = 0; + + /** Performance Testing applications can call this to note on the Perf Test Report when they've shifted + * their fidelity to a new mode. */ + virtual void PerformanceTestReportFidelityLevelChange( int nFidelityLevel ) = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_010"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_002"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingWallTagInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveWallTagInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_004"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; + float m_flHandoffStartMs; + float m_flHandoffEndMs; + float m_flCompositorUpdateCpuMs; + + uint32_t m_nPresents; // number of times this frame was presented +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_010"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1 + }; + + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_008"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties +*/ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present +*/ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. + **/ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. + */ + virtual bool LoadTexture( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. + */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise + */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, RenderModel_ComponentState_t *pComponentState ) = 0; + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +#pragma pack( pop ) + +class IVRTrackedCamera +{ +public: + virtual bool HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool GetCameraFirmwareDescription( vr::TrackedDeviceIndex_t nDeviceIndex, char *pBuffer, uint32_t nBufferLen ) = 0; + + // An invalid or unsupported format returns false. Frame dimensions imply sensor size. + virtual bool GetCameraFrameDimensions( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // Caller can request a specific streaming format prior to enable. The request may be ignored if camera has been granted exclusive use by lower level systems. + // Format cannot be changed after camera has been enabled. An unsupported or rejected format returns false. + // Use CVS_FORMAT_UNKNOWN for defaults. + virtual bool SetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex, vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0; + virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Camera must be enabled prior to streaming. Enabling causes frame buffering allocations and locks attributes. + virtual bool EnableCameraForStreaming( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + virtual bool StartVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool StopVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamActive( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Starts at 0 and advances in seconds when stream started and valid. A stopped stream returns 0. + // A paused stream is still considered active and the elapsed time advances. + virtual float GetVideoStreamElapsedTime( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + // Caller acquires ref-counted frames for exclusive use and releases when finished. Failure to release frames degrades frame buffering. + // NULL implies no frame available. + virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ReleaseVideoStreamFrame( vr::TrackedDeviceIndex_t nDeviceIndex, const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0; + + virtual bool SetAutoExposure( vr::TrackedDeviceIndex_t nDeviceIndex, bool bEnable ) = 0; + + // A stream can only be paused after it is started. The pause state is cleared after stopping. + virtual bool PauseVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool ResumeVideoStream( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + virtual bool IsVideoStreamPaused( vr::TrackedDeviceIndex_t nDeviceIndex ) = 0; + + virtual bool GetCameraDistortion( vr::TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0; + virtual bool GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_001"; + +} +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::EVRInitError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( vr::EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( vr::EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::EVRInitError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRChaperoneSetup pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRTrackedCamera pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera(); + + /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. + * This function will also return NULL if the VR Compositor is running as the extended display + * interface is incompatible with the compositor. */ + VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); + + + + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; +} diff --git a/vrclient_x64/openvr_v0.9.15/openvr.h b/vrclient_x64/openvr_v0.9.15/openvr.h new file mode 100644 index 00000000..dbe2748a --- /dev/null +++ b/vrclient_x64/openvr_v0.9.15/openvr.h @@ -0,0 +1,2498 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_BackgroundSettingHasChanged = 850, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + + // ------------------------------------ + // Performance Test methods + // ------------------------------------ + + /** Performance Testing applications can call this to enable/disable when frame timing data should be + * captured for the Perf Test Report. */ + virtual void PerformanceTestEnableCapture( bool bEnable ) = 0; + + /** Performance Testing applications can call this to note on the Perf Test Report when they've shifted + * their fidelity to a new mode. */ + virtual void PerformanceTestReportFidelityLevelChange( int nFidelityLevel ) = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_011"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_003"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_Id_String = "id"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_011"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_010"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties +*/ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present +*/ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. + **/ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. + */ + virtual bool LoadTexture( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. + */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise + */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::EVRInitError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( vr::EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( vr::EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::EVRInitError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRChaperoneSetup pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. + * This function will also return NULL if the VR Compositor is running as the extended display + * interface is incompatible with the compositor. */ + VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; +} diff --git a/vrclient_x64/openvr_v0.9.16/openvr.h b/vrclient_x64/openvr_v0.9.16/openvr.h new file mode 100644 index 00000000..20bdad2a --- /dev/null +++ b/vrclient_x64/openvr_v0.9.16/openvr.h @@ -0,0 +1,2527 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + + // ------------------------------------ + // Performance Test methods + // ------------------------------------ + + /** Performance Testing applications can call this to enable/disable when frame timing data should be + * captured for the Perf Test Report. */ + virtual void PerformanceTestEnableCapture( bool bEnable ) = 0; + + /** Performance Testing applications can call this to note on the Perf Test Report when they've shifted + * their fidelity to a new mode. */ + virtual void PerformanceTestReportFidelityLevelChange( int nFidelityLevel ) = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_011"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_003"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_AutomaticDirectModeEnabled_Bool = "automaticDirectModeEnabled"; + static const char * const k_pch_SteamVR_RequestDirectModeEnabled_Bool = "requestDirectModeEnabled"; + static const char * const k_pch_SteamVR_RequestDirectModeDisabled_Bool = "requestDirectModeDisabled"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_011"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_010"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyIndices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_004"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::EVRInitError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( vr::EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( vr::EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::EVRInitError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRChaperoneSetup pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRExtendedDisplay pointer or NULL the interface could not be found. + * This function will also return NULL if the VR Compositor is running as the extended display + * interface is incompatible with the compositor. */ + VR_INTERFACE vr::IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; +} diff --git a/vrclient_x64/openvr_v0.9.17/openvr.h b/vrclient_x64/openvr_v0.9.17/openvr.h new file mode 100644 index 00000000..bf59acab --- /dev/null +++ b/vrclient_x64/openvr_v0.9.17/openvr.h @@ -0,0 +1,2730 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + + // ------------------------------------ + // Performance Test methods + // ------------------------------------ + + /** Performance Testing applications can call this to enable/disable when frame timing data should be + * captured for the Perf Test Report. */ + virtual void PerformanceTestEnableCapture( bool bEnable ) = 0; + + /** Performance Testing applications can call this to note on the Perf Test Report when they've shifted + * their fidelity to a new mode. */ + virtual void PerformanceTestReportFidelityLevelChange( int nFidelityLevel ) = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_011"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_004"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_AutomaticDirectModeEnabled_Bool = "automaticDirectModeEnabled"; + static const char * const k_pch_SteamVR_RequestDirectModeEnabled_Bool = "requestDirectModeEnabled"; + static const char * const k_pch_SteamVR_RequestDirectModeDisabled_Bool = "requestDirectModeDisabled"; + static const char * const k_pch_SteamVR_RequestDirectModeEdidVid_Int32 = "requestDirectModeEdidVid"; + static const char * const k_pch_SteamVR_RequestDirectModeEdidPid_Int32 = "requestDirectModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources */ + virtual bool ShouldAppRenderWithLowResources() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_012"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_010"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyIndices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_004"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v0.9.18/openvr.h b/vrclient_x64/openvr_v0.9.18/openvr.h new file mode 100644 index 00000000..9b78236e --- /dev/null +++ b/vrclient_x64/openvr_v0.9.18/openvr.h @@ -0,0 +1,2768 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + + // ------------------------------------ + // Performance Test methods + // ------------------------------------ + + /** Performance Testing applications can call this to enable/disable when frame timing data should be + * captured for the Perf Test Report. */ + virtual void PerformanceTestEnableCapture( bool bEnable ) = 0; + + /** Performance Testing applications can call this to note on the Perf Test Report when they've shifted + * their fidelity to a new mode. */ + virtual void PerformanceTestReportFidelityLevelChange( int nFidelityLevel ) = 0; +}; + +static const char * const IVRSystem_Version = "IVRSystem_011"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_004"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_013"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_010"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyIndices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_004"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v0.9.19/openvr.h b/vrclient_x64/openvr_v0.9.19/openvr.h new file mode 100644 index 00000000..030b28a8 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.19/openvr.h @@ -0,0 +1,2800 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_012"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_005"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + + //----------------------------------------------------------------------------- + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_013"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_011"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyIndices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v0.9.20/openvr.h b/vrclient_x64/openvr_v0.9.20/openvr.h new file mode 100644 index 00000000..5d4d173d --- /dev/null +++ b/vrclient_x64/openvr_v0.9.20/openvr.h @@ -0,0 +1,2860 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_012"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_005"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_001"; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowReprojection_Bool = "allowReprojection"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char * const k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char * const k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char * const k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value + + uint32_t m_nReprojectionFlags; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_014"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_011"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyIndices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v0.9.4/openvr.h b/vrclient_x64/openvr_v0.9.4/openvr.h new file mode 100644 index 00000000..93722076 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.4/openvr.h @@ -0,0 +1,1439 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_005"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_007"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** used to refer to a single VR overlay */ + typedef uint64_t VROverlayHandle_t; + + static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Errors that can occur around VR overlays */ + enum VROverlayError + { + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + }; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this system overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_002"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.5/openvr.h b/vrclient_x64/openvr_v0.9.5/openvr.h new file mode 100644 index 00000000..de996831 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.5/openvr.h @@ -0,0 +1,1551 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_005"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_007"; + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + char *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1 +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, char *strType, char *strText, char *strCategory, NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** used to refer to a single VR overlay */ + typedef uint64_t VROverlayHandle_t; + + static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Errors that can occur around VR overlays */ + enum VROverlayError + { + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + }; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_003"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.6/openvr.h b/vrclient_x64/openvr_v0.9.6/openvr.h new file mode 100644 index 00000000..b69d2020 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.6/openvr.h @@ -0,0 +1,1551 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum VROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, +}; + + +/** error codes returned by Vr_Init */ +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_005"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_007"; + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + char *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1 +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, char *strType, char *strText, char *strCategory, NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_003"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.7/openvr.h b/vrclient_x64/openvr_v0.9.7/openvr.h new file mode 100644 index 00000000..bf5d1334 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.7/openvr.h @@ -0,0 +1,1592 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** Status of the overall system */ +enum VRStatusState_t +{ + State_OK = 0, + State_Error = 1, + State_Warning = 2, + State_Undefined = 3, + State_NotSet = 4, +}; + + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + + VREvent_StatusUpdate = 900, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + VRStatusState_t statusState; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum VROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + HmdError_Init_AppInfoInitFailed = 114, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_005"; + +} + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_007"; + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + char *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1, + k_eNotificationError_InvalidParam = 2, +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; +static const uint32_t k_unNotificationCatagoryMaxSize = 32; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, char *strType, char *strText, char *strCategory, NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_003"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Starts a process and returns the PID or 0 if the process failed to start. */ + virtual uint32_t StartVRProcess( const char *pchExecutable, const char **pchArguments, uint32_t unArgumentCount, const char *pchWorkingDirectory) = 0; + + /** Sets the master process for OpenVR. When the master process exits VRServer will send quit messages to every other process + * to start the shutdown process */ + virtual void SetMasterProcessToThis() = 0; + + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.8/openvr.h b/vrclient_x64/openvr_v0.9.8/openvr.h new file mode 100644 index 00000000..3b239b96 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.8/openvr.h @@ -0,0 +1,1736 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String= 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** Status of the overall system */ +enum VRStatusState_t +{ + State_OK = 0, + State_Error = 1, + State_Warning = 2, + State_Undefined = 3, + State_NotSet = 4, +}; + + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + + VREvent_StatusUpdate = 900, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + VRStatusState_t statusState; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum VROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays +}; + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + HmdError_Init_AppInfoInitFailed = 114, + HmdError_Init_Retry = 115, // Used internally to cause retries to vrserver + HmdError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + HmdError_Init_AnotherAppLaunching = 117, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_005"; + +} + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns the application key for the home application. The buffer should be at least k_unMaxApplicationKeyLength bytes long. */ + virtual EVRApplicationError GetHomeApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Sets the application key for the home application */ + virtual EVRApplicationError SetHomeApplication( const char *pchAppKey ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_001"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_007"; + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1, + k_eNotificationError_InvalidParam = 2, +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; +static const uint32_t k_unNotificationCatagoryMaxSize = 32; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, char *strType, char *strText, char *strCategory, NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_004"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Starts a process and returns the PID or 0 if the process failed to start. */ + virtual uint32_t StartVRProcess( const char *pchExecutable, const char **pchArguments, uint32_t unArgumentCount, const char *pchWorkingDirectory) = 0; + + /** Sets the master process for OpenVR. When the master process exits VRServer will send quit messages to every other process + * to start the shutdown process */ + virtual void SetMasterProcessToThis() = 0; + + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v0.9.9/openvr.h b/vrclient_x64/openvr_v0.9.9/openvr.h new file mode 100644 index 00000000..3c79c797 --- /dev/null +++ b/vrclient_x64/openvr_v0.9.9/openvr.h @@ -0,0 +1,1959 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum Hmd_Eye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum GraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum HmdTrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Describes what kind of object is being tracked at a given ID */ +enum TrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + HmdTrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum TrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one TrackedDeviceClass. */ +enum TrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_String = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + + // Camera calibration parameters + Prop_TrackedCamera_IntrinsicsFX_Float = 5000, + Prop_TrackedCamera_IntrinsicsFY_Float = 5001, + Prop_TrackedCamera_IntrinsicsCX_Float = 5002, + Prop_TrackedCamera_IntrinsicsCY_Float = 5003, + Prop_TrackedCamera_IntrinsicsK1_Float = 5004, + Prop_TrackedCamera_IntrinsicsK2_Float = 5005, + Prop_TrackedCamera_IntrinsicsP1_Float = 5006, + Prop_TrackedCamera_IntrinsicsP2_Float = 5007, + Prop_TrackedCamera_IntrinsicsK3_Float = 5008, +}; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum TrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, +}; + + +/** a single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[ 2 ]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Contains everything a game needs to render a single tracked or static object for the user. */ +struct RenderModel_t +{ + uint64_t ulInternalHandle; // Used internally by SteamVR + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + RenderModel_TextureMap_t diffuseTexture; // RGBA diffuse texture for the model +}; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum VRSubmitFlags_t +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01 +}; + + +/** Status of the overall system */ +enum VRStatusState_t +{ + State_OK = 0, + State_Error = 1, + State_Warning = 2, + State_Undefined = 3, + State_NotSet = 4, +}; + + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + + VREvent_InputFocusCaptured = 400, // data is process + VREvent_InputFocusReleased = 401, // data is process + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + + VREvent_Notification_Show = 600, + VREvent_Notification_Dismissed = 601, + VREvent_Notification_BeginInteraction = 602, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + EVRButtonId button; +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; + EVRMouseButton button; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + VRStatusState_t statusState; +}; + +/** Not actually used for any events. It is just used to reserve +* space in the union for future event types */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + EVREventType eventType; + TrackedDeviceIndex_t trackedDeviceIndex; + VREvent_Data_t data; + float eventAgeSeconds; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum VROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays +}; + + +/** error codes for firmware */ +enum VRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum HmdError +{ + HmdError_None = 0, + HmdError_Unknown = 1, + + HmdError_Init_InstallationNotFound = 100, + HmdError_Init_InstallationCorrupt = 101, + HmdError_Init_VRClientDLLNotFound = 102, + HmdError_Init_FileNotFound = 103, + HmdError_Init_FactoryNotFound = 104, + HmdError_Init_InterfaceNotFound = 105, + HmdError_Init_InvalidInterface = 106, + HmdError_Init_UserConfigDirectoryInvalid = 107, + HmdError_Init_HmdNotFound = 108, + HmdError_Init_NotInitialized = 109, + HmdError_Init_PathRegistryNotFound = 110, + HmdError_Init_NoConfigPath = 111, + HmdError_Init_NoLogPath = 112, + HmdError_Init_PathRegistryNotWritable = 113, + HmdError_Init_AppInfoInitFailed = 114, + HmdError_Init_Retry = 115, // Used internally to cause retries to vrserver + HmdError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + HmdError_Init_AnotherAppLaunching = 117, + HmdError_Init_SettingsInitFailed = 118, + + HmdError_Driver_Failed = 200, + HmdError_Driver_Unknown = 201, + HmdError_Driver_HmdUnknown = 202, + HmdError_Driver_NotLoaded = 203, + HmdError_Driver_RuntimeOutOfDate = 204, + HmdError_Driver_HmdInUse = 205, + HmdError_Driver_NotCalibrated = 206, + HmdError_Driver_CalibrationInvalid = 207, + HmdError_Driver_HmdDisplayNotFound = 208, + + HmdError_IPC_ServerInitFailed = 300, + HmdError_IPC_ConnectFailed = 301, + HmdError_IPC_SharedStateInitFailed = 302, + HmdError_IPC_CompositorInitFailed = 303, + HmdError_IPC_MutexInitFailed = 304, + + HmdError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + HmdError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + HmdError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + HmdError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + HmdError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + HmdError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + HmdError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + HmdError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + + HmdError_Steam_SteamInstallationNotFound = 2000, + +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} + +#endif // _INCLUDE_VRTYPES_H + +// vrannotation.h +#ifdef __clang__ +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( Hmd_Eye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( Hmd_Eye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( Hmd_Eye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + /** [Windows Only] + * Notifies the system that the VR output will appear in a particular window. + */ + virtual bool AttachToWindow( void *hWnd ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the chaperone soft bounds. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. */ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the soft or hard bounds returned by IVRChaperone. Its position + * depends on what the user has set in the chaperone calibration tool and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( TrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the HMD. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual TrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a float type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, TrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( TrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false */ + virtual bool PollNextEvent( VREvent_t *pEvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. */ + virtual bool PollNextEventWithPose( TrackingUniverseOrigin eOrigin, vr::VREvent_t *pEvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( Hmd_Eye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( TrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::VRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + +}; + +static const char * const IVRSystem_Version = "IVRSystem_006"; + +} + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + }; + + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns the application key for the home application. The buffer should be at least k_unMaxApplicationKeyLength bytes long. */ + virtual EVRApplicationError GetHomeApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Sets the application key for the home application */ + virtual EVRApplicationError SetHomeApplication( const char *pchAppKey ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + }; + + static const char * const IVRApplications_Version = "IVRApplications_001"; + + /** Returns the current IVRApplications pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRApplications *VR_CALLTYPE VRApplications(); + +} // namespace vr +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void Sync( EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char *k_pch_SteamVR_Section = "steamvr"; + static const char *k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char *k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char *k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char *k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char *k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char *k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char *k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char *k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char *k_pch_SteamVR_IPD_Float = "ipd"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + 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"; + static const char *k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char *k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char *k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char *k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char *k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char *k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char *k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx"; + static const char *k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety"; + static const char *k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz"; + static const char *k_pch_Lighthouse_HeadingOffset_Float = "headingoffset"; + + //----------------------------------------------------------------------------- + // null keys + + static const char *k_pch_Null_Section = "driver_null"; + static const char *k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char *k_pch_Null_Id_String = "id"; + static const char *k_pch_Null_SerialNumber_String = "serialNumber"; + static const char *k_pch_Null_ModelNumber_String = "modelNumber"; + static const char *k_pch_Null_WindowX_Int32 = "windowX"; + static const char *k_pch_Null_WindowY_Int32 = "windowY"; + static const char *k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char *k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char *k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char *k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char *k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char *k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // notification keys + static const char *k_pch_Notifications_Section = "notifications"; + static const char *k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + + //----------------------------------------------------------------------------- + + + static const char * const IVRSettings_Version = "IVRSettings_001"; + + /** Returns the current IVRSettings pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRSettings *VR_CALLTYPE VRSettings(); + +} // namespace vr +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_SoftBoundsInvalid = 203, // Soft bounds haven't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_HardBoundsInvalid = 204, // Hard bounds haven't been calibrated for the current tracking center +}; + +/** SOFT BOUNDS ASSUMPTIONS +* Corners are in clockwise order. +* Tracking space center (0,0,0) is contained within the Soft Bounds. +* Angles of corners are between 25 and 155 degrees. +* Quadrilateral formed is convex. +* One side will run parallel to the X axis. +* Height of every corner is 0Y (on the floor). */ +struct ChaperoneSoftBoundsInfo_t +{ + HmdQuad_t quadCorners; +}; + +struct ChaperoneSeatedBoundsInfo_t +{ + HmdVector3_t vSeatedHeadPosition; + HmdVector3_t vDeskEdgePositions[ 2 ]; +}; + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. */ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the 4 corner positions of the Soft Bounds (also know as Safe Zone and Play Space). */ + virtual bool GetSoftBoundsInfo( ChaperoneSoftBoundsInfo_t *pInfo ) = 0; + + /** Returns the quads representing the Hard Bounds (static physical obstacles). */ + virtual bool GetHardBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position and front edge of their desk. */ + virtual bool GetSeatedBoundsInfo( ChaperoneSeatedBoundsInfo_t *pInfo ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_002"; + +#pragma pack( pop ) + +} +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum VRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, +}; + + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t size; // sizeof(Compositor_FrameTiming) + double frameStart; + float frameVSync; // seconds from frame start + uint32_t droppedFrames; + uint32_t frameIndex; + vr::TrackedDevicePose_t pose; + + float prediction; + + float m_flFrameIntervalMs; + float m_flSceneRenderCpuMs; + float m_flSceneRenderGpuMs; + float m_flCompositorRenderCpuMs; + float m_flCompositorRenderGpuMs; + float m_flPresentCallCpuMs; + float m_flRunningStartMs; +}; + + +#pragma pack( pop ) + + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Returns the last error that occurred in the compositor */ + virtual uint32_t GetLastError( VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + /** Turns vsync on or off on the compositor window */ + virtual void SetVSync( bool bVSync ) = 0; + + /** Returns true if vsync is enabled in the compositor window */ + virtual bool GetVSync() = 0; + + /** Sets gamma for the compositor window */ + virtual void SetGamma( float fGamma ) = 0; + + /** Returns the gamma for the compositor window */ + virtual float GetGamma() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual VRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VRCompositorError Submit( Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void* pTexture, const VRTextureBounds_t* pBounds, VRSubmitFlags_t nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough). */ + virtual void SetSkyboxOverride( GraphicsAPIConvention eTextureType, void *pFront, void *pBack, void *pLeft, void *pRight, void *pTop, void *pBottom ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( TrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual TrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_008"; + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +const char * const NotificationTypeFriendUpdate = "FriendUpdate"; + +// Used for passing graphic data +struct NotificationBitmap +{ + void *bytes; + int32_t width; + int32_t height; + int32_t depth; +}; + +enum NotificationError_t +{ + k_ENotificationError_OK = 0, + k_ENotificationError_Fail = 1, + k_eNotificationError_InvalidParam = 2, +}; + +static const uint32_t k_unNotificationTypeMaxSize = 16; +static const uint32_t k_unNotificationTextMaxSize = 128; +static const uint32_t k_unNotificationCatagoryMaxSize = 32; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +/*enum NotificationEventType +{ + Notification_None = 0, + + Notification_Dismissed = 101, // param1 = Device index + Notification_BeginInteraction = 102, // param1 = Device index + Notification_Scroll = 103, // param1 = Device index + Notification_ClickOn = 104, // param1 = Device index + Notification_ClickOff = 105, // param1 = Device index +};*/ + +/** An event posted by the server to all running applications */ +/*struct NotificationEvent_t +{ + NotificationEventType eventType; + int32_t x; // X coordinate in the notifications bitmap when the click happened + int32_t y; // Y coordinate in the notifications bitmap when the click happened + int32_t scroll_x; // X scrolling amount in the notifications bitmap coords + int32_t scroll_y; // Y scrolling amount in the notifications bitmap coords + uint32_t buttons; // Buttons pressed + + float eventAgeSeconds; +};*/ + +typedef uint32_t VRNotificationId; + +// This struct will be used for the history list of notifications +struct NotificationItem +{ + VRNotificationId notificationId; +}; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Returns the last error that occurred */ + virtual uint32_t GetErrorString( NotificationError_t error, VR_OUT_STRING() char* pchBuffer, uint32_t unBufferSize ) = 0; + + VR_METHOD_DESC( Create a new notification. ) + virtual NotificationError_t CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char *strType, const char *strText, const char *strCategory, const NotificationBitmap *photo, /* out */ vr::VRNotificationId *notificationId ) = 0; + + VR_METHOD_DESC(Dismiss the notification) + virtual NotificationError_t DismissNotification( vr::VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_001"; + +} // namespace vr + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + TrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual VROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual VROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual VROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). */ + virtual VROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, VROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual VROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( VROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Specify flag setting for a given overlay */ + virtual VROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual VROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual VROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual VROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual VROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual VROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the gamma of the overlay quad. Use 2.2 when providing a texture in linear color space. */ + virtual VROverlayError SetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float fGamma ) = 0; + + /** Gets the gamma of the overlay quad. Be default overlays are rendered with 1.0 gamma. */ + virtual VROverlayError GetOverlayGamma( VROverlayHandle_t ulOverlayHandle, float *pfGamma ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual VROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual VROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual VROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual VROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual VROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual VROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual VROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual VROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual VROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual VROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual VROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay has input focus. An overlay has input focus when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsFocusOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. IVRCompositor::SetGraphicsDevice must be called before + * this function. This function can only be called by the overlay's renderer process. + * + * If pBounds is NULL the entire texture will be used. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual VROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void* pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual VROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual VROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual VROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual VROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual VROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual VROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_005"; + +} // namespace vr +// ivrrendermodels.h +namespace vr +{ + +class IVRRenderModels +{ +public: + + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns false if the model could not be loaded. + * + * The API expects that this function will be called at startup or when tracked devices are connected and disconnected. + * If it is called every frame it will hurt performance. + */ + virtual bool LoadRenderModel( const char *pchRenderModelName, RenderModel_t *pRenderModel ) = 0; + + /** Frees a previously returned render model */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; + +} + +// ivrcontrolpanel.h +namespace vr +{ + +class IVRControlPanel +{ +public: + + // ------------------------------------ + // Driver enumeration methods + // ------------------------------------ + + /** the number of active drivers */ + virtual uint32_t GetDriverCount() = 0; + + /** The ID of the specified driver as a UTF-8 string. Returns the length of the ID in bytes. If + * the buffer is not large enough to fit the ID an empty string will be returned. In general, 128 bytes + * will be enough to fit any ID. */ + virtual uint32_t GetDriverId( uint32_t unDriverIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Enumeration Methods + // ------------------------------------ + + /** the number of active displays on the specified driver */ + virtual uint32_t GetDriverDisplayCount( const char *pchDriverId ) = 0; + + /** The ID of the specified display in the specified driver as a UTF-8 string. Returns the + * length of the ID in bytes. If the buffer is not large enough to fit the ID an empty + * string will be returned. In general, 128 bytes will be enough to fit any ID. */ + virtual uint32_t GetDriverDisplayId( const char *pchDriverId, uint32_t unDisplayIndex, char *pchBuffer, uint32_t unBufferLen ) = 0; + + // ------------------------------------ + // Display Detail Methods + // ------------------------------------ + + /** The model name of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the model name in bytes. If the buffer is not large enough to fit the model name an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplayModelNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** The serial number of the specified driver in the specified driver as a UTF-8 string. Returns the + * length of the serial number in bytes. If the buffer is not large enough to fit the serial number an empty + * string will be returned. In general, 128 bytes will be enough to fit any model name. Returns 0 if + * the display or driver was not found. */ + virtual uint32_t GetDriverDisplaySerialNumber( const char *pchDriverId, const char *pchDisplayId, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Returns the IVRSystem interface for the current display that matches the specified version number. + * This is usually unnecessary and the return value of VR_Init can be used without calling this method. */ + VR_IGNOREATTR() + virtual class IVRSystem *GetCurrentDisplayInterface( const char *pchHmdInterfaceVersion ) = 0; + + // ------------------------------------ + // 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; + + // ------------------------------------ + // IPD Methods + // ------------------------------------ + + /** Gets the current IPD (Interpupillary Distance) in meters. */ + virtual float GetIPD() = 0; + + /** Sets the current IPD (Interpupillary Distance) in meters. */ + virtual void SetIPD( float fIPD ) = 0; + + // ------------------------------------ + // Compositor Methods + // ------------------------------------ + + /** Returns the IVRCompositor interface that matches the specified interface version. This will only + * return the compositor interface if it has already been initialized by the current process. */ + virtual class vr::IVRCompositor *GetCurrentCompositorInterface( const char *pchInterfaceVersion ) = 0; + + // ------------------------------------ + // Process control Methods + // ------------------------------------ + + /** Tells the specified OpenVR process to quit. If the process ID is 0, all processes will be told to quit, + * ending with the process submitting the request. Returns false if the request could not be sent. */ + virtual bool QuitProcess( uint32_t pidProcessToQuit ) = 0; + + /** Starts a process and returns the PID or 0 if the process failed to start. */ + virtual uint32_t StartVRProcess( const char *pchExecutable, const char **pchArguments, uint32_t unArgumentCount, const char *pchWorkingDirectory) = 0; + + /** Sets the master process for OpenVR. When the master process exits VRServer will send quit messages to every other process + * to start the shutdown process */ + virtual void SetMasterProcessToThis() = 0; + + +}; + +static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VR_Init( vr::HmdError *peError, vr::EVRApplicationType eApplicationType = vr::VRApplication_Scene ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + VR_INTERFACE void VR_CALLTYPE VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns the string version of an HMD error. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetStringForHmdError( vr::HmdError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, vr::HmdError *peError ); + + /** Returns the current IVRSystem pointer or NULL if VR_Init has not been called successfully */ + VR_INTERFACE vr::IVRSystem *VR_CALLTYPE VRSystem(); + + /** Returns the current IVRChaperone pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRChaperone *VR_CALLTYPE VRChaperone(); + + /** Returns the current IVRCompositor pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRCompositor *VR_CALLTYPE VRCompositor(); + + /** Returns the current IVROverlay pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVROverlay *VR_CALLTYPE VROverlay(); + + /** Returns the current IVRRenderModels pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRRenderModels *VR_CALLTYPE VRRenderModels(); + + /** Returns the current IVRControlPanel pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRControlPanel *VR_CALLTYPE VRControlPanel(); + + +} diff --git a/vrclient_x64/openvr_v1.0.0/openvr.h b/vrclient_x64/openvr_v1.0.0/openvr.h new file mode 100644 index 00000000..458642c9 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.0/openvr.h @@ -0,0 +1,3088 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the applicaiton to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // If you application receives a screenshot request, submit with this flag to let the compositor this submission + // is in the response to the screenshot + Submit_Screenshot = 0x04 +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_StereoPanorama = 4 +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef void* TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_012"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_005"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_001"; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_Environment_String = "environment"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowReprojection_Bool = "allowReprojection"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_EnableScreenshots_Bool = "EnableScreenshots"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_ScreenshotAlreadyInProgress = 108, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value + + uint32_t m_nReprojectionFlags; +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time with reprojection + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Request a screenshot of the requested type, application + * will get an event that the screen shot has started. The + * application should turn off any stenciling and max out + * quality for the next frames and include the Screenshot flag + * when calling Submit so that the compositor knows the + * screenshot. The application should keep the higher qualtity + * and submitted with the ScreenShot flag until gets a + * screenshot End event. It can take several frames for a + * cubemap to be capture for example. The first file is a + * boring 2D view used for preview, the second is the actual + * capture of the requested type. They are the same for + * VRScreenshotType_Mono */ + virtual vr::EVRCompositorError RequestScreenshot( vr::EVRScreenshotType type, const char *pchDestinationFileName, const char *pchVRDestinationFileName ) = 0; + + /** Returns the current screenshot type if a screenshot is currently being captured **/ + virtual vr::EVRScreenshotType GetCurrentScreenshotType() = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_015"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_012"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_002"; + +} // namespace vr + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.1/openvr.h b/vrclient_x64/openvr_v1.0.1/openvr.h new file mode 100644 index 00000000..53a6872e --- /dev/null +++ b/vrclient_x64/openvr_v1.0.1/openvr.h @@ -0,0 +1,3226 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(GNUC) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_012"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_005"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_001"; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_Environment_String = "environment"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowReprojection_Bool = "allowReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_EnableScreenshots_Bool = "EnableScreenshots"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flSceneRenderGpuMs; // time spent rendering the scene + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + int32_t m_nFidelityLevel; // app reported value + + uint32_t m_nReprojectionFlags; +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time with reprojection + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Screenshot support */ + + /** These functions are no longer used and will be removed in + * a future update. Use the functions via the + * IVRScreenshots interface */ + virtual vr::EVRCompositorError RequestScreenshot( vr::EVRScreenshotType type, const char *pchDestinationFileName, const char *pchVRDestinationFileName ) = 0; + virtual vr::EVRScreenshotType GetCurrentScreenshotType() = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_015"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_012"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. It is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similiar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including + * exntensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // namespace vr + + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.10/ivrclientcore.h b/vrclient_x64/openvr_v1.0.10/ivrclientcore.h new file mode 100644 index 00000000..61d557fb --- /dev/null +++ b/vrclient_x64/openvr_v1.0.10/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType, const char *pStartupInfo ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_003"; + + +} diff --git a/vrclient_x64/openvr_v1.0.10/openvr.h b/vrclient_x64/openvr_v1.0.10/openvr.h new file mode 100644 index 00000000..0b6a8ee9 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.10/openvr.h @@ -0,0 +1,3776 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + 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 */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + 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, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Properties that are used for user interface like icons names + 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, + Prop_DisplayHiddenArea_Binary_End = 5150, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** Allows specifying pose used to render provided scene texture (if different from value returned by WaitGetPoses). */ +struct VRTextureWithPose_t : public Texture_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; // Actual pose used to render scene textures. +}; + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, + + // Set to indicate that pTexture is a pointer to a VRTextureWithPose_t. + Submit_TextureWithPose = 0x08, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + 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 + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + VREvent_MessageOverlayCloseRequested = 1651, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // Start up SteamVR + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + VRInitError_Init_VRHomeNotFound = 135, + VRInitError_Init_VRHomeStartupFailed = 136, + VRInitError_Init_RebootingBusy = 137, + VRInitError_Init_FirmwareUpdateBusy = 138, + VRInitError_Init_FirmwareRecoveryBusy = 139, + + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * 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. + * pInstance is an optional parameter that is required only when textureType is TextureType_Vulkan. + * [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 VkPhysicalDevice that should be used by the application. + * pInstance must be the instance the application will use to query for the VkPhysicalDevice. The application + * must create the VkInstance with extensions returned by IVRCompositor::GetVulkanInstanceExtensionsRequired enabled. + * [macOS Only] + * Returns an id that should be used by the application. + */ + virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType, VkInstance_T *pInstance = nullptr ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_017"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + 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 + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_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"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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_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"; + static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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 + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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 + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, + VRCompositorError_InvalidBounds = 109, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [ Vulkan/D3D12 Only ] + * There are two purposes for SetExplicitTimingMode: + * 1. To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications. + * 2. (Optional) To avoid having WaitGetPoses access the Vulkan queue so that the queue can be accessed from + * another thread while WaitGetPoses is executing. + * + * More accurate GPU timestamp for the start of the frame is achieved by the application calling + * SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue. + * This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11, + * WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the + * application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for + * Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame. + * + * Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, + * the application *MUST* call PostPresentHandoff itself prior to WaitGetPoses. If SetExplicitTimingMode is true and the + * application calls PostPresentHandoff, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff + * and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another + * thread. */ + virtual void SetExplicitTimingMode( bool bExplicitTimingMode ) = 0; + + /** [ Vulkan/D3D12 Only ] + * Submit explicit timing data. When SetExplicitTimingMode is true, this must be called immediately before + * the application's first vkQueueSubmit (Vulkan) or ID3D12CommandQueue::ExecuteCommandLists (D3D12) of each frame. + * This function will insert a GPU timestamp write just before the application starts its rendering. This function + * will perform a vkQueueSubmit on Vulkan so must not be done simultaneously with VkQueue operations on another thread. + * Returns VRCompositorError_RequestFailed if SetExplicitTimingMode is not enabled. */ + virtual EVRCompositorError SubmitExplicitTimingData() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_021"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets render model to draw behind this overlay */ + virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0; + + /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. + The model is scaled by the same amount as the overlay, with a default of 1m. */ + virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + + /** If the calling process owns the overlay and it's open, this will close it. **/ + virtual void CloseMessageOverlay() = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_016"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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 + + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + * + * pStartupInfo is reserved for future use. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo = nullptr ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + 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; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + IVRDriverManager *m_pVRDriverManager; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + m_pVRDriverManager = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal2( &eError, eApplicationType, pStartupInfo ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.11/ivrclientcore.h b/vrclient_x64/openvr_v1.0.11/ivrclientcore.h new file mode 100644 index 00000000..61d557fb --- /dev/null +++ b/vrclient_x64/openvr_v1.0.11/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType, const char *pStartupInfo ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_003"; + + +} diff --git a/vrclient_x64/openvr_v1.0.11/openvr.h b/vrclient_x64/openvr_v1.0.11/openvr.h new file mode 100644 index 00000000..2b65bffe --- /dev/null +++ b/vrclient_x64/openvr_v1.0.11/openvr.h @@ -0,0 +1,3856 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + 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 */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 64; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; +static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; +static const PropertyTypeTag_t k_unActionPropertyTag = 32; +static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; +static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfileName_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + 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_ExpectedTrackingReferenceCount_Int32 = 2049, // expected number of sensors or basestations to reserve UI space for + Prop_ExpectedControllerCount_Int32 = 2050, // expected number of tracked controllers to reserve UI space for + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded + Prop_DoNotApplyPrediction_Bool = 2054, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Properties that are used for user interface like icons names + 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, + Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** Allows specifying pose used to render provided scene texture (if different from value returned by WaitGetPoses). */ +struct VRTextureWithPose_t : public Texture_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; // Actual pose used to render scene textures. +}; + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, + + // Set to indicate that pTexture is a pointer to a VRTextureWithPose_t. + Submit_TextureWithPose = 0x08, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + 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 + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_DualAnalog_Press = 250, // data is dualAnalog + VREvent_DualAnalog_Unpress = 251, // data is dualAnalog + VREvent_DualAnalog_Touch = 252, // data is dualAnalog + VREvent_DualAnalog_Untouch = 253, // data is dualAnalog + VREvent_DualAnalog_Move = 254, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog + VREvent_DualAnalog_Cancel = 257, // data is dualAnalog + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + VREvent_MessageOverlayCloseRequested = 1651, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it). These events are sent to overlays with the VROverlayFlags_SendVRTouchpadEvents + flag set. +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +enum EDualAnalogWhich +{ + k_EDualAnalog_Left = 0, + k_EDualAnalog_Right = 1, +}; + +struct VREvent_DualAnalog_t +{ + float x, y; // coordinates are -1..1 analog values + float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay + EDualAnalogWhich which; +}; + + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; + VREvent_DualAnalog_t dualAnalog; +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // Start up SteamVR + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + VRInitError_Init_VRHomeNotFound = 135, + VRInitError_Init_VRHomeStartupFailed = 136, + VRInitError_Init_RebootingBusy = 137, + VRInitError_Init_FirmwareUpdateBusy = 138, + VRInitError_Init_FirmwareRecoveryBusy = 139, + VRInitError_Init_USBServiceBusy = 140, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +/** Frame timing data provided by direct mode drivers. */ +struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( DriverDirectMode_FrameTiming ) + uint32_t m_nNumFramePresents; // number of times frame was presented + uint32_t m_nNumMisPresented; // number of times frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out (i.e. compositor missed vsync) + uint32_t m_nReprojectionFlags; +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * 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. + * pInstance is an optional parameter that is required only when textureType is TextureType_Vulkan. + * [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 VkPhysicalDevice that should be used by the application. + * pInstance must be the instance the application will use to query for the VkPhysicalDevice. The application + * must create the VkInstance with extensions returned by IVRCompositor::GetVulkanInstanceExtensionsRequired enabled. + * [macOS Only] + * Returns an id that should be used by the application. + */ + virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType, VkInstance_T *pInstance = nullptr ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_017"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + 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 + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + VRApplicationProperty_ActionManifestPath_String = 54, + VRApplicationProperty_ActionBindingPath_String = 55, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_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"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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_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"; + static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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 + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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 + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, + VRCompositorError_InvalidBounds = 109, +}; + +/** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */ +enum EVRCompositorTimingMode +{ + VRCompositorTimingMode_Implicit = 0, + VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1, + VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [ Vulkan/D3D12 Only ] + * There are two purposes for SetExplicitTimingMode: + * 1. To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications. + * 2. (Optional) To avoid having WaitGetPoses access the Vulkan queue so that the queue can be accessed from + * another thread while WaitGetPoses is executing. + * + * More accurate GPU timestamp for the start of the frame is achieved by the application calling + * SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue. + * This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11, + * WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the + * application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for + * Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame. + * + * Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, + * the application should set the timing mode to Explicit_ApplicationPerformsPostPresentHandoff and *MUST* call PostPresentHandoff + * itself. If these conditions are met, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff + * and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another + * thread. */ + virtual void SetExplicitTimingMode( EVRCompositorTimingMode eTimingMode ) = 0; + + /** [ Vulkan/D3D12 Only ] + * Submit explicit timing data. When SetExplicitTimingMode is true, this must be called immediately before + * the application's first vkQueueSubmit (Vulkan) or ID3D12CommandQueue::ExecuteCommandLists (D3D12) of each frame. + * This function will insert a GPU timestamp write just before the application starts its rendering. This function + * will perform a vkQueueSubmit on Vulkan so must not be done simultaneously with VkQueue operations on another thread. + * Returns VRCompositorError_RequestFailed if SetExplicitTimingMode is not enabled. */ + virtual EVRCompositorError SubmitExplicitTimingData() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_022"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + VROverlayInputMethod_DualAnalog = 2, // Analog inputs from tracked controllers are turned into DualAnalog events + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets render model to draw behind this overlay */ + virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0; + + /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. + The model is scaled by the same amount as the overlay, with a default of 1m. */ + virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + /** Sets the analog input to Dual Analog coordinate scale for the specified overlay. */ + virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t & vCenter, float fRadius ) = 0; + + /** Gets the analog input to Dual Analog coordinate scale for the specified overlay. */ + virtual EVROverlayError GetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t *pvCenter, float *pfRadius ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + + /** If the calling process owns the overlay and it's open, this will close it. **/ + virtual void CloseMessageOverlay() = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_017"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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 + + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + * + * pStartupInfo is reserved for future use. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo = nullptr ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + 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; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + IVRDriverManager *m_pVRDriverManager; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + m_pVRDriverManager = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal2( &eError, eApplicationType, pStartupInfo ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.2/openvr.h b/vrclient_x64/openvr_v1.0.2/openvr.h new file mode 100644 index 00000000..23fdc46e --- /dev/null +++ b/vrclient_x64/openvr_v1.0.2/openvr.h @@ -0,0 +1,3351 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROVerlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_012"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_001"; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_Environment_String = "environment"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout"; + static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowReprojection_Bool = "allowReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; + static const char * const k_pch_SteamVR_UseGenericGraphcisDevice_Bool = "useGenericGraphicsDevice"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_LighthouseName_String = "lighthousename"; + static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees"; + static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_016"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_013"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similiar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including + * exntensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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"; + + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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 void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.3/openvr.h b/vrclient_x64/openvr_v1.0.3/openvr.h new file mode 100644 index 00000000..44a806cb --- /dev/null +++ b/vrclient_x64/openvr_v1.0.3/openvr.h @@ -0,0 +1,3428 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unTrackingStringSize = 32; +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Count, // This isn't a class that will ever be returned. It is used for allocating arrays and such + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + 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 + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Handle is pointer to VulkanData_t + Submit_VulkanTexture = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VulkanData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +/** If you change this you must manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Values may be NAN to indicate an error has occurred. */ + virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * and swap chain in DX10 and DX11. If an error occurs the index will be set to -1. The index will + * also be -1 if the headset is in direct mode on the driver side instead of using the compositor's + * builtin direct mode support. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will generally fit in buffers of k_unTrackingStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil mesh the vertex data and count will be + * NULL and 0 respectively. This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering + * each eye's view. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels. + * This will improve perf by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0; + + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_012"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_Environment_String = "environment"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowReprojection_Bool = "allowReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + 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"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_016"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + }; + + static const char * const IVROverlay_Version = "IVROverlay_013"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similiar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including + * exntensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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"; + + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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 void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.4/ivrclientcore.h b/vrclient_x64/openvr_v1.0.4/ivrclientcore.h new file mode 100644 index 00000000..516080e2 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.4/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an english error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_002"; + + +} diff --git a/vrclient_x64/openvr_v1.0.4/openvr.h b/vrclient_x64/openvr_v1.0.4/openvr.h new file mode 100644 index 00000000..dbb6de78 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.4/openvr.h @@ -0,0 +1,3519 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum EGraphicsAPIConvention +{ + API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane + API_OpenGL = 1, // Normalized Z goes from 1 at the viewer to -1 at the far clip plane +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // Native d3d texture pointer or GL texture id. + EGraphicsAPIConvention eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + + TrackedDeviceClass_Count, // This isn't a class that will ever be returned. It is used for allocating arrays and such + + TrackedDeviceClass_Other = 1000, +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. You probably don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + 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 + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Handle is pointer to VulkanData_t + Submit_VulkanTexture = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VulkanData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * and swap chain in DX10 and DX11. If an error occurs the index will be set to -1. The index will + * also be -1 if the headset is in direct mode on the driver side instead of using the compositor's + * builtin direct mode support. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_014"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; + static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + 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"; + + + //----------------------------------------------------------------------------- + // lighthouse keys + + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitalized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_018"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_013"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinisics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similiar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including + * exntensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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"; + + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EGraphicsAPIConvention GraphicsAPIConvention; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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 void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.5/ivrclientcore.h b/vrclient_x64/openvr_v1.0.5/ivrclientcore.h new file mode 100644 index 00000000..516080e2 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.5/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an english error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_002"; + + +} diff --git a/vrclient_x64/openvr_v1.0.5/openvr.h b/vrclient_x64/openvr_v1.0.5/openvr.h new file mode 100644 index 00000000..e225e9fc --- /dev/null +++ b/vrclient_x64/openvr_v1.0.5/openvr.h @@ -0,0 +1,3566 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + 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 + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * and swap chain in DX10 and DX11. If an error occurs the index will be set to -1. The index will + * also be -1 if the headset is in direct mode on the driver side instead of using the compositor's + * builtin direct mode support. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_015"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; + static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_EnableNullDriver_Bool = "enable"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_019"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_014"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similiar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including + * exntensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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"; + + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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 void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.6/ivrclientcore.h b/vrclient_x64/openvr_v1.0.6/ivrclientcore.h new file mode 100644 index 00000000..516080e2 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.6/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an english error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_002"; + + +} diff --git a/vrclient_x64/openvr_v1.0.6/openvr.h b/vrclient_x64/openvr_v1.0.6/openvr.h new file mode 100644 index 00000000..ecd22359 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.6/openvr.h @@ -0,0 +1,3642 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurface + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + Prop_DisplayMCImageNumChannels_Int32 = 2040, + Prop_DisplayMCImageData_Binary = 2041, + Prop_UsesDriverDirectMode_Bool = 2042, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + 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 + + // Properties that are used by helpers, but are opaque to applications + Prop_DisplayHiddenArea_Binary_Start = 5100, + Prop_DisplayHiddenArea_Binary_End = 5150, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + VREvent_PropertyChanged = 111, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, + k_EDeviceActivityLevel_UserInteraction = 1, + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, + k_EDeviceActivityLevel_Standby = 3, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; +} VREvent_Data_t; + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * 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; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_015"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; + static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_020"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#if defined(__linux__) || defined(__APPLE__) + // The 32-bit version of gcc has the alignment requirement for uint64 and double set to + // 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. + // The 64-bit version of gcc has the alignment requirement for these types set to + // 8 meaning that unless we use #pragma pack(4) our structures will get bigger. + // The 64-bit structure packing has to match the 32-bit structure packing for each platform. + #pragma pack( push, 4 ) +#else + #pragma pack( push, 8 ) +#endif + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_014"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#if defined(__linux__) || defined(__APPLE__) +// The 32-bit version of gcc has the alignment requirement for uint64 and double set to +// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned. +// The 64-bit version of gcc has the alignment requirement for these types set to +// 8 meaning that unless we use #pragma pack(4) our structures will get bigger. +// The 64-bit structure packing has to match the 32-bit structure packing for each platform. +#pragma pack( push, 4 ) +#else +#pragma pack( push, 8 ) +#endif + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similiar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including + * exntensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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"; + + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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 void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.7/ivrclientcore.h b/vrclient_x64/openvr_v1.0.7/ivrclientcore.h new file mode 100644 index 00000000..d894f52f --- /dev/null +++ b/vrclient_x64/openvr_v1.0.7/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_002"; + + +} diff --git a/vrclient_x64/openvr_v1.0.7/openvr.h b/vrclient_x64/openvr_v1.0.7/openvr.h new file mode 100644 index 00000000..dedec1bd --- /dev/null +++ b/vrclient_x64/openvr_v1.0.7/openvr.h @@ -0,0 +1,3660 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, +}; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + Prop_DisplayMCImageNumChannels_Int32 = 2040, + Prop_DisplayMCImageData_Binary = 2041, + Prop_SecondsFromPhotonsToVblank_Float = 2042, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + 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 + + // Properties that are used by helpers, but are opaque to applications + Prop_DisplayHiddenArea_Binary_Start = 5100, + Prop_DisplayHiddenArea_Binary_End = 5150, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + VREvent_PropertyChanged = 111, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // Start up SteamVR + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * 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; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_015"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; + static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; + static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_020"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets render model to draw behind this overlay */ + virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0; + + /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. + The model is scaled by the same amount as the overlay, with a default of 1m. */ + virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_016"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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"; + + +}// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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 void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.8/ivrclientcore.h b/vrclient_x64/openvr_v1.0.8/ivrclientcore.h new file mode 100644 index 00000000..d894f52f --- /dev/null +++ b/vrclient_x64/openvr_v1.0.8/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_002"; + + +} diff --git a/vrclient_x64/openvr_v1.0.8/openvr.h b/vrclient_x64/openvr_v1.0.8/openvr.h new file mode 100644 index 00000000..58028943 --- /dev/null +++ b/vrclient_x64/openvr_v1.0.8/openvr.h @@ -0,0 +1,3721 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + 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 */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + Prop_DisplayMCImageNumChannels_Int32 = 2040, + Prop_DisplayMCImageData_Binary = 2041, + Prop_SecondsFromPhotonsToVblank_Float = 2042, + Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043, + Prop_DisplayDebugMode_Bool = 2044, + Prop_GraphicsAdapterLuid_Uint64 = 2045, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Properties that are used for user interface like icons names + 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, + Prop_DisplayHiddenArea_Binary_End = 5150, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + VREvent_PropertyChanged = 111, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // Start up SteamVR + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + 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, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * 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 that should be used by the application. + */ + virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_016"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_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"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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_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 + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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 + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, + VRCompositorError_InvalidBounds = 109, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_020"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets render model to draw behind this overlay */ + virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0; + + /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. + The model is scaled by the same amount as the overlay, with a default of 1m. */ + virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_016"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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 + + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + 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; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + IVRDriverManager *m_pVRDriverManager; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + m_pVRDriverManager = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/openvr_v1.0.9/ivrclientcore.h b/vrclient_x64/openvr_v1.0.9/ivrclientcore.h new file mode 100644 index 00000000..d894f52f --- /dev/null +++ b/vrclient_x64/openvr_v1.0.9/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_002"; + + +} diff --git a/vrclient_x64/openvr_v1.0.9/openvr.h b/vrclient_x64/openvr_v1.0.9/openvr.h new file mode 100644 index 00000000..6cea71bd --- /dev/null +++ b/vrclient_x64/openvr_v1.0.9/openvr.h @@ -0,0 +1,3727 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is going away from you +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + 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 */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 16; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand +}; + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + 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, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + + // Properties that are used for user interface like icons names + 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, + Prop_DisplayHiddenArea_Binary_End = 5150, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, +}; + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + 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 + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_Scroll = 305, // data is mouse + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + VREvent_SceneFocusLost = 402, // data is process + VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + VREvent_DashboardGuideButtonDown = 514, + VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + + VREvent_ChaperoneDataHasChanged = 800, + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + + VREvent_StatusUpdate = 900, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + VREvent_ApplicationTransitionStarted = 1300, + VREvent_ApplicationTransitionAborted = 1301, + VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + VREvent_Compositor_MirrorWindowShown = 1400, + VREvent_Compositor_MirrorWindowHidden = 1401, + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll in overlay space */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe + uint32_t repeatCount; +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it) +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // Start up SteamVR + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + 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, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + + VRInitError_Steam_SteamInstallationNotFound = 2000, +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t standingTrackedDevicePose; +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __declspec( dllexport ) +#else +#define VR_INTERFACE extern "C" __declspec( dllimport ) +#endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT +#define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else +#define VR_INTERFACE extern "C" +#endif + +#else +#error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) +#define VR_CALLTYPE __cdecl +#else +#define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * 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 that should be used by the application. + */ + virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that + * they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for + * some reason. */ + virtual bool CaptureInputFocus() = 0; + + /** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified + * that input focus has been released with a VREvent_InputFocusReleased event. */ + virtual void ReleaseInputFocus() = 0; + + /** Returns true if input focus is captured by another process. */ + virtual bool IsInputFocusCapturedByAnotherProcess() = 0; + + // ------------------------------------ + // Debug Methods + // ------------------------------------ + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + /** Call this to tell the system that the user is being prompted to save data. This + * halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually + * prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */ + virtual void AcknowledgeQuit_UserPrompt() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_016"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + 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 + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + /** These are states the scene application startup process will go through. */ + enum EVRApplicationTransitionState + { + VRApplicationTransition_None = 0, + + VRApplicationTransition_OldAppQuitSent = 10, + VRApplicationTransition_WaitingForExternalLaunch = 11, + + VRApplicationTransition_NewAppLaunched = 20, + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRApplicationTransitionState GetTransitionState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0; + + /** Returns true if the outgoing scene app has requested a save prompt before exiting */ + virtual bool IsQuitUserPromptRequested() = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_006"; + +} // namespace vr + +// ivrsettings.h +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + // Returns true if file sync occurred (force or settings dirty) + virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_002"; + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode"; + static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + 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_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"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + 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_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 + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + 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 + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + 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 + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0; + virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0; + + virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, + VRCompositorError_InvalidBounds = 109, +}; + +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** Creates a window on the primary monitor to display what is being shown in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** Closes the mirror window. */ + virtual void HideMirrorWindow() = 0; + + /** Returns true if the mirror window is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_020"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + }; + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 64; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + VROverlayFlags_None = 0, + + // The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay). + VROverlayFlags_Curved = 1, + VROverlayFlags_RGSS4X = 2, + + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 3, + + // Set this flag on a dashboard that is able to deal with gamepad focus events + VROverlayFlags_AcceptsGamepadEvents = 4, + + // Indicates that the overlay should dim/brighten to show gamepad focus + VROverlayFlags_ShowGamepadFocus = 5, + + // When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t + VROverlayFlags_SendVRScrollEvents = 6, + VROverlayFlags_SendVRTouchpadEvents = 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 15, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + /** Directions for changing focus between overlays with the gamepad */ + enum EOverlayDirection + { + OverlayDirection_Up = 0, + OverlayDirection_Down = 1, + OverlayDirection_Left = 2, + OverlayDirection_Right = 3, + + OverlayDirection_Count = 4, + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify which overlay to use the high quality render path. This overlay will be composited in during the distortion pass which + * results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than + * rasterizing into each eye's render texture first. Because if this, only one of these is supported at any given time. It is most useful + * for overlays that are expected to take up most of the user's view (e.g. streaming video). + * This mode does not support mouse input to your overlay. */ + virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path. + * Otherwise it will return k_ulOverlayHandleInvalid. */ + virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0; + + /** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve + * the surface around the viewer. Min is distance is when the surface will be most curved. Max is when least curved. */ + virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets render model to draw behind this overlay */ + virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0; + + /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. + The model is scaled by the same amount as the overlay, with a default of 1m. */ + virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the + * specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would + * intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. + * + * Return true if the controller is pointed at the overlay and an event was generated. */ + virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns the current Gamepad focus overlay */ + virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0; + + /** Sets the current Gamepad focus overlay */ + virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0; + + /** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay + * to point back to the "from" overlay. If an overlay's neighbor is set to invalid both + * ends will be cleared */ + virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0; + + /** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no + * neighbor in that direction */ + virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_016"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_005"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // 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 + + +// End + +#endif // _OPENVR_API + + +namespace vr +{ + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath(); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + 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; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + IVRDriverManager *m_pVRDriverManager; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + 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() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + m_pVRDriverManager = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal( &eError, eApplicationType ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } +} diff --git a/vrclient_x64/struct_converters.h b/vrclient_x64/struct_converters.h new file mode 100644 index 00000000..37f0c513 --- /dev/null +++ b/vrclient_x64/struct_converters.h @@ -0,0 +1,310 @@ +typedef struct winVREvent_t_1011 winVREvent_t_1011; +extern void struct_VREvent_t_1011_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_1011 winVRControllerState001_t_1011; +extern void struct_VRControllerState001_t_1011_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_1011 winRenderModel_TextureMap_t_1011; +extern struct winRenderModel_TextureMap_t_1011 *struct_RenderModel_TextureMap_t_1011_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1011_unwrap(winRenderModel_TextureMap_t_1011 *w); +typedef struct winRenderModel_t_1011 winRenderModel_t_1011; +extern struct winRenderModel_t_1011 *struct_RenderModel_t_1011_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_1011_unwrap(winRenderModel_t_1011 *w); +typedef struct winVREvent_t_1010 winVREvent_t_1010; +extern void struct_VREvent_t_1010_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_1010 winVRControllerState001_t_1010; +extern void struct_VRControllerState001_t_1010_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_1010 winRenderModel_TextureMap_t_1010; +extern struct winRenderModel_TextureMap_t_1010 *struct_RenderModel_TextureMap_t_1010_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1010_unwrap(winRenderModel_TextureMap_t_1010 *w); +typedef struct winRenderModel_t_1010 winRenderModel_t_1010; +extern struct winRenderModel_t_1010 *struct_RenderModel_t_1010_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_1010_unwrap(winRenderModel_t_1010 *w); +typedef struct winVREvent_t_109 winVREvent_t_109; +extern void struct_VREvent_t_109_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_109 winVRControllerState001_t_109; +extern void struct_VRControllerState001_t_109_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_109 winRenderModel_TextureMap_t_109; +extern struct winRenderModel_TextureMap_t_109 *struct_RenderModel_TextureMap_t_109_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_109_unwrap(winRenderModel_TextureMap_t_109 *w); +typedef struct winRenderModel_t_109 winRenderModel_t_109; +extern struct winRenderModel_t_109 *struct_RenderModel_t_109_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_109_unwrap(winRenderModel_t_109 *w); +typedef struct winVREvent_t_108 winVREvent_t_108; +extern void struct_VREvent_t_108_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_108 winVRControllerState001_t_108; +extern void struct_VRControllerState001_t_108_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_108 winRenderModel_TextureMap_t_108; +extern struct winRenderModel_TextureMap_t_108 *struct_RenderModel_TextureMap_t_108_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_108_unwrap(winRenderModel_TextureMap_t_108 *w); +typedef struct winRenderModel_t_108 winRenderModel_t_108; +extern struct winRenderModel_t_108 *struct_RenderModel_t_108_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_108_unwrap(winRenderModel_t_108 *w); +typedef struct winVREvent_t_107 winVREvent_t_107; +extern void struct_VREvent_t_107_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_107 winVRControllerState001_t_107; +extern void struct_VRControllerState001_t_107_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_107 winRenderModel_TextureMap_t_107; +extern struct winRenderModel_TextureMap_t_107 *struct_RenderModel_TextureMap_t_107_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_107_unwrap(winRenderModel_TextureMap_t_107 *w); +typedef struct winRenderModel_t_107 winRenderModel_t_107; +extern struct winRenderModel_t_107 *struct_RenderModel_t_107_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_107_unwrap(winRenderModel_t_107 *w); +typedef struct winVREvent_t_106 winVREvent_t_106; +extern void struct_VREvent_t_106_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_106 winVRControllerState001_t_106; +extern void struct_VRControllerState001_t_106_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_106 winRenderModel_TextureMap_t_106; +extern struct winRenderModel_TextureMap_t_106 *struct_RenderModel_TextureMap_t_106_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_106_unwrap(winRenderModel_TextureMap_t_106 *w); +typedef struct winRenderModel_t_106 winRenderModel_t_106; +extern struct winRenderModel_t_106 *struct_RenderModel_t_106_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_106_unwrap(winRenderModel_t_106 *w); +typedef struct winVREvent_t_105 winVREvent_t_105; +extern void struct_VREvent_t_105_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_105 winVRControllerState001_t_105; +extern void struct_VRControllerState001_t_105_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_105 winRenderModel_TextureMap_t_105; +extern struct winRenderModel_TextureMap_t_105 *struct_RenderModel_TextureMap_t_105_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_105_unwrap(winRenderModel_TextureMap_t_105 *w); +typedef struct winRenderModel_t_105 winRenderModel_t_105; +extern struct winRenderModel_t_105 *struct_RenderModel_t_105_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_105_unwrap(winRenderModel_t_105 *w); +typedef struct winVREvent_t_104 winVREvent_t_104; +extern void struct_VREvent_t_104_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_104 winVRControllerState001_t_104; +extern void struct_VRControllerState001_t_104_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_104 winRenderModel_TextureMap_t_104; +extern struct winRenderModel_TextureMap_t_104 *struct_RenderModel_TextureMap_t_104_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_104_unwrap(winRenderModel_TextureMap_t_104 *w); +typedef struct winRenderModel_t_104 winRenderModel_t_104; +extern struct winRenderModel_t_104 *struct_RenderModel_t_104_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_104_unwrap(winRenderModel_t_104 *w); +typedef struct winVREvent_t_103 winVREvent_t_103; +extern void struct_VREvent_t_103_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_103 winVRControllerState001_t_103; +extern void struct_VRControllerState001_t_103_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_103 winRenderModel_TextureMap_t_103; +extern struct winRenderModel_TextureMap_t_103 *struct_RenderModel_TextureMap_t_103_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_103_unwrap(winRenderModel_TextureMap_t_103 *w); +typedef struct winRenderModel_t_103 winRenderModel_t_103; +extern struct winRenderModel_t_103 *struct_RenderModel_t_103_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_103_unwrap(winRenderModel_t_103 *w); +typedef struct winVREvent_t_102 winVREvent_t_102; +extern void struct_VREvent_t_102_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_102 winVRControllerState001_t_102; +extern void struct_VRControllerState001_t_102_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_102 winRenderModel_TextureMap_t_102; +extern struct winRenderModel_TextureMap_t_102 *struct_RenderModel_TextureMap_t_102_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_102_unwrap(winRenderModel_TextureMap_t_102 *w); +typedef struct winRenderModel_t_102 winRenderModel_t_102; +extern struct winRenderModel_t_102 *struct_RenderModel_t_102_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_102_unwrap(winRenderModel_t_102 *w); +typedef struct winVREvent_t_101 winVREvent_t_101; +extern void struct_VREvent_t_101_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_101 winVRControllerState001_t_101; +extern void struct_VRControllerState001_t_101_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_101 winRenderModel_TextureMap_t_101; +extern struct winRenderModel_TextureMap_t_101 *struct_RenderModel_TextureMap_t_101_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_101_unwrap(winRenderModel_TextureMap_t_101 *w); +typedef struct winRenderModel_t_101 winRenderModel_t_101; +extern struct winRenderModel_t_101 *struct_RenderModel_t_101_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_101_unwrap(winRenderModel_t_101 *w); +typedef struct winVREvent_t_100 winVREvent_t_100; +extern void struct_VREvent_t_100_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_100 winVRControllerState001_t_100; +extern void struct_VRControllerState001_t_100_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_100 winRenderModel_TextureMap_t_100; +extern struct winRenderModel_TextureMap_t_100 *struct_RenderModel_TextureMap_t_100_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_100_unwrap(winRenderModel_TextureMap_t_100 *w); +typedef struct winRenderModel_t_100 winRenderModel_t_100; +extern struct winRenderModel_t_100 *struct_RenderModel_t_100_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_100_unwrap(winRenderModel_t_100 *w); +typedef struct winVREvent_t_0920 winVREvent_t_0920; +extern void struct_VREvent_t_0920_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0920 winVRControllerState001_t_0920; +extern void struct_VRControllerState001_t_0920_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0920 winRenderModel_TextureMap_t_0920; +extern struct winRenderModel_TextureMap_t_0920 *struct_RenderModel_TextureMap_t_0920_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0920_unwrap(winRenderModel_TextureMap_t_0920 *w); +typedef struct winRenderModel_t_0920 winRenderModel_t_0920; +extern struct winRenderModel_t_0920 *struct_RenderModel_t_0920_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0920_unwrap(winRenderModel_t_0920 *w); +typedef struct winVREvent_t_0919 winVREvent_t_0919; +extern void struct_VREvent_t_0919_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0919 winVRControllerState001_t_0919; +extern void struct_VRControllerState001_t_0919_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0919 winRenderModel_TextureMap_t_0919; +extern struct winRenderModel_TextureMap_t_0919 *struct_RenderModel_TextureMap_t_0919_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0919_unwrap(winRenderModel_TextureMap_t_0919 *w); +typedef struct winRenderModel_t_0919 winRenderModel_t_0919; +extern struct winRenderModel_t_0919 *struct_RenderModel_t_0919_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0919_unwrap(winRenderModel_t_0919 *w); +typedef struct winVREvent_t_0918 winVREvent_t_0918; +extern void struct_VREvent_t_0918_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0918 winVRControllerState001_t_0918; +extern void struct_VRControllerState001_t_0918_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0918 winRenderModel_TextureMap_t_0918; +extern struct winRenderModel_TextureMap_t_0918 *struct_RenderModel_TextureMap_t_0918_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0918_unwrap(winRenderModel_TextureMap_t_0918 *w); +typedef struct winRenderModel_t_0918 winRenderModel_t_0918; +extern struct winRenderModel_t_0918 *struct_RenderModel_t_0918_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0918_unwrap(winRenderModel_t_0918 *w); +typedef struct winVREvent_t_0917 winVREvent_t_0917; +extern void struct_VREvent_t_0917_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0917 winVRControllerState001_t_0917; +extern void struct_VRControllerState001_t_0917_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0917 winRenderModel_TextureMap_t_0917; +extern struct winRenderModel_TextureMap_t_0917 *struct_RenderModel_TextureMap_t_0917_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0917_unwrap(winRenderModel_TextureMap_t_0917 *w); +typedef struct winRenderModel_t_0917 winRenderModel_t_0917; +extern struct winRenderModel_t_0917 *struct_RenderModel_t_0917_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0917_unwrap(winRenderModel_t_0917 *w); +typedef struct winVREvent_t_0916 winVREvent_t_0916; +extern void struct_VREvent_t_0916_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0916 winVRControllerState001_t_0916; +extern void struct_VRControllerState001_t_0916_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0916 winRenderModel_TextureMap_t_0916; +extern struct winRenderModel_TextureMap_t_0916 *struct_RenderModel_TextureMap_t_0916_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0916_unwrap(winRenderModel_TextureMap_t_0916 *w); +typedef struct winRenderModel_t_0916 winRenderModel_t_0916; +extern struct winRenderModel_t_0916 *struct_RenderModel_t_0916_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0916_unwrap(winRenderModel_t_0916 *w); +typedef struct winVREvent_t_0915 winVREvent_t_0915; +extern void struct_VREvent_t_0915_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0915 winVRControllerState001_t_0915; +extern void struct_VRControllerState001_t_0915_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0915 winRenderModel_TextureMap_t_0915; +extern struct winRenderModel_TextureMap_t_0915 *struct_RenderModel_TextureMap_t_0915_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0915_unwrap(winRenderModel_TextureMap_t_0915 *w); +typedef struct winRenderModel_t_0915 winRenderModel_t_0915; +extern struct winRenderModel_t_0915 *struct_RenderModel_t_0915_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0915_unwrap(winRenderModel_t_0915 *w); +typedef struct winVREvent_t_0914 winVREvent_t_0914; +extern void struct_VREvent_t_0914_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0914 winVRControllerState001_t_0914; +extern void struct_VRControllerState001_t_0914_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0914 winRenderModel_TextureMap_t_0914; +extern struct winRenderModel_TextureMap_t_0914 *struct_RenderModel_TextureMap_t_0914_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0914_unwrap(winRenderModel_TextureMap_t_0914 *w); +typedef struct winRenderModel_t_0914 winRenderModel_t_0914; +extern struct winRenderModel_t_0914 *struct_RenderModel_t_0914_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0914_unwrap(winRenderModel_t_0914 *w); +typedef struct winVREvent_t_0913 winVREvent_t_0913; +extern void struct_VREvent_t_0913_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0913 winVRControllerState001_t_0913; +extern void struct_VRControllerState001_t_0913_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0913 winRenderModel_TextureMap_t_0913; +extern struct winRenderModel_TextureMap_t_0913 *struct_RenderModel_TextureMap_t_0913_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0913_unwrap(winRenderModel_TextureMap_t_0913 *w); +typedef struct winRenderModel_t_0913 winRenderModel_t_0913; +extern struct winRenderModel_t_0913 *struct_RenderModel_t_0913_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0913_unwrap(winRenderModel_t_0913 *w); +typedef struct winVREvent_t_0912 winVREvent_t_0912; +extern void struct_VREvent_t_0912_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0912 winVRControllerState001_t_0912; +extern void struct_VRControllerState001_t_0912_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_0912 winRenderModel_TextureMap_t_0912; +extern struct winRenderModel_TextureMap_t_0912 *struct_RenderModel_TextureMap_t_0912_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0912_unwrap(winRenderModel_TextureMap_t_0912 *w); +typedef struct winRenderModel_t_0912 winRenderModel_t_0912; +extern struct winRenderModel_t_0912 *struct_RenderModel_t_0912_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0912_unwrap(winRenderModel_t_0912 *w); +typedef struct winRenderModel_TextureMap_t_0910 winRenderModel_TextureMap_t_0910; +extern struct winRenderModel_TextureMap_t_0910 *struct_RenderModel_TextureMap_t_0910_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0910_unwrap(winRenderModel_TextureMap_t_0910 *w); +typedef struct winRenderModel_t_0910 winRenderModel_t_0910; +extern struct winRenderModel_t_0910 *struct_RenderModel_t_0910_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_0910_unwrap(winRenderModel_t_0910 *w); +typedef struct winVREvent_t_0910 winVREvent_t_0910; +extern void struct_VREvent_t_0910_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_0910 winVRControllerState001_t_0910; +extern void struct_VRControllerState001_t_0910_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_099 winRenderModel_TextureMap_t_099; +extern struct winRenderModel_TextureMap_t_099 *struct_RenderModel_TextureMap_t_099_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_099_unwrap(winRenderModel_TextureMap_t_099 *w); +typedef struct winRenderModel_t_099 winRenderModel_t_099; +extern struct winRenderModel_t_099 *struct_RenderModel_t_099_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_099_unwrap(winRenderModel_t_099 *w); +typedef struct winVREvent_t_099 winVREvent_t_099; +extern void struct_VREvent_t_099_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_099 winVRControllerState001_t_099; +extern void struct_VRControllerState001_t_099_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_098 winRenderModel_TextureMap_t_098; +extern struct winRenderModel_TextureMap_t_098 *struct_RenderModel_TextureMap_t_098_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_098_unwrap(winRenderModel_TextureMap_t_098 *w); +typedef struct winRenderModel_t_098 winRenderModel_t_098; +extern struct winRenderModel_t_098 *struct_RenderModel_t_098_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_098_unwrap(winRenderModel_t_098 *w); +typedef struct winVREvent_t_098 winVREvent_t_098; +extern void struct_VREvent_t_098_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_098 winVRControllerState001_t_098; +extern void struct_VRControllerState001_t_098_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_097 winRenderModel_TextureMap_t_097; +extern struct winRenderModel_TextureMap_t_097 *struct_RenderModel_TextureMap_t_097_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_097_unwrap(winRenderModel_TextureMap_t_097 *w); +typedef struct winRenderModel_t_097 winRenderModel_t_097; +extern struct winRenderModel_t_097 *struct_RenderModel_t_097_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_097_unwrap(winRenderModel_t_097 *w); +typedef struct winVREvent_t_097 winVREvent_t_097; +extern void struct_VREvent_t_097_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_097 winVRControllerState001_t_097; +extern void struct_VRControllerState001_t_097_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_096 winRenderModel_TextureMap_t_096; +extern struct winRenderModel_TextureMap_t_096 *struct_RenderModel_TextureMap_t_096_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_096_unwrap(winRenderModel_TextureMap_t_096 *w); +typedef struct winRenderModel_t_096 winRenderModel_t_096; +extern struct winRenderModel_t_096 *struct_RenderModel_t_096_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_096_unwrap(winRenderModel_t_096 *w); +typedef struct winVREvent_t_096 winVREvent_t_096; +extern void struct_VREvent_t_096_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_096 winVRControllerState001_t_096; +extern void struct_VRControllerState001_t_096_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_094 winRenderModel_TextureMap_t_094; +extern struct winRenderModel_TextureMap_t_094 *struct_RenderModel_TextureMap_t_094_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_094_unwrap(winRenderModel_TextureMap_t_094 *w); +typedef struct winRenderModel_t_094 winRenderModel_t_094; +extern struct winRenderModel_t_094 *struct_RenderModel_t_094_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_094_unwrap(winRenderModel_t_094 *w); +typedef struct winVREvent_t_094 winVREvent_t_094; +extern void struct_VREvent_t_094_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_094 winVRControllerState001_t_094; +extern void struct_VRControllerState001_t_094_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_093 winRenderModel_TextureMap_t_093; +extern struct winRenderModel_TextureMap_t_093 *struct_RenderModel_TextureMap_t_093_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_093_unwrap(winRenderModel_TextureMap_t_093 *w); +typedef struct winRenderModel_t_093 winRenderModel_t_093; +extern struct winRenderModel_t_093 *struct_RenderModel_t_093_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_093_unwrap(winRenderModel_t_093 *w); +typedef struct winVREvent_t_093 winVREvent_t_093; +extern void struct_VREvent_t_093_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_093 winVRControllerState001_t_093; +extern void struct_VRControllerState001_t_093_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_092 winRenderModel_TextureMap_t_092; +extern struct winRenderModel_TextureMap_t_092 *struct_RenderModel_TextureMap_t_092_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_092_unwrap(winRenderModel_TextureMap_t_092 *w); +typedef struct winRenderModel_t_092 winRenderModel_t_092; +extern struct winRenderModel_t_092 *struct_RenderModel_t_092_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_092_unwrap(winRenderModel_t_092 *w); +typedef struct winVREvent_t_092 winVREvent_t_092; +extern void struct_VREvent_t_092_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_092 winVRControllerState001_t_092; +extern void struct_VRControllerState001_t_092_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_091 winRenderModel_TextureMap_t_091; +extern struct winRenderModel_TextureMap_t_091 *struct_RenderModel_TextureMap_t_091_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_091_unwrap(winRenderModel_TextureMap_t_091 *w); +typedef struct winRenderModel_t_091 winRenderModel_t_091; +extern struct winRenderModel_t_091 *struct_RenderModel_t_091_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_091_unwrap(winRenderModel_t_091 *w); +typedef struct winVREvent_t_091 winVREvent_t_091; +extern void struct_VREvent_t_091_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_091 winVRControllerState001_t_091; +extern void struct_VRControllerState001_t_091_lin_to_win(void *l, void *w); +typedef struct winRenderModel_TextureMap_t_090 winRenderModel_TextureMap_t_090; +extern struct winRenderModel_TextureMap_t_090 *struct_RenderModel_TextureMap_t_090_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_090_unwrap(winRenderModel_TextureMap_t_090 *w); +typedef struct winRenderModel_t_090 winRenderModel_t_090; +extern struct winRenderModel_t_090 *struct_RenderModel_t_090_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_090_unwrap(winRenderModel_t_090 *w); +typedef struct winVREvent_t_090 winVREvent_t_090; +extern void struct_VREvent_t_090_lin_to_win(void *l, void *w); +typedef struct winVRControllerState001_t_090 winVRControllerState001_t_090; +extern void struct_VRControllerState001_t_090_lin_to_win(void *l, void *w); diff --git a/vrclient_x64/struct_converters_090.cpp b/vrclient_x64/struct_converters_090.cpp new file mode 100644 index 00000000..f6647e3a --- /dev/null +++ b/vrclient_x64/struct_converters_090.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.0/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_090 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_090 *struct_RenderModel_TextureMap_t_090_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_090 *win = (struct winRenderModel_TextureMap_t_090 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_090_unwrap(winRenderModel_TextureMap_t_090 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_090 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_090 *struct_RenderModel_t_090_wrap(void *l) +{ + struct winRenderModel_t_090 *win = (struct winRenderModel_t_090 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_090_unwrap(winRenderModel_t_090 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_090 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_090_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_090 *win = (struct winVREvent_t_090 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_090 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_090_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_090 *win = (struct winVRControllerState001_t_090 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_091.cpp b/vrclient_x64/struct_converters_091.cpp new file mode 100644 index 00000000..2176426e --- /dev/null +++ b/vrclient_x64/struct_converters_091.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_091 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_091 *struct_RenderModel_TextureMap_t_091_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_091 *win = (struct winRenderModel_TextureMap_t_091 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_091_unwrap(winRenderModel_TextureMap_t_091 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_091 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_091 *struct_RenderModel_t_091_wrap(void *l) +{ + struct winRenderModel_t_091 *win = (struct winRenderModel_t_091 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_091_unwrap(winRenderModel_t_091 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_091 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_091_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_091 *win = (struct winVREvent_t_091 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_091 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_091_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_091 *win = (struct winVRControllerState001_t_091 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_0910.cpp b/vrclient_x64/struct_converters_0910.cpp new file mode 100644 index 00000000..77312b5b --- /dev/null +++ b/vrclient_x64/struct_converters_0910.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_0910 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0910 *struct_RenderModel_TextureMap_t_0910_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0910 *win = (struct winRenderModel_TextureMap_t_0910 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0910_unwrap(winRenderModel_TextureMap_t_0910 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0910 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0910 *struct_RenderModel_t_0910_wrap(void *l) +{ + struct winRenderModel_t_0910 *win = (struct winRenderModel_t_0910 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0910_unwrap(winRenderModel_t_0910 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_0910 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0910_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0910 *win = (struct winVREvent_t_0910 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_0910 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0910_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0910 *win = (struct winVRControllerState001_t_0910 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_0912.cpp b/vrclient_x64/struct_converters_0912.cpp new file mode 100644 index 00000000..93139ed6 --- /dev/null +++ b/vrclient_x64/struct_converters_0912.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.12/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0912 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0912_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0912 *win = (struct winVREvent_t_0912 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_0912 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0912_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0912 *win = (struct winVRControllerState001_t_0912 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0912 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0912 *struct_RenderModel_TextureMap_t_0912_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0912 *win = (struct winRenderModel_TextureMap_t_0912 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0912_unwrap(winRenderModel_TextureMap_t_0912 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0912 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0912 *struct_RenderModel_t_0912_wrap(void *l) +{ + struct winRenderModel_t_0912 *win = (struct winRenderModel_t_0912 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0912_unwrap(winRenderModel_t_0912 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0913.cpp b/vrclient_x64/struct_converters_0913.cpp new file mode 100644 index 00000000..a084c7b5 --- /dev/null +++ b/vrclient_x64/struct_converters_0913.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.13/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0913 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0913_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0913 *win = (struct winVREvent_t_0913 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_0913 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0913_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0913 *win = (struct winVRControllerState001_t_0913 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0913 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0913 *struct_RenderModel_TextureMap_t_0913_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0913 *win = (struct winRenderModel_TextureMap_t_0913 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0913_unwrap(winRenderModel_TextureMap_t_0913 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0913 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0913 *struct_RenderModel_t_0913_wrap(void *l) +{ + struct winRenderModel_t_0913 *win = (struct winRenderModel_t_0913 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0913_unwrap(winRenderModel_t_0913 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0914.cpp b/vrclient_x64/struct_converters_0914.cpp new file mode 100644 index 00000000..5107dbfb --- /dev/null +++ b/vrclient_x64/struct_converters_0914.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.14/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0914 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0914_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0914 *win = (struct winVREvent_t_0914 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_0914 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0914_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0914 *win = (struct winVRControllerState001_t_0914 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0914 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0914 *struct_RenderModel_TextureMap_t_0914_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0914 *win = (struct winRenderModel_TextureMap_t_0914 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0914_unwrap(winRenderModel_TextureMap_t_0914 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0914 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0914 *struct_RenderModel_t_0914_wrap(void *l) +{ + struct winRenderModel_t_0914 *win = (struct winRenderModel_t_0914 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0914_unwrap(winRenderModel_t_0914 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0915.cpp b/vrclient_x64/struct_converters_0915.cpp new file mode 100644 index 00000000..eb7cd332 --- /dev/null +++ b/vrclient_x64/struct_converters_0915.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.15/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0915 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0915_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0915 *win = (struct winVREvent_t_0915 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_0915 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0915_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0915 *win = (struct winVRControllerState001_t_0915 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0915 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0915 *struct_RenderModel_TextureMap_t_0915_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0915 *win = (struct winRenderModel_TextureMap_t_0915 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0915_unwrap(winRenderModel_TextureMap_t_0915 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0915 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0915 *struct_RenderModel_t_0915_wrap(void *l) +{ + struct winRenderModel_t_0915 *win = (struct winRenderModel_t_0915 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0915_unwrap(winRenderModel_t_0915 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0916.cpp b/vrclient_x64/struct_converters_0916.cpp new file mode 100644 index 00000000..1d353305 --- /dev/null +++ b/vrclient_x64/struct_converters_0916.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.16/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0916 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0916_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0916 *win = (struct winVREvent_t_0916 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_0916 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0916_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0916 *win = (struct winVRControllerState001_t_0916 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0916 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0916 *struct_RenderModel_TextureMap_t_0916_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0916 *win = (struct winRenderModel_TextureMap_t_0916 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0916_unwrap(winRenderModel_TextureMap_t_0916 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0916 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0916 *struct_RenderModel_t_0916_wrap(void *l) +{ + struct winRenderModel_t_0916 *win = (struct winRenderModel_t_0916 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0916_unwrap(winRenderModel_t_0916 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0917.cpp b/vrclient_x64/struct_converters_0917.cpp new file mode 100644 index 00000000..5a371cdd --- /dev/null +++ b/vrclient_x64/struct_converters_0917.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.17/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0917 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0917_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0917 *win = (struct winVREvent_t_0917 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_0917 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0917_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0917 *win = (struct winVRControllerState001_t_0917 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0917 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0917 *struct_RenderModel_TextureMap_t_0917_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0917 *win = (struct winRenderModel_TextureMap_t_0917 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0917_unwrap(winRenderModel_TextureMap_t_0917 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0917 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0917 *struct_RenderModel_t_0917_wrap(void *l) +{ + struct winRenderModel_t_0917 *win = (struct winRenderModel_t_0917 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0917_unwrap(winRenderModel_t_0917 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0918.cpp b/vrclient_x64/struct_converters_0918.cpp new file mode 100644 index 00000000..0538a961 --- /dev/null +++ b/vrclient_x64/struct_converters_0918.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.18/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0918 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0918_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0918 *win = (struct winVREvent_t_0918 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_0918 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0918_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0918 *win = (struct winVRControllerState001_t_0918 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0918 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0918 *struct_RenderModel_TextureMap_t_0918_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0918 *win = (struct winRenderModel_TextureMap_t_0918 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0918_unwrap(winRenderModel_TextureMap_t_0918 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0918 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0918 *struct_RenderModel_t_0918_wrap(void *l) +{ + struct winRenderModel_t_0918 *win = (struct winRenderModel_t_0918 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0918_unwrap(winRenderModel_t_0918 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_0919.cpp b/vrclient_x64/struct_converters_0919.cpp new file mode 100644 index 00000000..27682b53 --- /dev/null +++ b/vrclient_x64/struct_converters_0919.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.19/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0919 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0919_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0919 *win = (struct winVREvent_t_0919 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_0919 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0919_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0919 *win = (struct winVRControllerState001_t_0919 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0919 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0919 *struct_RenderModel_TextureMap_t_0919_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0919 *win = (struct winRenderModel_TextureMap_t_0919 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0919_unwrap(winRenderModel_TextureMap_t_0919 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0919 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0919 *struct_RenderModel_t_0919_wrap(void *l) +{ + struct winRenderModel_t_0919 *win = (struct winRenderModel_t_0919 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0919_unwrap(winRenderModel_t_0919 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_092.cpp b/vrclient_x64/struct_converters_092.cpp new file mode 100644 index 00000000..833ada6e --- /dev/null +++ b/vrclient_x64/struct_converters_092.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.2/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_092 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_092 *struct_RenderModel_TextureMap_t_092_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_092 *win = (struct winRenderModel_TextureMap_t_092 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_092_unwrap(winRenderModel_TextureMap_t_092 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_092 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_092 *struct_RenderModel_t_092_wrap(void *l) +{ + struct winRenderModel_t_092 *win = (struct winRenderModel_t_092 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_092_unwrap(winRenderModel_t_092 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_092 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_092_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_092 *win = (struct winVREvent_t_092 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_092 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_092_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_092 *win = (struct winVRControllerState001_t_092 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_0920.cpp b/vrclient_x64/struct_converters_0920.cpp new file mode 100644 index 00000000..47b8b5f0 --- /dev/null +++ b/vrclient_x64/struct_converters_0920.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.20/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_0920 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_0920_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_0920 *win = (struct winVREvent_t_0920 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_0920 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_0920_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_0920 *win = (struct winVRControllerState001_t_0920 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_0920 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_0920 *struct_RenderModel_TextureMap_t_0920_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_0920 *win = (struct winRenderModel_TextureMap_t_0920 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_0920_unwrap(winRenderModel_TextureMap_t_0920 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_0920 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_0920 *struct_RenderModel_t_0920_wrap(void *l) +{ + struct winRenderModel_t_0920 *win = (struct winRenderModel_t_0920 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_0920_unwrap(winRenderModel_t_0920 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_093.cpp b/vrclient_x64/struct_converters_093.cpp new file mode 100644 index 00000000..06b2c9b1 --- /dev/null +++ b/vrclient_x64/struct_converters_093.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_0.9.3/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_093 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_093 *struct_RenderModel_TextureMap_t_093_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_093 *win = (struct winRenderModel_TextureMap_t_093 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_093_unwrap(winRenderModel_TextureMap_t_093 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_093 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_093 *struct_RenderModel_t_093_wrap(void *l) +{ + struct winRenderModel_t_093 *win = (struct winRenderModel_t_093 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_093_unwrap(winRenderModel_t_093 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_093 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_093_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_093 *win = (struct winVREvent_t_093 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_093 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_093_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_093 *win = (struct winVRControllerState001_t_093 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_094.cpp b/vrclient_x64/struct_converters_094.cpp new file mode 100644 index 00000000..4c31c507 --- /dev/null +++ b/vrclient_x64/struct_converters_094.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.4/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_094 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_094 *struct_RenderModel_TextureMap_t_094_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_094 *win = (struct winRenderModel_TextureMap_t_094 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_094_unwrap(winRenderModel_TextureMap_t_094 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_094 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_094 *struct_RenderModel_t_094_wrap(void *l) +{ + struct winRenderModel_t_094 *win = (struct winRenderModel_t_094 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_094_unwrap(winRenderModel_t_094 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_094 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_094_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_094 *win = (struct winVREvent_t_094 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_094 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_094_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_094 *win = (struct winVRControllerState001_t_094 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_096.cpp b/vrclient_x64/struct_converters_096.cpp new file mode 100644 index 00000000..b9e37d9d --- /dev/null +++ b/vrclient_x64/struct_converters_096.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.6/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_096 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_096 *struct_RenderModel_TextureMap_t_096_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_096 *win = (struct winRenderModel_TextureMap_t_096 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_096_unwrap(winRenderModel_TextureMap_t_096 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_096 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_096 *struct_RenderModel_t_096_wrap(void *l) +{ + struct winRenderModel_t_096 *win = (struct winRenderModel_t_096 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_096_unwrap(winRenderModel_t_096 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_096 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_096_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_096 *win = (struct winVREvent_t_096 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_096 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_096_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_096 *win = (struct winVRControllerState001_t_096 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_097.cpp b/vrclient_x64/struct_converters_097.cpp new file mode 100644 index 00000000..e69bb8f3 --- /dev/null +++ b/vrclient_x64/struct_converters_097.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.7/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_097 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_097 *struct_RenderModel_TextureMap_t_097_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_097 *win = (struct winRenderModel_TextureMap_t_097 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_097_unwrap(winRenderModel_TextureMap_t_097 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_097 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_097 *struct_RenderModel_t_097_wrap(void *l) +{ + struct winRenderModel_t_097 *win = (struct winRenderModel_t_097 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_097_unwrap(winRenderModel_t_097 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_097 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_097_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_097 *win = (struct winVREvent_t_097 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_097 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_097_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_097 *win = (struct winVRControllerState001_t_097 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_098.cpp b/vrclient_x64/struct_converters_098.cpp new file mode 100644 index 00000000..7f8cbde2 --- /dev/null +++ b/vrclient_x64/struct_converters_098.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.8/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_098 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_098 *struct_RenderModel_TextureMap_t_098_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_098 *win = (struct winRenderModel_TextureMap_t_098 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_098_unwrap(winRenderModel_TextureMap_t_098 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_098 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_098 *struct_RenderModel_t_098_wrap(void *l) +{ + struct winRenderModel_t_098 *win = (struct winRenderModel_t_098 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_098_unwrap(winRenderModel_t_098 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_098 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_098_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_098 *win = (struct winVREvent_t_098 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_098 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_098_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_098 *win = (struct winVRControllerState001_t_098 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_099.cpp b/vrclient_x64/struct_converters_099.cpp new file mode 100644 index 00000000..0f648e64 --- /dev/null +++ b/vrclient_x64/struct_converters_099.cpp @@ -0,0 +1,102 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v0.9.9/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winRenderModel_TextureMap_t_099 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_099 *struct_RenderModel_TextureMap_t_099_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_099 *win = (struct winRenderModel_TextureMap_t_099 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_099_unwrap(winRenderModel_TextureMap_t_099 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_099 { + uint64_t ulInternalHandle; + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::RenderModel_TextureMap_t diffuseTexture; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_099 *struct_RenderModel_t_099_wrap(void *l) +{ + struct winRenderModel_t_099 *win = (struct winRenderModel_t_099 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->ulInternalHandle = lin->ulInternalHandle; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTexture = lin->diffuseTexture; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_099_unwrap(winRenderModel_t_099 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winVREvent_t_099 { + vr::EVREventType eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + vr::VREvent_Data_t data; + float eventAgeSeconds; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_099_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_099 *win = (struct winVREvent_t_099 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->data = lin->data; + win->eventAgeSeconds = lin->eventAgeSeconds; +} + +struct winVRControllerState001_t_099 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_099_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_099 *win = (struct winVRControllerState001_t_099 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + + +} diff --git a/vrclient_x64/struct_converters_100.cpp b/vrclient_x64/struct_converters_100.cpp new file mode 100644 index 00000000..984e3c24 --- /dev/null +++ b/vrclient_x64/struct_converters_100.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.0/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_100 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_100_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_100 *win = (struct winVREvent_t_100 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_100 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_100_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_100 *win = (struct winVRControllerState001_t_100 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_100 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_100 *struct_RenderModel_TextureMap_t_100_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_100 *win = (struct winRenderModel_TextureMap_t_100 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_100_unwrap(winRenderModel_TextureMap_t_100 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_100 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_100 *struct_RenderModel_t_100_wrap(void *l) +{ + struct winRenderModel_t_100 *win = (struct winRenderModel_t_100 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_100_unwrap(winRenderModel_t_100 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_101.cpp b/vrclient_x64/struct_converters_101.cpp new file mode 100644 index 00000000..8ad6dc6a --- /dev/null +++ b/vrclient_x64/struct_converters_101.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.1/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_101 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_101_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_101 *win = (struct winVREvent_t_101 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_101 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_101_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_101 *win = (struct winVRControllerState001_t_101 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_101 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_101 *struct_RenderModel_TextureMap_t_101_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_101 *win = (struct winRenderModel_TextureMap_t_101 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_101_unwrap(winRenderModel_TextureMap_t_101 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_101 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_101 *struct_RenderModel_t_101_wrap(void *l) +{ + struct winRenderModel_t_101 *win = (struct winRenderModel_t_101 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_101_unwrap(winRenderModel_t_101 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_1010.cpp b/vrclient_x64/struct_converters_1010.cpp new file mode 100644 index 00000000..2ddf3207 --- /dev/null +++ b/vrclient_x64/struct_converters_1010.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.10/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_1010 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_1010_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_1010 *win = (struct winVREvent_t_1010 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_1010 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_1010_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_1010 *win = (struct winVRControllerState001_t_1010 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_1010 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_1010 *struct_RenderModel_TextureMap_t_1010_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_1010 *win = (struct winRenderModel_TextureMap_t_1010 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1010_unwrap(winRenderModel_TextureMap_t_1010 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_1010 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_1010 *struct_RenderModel_t_1010_wrap(void *l) +{ + struct winRenderModel_t_1010 *win = (struct winRenderModel_t_1010 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_1010_unwrap(winRenderModel_t_1010 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_1011.cpp b/vrclient_x64/struct_converters_1011.cpp new file mode 100644 index 00000000..aae88273 --- /dev/null +++ b/vrclient_x64/struct_converters_1011.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.11/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_1011 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_1011_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_1011 *win = (struct winVREvent_t_1011 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_1011 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_1011_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_1011 *win = (struct winVRControllerState001_t_1011 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_1011 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_1011 *struct_RenderModel_TextureMap_t_1011_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_1011 *win = (struct winRenderModel_TextureMap_t_1011 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1011_unwrap(winRenderModel_TextureMap_t_1011 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_1011 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_1011 *struct_RenderModel_t_1011_wrap(void *l) +{ + struct winRenderModel_t_1011 *win = (struct winRenderModel_t_1011 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_1011_unwrap(winRenderModel_t_1011 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_102.cpp b/vrclient_x64/struct_converters_102.cpp new file mode 100644 index 00000000..77de9752 --- /dev/null +++ b/vrclient_x64/struct_converters_102.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.2/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_102 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_102_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_102 *win = (struct winVREvent_t_102 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_102 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_102_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_102 *win = (struct winVRControllerState001_t_102 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_102 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_102 *struct_RenderModel_TextureMap_t_102_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_102 *win = (struct winRenderModel_TextureMap_t_102 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_102_unwrap(winRenderModel_TextureMap_t_102 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_102 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_102 *struct_RenderModel_t_102_wrap(void *l) +{ + struct winRenderModel_t_102 *win = (struct winRenderModel_t_102 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_102_unwrap(winRenderModel_t_102 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_103.cpp b/vrclient_x64/struct_converters_103.cpp new file mode 100644 index 00000000..848e8e45 --- /dev/null +++ b/vrclient_x64/struct_converters_103.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.3/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_103 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_103_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_103 *win = (struct winVREvent_t_103 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_103 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_103_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_103 *win = (struct winVRControllerState001_t_103 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_103 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_103 *struct_RenderModel_TextureMap_t_103_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_103 *win = (struct winRenderModel_TextureMap_t_103 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_103_unwrap(winRenderModel_TextureMap_t_103 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_103 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_103 *struct_RenderModel_t_103_wrap(void *l) +{ + struct winRenderModel_t_103 *win = (struct winRenderModel_t_103 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_103_unwrap(winRenderModel_t_103 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_104.cpp b/vrclient_x64/struct_converters_104.cpp new file mode 100644 index 00000000..394512ff --- /dev/null +++ b/vrclient_x64/struct_converters_104.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.4/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_104 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_104_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_104 *win = (struct winVREvent_t_104 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_104 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_104_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_104 *win = (struct winVRControllerState001_t_104 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_104 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_104 *struct_RenderModel_TextureMap_t_104_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_104 *win = (struct winRenderModel_TextureMap_t_104 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_104_unwrap(winRenderModel_TextureMap_t_104 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_104 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_104 *struct_RenderModel_t_104_wrap(void *l) +{ + struct winRenderModel_t_104 *win = (struct winRenderModel_t_104 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_104_unwrap(winRenderModel_t_104 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_105.cpp b/vrclient_x64/struct_converters_105.cpp new file mode 100644 index 00000000..5ce1a506 --- /dev/null +++ b/vrclient_x64/struct_converters_105.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.5/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_105 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_105_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_105 *win = (struct winVREvent_t_105 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_105 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_105_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_105 *win = (struct winVRControllerState001_t_105 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_105 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_105 *struct_RenderModel_TextureMap_t_105_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_105 *win = (struct winRenderModel_TextureMap_t_105 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_105_unwrap(winRenderModel_TextureMap_t_105 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_105 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_105 *struct_RenderModel_t_105_wrap(void *l) +{ + struct winRenderModel_t_105 *win = (struct winRenderModel_t_105 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_105_unwrap(winRenderModel_t_105 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_106.cpp b/vrclient_x64/struct_converters_106.cpp new file mode 100644 index 00000000..1e2247e6 --- /dev/null +++ b/vrclient_x64/struct_converters_106.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.6/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_106 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_106_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_106 *win = (struct winVREvent_t_106 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_106 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_106_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_106 *win = (struct winVRControllerState001_t_106 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_106 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_106 *struct_RenderModel_TextureMap_t_106_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_106 *win = (struct winRenderModel_TextureMap_t_106 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_106_unwrap(winRenderModel_TextureMap_t_106 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_106 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_106 *struct_RenderModel_t_106_wrap(void *l) +{ + struct winRenderModel_t_106 *win = (struct winRenderModel_t_106 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_106_unwrap(winRenderModel_t_106 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_107.cpp b/vrclient_x64/struct_converters_107.cpp new file mode 100644 index 00000000..0cddeb4f --- /dev/null +++ b/vrclient_x64/struct_converters_107.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.7/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_107 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_107_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_107 *win = (struct winVREvent_t_107 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_107 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_107_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_107 *win = (struct winVRControllerState001_t_107 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_107 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_107 *struct_RenderModel_TextureMap_t_107_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_107 *win = (struct winRenderModel_TextureMap_t_107 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_107_unwrap(winRenderModel_TextureMap_t_107 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_107 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_107 *struct_RenderModel_t_107_wrap(void *l) +{ + struct winRenderModel_t_107 *win = (struct winRenderModel_t_107 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_107_unwrap(winRenderModel_t_107 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_108.cpp b/vrclient_x64/struct_converters_108.cpp new file mode 100644 index 00000000..d35749cf --- /dev/null +++ b/vrclient_x64/struct_converters_108.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.8/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_108 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_108_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_108 *win = (struct winVREvent_t_108 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_108 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_108_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_108 *win = (struct winVRControllerState001_t_108 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_108 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_108 *struct_RenderModel_TextureMap_t_108_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_108 *win = (struct winRenderModel_TextureMap_t_108 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_108_unwrap(winRenderModel_TextureMap_t_108 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_108 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_108 *struct_RenderModel_t_108_wrap(void *l) +{ + struct winRenderModel_t_108 *win = (struct winRenderModel_t_108 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_108_unwrap(winRenderModel_t_108 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/struct_converters_109.cpp b/vrclient_x64/struct_converters_109.cpp new file mode 100644 index 00000000..b975f8b2 --- /dev/null +++ b/vrclient_x64/struct_converters_109.cpp @@ -0,0 +1,100 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.0.9/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +struct winVREvent_t_109 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data; +} __attribute__ ((ms_struct)); + +void struct_VREvent_t_109_lin_to_win(void *l, void *w) +{ + struct winVREvent_t_109 *win = (struct winVREvent_t_109 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + win->data = lin->data; +} + +struct winVRControllerState001_t_109 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); + +void struct_VRControllerState001_t_109_lin_to_win(void *l, void *w) +{ + struct winVRControllerState001_t_109 *win = (struct winVRControllerState001_t_109 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +struct winRenderModel_TextureMap_t_109 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_TextureMap_t_109 *struct_RenderModel_TextureMap_t_109_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_109 *win = (struct winRenderModel_TextureMap_t_109 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_109_unwrap(winRenderModel_TextureMap_t_109 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +struct winRenderModel_t_109 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); + +struct winRenderModel_t_109 *struct_RenderModel_t_109_wrap(void *l) +{ + struct winRenderModel_t_109 *win = (struct winRenderModel_t_109 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_109_unwrap(winRenderModel_t_109 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + + +} diff --git a/vrclient_x64/vrclient_defs.h b/vrclient_x64/vrclient_defs.h new file mode 100644 index 00000000..3b498784 --- /dev/null +++ b/vrclient_x64/vrclient_defs.h @@ -0,0 +1,322 @@ +#ifndef __cplusplus +typedef char bool; /* 1 byte on modern visual studio c++ */ + +/* enums */ +typedef int + EVREye, + ETextureType, + ETrackingUniverseOrigin, + ETrackedDeviceClass, + EDeviceActivityLevel, + ETrackedControllerRole, + ETrackedDeviceProperty, + ETrackedPropertyError, + EHiddenAreaMeshType, + EVREventType, + EVRControllerAxisType, + EVRFirmwareError, + EGraphicsAPIConvention, + EVRInitError, + EVRApplicationType, + EVRButtonId, + EVRRenderModelError, + EVRCompositorError, + EVRSubmitFlags, + EVRCompositorTimingMode, + EVRApplicationError, + EVRApplicationProperty, + EVRApplicationTransitionState, + EVRSettingsError, + ChaperoneCalibrationState, + EChaperoneConfigFile, + EVRNotificationType, + EVRNotificationError, + EVRNotificationStyle, + EVROverlayError, + EGamepadTextInputLineMode, + EOverlayDirection, + EColorSpace, + EGamepadTextInputMode, + VROverlayFlags, + VROverlayTransformType, + VROverlayInputMethod, + EDualAnalogWhich, + VRMessageOverlayResponse, + EVRTrackedCameraError, + EVRTrackedCameraFrameType, + EVRScreenshotError, + EVRScreenshotPropertyFilenames, + EVRScreenshotType, + Hmd_Eye, + GraphicsAPIConvention, + TrackingUniverseOrigin, + TrackedDeviceClass, + TrackedDeviceProperty, + TrackedPropertyError, + VRFirmwareError, + EVRControllerEventOutputType, + VRCompositorError, + VRSubmitFlags_t, + Compositor_DeviceType, + NotificationError_t, + VROverlayError, + VROverlayVisibility, + ECameraVideoStreamFormat; + +typedef uint32_t DriverId_t; +typedef uint32_t TrackedDeviceIndex_t; +typedef uint32_t glUInt_t; +typedef uint32_t VRNotificationId; +typedef uint32_t ScreenshotHandle_t; +typedef int32_t glInt_t; +typedef int32_t TextureID_t; +typedef void *glSharedTextureHandle_t; +typedef uint64_t VROverlayHandle_t; +typedef uint64_t TrackedCameraHandle_t; + +/* never dereferenced */ +typedef struct VROverlayIntersectionParams_t VROverlayIntersectionParams_t; +typedef struct VROverlayIntersectionResults_t VROverlayIntersectionResults_t; +typedef struct VRTextureBounds_t VRTextureBounds_t; +typedef struct Texture_t Texture_t; +typedef struct RenderModel_ComponentState_t RenderModel_ComponentState_t; +typedef struct RenderModel_ControllerMode_State_t RenderModel_ControllerMode_State_t; +typedef struct RenderModel_t RenderModel_t; +typedef struct RenderModel_TextureMap_t RenderModel_TextureMap_t; +typedef struct TrackedDevicePose_t TrackedDevicePose_t; +typedef struct VREvent_t VREvent_t; +typedef struct Compositor_FrameTiming Compositor_FrameTiming; +typedef struct Compositor_CumulativeStats Compositor_CumulativeStats; +typedef struct AppOverrideKeys_t AppOverrideKeys_t; +typedef struct VROverlayIntersectionMaskPrimitive_t VROverlayIntersectionMaskPrimitive_t; +typedef struct NotificationBitmap_t NotificationBitmap_t; +typedef struct CameraVideoStreamFrameHeader_t CameraVideoStreamFrameHeader_t; +typedef struct Compositor_OverlaySettings Compositor_OverlaySettings; +typedef struct ChaperoneSoftBoundsInfo_t ChaperoneSoftBoundsInfo_t; +typedef struct ChaperoneSeatedBoundsInfo_t ChaperoneSeatedBoundsInfo_t; +typedef struct Compositor_TextureBounds Compositor_TextureBounds; +typedef struct NotificationBitmap NotificationBitmap; +typedef struct ComponentState_t ComponentState_t; +typedef struct CameraVideoStreamFrame_t CameraVideoStreamFrame_t; +/* XXX VRControllerState_t is an alias for a versioned struct! */ +typedef struct VRControllerState_t VRControllerState_t; +typedef struct VkDevice_T VkDevice_T; +typedef struct VkPhysicalDevice_T VkPhysicalDevice_T; +typedef struct VkInstance_T VkInstance_T; +typedef struct VkQueue_T VkQueue_T; + +/* dereferenced structs */ +typedef struct HmdMatrix34_t +{ + float m[3][4]; +} HmdMatrix34_t; + +typedef struct HmdMatrix44_t +{ + float m[4][4]; +} HmdMatrix44_t; + +typedef struct HmdVector3_t +{ + float v[3]; +} HmdVector3_t; + +typedef struct HmdVector4_t +{ + float v[4]; +} HmdVector4_t; + +typedef struct HmdVector3d_t +{ + double v[3]; +} HmdVector3d_t; + +typedef struct HmdVector2_t +{ + float v[2]; +} HmdVector2_t; + +typedef struct HmdQuaternion_t +{ + double w, x, y, z; +} HmdQuaternion_t; + +typedef struct HmdColor_t +{ + float r, g, b, a; +} HmdColor_t; + +typedef struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +} HmdQuad_t; + +typedef struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +} HmdRect2_t; + +typedef struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +} DistortionCoordinates_t; + +typedef struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +} HiddenAreaMesh_t; + + + +#if 0 + +typedef int EAccountType; +typedef int EUniverse; +typedef int ENotificationPosition; +typedef int ESteamAPICallFailure; +typedef int EGamepadTextInputMode; +typedef int EGamepadTextInputLineMode; +typedef int EVoiceResult; +typedef int EBeginAuthSessionResult; +typedef int EUserHasLicenseForAppResult; +typedef int EPersonaState; +typedef int EFriendRelationship; +typedef int EPersonaState; +typedef int EOverlayToStoreFlag; +typedef int EChatEntryType; +typedef int ELobbyType; +typedef int ELobbyDistanceFilter; +typedef int ELobbyComparison; +typedef int EMatchMakingServerResponse; +typedef int ELeaderboardSortMethod; +typedef int ELeaderboardDisplayType; +typedef int ELeaderboardDataRequest; +typedef int ELeaderboardUploadScoreMethod; +typedef int EP2PSend; +typedef int ESNetSocketConnectionType; +typedef int ERemoteStoragePublishedFileVisibility; +typedef int EWorkshopFileAction; +typedef int EWorkshopEnumerationType; +typedef int ERemoteStoragePlatform; +typedef int EUGCReadAction; +typedef int EWorkshopFileType; +typedef int EWorkshopVideoProvider; +typedef int EVRScreenshotType; +typedef int EHTTPMethod; +typedef int EResult; +typedef int ESteamControllerPad; +typedef int EControllerActionOrigin; +typedef int EUserUGCList, + EUGCMatchingUGCType, + EUserUGCListSortOrder, + EUGCQuery, + EUGCMatchingUGCType, + EItemUpdateStatus, + EItemStatistic, + EItemPreviewType, + EAuthSessionResponse, + EHTTPStatusCode, + EDenyReason, + ERegisterActivationCodeResult, + EWorkshopVote, + EChatRoomEnterResponse, + ECheckFileSignature, + EBroadcastUploadResult, + EGCResults +; +typedef int EMatchMakingType; +typedef int AudioPlayback_Status; + +/* these are PODs, so just copy the data. hopefully the + * packing and alignment are the same... */ +typedef struct CSteamID { unsigned char a[8]; } CSteamID; +typedef struct CGameID { unsigned char a[8]; } CGameID; +typedef struct MatchMakingKeyValuePair_t { unsigned char a[64]; } MatchMakingKeyValuePair_t; +typedef struct gameserveritem_t { unsigned char a[372]; } gameserveritem_t; +typedef struct LeaderboardEntry_t { unsigned char a[28]; } LeaderboardEntry_t; +typedef struct RemoteStorageUpdatePublishedFileRequest_t { unsigned char a[40]; } RemoteStorageUpdatePublishedFileRequest_t; +typedef struct ControllerAnalogActionData_t { unsigned char a[13]; } ControllerAnalogActionData_t; +typedef struct ControllerDigitalActionData_t { unsigned char a[2]; } ControllerDigitalActionData_t; +typedef struct ControllerMotionData_t { unsigned char a[40]; } ControllerMotionData_t; +typedef struct SteamUGCDetails_t { unsigned char a[9764]; } SteamUGCDetails_t; + +/* never dereferenced */ +typedef struct FriendGameInfo_t FriendGameInfo_t; +typedef struct P2PSessionState_t P2PSessionState_t; +typedef struct SteamParamStringArray_t SteamParamStringArray_t; +typedef struct ISteamMatchmakingServerListResponse ISteamMatchmakingServerListResponse; +typedef struct ISteamMatchmakingPingResponse ISteamMatchmakingPingResponse; +typedef struct ISteamMatchmakingPlayersResponse ISteamMatchmakingPlayersResponse; +typedef struct ISteamMatchmakingRulesResponse ISteamMatchmakingRulesResponse; +typedef struct RemoteStorageUpdatePublishedFileRequest_t RemoteStorageUpdatePublishedFileRequest_t; +typedef struct SteamControllerState001_t SteamControllerState001_t; +typedef struct SteamItemDetails_t SteamItemDetails_t; + +/* FIXME: we don't care about fn pointer types, just pass 'em through */ +typedef void *SteamAPI_CheckCallbackRegistered_t; +typedef void *SteamAPIWarningMessageHook_t; +typedef void *SteamAPI_PostAPIResultInProcess_t; + +typedef unsigned char uint8; +typedef unsigned char uint8; +typedef signed char int8; +typedef short int16; +typedef unsigned short uint16; +typedef int int32; +typedef unsigned int uint32; +typedef long long int64; +typedef unsigned long long uint64; +typedef int64 lint64; +typedef uint64 ulint64; +typedef uint8 Salt_t[8]; +typedef uint64 GID_t; +typedef uint64 JobID_t; +typedef GID_t TxnID_t; +typedef uint32 PackageId_t; +typedef uint32 BundleId_t; +typedef uint32 AppId_t; +typedef uint64 AssetClassId_t; +typedef uint32 PhysicalItemId_t; +typedef uint32 DepotId_t; +typedef uint32 RTime32; +typedef uint32 CellID_t; +typedef uint64 SteamAPICall_t; +typedef uint32 AccountID_t; +typedef uint32 PartnerId_t; +typedef uint64 ManifestId_t; +typedef uint32 HAuthTicket; +typedef uint64 SteamLeaderboard_t; +typedef uint64 SteamLeaderboardEntries_t; +typedef void * BREAKPAD_HANDLE; +typedef char compile_time_assert_type[1]; +typedef int32 HSteamPipe; +typedef int32 HSteamUser; +typedef int16 FriendsGroupID_t; +typedef void * HServerListRequest; +typedef int HServerQuery; +typedef uint64 UGCHandle_t; +typedef uint64 PublishedFileUpdateHandle_t; +typedef uint32 SNetListenSocket_t; +typedef uint32 SNetSocket_t; +typedef uint64 PublishedFileId_t; +typedef uint64 UGCFileWriteStreamHandle_t; +typedef uint32 ScreenshotHandle; +typedef uint32 HTTPRequestHandle; +typedef uint32 HTTPCookieContainerHandle; +typedef uint64 ClientUnifiedMessageHandle; +typedef uint64 ControllerHandle_t; +typedef uint64 ControllerActionSetHandle_t; +typedef uint64 ControllerAnalogActionHandle_t; +typedef uint64 ControllerDigitalActionHandle_t; +typedef uint64 UGCQueryHandle_t; +typedef uint64 UGCUpdateHandle_t; +typedef uint32 HHTMLBrowser; +typedef int32 SteamInventoryResult_t, SteamItemDef_t; +typedef uint64 SteamItemInstanceID_t; +#endif + +#endif diff --git a/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_main.c new file mode 100644 index 00000000..dab101e2 --- /dev/null +++ b/vrclient_x64/vrclient_main.c @@ -0,0 +1,137 @@ +#include "config.h" + +#include +#include +#include +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "wine/debug.h" +#include "wine/library.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) +{ + TRACE("(%p, %u, %p)\n", instance, reason, reserved); + + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(instance); + break; + } + + return TRUE; +} + + +#if 0 +uint32 vrclient_unix_path_to_dos_path(uint32 api_result, char *inout, uint32 inout_bytes) +{ + WCHAR *converted; + uint32 r; + + if(api_result == 0) + return 0; + + converted = wine_get_dos_file_name(inout); + if(!converted){ + WARN("Unable to convert unix filename to DOS: %s\n", inout); + *inout = 0; + return 0; + } + + r = WideCharToMultiByte(CP_ACP, 0, converted, -1, inout, inout_bytes, + NULL, NULL); + + HeapFree(GetProcessHeap(), 0, converted); + + if(r > 0) + return r - 1; + + return 0; +} +#endif + +#include "win_constructors.h" + +static const struct { + const char *iface_version; + void *(*ctor)(void *); +} constructors[] = { +#include "win_constructors_table.dat" +}; + +void *create_win_interface(const char *name, void *linux_side) +{ + int i; + + TRACE("trying to create %s\n", name); + + if(!linux_side) + return NULL; + + for(i = 0; i < sizeof(constructors) / sizeof(*constructors); ++i){ + if(!strcmp(name, constructors[i].iface_version)) + return constructors[i].ctor(linux_side); + } + + ERR("Don't recognize interface name: %s\n", name); + + return NULL; +} + +static void *vrclient_lib; +static void *(*vrclient_VRClientCoreFactory)(const char *name, int *return_code); + +static int load_vrclient(void) +{ + char path[PATH_MAX]; + + if(vrclient_lib) + return 1; + + /* PROTON_VR_RUNTIME is provided by the proton setup script */ + if(!getenv("PROTON_VR_RUNTIME")){ + TRACE("Linux OpenVR runtime is not available\n"); + return 0; + } + +#ifdef _WIN64 + snprintf(path, PATH_MAX, "%s/bin/linux64/vrclient.so", getenv("PROTON_VR_RUNTIME")); +#else + snprintf(path, PATH_MAX, "%s/bin/vrclient.so", getenv("PROTON_VR_RUNTIME")); +#endif + TRACE("got openvr runtime path: %s\n", path); + + vrclient_lib = wine_dlopen(path, RTLD_NOW, NULL, 0); + if(!vrclient_lib){ + ERR("unable to load vrclient.so\n"); + return 0; + } + + vrclient_VRClientCoreFactory = wine_dlsym(vrclient_lib, "VRClientCoreFactory", NULL, 0); + if(!vrclient_VRClientCoreFactory){ + ERR("unable to load VRClientCoreFactory method\n"); + return 0; + } + + return 1; +} + +void *CDECL VRClientCoreFactory(const char *name, int *return_code) +{ + TRACE("name: %s, return_code: %p\n", name, return_code); + + if(!load_vrclient()) + return NULL; + + return create_win_interface(name, vrclient_VRClientCoreFactory(name, return_code)); +} diff --git a/vrclient_x64/vrclient_private.h b/vrclient_x64/vrclient_private.h new file mode 100644 index 00000000..d04af02e --- /dev/null +++ b/vrclient_x64/vrclient_private.h @@ -0,0 +1,33 @@ +/* TODO these should be generated */ +typedef struct __winISteamClient winISteamClient; +typedef struct __winISteamUser winISteamUser; +typedef struct __winISteamGameServer winISteamGameServer; +typedef struct __winISteamFriends winISteamFriends; +typedef struct __winISteamUtils winISteamUtils; +typedef struct __winISteamMatchmaking winISteamMatchmaking; +typedef struct __winISteamMatchmakingServers winISteamMatchmakingServers; +typedef struct __winISteamUserStats winISteamUserStats; +typedef struct __winISteamGameServerStats winISteamGameServerStats; +typedef struct __winISteamApps winISteamApps; +typedef struct __winISteamNetworking winISteamNetworking; +typedef struct __winISteamRemoteStorage winISteamRemoteStorage; +typedef struct __winISteamRemoteScreenshots winISteamRemoteScreenshots; +typedef struct __winISteamScreenshots winISteamScreenshots; +typedef struct __winISteamHTTP winISteamHTTP; +typedef struct __winISteamUnifiedMessages winISteamUnifiedMessages; +typedef struct __winISteamController winISteamController; +typedef struct __winISteamUGC winISteamUGC; +typedef struct __winISteamAppList winISteamAppList; +typedef struct __winISteamMusic winISteamMusic; +typedef struct __winISteamMusicRemote winISteamMusicRemote; +typedef struct __winISteamHTMLSurface winISteamHTMLSurface; +typedef struct __winISteamInventory winISteamInventory; +typedef struct __winISteamVideo winISteamVideo; +typedef struct __winISteamMasterServerUpdater winISteamMasterServerUpdater; +typedef struct __winISteamContentServer winISteamContentServer; +typedef struct __winX winX; +typedef struct __winX winX; + +void *create_win_interface(const char *name, void *linux_side); +unsigned int steamclient_unix_path_to_dos_path(unsigned int api_result, char *inout, unsigned int inout_bytes); +void *create_LinuxMatchmakingServerListResponse(void *win); diff --git a/vrclient_x64/vrclient_x64.spec b/vrclient_x64/vrclient_x64.spec new file mode 100644 index 00000000..8d5aaa07 --- /dev/null +++ b/vrclient_x64/vrclient_x64.spec @@ -0,0 +1,4 @@ +# Generated from vrclient.dll by winedump + +1 stub HmdSystemFactory +2 stdcall VRClientCoreFactory(ptr ptr) diff --git a/vrclient_x64/winIVRApplications.c b/vrclient_x64/winIVRApplications.c new file mode 100644 index 00000000..ba63bd82 --- /dev/null +++ b/vrclient_x64/winIVRApplications.c @@ -0,0 +1,1304 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRApplications_IVRApplications_006.h" + +typedef struct __winIVRApplications_IVRApplications_006 { + vtable_ptr *vtable; + void *linux_side; +} winIVRApplications_IVRApplications_006; + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_AddApplicationManifest, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_AddApplicationManifest(winIVRApplications_IVRApplications_006 *_this, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_AddApplicationManifest(_this->linux_side, pchApplicationManifestFullPath, bTemporary); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_RemoveApplicationManifest, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_RemoveApplicationManifest(winIVRApplications_IVRApplications_006 *_this, const char * pchApplicationManifestFullPath) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_RemoveApplicationManifest(_this->linux_side, pchApplicationManifestFullPath); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_IsApplicationInstalled, 12) +bool __thiscall winIVRApplications_IVRApplications_006_IsApplicationInstalled(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_IsApplicationInstalled(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationCount, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_006_GetApplicationCount(winIVRApplications_IVRApplications_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationKeyByIndex, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_GetApplicationKeyByIndex(winIVRApplications_IVRApplications_006 *_this, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationKeyByIndex(_this->linux_side, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationKeyByProcessId, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_GetApplicationKeyByProcessId(winIVRApplications_IVRApplications_006 *_this, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationKeyByProcessId(_this->linux_side, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_LaunchApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_LaunchApplication(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_LaunchApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_LaunchTemplateApplication, 32) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_LaunchTemplateApplication(winIVRApplications_IVRApplications_006 *_this, const char * pchTemplateAppKey, const char * pchNewAppKey, AppOverrideKeys_t * pKeys, uint32_t unKeys) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_LaunchTemplateApplication(_this->linux_side, pchTemplateAppKey, pchNewAppKey, pKeys, unKeys); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_LaunchApplicationFromMimeType, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_LaunchApplicationFromMimeType(winIVRApplications_IVRApplications_006 *_this, const char * pchMimeType, const char * pchArgs) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_LaunchApplicationFromMimeType(_this->linux_side, pchMimeType, pchArgs); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_LaunchDashboardOverlay, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_LaunchDashboardOverlay(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_LaunchDashboardOverlay(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_CancelApplicationLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_006_CancelApplicationLaunch(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_CancelApplicationLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_IdentifyApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_IdentifyApplication(winIVRApplications_IVRApplications_006 *_this, uint32_t unProcessId, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_IdentifyApplication(_this->linux_side, unProcessId, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationProcessId, 12) +uint32_t __thiscall winIVRApplications_IVRApplications_006_GetApplicationProcessId(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationProcessId(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationsErrorNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_006_GetApplicationsErrorNameFromEnum(winIVRApplications_IVRApplications_006 *_this, EVRApplicationError error) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationsErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationPropertyString, 36) +uint32_t __thiscall winIVRApplications_IVRApplications_006_GetApplicationPropertyString(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationPropertyString(_this->linux_side, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationPropertyBool, 24) +bool __thiscall winIVRApplications_IVRApplications_006_GetApplicationPropertyBool(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationPropertyBool(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationPropertyUint64, 24) +uint64_t __thiscall winIVRApplications_IVRApplications_006_GetApplicationPropertyUint64(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationPropertyUint64(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_SetApplicationAutoLaunch, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_SetApplicationAutoLaunch(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey, bool bAutoLaunch) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_SetApplicationAutoLaunch(_this->linux_side, pchAppKey, bAutoLaunch); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationAutoLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_006_GetApplicationAutoLaunch(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationAutoLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_SetDefaultApplicationForMimeType, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_SetDefaultApplicationForMimeType(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey, const char * pchMimeType) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_SetDefaultApplicationForMimeType(_this->linux_side, pchAppKey, pchMimeType); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetDefaultApplicationForMimeType, 24) +bool __thiscall winIVRApplications_IVRApplications_006_GetDefaultApplicationForMimeType(winIVRApplications_IVRApplications_006 *_this, const char * pchMimeType, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetDefaultApplicationForMimeType(_this->linux_side, pchMimeType, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationSupportedMimeTypes, 24) +bool __thiscall winIVRApplications_IVRApplications_006_GetApplicationSupportedMimeTypes(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey, char * pchMimeTypesBuffer, uint32_t unMimeTypesBuffer) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationSupportedMimeTypes(_this->linux_side, pchAppKey, pchMimeTypesBuffer, unMimeTypesBuffer); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationsThatSupportMimeType, 24) +uint32_t __thiscall winIVRApplications_IVRApplications_006_GetApplicationsThatSupportMimeType(winIVRApplications_IVRApplications_006 *_this, const char * pchMimeType, char * pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationsThatSupportMimeType(_this->linux_side, pchMimeType, pchAppKeysThatSupportBuffer, unAppKeysThatSupportBuffer); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationLaunchArguments, 20) +uint32_t __thiscall winIVRApplications_IVRApplications_006_GetApplicationLaunchArguments(winIVRApplications_IVRApplications_006 *_this, uint32_t unHandle, char * pchArgs, uint32_t unArgs) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationLaunchArguments(_this->linux_side, unHandle, pchArgs, unArgs); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetStartingApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_GetStartingApplication(winIVRApplications_IVRApplications_006 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetStartingApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetTransitionState, 4) +EVRApplicationTransitionState __thiscall winIVRApplications_IVRApplications_006_GetTransitionState(winIVRApplications_IVRApplications_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetTransitionState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_PerformApplicationPrelaunchCheck, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_PerformApplicationPrelaunchCheck(winIVRApplications_IVRApplications_006 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_PerformApplicationPrelaunchCheck(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetApplicationsTransitionStateNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_006_GetApplicationsTransitionStateNameFromEnum(winIVRApplications_IVRApplications_006 *_this, EVRApplicationTransitionState state) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetApplicationsTransitionStateNameFromEnum(_this->linux_side, state); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_IsQuitUserPromptRequested, 4) +bool __thiscall winIVRApplications_IVRApplications_006_IsQuitUserPromptRequested(winIVRApplications_IVRApplications_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_IsQuitUserPromptRequested(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_LaunchInternalProcess, 28) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_006_LaunchInternalProcess(winIVRApplications_IVRApplications_006 *_this, const char * pchBinaryPath, const char * pchArguments, const char * pchWorkingDirectory) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_LaunchInternalProcess(_this->linux_side, pchBinaryPath, pchArguments, pchWorkingDirectory); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_006_GetCurrentSceneProcessId, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_006_GetCurrentSceneProcessId(winIVRApplications_IVRApplications_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_006_GetCurrentSceneProcessId(_this->linux_side); +} + +extern vtable_ptr winIVRApplications_IVRApplications_006_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRApplications_IVRApplications_006, + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_AddApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_RemoveApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_IsApplicationInstalled) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationCount) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationKeyByIndex) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationKeyByProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_LaunchApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_LaunchTemplateApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_LaunchApplicationFromMimeType) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_LaunchDashboardOverlay) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_CancelApplicationLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_IdentifyApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationPropertyString) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationPropertyBool) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationPropertyUint64) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_SetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_SetDefaultApplicationForMimeType) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetDefaultApplicationForMimeType) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationSupportedMimeTypes) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationsThatSupportMimeType) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationLaunchArguments) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetStartingApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetTransitionState) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_PerformApplicationPrelaunchCheck) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetApplicationsTransitionStateNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_IsQuitUserPromptRequested) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_LaunchInternalProcess) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_006_GetCurrentSceneProcessId) + ); +#ifndef __GNUC__ +} +#endif + +winIVRApplications_IVRApplications_006 *create_winIVRApplications_IVRApplications_006(void *linux_side) +{ + winIVRApplications_IVRApplications_006 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRApplications_IVRApplications_006)); + TRACE("-> %p\n", r); + r->vtable = &winIVRApplications_IVRApplications_006_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRApplications_IVRApplications_005.h" + +typedef struct __winIVRApplications_IVRApplications_005 { + vtable_ptr *vtable; + void *linux_side; +} winIVRApplications_IVRApplications_005; + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_AddApplicationManifest, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_AddApplicationManifest(winIVRApplications_IVRApplications_005 *_this, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_AddApplicationManifest(_this->linux_side, pchApplicationManifestFullPath, bTemporary); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_RemoveApplicationManifest, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_RemoveApplicationManifest(winIVRApplications_IVRApplications_005 *_this, const char * pchApplicationManifestFullPath) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_RemoveApplicationManifest(_this->linux_side, pchApplicationManifestFullPath); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_IsApplicationInstalled, 12) +bool __thiscall winIVRApplications_IVRApplications_005_IsApplicationInstalled(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_IsApplicationInstalled(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationCount, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_005_GetApplicationCount(winIVRApplications_IVRApplications_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationKeyByIndex, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_GetApplicationKeyByIndex(winIVRApplications_IVRApplications_005 *_this, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationKeyByIndex(_this->linux_side, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationKeyByProcessId, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_GetApplicationKeyByProcessId(winIVRApplications_IVRApplications_005 *_this, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationKeyByProcessId(_this->linux_side, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_LaunchApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_LaunchApplication(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_LaunchApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_LaunchTemplateApplication, 32) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_LaunchTemplateApplication(winIVRApplications_IVRApplications_005 *_this, const char * pchTemplateAppKey, const char * pchNewAppKey, AppOverrideKeys_t * pKeys, uint32_t unKeys) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_LaunchTemplateApplication(_this->linux_side, pchTemplateAppKey, pchNewAppKey, pKeys, unKeys); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_LaunchDashboardOverlay, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_LaunchDashboardOverlay(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_LaunchDashboardOverlay(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_CancelApplicationLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_005_CancelApplicationLaunch(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_CancelApplicationLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_IdentifyApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_IdentifyApplication(winIVRApplications_IVRApplications_005 *_this, uint32_t unProcessId, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_IdentifyApplication(_this->linux_side, unProcessId, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationProcessId, 12) +uint32_t __thiscall winIVRApplications_IVRApplications_005_GetApplicationProcessId(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationProcessId(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationsErrorNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_005_GetApplicationsErrorNameFromEnum(winIVRApplications_IVRApplications_005 *_this, EVRApplicationError error) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationsErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationPropertyString, 36) +uint32_t __thiscall winIVRApplications_IVRApplications_005_GetApplicationPropertyString(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationPropertyString(_this->linux_side, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationPropertyBool, 24) +bool __thiscall winIVRApplications_IVRApplications_005_GetApplicationPropertyBool(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationPropertyBool(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationPropertyUint64, 24) +uint64_t __thiscall winIVRApplications_IVRApplications_005_GetApplicationPropertyUint64(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationPropertyUint64(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_SetApplicationAutoLaunch, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_SetApplicationAutoLaunch(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey, bool bAutoLaunch) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_SetApplicationAutoLaunch(_this->linux_side, pchAppKey, bAutoLaunch); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationAutoLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_005_GetApplicationAutoLaunch(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationAutoLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetStartingApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_GetStartingApplication(winIVRApplications_IVRApplications_005 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetStartingApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetTransitionState, 4) +EVRApplicationTransitionState __thiscall winIVRApplications_IVRApplications_005_GetTransitionState(winIVRApplications_IVRApplications_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetTransitionState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_PerformApplicationPrelaunchCheck, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_PerformApplicationPrelaunchCheck(winIVRApplications_IVRApplications_005 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_PerformApplicationPrelaunchCheck(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_GetApplicationsTransitionStateNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_005_GetApplicationsTransitionStateNameFromEnum(winIVRApplications_IVRApplications_005 *_this, EVRApplicationTransitionState state) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_GetApplicationsTransitionStateNameFromEnum(_this->linux_side, state); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_IsQuitUserPromptRequested, 4) +bool __thiscall winIVRApplications_IVRApplications_005_IsQuitUserPromptRequested(winIVRApplications_IVRApplications_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_IsQuitUserPromptRequested(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_005_LaunchInternalProcess, 28) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_005_LaunchInternalProcess(winIVRApplications_IVRApplications_005 *_this, const char * pchBinaryPath, const char * pchArguments, const char * pchWorkingDirectory) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_005_LaunchInternalProcess(_this->linux_side, pchBinaryPath, pchArguments, pchWorkingDirectory); +} + +extern vtable_ptr winIVRApplications_IVRApplications_005_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRApplications_IVRApplications_005, + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_AddApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_RemoveApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_IsApplicationInstalled) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationCount) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationKeyByIndex) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationKeyByProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_LaunchApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_LaunchTemplateApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_LaunchDashboardOverlay) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_CancelApplicationLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_IdentifyApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationPropertyString) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationPropertyBool) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationPropertyUint64) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_SetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetStartingApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetTransitionState) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_PerformApplicationPrelaunchCheck) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_GetApplicationsTransitionStateNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_IsQuitUserPromptRequested) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_005_LaunchInternalProcess) + ); +#ifndef __GNUC__ +} +#endif + +winIVRApplications_IVRApplications_005 *create_winIVRApplications_IVRApplications_005(void *linux_side) +{ + winIVRApplications_IVRApplications_005 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRApplications_IVRApplications_005)); + TRACE("-> %p\n", r); + r->vtable = &winIVRApplications_IVRApplications_005_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRApplications_IVRApplications_004.h" + +typedef struct __winIVRApplications_IVRApplications_004 { + vtable_ptr *vtable; + void *linux_side; +} winIVRApplications_IVRApplications_004; + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_AddApplicationManifest, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_AddApplicationManifest(winIVRApplications_IVRApplications_004 *_this, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_AddApplicationManifest(_this->linux_side, pchApplicationManifestFullPath, bTemporary); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_RemoveApplicationManifest, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_RemoveApplicationManifest(winIVRApplications_IVRApplications_004 *_this, const char * pchApplicationManifestFullPath) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_RemoveApplicationManifest(_this->linux_side, pchApplicationManifestFullPath); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_IsApplicationInstalled, 12) +bool __thiscall winIVRApplications_IVRApplications_004_IsApplicationInstalled(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_IsApplicationInstalled(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationCount, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_004_GetApplicationCount(winIVRApplications_IVRApplications_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationKeyByIndex, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_GetApplicationKeyByIndex(winIVRApplications_IVRApplications_004 *_this, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationKeyByIndex(_this->linux_side, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationKeyByProcessId, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_GetApplicationKeyByProcessId(winIVRApplications_IVRApplications_004 *_this, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationKeyByProcessId(_this->linux_side, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_LaunchApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_LaunchApplication(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_LaunchApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_LaunchDashboardOverlay, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_LaunchDashboardOverlay(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_LaunchDashboardOverlay(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_CancelApplicationLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_004_CancelApplicationLaunch(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_CancelApplicationLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_IdentifyApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_IdentifyApplication(winIVRApplications_IVRApplications_004 *_this, uint32_t unProcessId, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_IdentifyApplication(_this->linux_side, unProcessId, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationProcessId, 12) +uint32_t __thiscall winIVRApplications_IVRApplications_004_GetApplicationProcessId(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationProcessId(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationsErrorNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_004_GetApplicationsErrorNameFromEnum(winIVRApplications_IVRApplications_004 *_this, EVRApplicationError error) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationsErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationPropertyString, 36) +uint32_t __thiscall winIVRApplications_IVRApplications_004_GetApplicationPropertyString(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationPropertyString(_this->linux_side, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationPropertyBool, 24) +bool __thiscall winIVRApplications_IVRApplications_004_GetApplicationPropertyBool(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationPropertyBool(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationPropertyUint64, 24) +uint64_t __thiscall winIVRApplications_IVRApplications_004_GetApplicationPropertyUint64(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationPropertyUint64(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_SetApplicationAutoLaunch, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_SetApplicationAutoLaunch(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey, bool bAutoLaunch) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_SetApplicationAutoLaunch(_this->linux_side, pchAppKey, bAutoLaunch); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationAutoLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_004_GetApplicationAutoLaunch(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationAutoLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetStartingApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_GetStartingApplication(winIVRApplications_IVRApplications_004 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetStartingApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetTransitionState, 4) +EVRApplicationTransitionState __thiscall winIVRApplications_IVRApplications_004_GetTransitionState(winIVRApplications_IVRApplications_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetTransitionState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_PerformApplicationPrelaunchCheck, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_PerformApplicationPrelaunchCheck(winIVRApplications_IVRApplications_004 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_PerformApplicationPrelaunchCheck(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_GetApplicationsTransitionStateNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_004_GetApplicationsTransitionStateNameFromEnum(winIVRApplications_IVRApplications_004 *_this, EVRApplicationTransitionState state) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_GetApplicationsTransitionStateNameFromEnum(_this->linux_side, state); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_IsQuitUserPromptRequested, 4) +bool __thiscall winIVRApplications_IVRApplications_004_IsQuitUserPromptRequested(winIVRApplications_IVRApplications_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_IsQuitUserPromptRequested(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_004_LaunchInternalProcess, 28) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_004_LaunchInternalProcess(winIVRApplications_IVRApplications_004 *_this, const char * pchBinaryPath, const char * pchArguments, const char * pchWorkingDirectory) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_004_LaunchInternalProcess(_this->linux_side, pchBinaryPath, pchArguments, pchWorkingDirectory); +} + +extern vtable_ptr winIVRApplications_IVRApplications_004_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRApplications_IVRApplications_004, + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_AddApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_RemoveApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_IsApplicationInstalled) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationCount) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationKeyByIndex) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationKeyByProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_LaunchApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_LaunchDashboardOverlay) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_CancelApplicationLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_IdentifyApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationPropertyString) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationPropertyBool) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationPropertyUint64) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_SetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetStartingApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetTransitionState) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_PerformApplicationPrelaunchCheck) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_GetApplicationsTransitionStateNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_IsQuitUserPromptRequested) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_004_LaunchInternalProcess) + ); +#ifndef __GNUC__ +} +#endif + +winIVRApplications_IVRApplications_004 *create_winIVRApplications_IVRApplications_004(void *linux_side) +{ + winIVRApplications_IVRApplications_004 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRApplications_IVRApplications_004)); + TRACE("-> %p\n", r); + r->vtable = &winIVRApplications_IVRApplications_004_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRApplications_IVRApplications_003.h" + +typedef struct __winIVRApplications_IVRApplications_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVRApplications_IVRApplications_003; + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_AddApplicationManifest, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_AddApplicationManifest(winIVRApplications_IVRApplications_003 *_this, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_AddApplicationManifest(_this->linux_side, pchApplicationManifestFullPath, bTemporary); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_RemoveApplicationManifest, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_RemoveApplicationManifest(winIVRApplications_IVRApplications_003 *_this, const char * pchApplicationManifestFullPath) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_RemoveApplicationManifest(_this->linux_side, pchApplicationManifestFullPath); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_IsApplicationInstalled, 12) +bool __thiscall winIVRApplications_IVRApplications_003_IsApplicationInstalled(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_IsApplicationInstalled(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationCount, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_003_GetApplicationCount(winIVRApplications_IVRApplications_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationKeyByIndex, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_GetApplicationKeyByIndex(winIVRApplications_IVRApplications_003 *_this, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationKeyByIndex(_this->linux_side, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationKeyByProcessId, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_GetApplicationKeyByProcessId(winIVRApplications_IVRApplications_003 *_this, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationKeyByProcessId(_this->linux_side, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_LaunchApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_LaunchApplication(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_LaunchApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_LaunchDashboardOverlay, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_LaunchDashboardOverlay(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_LaunchDashboardOverlay(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_IdentifyApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_IdentifyApplication(winIVRApplications_IVRApplications_003 *_this, uint32_t unProcessId, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_IdentifyApplication(_this->linux_side, unProcessId, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationProcessId, 12) +uint32_t __thiscall winIVRApplications_IVRApplications_003_GetApplicationProcessId(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationProcessId(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationsErrorNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_003_GetApplicationsErrorNameFromEnum(winIVRApplications_IVRApplications_003 *_this, EVRApplicationError error) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationsErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationPropertyString, 36) +uint32_t __thiscall winIVRApplications_IVRApplications_003_GetApplicationPropertyString(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationPropertyString(_this->linux_side, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationPropertyBool, 24) +bool __thiscall winIVRApplications_IVRApplications_003_GetApplicationPropertyBool(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationPropertyBool(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationPropertyUint64, 24) +uint64_t __thiscall winIVRApplications_IVRApplications_003_GetApplicationPropertyUint64(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationPropertyUint64(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_SetApplicationAutoLaunch, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_SetApplicationAutoLaunch(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey, bool bAutoLaunch) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_SetApplicationAutoLaunch(_this->linux_side, pchAppKey, bAutoLaunch); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationAutoLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_003_GetApplicationAutoLaunch(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationAutoLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetStartingApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_GetStartingApplication(winIVRApplications_IVRApplications_003 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetStartingApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetTransitionState, 4) +EVRApplicationTransitionState __thiscall winIVRApplications_IVRApplications_003_GetTransitionState(winIVRApplications_IVRApplications_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetTransitionState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_PerformApplicationPrelaunchCheck, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_003_PerformApplicationPrelaunchCheck(winIVRApplications_IVRApplications_003 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_PerformApplicationPrelaunchCheck(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_GetApplicationsTransitionStateNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_003_GetApplicationsTransitionStateNameFromEnum(winIVRApplications_IVRApplications_003 *_this, EVRApplicationTransitionState state) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_GetApplicationsTransitionStateNameFromEnum(_this->linux_side, state); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_003_IsQuitUserPromptRequested, 4) +bool __thiscall winIVRApplications_IVRApplications_003_IsQuitUserPromptRequested(winIVRApplications_IVRApplications_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_003_IsQuitUserPromptRequested(_this->linux_side); +} + +extern vtable_ptr winIVRApplications_IVRApplications_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRApplications_IVRApplications_003, + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_AddApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_RemoveApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_IsApplicationInstalled) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationCount) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationKeyByIndex) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationKeyByProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_LaunchApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_LaunchDashboardOverlay) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_IdentifyApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationPropertyString) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationPropertyBool) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationPropertyUint64) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_SetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetStartingApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetTransitionState) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_PerformApplicationPrelaunchCheck) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_GetApplicationsTransitionStateNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_003_IsQuitUserPromptRequested) + ); +#ifndef __GNUC__ +} +#endif + +winIVRApplications_IVRApplications_003 *create_winIVRApplications_IVRApplications_003(void *linux_side) +{ + winIVRApplications_IVRApplications_003 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRApplications_IVRApplications_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVRApplications_IVRApplications_003_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRApplications_IVRApplications_002.h" + +typedef struct __winIVRApplications_IVRApplications_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRApplications_IVRApplications_002; + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_AddApplicationManifest, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_AddApplicationManifest(winIVRApplications_IVRApplications_002 *_this, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_AddApplicationManifest(_this->linux_side, pchApplicationManifestFullPath, bTemporary); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_RemoveApplicationManifest, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_RemoveApplicationManifest(winIVRApplications_IVRApplications_002 *_this, const char * pchApplicationManifestFullPath) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_RemoveApplicationManifest(_this->linux_side, pchApplicationManifestFullPath); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_IsApplicationInstalled, 12) +bool __thiscall winIVRApplications_IVRApplications_002_IsApplicationInstalled(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_IsApplicationInstalled(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationCount, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_002_GetApplicationCount(winIVRApplications_IVRApplications_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationKeyByIndex, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_GetApplicationKeyByIndex(winIVRApplications_IVRApplications_002 *_this, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationKeyByIndex(_this->linux_side, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationKeyByProcessId, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_GetApplicationKeyByProcessId(winIVRApplications_IVRApplications_002 *_this, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationKeyByProcessId(_this->linux_side, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_LaunchApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_LaunchApplication(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_LaunchApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_LaunchDashboardOverlay, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_LaunchDashboardOverlay(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_LaunchDashboardOverlay(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_IdentifyApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_IdentifyApplication(winIVRApplications_IVRApplications_002 *_this, uint32_t unProcessId, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_IdentifyApplication(_this->linux_side, unProcessId, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationProcessId, 12) +uint32_t __thiscall winIVRApplications_IVRApplications_002_GetApplicationProcessId(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationProcessId(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationsErrorNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_002_GetApplicationsErrorNameFromEnum(winIVRApplications_IVRApplications_002 *_this, EVRApplicationError error) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationsErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationPropertyString, 36) +uint32_t __thiscall winIVRApplications_IVRApplications_002_GetApplicationPropertyString(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationPropertyString(_this->linux_side, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationPropertyBool, 24) +bool __thiscall winIVRApplications_IVRApplications_002_GetApplicationPropertyBool(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationPropertyBool(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_SetApplicationAutoLaunch, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_SetApplicationAutoLaunch(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey, bool bAutoLaunch) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_SetApplicationAutoLaunch(_this->linux_side, pchAppKey, bAutoLaunch); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationAutoLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_002_GetApplicationAutoLaunch(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationAutoLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetStartingApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_GetStartingApplication(winIVRApplications_IVRApplications_002 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetStartingApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetTransitionState, 4) +EVRApplicationTransitionState __thiscall winIVRApplications_IVRApplications_002_GetTransitionState(winIVRApplications_IVRApplications_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetTransitionState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_PerformApplicationPrelaunchCheck, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_002_PerformApplicationPrelaunchCheck(winIVRApplications_IVRApplications_002 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_PerformApplicationPrelaunchCheck(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_GetApplicationsTransitionStateNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_002_GetApplicationsTransitionStateNameFromEnum(winIVRApplications_IVRApplications_002 *_this, EVRApplicationTransitionState state) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_GetApplicationsTransitionStateNameFromEnum(_this->linux_side, state); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_002_IsQuitUserPromptRequested, 4) +bool __thiscall winIVRApplications_IVRApplications_002_IsQuitUserPromptRequested(winIVRApplications_IVRApplications_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_002_IsQuitUserPromptRequested(_this->linux_side); +} + +extern vtable_ptr winIVRApplications_IVRApplications_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRApplications_IVRApplications_002, + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_AddApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_RemoveApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_IsApplicationInstalled) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationCount) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationKeyByIndex) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationKeyByProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_LaunchApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_LaunchDashboardOverlay) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_IdentifyApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationPropertyString) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationPropertyBool) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_SetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetStartingApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetTransitionState) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_PerformApplicationPrelaunchCheck) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_GetApplicationsTransitionStateNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_002_IsQuitUserPromptRequested) + ); +#ifndef __GNUC__ +} +#endif + +winIVRApplications_IVRApplications_002 *create_winIVRApplications_IVRApplications_002(void *linux_side) +{ + winIVRApplications_IVRApplications_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRApplications_IVRApplications_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRApplications_IVRApplications_002_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRApplications_IVRApplications_001.h" + +typedef struct __winIVRApplications_IVRApplications_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRApplications_IVRApplications_001; + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_AddApplicationManifest, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_AddApplicationManifest(winIVRApplications_IVRApplications_001 *_this, const char * pchApplicationManifestFullPath, bool bTemporary) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_AddApplicationManifest(_this->linux_side, pchApplicationManifestFullPath, bTemporary); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_RemoveApplicationManifest, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_RemoveApplicationManifest(winIVRApplications_IVRApplications_001 *_this, const char * pchApplicationManifestFullPath) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_RemoveApplicationManifest(_this->linux_side, pchApplicationManifestFullPath); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_IsApplicationInstalled, 12) +bool __thiscall winIVRApplications_IVRApplications_001_IsApplicationInstalled(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_IsApplicationInstalled(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationCount, 4) +uint32_t __thiscall winIVRApplications_IVRApplications_001_GetApplicationCount(winIVRApplications_IVRApplications_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationKeyByIndex, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_GetApplicationKeyByIndex(winIVRApplications_IVRApplications_001 *_this, uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationKeyByIndex(_this->linux_side, unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationKeyByProcessId, 20) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_GetApplicationKeyByProcessId(winIVRApplications_IVRApplications_001 *_this, uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationKeyByProcessId(_this->linux_side, unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_LaunchApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_LaunchApplication(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_LaunchApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_LaunchDashboardOverlay, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_LaunchDashboardOverlay(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_LaunchDashboardOverlay(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_IdentifyApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_IdentifyApplication(winIVRApplications_IVRApplications_001 *_this, uint32_t unProcessId, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_IdentifyApplication(_this->linux_side, unProcessId, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationProcessId, 12) +uint32_t __thiscall winIVRApplications_IVRApplications_001_GetApplicationProcessId(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationProcessId(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationsErrorNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_001_GetApplicationsErrorNameFromEnum(winIVRApplications_IVRApplications_001 *_this, EVRApplicationError error) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationsErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationPropertyString, 36) +uint32_t __thiscall winIVRApplications_IVRApplications_001_GetApplicationPropertyString(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationPropertyString(_this->linux_side, pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationPropertyBool, 24) +bool __thiscall winIVRApplications_IVRApplications_001_GetApplicationPropertyBool(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationPropertyBool(_this->linux_side, pchAppKey, eProperty, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetHomeApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_GetHomeApplication(winIVRApplications_IVRApplications_001 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetHomeApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_SetHomeApplication, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_SetHomeApplication(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_SetHomeApplication(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_SetApplicationAutoLaunch, 13) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_SetApplicationAutoLaunch(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey, bool bAutoLaunch) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_SetApplicationAutoLaunch(_this->linux_side, pchAppKey, bAutoLaunch); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationAutoLaunch, 12) +bool __thiscall winIVRApplications_IVRApplications_001_GetApplicationAutoLaunch(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationAutoLaunch(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetStartingApplication, 16) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_GetStartingApplication(winIVRApplications_IVRApplications_001 *_this, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetStartingApplication(_this->linux_side, pchAppKeyBuffer, unAppKeyBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetTransitionState, 4) +EVRApplicationTransitionState __thiscall winIVRApplications_IVRApplications_001_GetTransitionState(winIVRApplications_IVRApplications_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetTransitionState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_PerformApplicationPrelaunchCheck, 12) +EVRApplicationError __thiscall winIVRApplications_IVRApplications_001_PerformApplicationPrelaunchCheck(winIVRApplications_IVRApplications_001 *_this, const char * pchAppKey) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_PerformApplicationPrelaunchCheck(_this->linux_side, pchAppKey); +} + +DEFINE_THISCALL_WRAPPER(winIVRApplications_IVRApplications_001_GetApplicationsTransitionStateNameFromEnum, 8) +const char * __thiscall winIVRApplications_IVRApplications_001_GetApplicationsTransitionStateNameFromEnum(winIVRApplications_IVRApplications_001 *_this, EVRApplicationTransitionState state) +{ + TRACE("%p\n", _this); + return cppIVRApplications_IVRApplications_001_GetApplicationsTransitionStateNameFromEnum(_this->linux_side, state); +} + +extern vtable_ptr winIVRApplications_IVRApplications_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRApplications_IVRApplications_001, + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_AddApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_RemoveApplicationManifest) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_IsApplicationInstalled) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationCount) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationKeyByIndex) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationKeyByProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_LaunchApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_LaunchDashboardOverlay) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_IdentifyApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationProcessId) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationPropertyString) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationPropertyBool) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetHomeApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_SetHomeApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_SetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationAutoLaunch) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetStartingApplication) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetTransitionState) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_PerformApplicationPrelaunchCheck) + VTABLE_ADD_FUNC(winIVRApplications_IVRApplications_001_GetApplicationsTransitionStateNameFromEnum) + ); +#ifndef __GNUC__ +} +#endif + +winIVRApplications_IVRApplications_001 *create_winIVRApplications_IVRApplications_001(void *linux_side) +{ + winIVRApplications_IVRApplications_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRApplications_IVRApplications_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRApplications_IVRApplications_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRChaperone.c b/vrclient_x64/winIVRChaperone.c new file mode 100644 index 00000000..096ab9fe --- /dev/null +++ b/vrclient_x64/winIVRChaperone.c @@ -0,0 +1,212 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRChaperone_IVRChaperone_003.h" + +typedef struct __winIVRChaperone_IVRChaperone_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVRChaperone_IVRChaperone_003; + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_GetCalibrationState, 4) +ChaperoneCalibrationState __thiscall winIVRChaperone_IVRChaperone_003_GetCalibrationState(winIVRChaperone_IVRChaperone_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_003_GetCalibrationState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_GetPlayAreaSize, 20) +bool __thiscall winIVRChaperone_IVRChaperone_003_GetPlayAreaSize(winIVRChaperone_IVRChaperone_003 *_this, float * pSizeX, float * pSizeZ) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_003_GetPlayAreaSize(_this->linux_side, pSizeX, pSizeZ); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_GetPlayAreaRect, 12) +bool __thiscall winIVRChaperone_IVRChaperone_003_GetPlayAreaRect(winIVRChaperone_IVRChaperone_003 *_this, HmdQuad_t * rect) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_003_GetPlayAreaRect(_this->linux_side, rect); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_ReloadInfo, 4) +void __thiscall winIVRChaperone_IVRChaperone_003_ReloadInfo(winIVRChaperone_IVRChaperone_003 *_this) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_003_ReloadInfo(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_SetSceneColor, 20) +void __thiscall winIVRChaperone_IVRChaperone_003_SetSceneColor(winIVRChaperone_IVRChaperone_003 *_this, HmdColor_t color) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_003_SetSceneColor(_this->linux_side, color); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_GetBoundsColor, 28) +void __thiscall winIVRChaperone_IVRChaperone_003_GetBoundsColor(winIVRChaperone_IVRChaperone_003 *_this, HmdColor_t * pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t * pOutputCameraColor) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_003_GetBoundsColor(_this->linux_side, pOutputColorArray, nNumOutputColors, flCollisionBoundsFadeDistance, pOutputCameraColor); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_AreBoundsVisible, 4) +bool __thiscall winIVRChaperone_IVRChaperone_003_AreBoundsVisible(winIVRChaperone_IVRChaperone_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_003_AreBoundsVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_003_ForceBoundsVisible, 5) +void __thiscall winIVRChaperone_IVRChaperone_003_ForceBoundsVisible(winIVRChaperone_IVRChaperone_003 *_this, bool bForce) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_003_ForceBoundsVisible(_this->linux_side, bForce); +} + +extern vtable_ptr winIVRChaperone_IVRChaperone_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRChaperone_IVRChaperone_003, + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_GetCalibrationState) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_GetPlayAreaSize) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_GetPlayAreaRect) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_ReloadInfo) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_SetSceneColor) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_GetBoundsColor) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_AreBoundsVisible) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_003_ForceBoundsVisible) + ); +#ifndef __GNUC__ +} +#endif + +winIVRChaperone_IVRChaperone_003 *create_winIVRChaperone_IVRChaperone_003(void *linux_side) +{ + winIVRChaperone_IVRChaperone_003 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRChaperone_IVRChaperone_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVRChaperone_IVRChaperone_003_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRChaperone_IVRChaperone_002.h" + +typedef struct __winIVRChaperone_IVRChaperone_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRChaperone_IVRChaperone_002; + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_GetCalibrationState, 4) +ChaperoneCalibrationState __thiscall winIVRChaperone_IVRChaperone_002_GetCalibrationState(winIVRChaperone_IVRChaperone_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_002_GetCalibrationState(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_GetSoftBoundsInfo, 12) +bool __thiscall winIVRChaperone_IVRChaperone_002_GetSoftBoundsInfo(winIVRChaperone_IVRChaperone_002 *_this, ChaperoneSoftBoundsInfo_t * pInfo) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_002_GetSoftBoundsInfo(_this->linux_side, pInfo); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_GetHardBoundsInfo, 20) +bool __thiscall winIVRChaperone_IVRChaperone_002_GetHardBoundsInfo(winIVRChaperone_IVRChaperone_002 *_this, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_002_GetHardBoundsInfo(_this->linux_side, pQuadsBuffer, punQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_GetSeatedBoundsInfo, 12) +bool __thiscall winIVRChaperone_IVRChaperone_002_GetSeatedBoundsInfo(winIVRChaperone_IVRChaperone_002 *_this, ChaperoneSeatedBoundsInfo_t * pInfo) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_002_GetSeatedBoundsInfo(_this->linux_side, pInfo); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_ReloadInfo, 4) +void __thiscall winIVRChaperone_IVRChaperone_002_ReloadInfo(winIVRChaperone_IVRChaperone_002 *_this) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_002_ReloadInfo(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_SetSceneColor, 20) +void __thiscall winIVRChaperone_IVRChaperone_002_SetSceneColor(winIVRChaperone_IVRChaperone_002 *_this, HmdColor_t color) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_002_SetSceneColor(_this->linux_side, color); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_GetBoundsColor, 16) +void __thiscall winIVRChaperone_IVRChaperone_002_GetBoundsColor(winIVRChaperone_IVRChaperone_002 *_this, HmdColor_t * pOutputColorArray, int nNumOutputColors) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_002_GetBoundsColor(_this->linux_side, pOutputColorArray, nNumOutputColors); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_AreBoundsVisible, 4) +bool __thiscall winIVRChaperone_IVRChaperone_002_AreBoundsVisible(winIVRChaperone_IVRChaperone_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRChaperone_IVRChaperone_002_AreBoundsVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperone_IVRChaperone_002_ForceBoundsVisible, 5) +void __thiscall winIVRChaperone_IVRChaperone_002_ForceBoundsVisible(winIVRChaperone_IVRChaperone_002 *_this, bool bForce) +{ + TRACE("%p\n", _this); + cppIVRChaperone_IVRChaperone_002_ForceBoundsVisible(_this->linux_side, bForce); +} + +extern vtable_ptr winIVRChaperone_IVRChaperone_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRChaperone_IVRChaperone_002, + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_GetCalibrationState) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_GetSoftBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_GetHardBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_GetSeatedBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_ReloadInfo) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_SetSceneColor) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_GetBoundsColor) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_AreBoundsVisible) + VTABLE_ADD_FUNC(winIVRChaperone_IVRChaperone_002_ForceBoundsVisible) + ); +#ifndef __GNUC__ +} +#endif + +winIVRChaperone_IVRChaperone_002 *create_winIVRChaperone_IVRChaperone_002(void *linux_side) +{ + winIVRChaperone_IVRChaperone_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRChaperone_IVRChaperone_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRChaperone_IVRChaperone_002_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRChaperoneSetup.c b/vrclient_x64/winIVRChaperoneSetup.c new file mode 100644 index 00000000..041a0368 --- /dev/null +++ b/vrclient_x64/winIVRChaperoneSetup.c @@ -0,0 +1,364 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRChaperoneSetup_IVRChaperoneSetup_005.h" + +typedef struct __winIVRChaperoneSetup_IVRChaperoneSetup_005 { + vtable_ptr *vtable; + void *linux_side; +} winIVRChaperoneSetup_IVRChaperoneSetup_005; + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_CommitWorkingCopy, 8) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_CommitWorkingCopy(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, EChaperoneConfigFile configFile) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_CommitWorkingCopy(_this->linux_side, configFile); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_RevertWorkingCopy, 4) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_RevertWorkingCopy(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_RevertWorkingCopy(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaSize, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaSize(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, float * pSizeX, float * pSizeZ) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaSize(_this->linux_side, pSizeX, pSizeZ); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaRect, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaRect(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdQuad_t * rect) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaRect(_this->linux_side, rect); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingCollisionBoundsInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingCollisionBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingCollisionBoundsInfo(_this->linux_side, pQuadsBuffer, punQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsInfo(_this->linux_side, pQuadsBuffer, punQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingSeatedZeroPoseToRawTrackingPose, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingSeatedZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingSeatedZeroPoseToRawTrackingPose(_this->linux_side, pmatSeatedZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingStandingZeroPoseToRawTrackingPose, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingStandingZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingStandingZeroPoseToRawTrackingPose(_this->linux_side, pmatStandingZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPlayAreaSize, 12) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPlayAreaSize(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, float sizeX, float sizeZ) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPlayAreaSize(_this->linux_side, sizeX, sizeZ); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsInfo, 16) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsInfo(_this->linux_side, pQuadsBuffer, unQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingSeatedZeroPoseToRawTrackingPose, 12) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingSeatedZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingSeatedZeroPoseToRawTrackingPose(_this->linux_side, pMatSeatedZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingStandingZeroPoseToRawTrackingPose, 12) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingStandingZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingStandingZeroPoseToRawTrackingPose(_this->linux_side, pMatStandingZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_ReloadFromDisk, 8) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_ReloadFromDisk(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, EChaperoneConfigFile configFile) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_ReloadFromDisk(_this->linux_side, configFile); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveSeatedZeroPoseToRawTrackingPose, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveSeatedZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveSeatedZeroPoseToRawTrackingPose(_this->linux_side, pmatSeatedZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsTagsInfo, 16) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsTagsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, uint8_t * pTagsBuffer, uint32_t unTagCount) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsTagsInfo(_this->linux_side, pTagsBuffer, unTagCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsTagsInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsTagsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, uint8_t * pTagsBuffer, uint32_t * punTagCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsTagsInfo(_this->linux_side, pTagsBuffer, punTagCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPhysicalBoundsInfo, 16) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPhysicalBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPhysicalBoundsInfo(_this->linux_side, pQuadsBuffer, unQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLivePhysicalBoundsInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLivePhysicalBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_GetLivePhysicalBoundsInfo(_this->linux_side, pQuadsBuffer, punQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_ExportLiveToBuffer, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_ExportLiveToBuffer(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, char * pBuffer, uint32_t * pnBufferLength) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_ExportLiveToBuffer(_this->linux_side, pBuffer, pnBufferLength); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_005_ImportFromBufferToWorking, 16) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_005_ImportFromBufferToWorking(winIVRChaperoneSetup_IVRChaperoneSetup_005 *_this, const char * pBuffer, uint32_t nImportFlags) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_005_ImportFromBufferToWorking(_this->linux_side, pBuffer, nImportFlags); +} + +extern vtable_ptr winIVRChaperoneSetup_IVRChaperoneSetup_005_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRChaperoneSetup_IVRChaperoneSetup_005, + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_CommitWorkingCopy) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_RevertWorkingCopy) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaSize) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingPlayAreaRect) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingCollisionBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingSeatedZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetWorkingStandingZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPlayAreaSize) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingSeatedZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingStandingZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_ReloadFromDisk) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveSeatedZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingCollisionBoundsTagsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLiveCollisionBoundsTagsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_SetWorkingPhysicalBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_GetLivePhysicalBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_ExportLiveToBuffer) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_005_ImportFromBufferToWorking) + ); +#ifndef __GNUC__ +} +#endif + +winIVRChaperoneSetup_IVRChaperoneSetup_005 *create_winIVRChaperoneSetup_IVRChaperoneSetup_005(void *linux_side) +{ + winIVRChaperoneSetup_IVRChaperoneSetup_005 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRChaperoneSetup_IVRChaperoneSetup_005)); + TRACE("-> %p\n", r); + r->vtable = &winIVRChaperoneSetup_IVRChaperoneSetup_005_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRChaperoneSetup_IVRChaperoneSetup_004.h" + +typedef struct __winIVRChaperoneSetup_IVRChaperoneSetup_004 { + vtable_ptr *vtable; + void *linux_side; +} winIVRChaperoneSetup_IVRChaperoneSetup_004; + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_CommitWorkingCopy, 8) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_CommitWorkingCopy(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, EChaperoneConfigFile configFile) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_CommitWorkingCopy(_this->linux_side, configFile); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_RevertWorkingCopy, 4) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_RevertWorkingCopy(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_RevertWorkingCopy(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaSize, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaSize(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, float * pSizeX, float * pSizeZ) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaSize(_this->linux_side, pSizeX, pSizeZ); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaRect, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaRect(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdQuad_t * rect) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaRect(_this->linux_side, rect); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingCollisionBoundsInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingCollisionBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingCollisionBoundsInfo(_this->linux_side, pQuadsBuffer, punQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveCollisionBoundsInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveCollisionBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveCollisionBoundsInfo(_this->linux_side, pQuadsBuffer, punQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingSeatedZeroPoseToRawTrackingPose, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingSeatedZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingSeatedZeroPoseToRawTrackingPose(_this->linux_side, pmatSeatedZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingStandingZeroPoseToRawTrackingPose, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingStandingZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingStandingZeroPoseToRawTrackingPose(_this->linux_side, pmatStandingZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingPlayAreaSize, 12) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingPlayAreaSize(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, float sizeX, float sizeZ) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingPlayAreaSize(_this->linux_side, sizeX, sizeZ); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingCollisionBoundsInfo, 16) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingCollisionBoundsInfo(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingCollisionBoundsInfo(_this->linux_side, pQuadsBuffer, unQuadsCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingSeatedZeroPoseToRawTrackingPose, 12) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingSeatedZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingSeatedZeroPoseToRawTrackingPose(_this->linux_side, pMatSeatedZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingStandingZeroPoseToRawTrackingPose, 12) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingStandingZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingStandingZeroPoseToRawTrackingPose(_this->linux_side, pMatStandingZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_ReloadFromDisk, 8) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_ReloadFromDisk(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, EChaperoneConfigFile configFile) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_ReloadFromDisk(_this->linux_side, configFile); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveSeatedZeroPoseToRawTrackingPose, 12) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveSeatedZeroPoseToRawTrackingPose(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveSeatedZeroPoseToRawTrackingPose(_this->linux_side, pmatSeatedZeroPoseToRawTrackingPose); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingWallTagInfo, 16) +void __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingWallTagInfo(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, uint8_t * pTagsBuffer, uint32_t unTagCount) +{ + TRACE("%p\n", _this); + cppIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingWallTagInfo(_this->linux_side, pTagsBuffer, unTagCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveWallTagInfo, 20) +bool __thiscall winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveWallTagInfo(winIVRChaperoneSetup_IVRChaperoneSetup_004 *_this, uint8_t * pTagsBuffer, uint32_t * punTagCount) +{ + TRACE("%p\n", _this); + return cppIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveWallTagInfo(_this->linux_side, pTagsBuffer, punTagCount); +} + +extern vtable_ptr winIVRChaperoneSetup_IVRChaperoneSetup_004_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRChaperoneSetup_IVRChaperoneSetup_004, + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_CommitWorkingCopy) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_RevertWorkingCopy) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaSize) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingPlayAreaRect) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingCollisionBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveCollisionBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingSeatedZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetWorkingStandingZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingPlayAreaSize) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingCollisionBoundsInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingSeatedZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingStandingZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_ReloadFromDisk) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveSeatedZeroPoseToRawTrackingPose) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_SetWorkingWallTagInfo) + VTABLE_ADD_FUNC(winIVRChaperoneSetup_IVRChaperoneSetup_004_GetLiveWallTagInfo) + ); +#ifndef __GNUC__ +} +#endif + +winIVRChaperoneSetup_IVRChaperoneSetup_004 *create_winIVRChaperoneSetup_IVRChaperoneSetup_004(void *linux_side) +{ + winIVRChaperoneSetup_IVRChaperoneSetup_004 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRChaperoneSetup_IVRChaperoneSetup_004)); + TRACE("-> %p\n", r); + r->vtable = &winIVRChaperoneSetup_IVRChaperoneSetup_004_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRClientCore.c b/vrclient_x64/winIVRClientCore.c new file mode 100644 index 00000000..53b959e0 --- /dev/null +++ b/vrclient_x64/winIVRClientCore.c @@ -0,0 +1,190 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRClientCore_IVRClientCore_003.h" + +typedef struct __winIVRClientCore_IVRClientCore_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVRClientCore_IVRClientCore_003; + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_Init, 16) +EVRInitError __thiscall winIVRClientCore_IVRClientCore_003_Init(winIVRClientCore_IVRClientCore_003 *_this, EVRApplicationType eApplicationType, const char * pStartupInfo) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_003_Init(_this->linux_side, eApplicationType, pStartupInfo); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_Cleanup, 4) +void __thiscall winIVRClientCore_IVRClientCore_003_Cleanup(winIVRClientCore_IVRClientCore_003 *_this) +{ + TRACE("%p\n", _this); + cppIVRClientCore_IVRClientCore_003_Cleanup(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_IsInterfaceVersionValid, 12) +EVRInitError __thiscall winIVRClientCore_IVRClientCore_003_IsInterfaceVersionValid(winIVRClientCore_IVRClientCore_003 *_this, const char * pchInterfaceVersion) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_003_IsInterfaceVersionValid(_this->linux_side, pchInterfaceVersion); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_GetGenericInterface, 20) +void * __thiscall winIVRClientCore_IVRClientCore_003_GetGenericInterface(winIVRClientCore_IVRClientCore_003 *_this, const char * pchNameAndVersion, EVRInitError * peError) +{ + TRACE("%p\n", _this); + return create_win_interface(pchNameAndVersion, + cppIVRClientCore_IVRClientCore_003_GetGenericInterface(_this->linux_side, pchNameAndVersion, peError)); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_BIsHmdPresent, 4) +bool __thiscall winIVRClientCore_IVRClientCore_003_BIsHmdPresent(winIVRClientCore_IVRClientCore_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_003_BIsHmdPresent(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_GetEnglishStringForHmdError, 8) +const char * __thiscall winIVRClientCore_IVRClientCore_003_GetEnglishStringForHmdError(winIVRClientCore_IVRClientCore_003 *_this, EVRInitError eError) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_003_GetEnglishStringForHmdError(_this->linux_side, eError); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_003_GetIDForVRInitError, 8) +const char * __thiscall winIVRClientCore_IVRClientCore_003_GetIDForVRInitError(winIVRClientCore_IVRClientCore_003 *_this, EVRInitError eError) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_003_GetIDForVRInitError(_this->linux_side, eError); +} + +extern vtable_ptr winIVRClientCore_IVRClientCore_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRClientCore_IVRClientCore_003, + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_Init) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_Cleanup) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_IsInterfaceVersionValid) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_GetGenericInterface) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_BIsHmdPresent) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_GetEnglishStringForHmdError) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_003_GetIDForVRInitError) + ); +#ifndef __GNUC__ +} +#endif + +winIVRClientCore_IVRClientCore_003 *create_winIVRClientCore_IVRClientCore_003(void *linux_side) +{ + winIVRClientCore_IVRClientCore_003 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRClientCore_IVRClientCore_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVRClientCore_IVRClientCore_003_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRClientCore_IVRClientCore_002.h" + +typedef struct __winIVRClientCore_IVRClientCore_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRClientCore_IVRClientCore_002; + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_Init, 8) +EVRInitError __thiscall winIVRClientCore_IVRClientCore_002_Init(winIVRClientCore_IVRClientCore_002 *_this, EVRApplicationType eApplicationType) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_002_Init(_this->linux_side, eApplicationType); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_Cleanup, 4) +void __thiscall winIVRClientCore_IVRClientCore_002_Cleanup(winIVRClientCore_IVRClientCore_002 *_this) +{ + TRACE("%p\n", _this); + cppIVRClientCore_IVRClientCore_002_Cleanup(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_IsInterfaceVersionValid, 12) +EVRInitError __thiscall winIVRClientCore_IVRClientCore_002_IsInterfaceVersionValid(winIVRClientCore_IVRClientCore_002 *_this, const char * pchInterfaceVersion) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_002_IsInterfaceVersionValid(_this->linux_side, pchInterfaceVersion); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_GetGenericInterface, 20) +void * __thiscall winIVRClientCore_IVRClientCore_002_GetGenericInterface(winIVRClientCore_IVRClientCore_002 *_this, const char * pchNameAndVersion, EVRInitError * peError) +{ + TRACE("%p\n", _this); + return create_win_interface(pchNameAndVersion, + cppIVRClientCore_IVRClientCore_002_GetGenericInterface(_this->linux_side, pchNameAndVersion, peError)); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_BIsHmdPresent, 4) +bool __thiscall winIVRClientCore_IVRClientCore_002_BIsHmdPresent(winIVRClientCore_IVRClientCore_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_002_BIsHmdPresent(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_GetEnglishStringForHmdError, 8) +const char * __thiscall winIVRClientCore_IVRClientCore_002_GetEnglishStringForHmdError(winIVRClientCore_IVRClientCore_002 *_this, EVRInitError eError) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_002_GetEnglishStringForHmdError(_this->linux_side, eError); +} + +DEFINE_THISCALL_WRAPPER(winIVRClientCore_IVRClientCore_002_GetIDForVRInitError, 8) +const char * __thiscall winIVRClientCore_IVRClientCore_002_GetIDForVRInitError(winIVRClientCore_IVRClientCore_002 *_this, EVRInitError eError) +{ + TRACE("%p\n", _this); + return cppIVRClientCore_IVRClientCore_002_GetIDForVRInitError(_this->linux_side, eError); +} + +extern vtable_ptr winIVRClientCore_IVRClientCore_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRClientCore_IVRClientCore_002, + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_Init) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_Cleanup) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_IsInterfaceVersionValid) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_GetGenericInterface) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_BIsHmdPresent) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_GetEnglishStringForHmdError) + VTABLE_ADD_FUNC(winIVRClientCore_IVRClientCore_002_GetIDForVRInitError) + ); +#ifndef __GNUC__ +} +#endif + +winIVRClientCore_IVRClientCore_002 *create_winIVRClientCore_IVRClientCore_002(void *linux_side) +{ + winIVRClientCore_IVRClientCore_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRClientCore_IVRClientCore_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRClientCore_IVRClientCore_002_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRCompositor.c b/vrclient_x64/winIVRCompositor.c new file mode 100644 index 00000000..03d098fa --- /dev/null +++ b/vrclient_x64/winIVRCompositor.c @@ -0,0 +1,4646 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRCompositor_IVRCompositor_022.h" + +typedef struct __winIVRCompositor_IVRCompositor_022 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_022; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_022_SetTrackingSpace(winIVRCompositor_IVRCompositor_022 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_022_GetTrackingSpace(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_WaitGetPoses(winIVRCompositor_IVRCompositor_022 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_GetLastPoses(winIVRCompositor_IVRCompositor_022 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_022 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_Submit(winIVRCompositor_IVRCompositor_022 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_PostPresentHandoff(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_022_GetFrameTiming(winIVRCompositor_IVRCompositor_022 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetFrameTimings, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_022_GetFrameTimings(winIVRCompositor_IVRCompositor_022 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_022_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_022_GetCumulativeStats(winIVRCompositor_IVRCompositor_022 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_022_FadeToColor(winIVRCompositor_IVRCompositor_022 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_022_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_022 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_022_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_022_FadeGrid(winIVRCompositor_IVRCompositor_022 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_022_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_SetSkyboxOverride(winIVRCompositor_IVRCompositor_022 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_CompositorBringToFront(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_CompositorGoToBack(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_CompositorQuit(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_022_IsFullscreen(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_022_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_022_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_022_CanRenderScene(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_ShowMirrorWindow(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_HideMirrorWindow(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_022_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_CompositorDumpImages(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_022_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_022_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_022 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_022_ForceReconnectProcess(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_022_SuspendRendering(winIVRCompositor_IVRCompositor_022 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_022 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ReleaseMirrorTextureD3D11, 12) +void __thiscall winIVRCompositor_IVRCompositor_022_ReleaseMirrorTextureD3D11(winIVRCompositor_IVRCompositor_022 *_this, void * pD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_ReleaseMirrorTextureD3D11(_this->linux_side, pD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_022 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_022_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_022 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_022_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_022 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_022_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_022 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetVulkanInstanceExtensionsRequired, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_022_GetVulkanInstanceExtensionsRequired(winIVRCompositor_IVRCompositor_022 *_this, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetVulkanInstanceExtensionsRequired(_this->linux_side, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired, 24) +uint32_t __thiscall winIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_022 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_SetExplicitTimingMode, 8) +void __thiscall winIVRCompositor_IVRCompositor_022_SetExplicitTimingMode(winIVRCompositor_IVRCompositor_022 *_this, EVRCompositorTimingMode eTimingMode) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_022_SetExplicitTimingMode(_this->linux_side, eTimingMode); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_022_SubmitExplicitTimingData, 4) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_022_SubmitExplicitTimingData(winIVRCompositor_IVRCompositor_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_022_SubmitExplicitTimingData(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_022_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_022, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ReleaseMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_UnlockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetVulkanInstanceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_GetVulkanDeviceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_SetExplicitTimingMode) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_022_SubmitExplicitTimingData) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_022 *create_winIVRCompositor_IVRCompositor_022(void *linux_side) +{ + winIVRCompositor_IVRCompositor_022 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_022)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_022_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_021.h" + +typedef struct __winIVRCompositor_IVRCompositor_021 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_021; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_021_SetTrackingSpace(winIVRCompositor_IVRCompositor_021 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_021_GetTrackingSpace(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_WaitGetPoses(winIVRCompositor_IVRCompositor_021 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_GetLastPoses(winIVRCompositor_IVRCompositor_021 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_021 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_Submit(winIVRCompositor_IVRCompositor_021 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_PostPresentHandoff(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_021_GetFrameTiming(winIVRCompositor_IVRCompositor_021 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetFrameTimings, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_021_GetFrameTimings(winIVRCompositor_IVRCompositor_021 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_021_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_021_GetCumulativeStats(winIVRCompositor_IVRCompositor_021 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_021_FadeToColor(winIVRCompositor_IVRCompositor_021 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_021_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_021 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_021_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_021_FadeGrid(winIVRCompositor_IVRCompositor_021 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_021_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_SetSkyboxOverride(winIVRCompositor_IVRCompositor_021 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_CompositorBringToFront(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_CompositorGoToBack(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_CompositorQuit(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_021_IsFullscreen(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_021_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_021_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_021_CanRenderScene(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_ShowMirrorWindow(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_HideMirrorWindow(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_021_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_CompositorDumpImages(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_021_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_021_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_021 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_021_ForceReconnectProcess(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_021_SuspendRendering(winIVRCompositor_IVRCompositor_021 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_021 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ReleaseMirrorTextureD3D11, 12) +void __thiscall winIVRCompositor_IVRCompositor_021_ReleaseMirrorTextureD3D11(winIVRCompositor_IVRCompositor_021 *_this, void * pD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_ReleaseMirrorTextureD3D11(_this->linux_side, pD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_021 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_021_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_021 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_021_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_021 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_021_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_021 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetVulkanInstanceExtensionsRequired, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_021_GetVulkanInstanceExtensionsRequired(winIVRCompositor_IVRCompositor_021 *_this, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetVulkanInstanceExtensionsRequired(_this->linux_side, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired, 24) +uint32_t __thiscall winIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_021 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_SetExplicitTimingMode, 5) +void __thiscall winIVRCompositor_IVRCompositor_021_SetExplicitTimingMode(winIVRCompositor_IVRCompositor_021 *_this, bool bExplicitTimingMode) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_021_SetExplicitTimingMode(_this->linux_side, bExplicitTimingMode); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_021_SubmitExplicitTimingData, 4) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_021_SubmitExplicitTimingData(winIVRCompositor_IVRCompositor_021 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_021_SubmitExplicitTimingData(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_021_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_021, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ReleaseMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_UnlockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetVulkanInstanceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_GetVulkanDeviceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_SetExplicitTimingMode) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_021_SubmitExplicitTimingData) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_021 *create_winIVRCompositor_IVRCompositor_021(void *linux_side) +{ + winIVRCompositor_IVRCompositor_021 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_021)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_021_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_020.h" + +typedef struct __winIVRCompositor_IVRCompositor_020 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_020; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_020_SetTrackingSpace(winIVRCompositor_IVRCompositor_020 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_020_GetTrackingSpace(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_WaitGetPoses(winIVRCompositor_IVRCompositor_020 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_GetLastPoses(winIVRCompositor_IVRCompositor_020 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_020 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_Submit(winIVRCompositor_IVRCompositor_020 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_PostPresentHandoff(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_020_GetFrameTiming(winIVRCompositor_IVRCompositor_020 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetFrameTimings, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_020_GetFrameTimings(winIVRCompositor_IVRCompositor_020 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_020_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_020_GetCumulativeStats(winIVRCompositor_IVRCompositor_020 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_020_FadeToColor(winIVRCompositor_IVRCompositor_020 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_020_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_020 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_020_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_020_FadeGrid(winIVRCompositor_IVRCompositor_020 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_020_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_SetSkyboxOverride(winIVRCompositor_IVRCompositor_020 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_CompositorBringToFront(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_CompositorGoToBack(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_CompositorQuit(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_020_IsFullscreen(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_020_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_020_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_020_CanRenderScene(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_ShowMirrorWindow(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_HideMirrorWindow(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_020_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_CompositorDumpImages(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_020_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_020_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_020 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_020_ForceReconnectProcess(winIVRCompositor_IVRCompositor_020 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_020_SuspendRendering(winIVRCompositor_IVRCompositor_020 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_020 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ReleaseMirrorTextureD3D11, 12) +void __thiscall winIVRCompositor_IVRCompositor_020_ReleaseMirrorTextureD3D11(winIVRCompositor_IVRCompositor_020 *_this, void * pD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_ReleaseMirrorTextureD3D11(_this->linux_side, pD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_020_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_020 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_020_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_020 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_020_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_020 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_020_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_020 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_020_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetVulkanInstanceExtensionsRequired, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_020_GetVulkanInstanceExtensionsRequired(winIVRCompositor_IVRCompositor_020 *_this, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetVulkanInstanceExtensionsRequired(_this->linux_side, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired, 24) +uint32_t __thiscall winIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_020 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_020_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_020, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ReleaseMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_UnlockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetVulkanInstanceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_020_GetVulkanDeviceExtensionsRequired) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_020 *create_winIVRCompositor_IVRCompositor_020(void *linux_side) +{ + winIVRCompositor_IVRCompositor_020 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_020)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_020_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_019.h" + +typedef struct __winIVRCompositor_IVRCompositor_019 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_019; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_019_SetTrackingSpace(winIVRCompositor_IVRCompositor_019 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_019_GetTrackingSpace(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_WaitGetPoses(winIVRCompositor_IVRCompositor_019 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_GetLastPoses(winIVRCompositor_IVRCompositor_019 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_019 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_Submit(winIVRCompositor_IVRCompositor_019 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_PostPresentHandoff(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_019_GetFrameTiming(winIVRCompositor_IVRCompositor_019 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetFrameTimings, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_019_GetFrameTimings(winIVRCompositor_IVRCompositor_019 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_019_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_019_GetCumulativeStats(winIVRCompositor_IVRCompositor_019 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_019_FadeToColor(winIVRCompositor_IVRCompositor_019 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_019_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_019 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_019_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_019_FadeGrid(winIVRCompositor_IVRCompositor_019 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_019_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_SetSkyboxOverride(winIVRCompositor_IVRCompositor_019 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_CompositorBringToFront(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_CompositorGoToBack(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_CompositorQuit(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_019_IsFullscreen(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_019_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_019_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_019_CanRenderScene(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_ShowMirrorWindow(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_HideMirrorWindow(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_019_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_CompositorDumpImages(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_019_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_019_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_019 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_019_ForceReconnectProcess(winIVRCompositor_IVRCompositor_019 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_019_SuspendRendering(winIVRCompositor_IVRCompositor_019 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_019 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_019_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_019 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_019_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_019 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_019_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_019 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_019_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_019 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_019_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetVulkanInstanceExtensionsRequired, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_019_GetVulkanInstanceExtensionsRequired(winIVRCompositor_IVRCompositor_019 *_this, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetVulkanInstanceExtensionsRequired(_this->linux_side, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired, 24) +uint32_t __thiscall winIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_019 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired(_this->linux_side, pPhysicalDevice, pchValue, unBufferSize); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_019_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_019, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_UnlockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetVulkanInstanceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_019_GetVulkanDeviceExtensionsRequired) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_019 *create_winIVRCompositor_IVRCompositor_019(void *linux_side) +{ + winIVRCompositor_IVRCompositor_019 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_019)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_019_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_018.h" + +typedef struct __winIVRCompositor_IVRCompositor_018 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_018; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_018_SetTrackingSpace(winIVRCompositor_IVRCompositor_018 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_018_GetTrackingSpace(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_WaitGetPoses(winIVRCompositor_IVRCompositor_018 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_GetLastPoses(winIVRCompositor_IVRCompositor_018 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_018 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_Submit(winIVRCompositor_IVRCompositor_018 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_PostPresentHandoff(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_018_GetFrameTiming(winIVRCompositor_IVRCompositor_018 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetFrameTimings, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_018_GetFrameTimings(winIVRCompositor_IVRCompositor_018 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_018_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_018_GetCumulativeStats(winIVRCompositor_IVRCompositor_018 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_018_FadeToColor(winIVRCompositor_IVRCompositor_018 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_018_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_018 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_018_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_018_FadeGrid(winIVRCompositor_IVRCompositor_018 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_018_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_SetSkyboxOverride(winIVRCompositor_IVRCompositor_018 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_CompositorBringToFront(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_CompositorGoToBack(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_CompositorQuit(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_018_IsFullscreen(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_018_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_018_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_018_CanRenderScene(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_ShowMirrorWindow(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_HideMirrorWindow(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_018_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_CompositorDumpImages(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_018_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_018_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_018 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_018_ForceReconnectProcess(winIVRCompositor_IVRCompositor_018 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_018_SuspendRendering(winIVRCompositor_IVRCompositor_018 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_018 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_018_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_018 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_018_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_018 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_018_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_018_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_018 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_018_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_018_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_018 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_018_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_018_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_018, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_018_UnlockGLSharedTextureForAccess) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_018 *create_winIVRCompositor_IVRCompositor_018(void *linux_side) +{ + winIVRCompositor_IVRCompositor_018 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_018)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_018_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_016.h" + +typedef struct __winIVRCompositor_IVRCompositor_016 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_016; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_016_SetTrackingSpace(winIVRCompositor_IVRCompositor_016 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_016_GetTrackingSpace(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_WaitGetPoses(winIVRCompositor_IVRCompositor_016 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_GetLastPoses(winIVRCompositor_IVRCompositor_016 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_016 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_Submit(winIVRCompositor_IVRCompositor_016 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_PostPresentHandoff(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_016_GetFrameTiming(winIVRCompositor_IVRCompositor_016 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_016_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_016_GetCumulativeStats(winIVRCompositor_IVRCompositor_016 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_016_FadeToColor(winIVRCompositor_IVRCompositor_016 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_016_FadeGrid(winIVRCompositor_IVRCompositor_016 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_SetSkyboxOverride(winIVRCompositor_IVRCompositor_016 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_CompositorBringToFront(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_CompositorGoToBack(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_CompositorQuit(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_016_IsFullscreen(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_016_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_016_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_016_CanRenderScene(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_ShowMirrorWindow(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_HideMirrorWindow(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_016_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_CompositorDumpImages(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_016_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_016_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_016 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_016_ForceReconnectProcess(winIVRCompositor_IVRCompositor_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_016_SuspendRendering(winIVRCompositor_IVRCompositor_016 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_016 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_016_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_016 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_016_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_016 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_016_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_016_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_016 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_016_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_016_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_016 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_016_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_016_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_016, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_016_UnlockGLSharedTextureForAccess) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_016 *create_winIVRCompositor_IVRCompositor_016(void *linux_side) +{ + winIVRCompositor_IVRCompositor_016 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_016)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_016_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_015.h" + +typedef struct __winIVRCompositor_IVRCompositor_015 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_015; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_015_SetTrackingSpace(winIVRCompositor_IVRCompositor_015 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_015_GetTrackingSpace(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_WaitGetPoses(winIVRCompositor_IVRCompositor_015 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_GetLastPoses(winIVRCompositor_IVRCompositor_015 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_015 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_Submit(winIVRCompositor_IVRCompositor_015 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_PostPresentHandoff(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_015_GetFrameTiming(winIVRCompositor_IVRCompositor_015 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_015_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetCumulativeStats, 16) +void __thiscall winIVRCompositor_IVRCompositor_015_GetCumulativeStats(winIVRCompositor_IVRCompositor_015 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_015_FadeToColor(winIVRCompositor_IVRCompositor_015 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_015_FadeGrid(winIVRCompositor_IVRCompositor_015 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_SetSkyboxOverride(winIVRCompositor_IVRCompositor_015 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_CompositorBringToFront(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_CompositorGoToBack(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_CompositorQuit(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_015_IsFullscreen(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_015_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_015_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_015_CanRenderScene(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_ShowMirrorWindow(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_HideMirrorWindow(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_015_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_CompositorDumpImages(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_015_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_015_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_015 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_015_ForceReconnectProcess(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_015_SuspendRendering(winIVRCompositor_IVRCompositor_015 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_RequestScreenshot, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_RequestScreenshot(winIVRCompositor_IVRCompositor_015 *_this, EVRScreenshotType type, const char * pchDestinationFileName, const char * pchVRDestinationFileName) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_RequestScreenshot(_this->linux_side, type, pchDestinationFileName, pchVRDestinationFileName); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetCurrentScreenshotType, 4) +EVRScreenshotType __thiscall winIVRCompositor_IVRCompositor_015_GetCurrentScreenshotType(winIVRCompositor_IVRCompositor_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetCurrentScreenshotType(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetMirrorTextureD3D11, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_015 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_GetMirrorTextureGL, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_015_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_015 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_ReleaseSharedGLTexture, 16) +bool __thiscall winIVRCompositor_IVRCompositor_015_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_015 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_015_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_LockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_015_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_015 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_015_UnlockGLSharedTextureForAccess, 12) +void __thiscall winIVRCompositor_IVRCompositor_015_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_015 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_015_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_015_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_015, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_RequestScreenshot) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetCurrentScreenshotType) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_015_UnlockGLSharedTextureForAccess) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_015 *create_winIVRCompositor_IVRCompositor_015(void *linux_side) +{ + winIVRCompositor_IVRCompositor_015 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_015)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_015_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_014.h" + +typedef struct __winIVRCompositor_IVRCompositor_014 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_014; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_014_SetTrackingSpace(winIVRCompositor_IVRCompositor_014 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_014_GetTrackingSpace(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_014_WaitGetPoses(winIVRCompositor_IVRCompositor_014 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_014_GetLastPoses(winIVRCompositor_IVRCompositor_014 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_014_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_014 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_014_Submit(winIVRCompositor_IVRCompositor_014 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_PostPresentHandoff(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_014_GetFrameTiming(winIVRCompositor_IVRCompositor_014 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_014_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_014_FadeToColor(winIVRCompositor_IVRCompositor_014 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_014_FadeGrid(winIVRCompositor_IVRCompositor_014 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_014_SetSkyboxOverride(winIVRCompositor_IVRCompositor_014 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_CompositorBringToFront(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_CompositorGoToBack(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_CompositorQuit(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_014_IsFullscreen(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_014_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_014_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_014_CanRenderScene(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_ShowMirrorWindow(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_HideMirrorWindow(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_014_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_CompositorDumpImages(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_014_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_014_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_014_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_014 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_014_ForceReconnectProcess(winIVRCompositor_IVRCompositor_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_014_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_014_SuspendRendering(winIVRCompositor_IVRCompositor_014 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_014_SuspendRendering(_this->linux_side, bSuspend); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_014_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_014, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_014_SuspendRendering) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_014 *create_winIVRCompositor_IVRCompositor_014(void *linux_side) +{ + winIVRCompositor_IVRCompositor_014 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_014)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_014_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_013.h" + +typedef struct __winIVRCompositor_IVRCompositor_013 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_013; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_013_SetTrackingSpace(winIVRCompositor_IVRCompositor_013 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_013_GetTrackingSpace(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_013_WaitGetPoses(winIVRCompositor_IVRCompositor_013 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_013_GetLastPoses(winIVRCompositor_IVRCompositor_013 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_013_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_013 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_013_Submit(winIVRCompositor_IVRCompositor_013 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_PostPresentHandoff(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_013_GetFrameTiming(winIVRCompositor_IVRCompositor_013 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_013_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_013_FadeToColor(winIVRCompositor_IVRCompositor_013 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_013_FadeGrid(winIVRCompositor_IVRCompositor_013 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_013_SetSkyboxOverride(winIVRCompositor_IVRCompositor_013 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_CompositorBringToFront(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_CompositorGoToBack(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_CompositorQuit(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_013_IsFullscreen(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_013_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_013_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_013_CanRenderScene(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_ShowMirrorWindow(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_HideMirrorWindow(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_013_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_013_CompositorDumpImages(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_013_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_013_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_013_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_013_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_013 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_013_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_013_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_013, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_013_ForceInterleavedReprojectionOn) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_013 *create_winIVRCompositor_IVRCompositor_013(void *linux_side) +{ + winIVRCompositor_IVRCompositor_013 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_013)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_013_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_012.h" + +typedef struct __winIVRCompositor_IVRCompositor_012 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_012; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_012_SetTrackingSpace(winIVRCompositor_IVRCompositor_012 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_012_GetTrackingSpace(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_012_WaitGetPoses(winIVRCompositor_IVRCompositor_012 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_012_GetLastPoses(winIVRCompositor_IVRCompositor_012 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetLastPoseForTrackedDeviceIndex, 24) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_012_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_012 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_012_Submit(winIVRCompositor_IVRCompositor_012 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_PostPresentHandoff(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_012_GetFrameTiming(winIVRCompositor_IVRCompositor_012 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_012_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_012_FadeToColor(winIVRCompositor_IVRCompositor_012 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_012_FadeGrid(winIVRCompositor_IVRCompositor_012 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_012_SetSkyboxOverride(winIVRCompositor_IVRCompositor_012 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_CompositorBringToFront(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_CompositorGoToBack(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_CompositorQuit(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_012_IsFullscreen(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_012_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_012_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_012_CanRenderScene(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_ShowMirrorWindow(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_HideMirrorWindow(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_012_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_012_CompositorDumpImages(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_012_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_012_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_012_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_012_ShouldAppRenderWithLowResources(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_012_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_012, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_012_ShouldAppRenderWithLowResources) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_012 *create_winIVRCompositor_IVRCompositor_012(void *linux_side) +{ + winIVRCompositor_IVRCompositor_012 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_012)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_012_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_011.h" + +typedef struct __winIVRCompositor_IVRCompositor_011 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_011; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_011_SetTrackingSpace(winIVRCompositor_IVRCompositor_011 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_011_GetTrackingSpace(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_011_WaitGetPoses(winIVRCompositor_IVRCompositor_011 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_011_GetLastPoses(winIVRCompositor_IVRCompositor_011 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_011_Submit(winIVRCompositor_IVRCompositor_011 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_PostPresentHandoff(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_011_GetFrameTiming(winIVRCompositor_IVRCompositor_011 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_011_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_011_FadeToColor(winIVRCompositor_IVRCompositor_011 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_011_FadeGrid(winIVRCompositor_IVRCompositor_011 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_011_SetSkyboxOverride(winIVRCompositor_IVRCompositor_011 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_CompositorBringToFront(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_CompositorGoToBack(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_CompositorQuit(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_011_IsFullscreen(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_011_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_011_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_011_CanRenderScene(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_ShowMirrorWindow(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_HideMirrorWindow(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_011_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_011_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_011_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_011_CompositorDumpImages(winIVRCompositor_IVRCompositor_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_011_CompositorDumpImages(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_011_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_011, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_011_CompositorDumpImages) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_011 *create_winIVRCompositor_IVRCompositor_011(void *linux_side) +{ + winIVRCompositor_IVRCompositor_011 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_011)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_011_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_010.h" + +typedef struct __winIVRCompositor_IVRCompositor_010 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_010; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_010_SetTrackingSpace(winIVRCompositor_IVRCompositor_010 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_010_GetTrackingSpace(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_010_WaitGetPoses(winIVRCompositor_IVRCompositor_010 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_010_GetLastPoses(winIVRCompositor_IVRCompositor_010 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_010_Submit(winIVRCompositor_IVRCompositor_010 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_PostPresentHandoff(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_010_GetFrameTiming(winIVRCompositor_IVRCompositor_010 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_010_FadeToColor(winIVRCompositor_IVRCompositor_010 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_010_FadeGrid(winIVRCompositor_IVRCompositor_010 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_010_SetSkyboxOverride(winIVRCompositor_IVRCompositor_010 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_CompositorBringToFront(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_CompositorGoToBack(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_CompositorQuit(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_010_IsFullscreen(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_010_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_010_CanRenderScene(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_ShowMirrorWindow(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_HideMirrorWindow(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_010_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_010_CompositorDumpImages(winIVRCompositor_IVRCompositor_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_010_CompositorDumpImages(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_010_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_010, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_010_CompositorDumpImages) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_010 *create_winIVRCompositor_IVRCompositor_010(void *linux_side) +{ + winIVRCompositor_IVRCompositor_010 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_010)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_010_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_009.h" + +typedef struct __winIVRCompositor_IVRCompositor_009 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_009; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_009_SetTrackingSpace(winIVRCompositor_IVRCompositor_009 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_009_GetTrackingSpace(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_WaitGetPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_009_WaitGetPoses(winIVRCompositor_IVRCompositor_009 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_GetLastPoses, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_009_GetLastPoses(winIVRCompositor_IVRCompositor_009 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_Submit, 28) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_009_Submit(winIVRCompositor_IVRCompositor_009 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_Submit(_this->linux_side, eEye, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_PostPresentHandoff(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_PostPresentHandoff(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_009_GetFrameTiming(winIVRCompositor_IVRCompositor_009 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_009_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_009_FadeToColor(winIVRCompositor_IVRCompositor_009 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_009_FadeGrid(winIVRCompositor_IVRCompositor_009 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_SetSkyboxOverride, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_009_SetSkyboxOverride(winIVRCompositor_IVRCompositor_009 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_CompositorBringToFront(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_CompositorGoToBack(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_CompositorQuit(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_009_IsFullscreen(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_009_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_009_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_009_CanRenderScene(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_ShowMirrorWindow(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_HideMirrorWindow(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_009_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_009_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_009_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_009_CompositorDumpImages(winIVRCompositor_IVRCompositor_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_009_CompositorDumpImages(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_009_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_009, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_009_CompositorDumpImages) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_009 *create_winIVRCompositor_IVRCompositor_009(void *linux_side) +{ + winIVRCompositor_IVRCompositor_009 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_009)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_009_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_008.h" + +typedef struct __winIVRCompositor_IVRCompositor_008 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_008; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetLastError, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_008_GetLastError(winIVRCompositor_IVRCompositor_008 *_this, char * pchBuffer, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetLastError(_this->linux_side, pchBuffer, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_SetVSync, 5) +void __thiscall winIVRCompositor_IVRCompositor_008_SetVSync(winIVRCompositor_IVRCompositor_008 *_this, bool bVSync) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_SetVSync(_this->linux_side, bVSync); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetVSync, 4) +bool __thiscall winIVRCompositor_IVRCompositor_008_GetVSync(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetVSync(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_SetGamma, 8) +void __thiscall winIVRCompositor_IVRCompositor_008_SetGamma(winIVRCompositor_IVRCompositor_008 *_this, float fGamma) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_SetGamma(_this->linux_side, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetGamma, 4) +float __thiscall winIVRCompositor_IVRCompositor_008_GetGamma(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetGamma(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_WaitGetPoses, 28) +VRCompositorError __thiscall winIVRCompositor_IVRCompositor_008_WaitGetPoses(winIVRCompositor_IVRCompositor_008 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_Submit, 32) +VRCompositorError __thiscall winIVRCompositor_IVRCompositor_008_Submit(winIVRCompositor_IVRCompositor_008 *_this, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void * pTexture, VRTextureBounds_t * pBounds, VRSubmitFlags_t nSubmitFlags) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_Submit(_this->linux_side, eEye, eTextureType, pTexture, pBounds, nSubmitFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_008_GetFrameTiming(winIVRCompositor_IVRCompositor_008 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_008_FadeToColor(winIVRCompositor_IVRCompositor_008 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_008_FadeGrid(winIVRCompositor_IVRCompositor_008 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_SetSkyboxOverride, 56) +void __thiscall winIVRCompositor_IVRCompositor_008_SetSkyboxOverride(winIVRCompositor_IVRCompositor_008 *_this, GraphicsAPIConvention eTextureType, void * pFront, void * pBack, void * pLeft, void * pRight, void * pTop, void * pBottom) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_SetSkyboxOverride(_this->linux_side, eTextureType, pFront, pBack, pLeft, pRight, pTop, pBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_CompositorBringToFront(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_CompositorGoToBack(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_CompositorQuit(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_008_IsFullscreen(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_008_SetTrackingSpace(winIVRCompositor_IVRCompositor_008 *_this, TrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetTrackingSpace, 4) +TrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_008_GetTrackingSpace(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_008_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_008_CanRenderScene(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_ShowMirrorWindow(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_HideMirrorWindow(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_008_CompositorDumpImages(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_008_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_008_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_008_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_008_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_008_GetLastFrameRenderer(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_008_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_008, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetLastError) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_SetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_SetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_008_GetLastFrameRenderer) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_008 *create_winIVRCompositor_IVRCompositor_008(void *linux_side) +{ + winIVRCompositor_IVRCompositor_008 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_008)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_008_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_007.h" + +typedef struct __winIVRCompositor_IVRCompositor_007 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_007; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_GetLastError, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_007_GetLastError(winIVRCompositor_IVRCompositor_007 *_this, char * pchBuffer, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_GetLastError(_this->linux_side, pchBuffer, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_SetVSync, 5) +void __thiscall winIVRCompositor_IVRCompositor_007_SetVSync(winIVRCompositor_IVRCompositor_007 *_this, bool bVSync) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_SetVSync(_this->linux_side, bVSync); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_GetVSync, 4) +bool __thiscall winIVRCompositor_IVRCompositor_007_GetVSync(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_GetVSync(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_SetGamma, 8) +void __thiscall winIVRCompositor_IVRCompositor_007_SetGamma(winIVRCompositor_IVRCompositor_007 *_this, float fGamma) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_SetGamma(_this->linux_side, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_GetGamma, 4) +float __thiscall winIVRCompositor_IVRCompositor_007_GetGamma(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_GetGamma(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_WaitGetPoses, 28) +VRCompositorError __thiscall winIVRCompositor_IVRCompositor_007_WaitGetPoses(winIVRCompositor_IVRCompositor_007 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_Submit, 28) +VRCompositorError __thiscall winIVRCompositor_IVRCompositor_007_Submit(winIVRCompositor_IVRCompositor_007 *_this, Hmd_Eye eEye, GraphicsAPIConvention eTextureType, void * pTexture, VRTextureBounds_t * pBounds) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_Submit(_this->linux_side, eEye, eTextureType, pTexture, pBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_007_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_007_GetFrameTiming(winIVRCompositor_IVRCompositor_007 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_007_FadeToColor(winIVRCompositor_IVRCompositor_007 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_007_FadeGrid(winIVRCompositor_IVRCompositor_007 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_007_CompositorBringToFront(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_007_CompositorGoToBack(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_007_CompositorQuit(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_007_IsFullscreen(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_007_SetTrackingSpace(winIVRCompositor_IVRCompositor_007 *_this, TrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_007_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_GetTrackingSpace, 4) +TrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_007_GetTrackingSpace(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_007_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_007_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_007_CanRenderScene(winIVRCompositor_IVRCompositor_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_007_CanRenderScene(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_007_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_007, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_GetLastError) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_SetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_GetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_SetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_GetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_007_CanRenderScene) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_007 *create_winIVRCompositor_IVRCompositor_007(void *linux_side) +{ + winIVRCompositor_IVRCompositor_007 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_007)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_007_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_006.h" + +typedef struct __winIVRCompositor_IVRCompositor_006 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_006; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_GetLastError, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_006_GetLastError(winIVRCompositor_IVRCompositor_006 *_this, char * pchBuffer, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_GetLastError(_this->linux_side, pchBuffer, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_SetVSync, 5) +void __thiscall winIVRCompositor_IVRCompositor_006_SetVSync(winIVRCompositor_IVRCompositor_006 *_this, bool bVSync) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_SetVSync(_this->linux_side, bVSync); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_GetVSync, 4) +bool __thiscall winIVRCompositor_IVRCompositor_006_GetVSync(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_GetVSync(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_SetGamma, 8) +void __thiscall winIVRCompositor_IVRCompositor_006_SetGamma(winIVRCompositor_IVRCompositor_006 *_this, float fGamma) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_SetGamma(_this->linux_side, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_GetGamma, 4) +float __thiscall winIVRCompositor_IVRCompositor_006_GetGamma(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_GetGamma(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_SetGraphicsDevice, 16) +void __thiscall winIVRCompositor_IVRCompositor_006_SetGraphicsDevice(winIVRCompositor_IVRCompositor_006 *_this, Compositor_DeviceType eType, void * pDevice) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_SetGraphicsDevice(_this->linux_side, eType, pDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_WaitGetPoses, 28) +VRCompositorError __thiscall winIVRCompositor_IVRCompositor_006_WaitGetPoses(winIVRCompositor_IVRCompositor_006 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_WaitGetPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_Submit, 24) +VRCompositorError __thiscall winIVRCompositor_IVRCompositor_006_Submit(winIVRCompositor_IVRCompositor_006 *_this, Hmd_Eye eEye, void * pTexture, VRTextureBounds_t * pBounds) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_Submit(_this->linux_side, eEye, pTexture, pBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_006_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_006_GetFrameTiming(winIVRCompositor_IVRCompositor_006 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_006_FadeToColor(winIVRCompositor_IVRCompositor_006 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_006_FadeGrid(winIVRCompositor_IVRCompositor_006 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_006_CompositorBringToFront(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_006_CompositorGoToBack(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_006_CompositorQuit(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_006_IsFullscreen(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_006_SetTrackingSpace(winIVRCompositor_IVRCompositor_006 *_this, TrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_006_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_GetTrackingSpace, 4) +TrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_006_GetTrackingSpace(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_006_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_006_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_006_CanRenderScene(winIVRCompositor_IVRCompositor_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_006_CanRenderScene(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_006_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_006, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_GetLastError) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_SetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_GetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_SetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_GetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_SetGraphicsDevice) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_006_CanRenderScene) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_006 *create_winIVRCompositor_IVRCompositor_006(void *linux_side) +{ + winIVRCompositor_IVRCompositor_006 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_006)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_006_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRCompositor_IVRCompositor_005.h" + +typedef struct __winIVRCompositor_IVRCompositor_005 { + vtable_ptr *vtable; + void *linux_side; +} winIVRCompositor_IVRCompositor_005; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_GetLastError, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_005_GetLastError(winIVRCompositor_IVRCompositor_005 *_this, char * pchBuffer, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_GetLastError(_this->linux_side, pchBuffer, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetVSync, 5) +void __thiscall winIVRCompositor_IVRCompositor_005_SetVSync(winIVRCompositor_IVRCompositor_005 *_this, bool bVSync) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetVSync(_this->linux_side, bVSync); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_GetVSync, 4) +bool __thiscall winIVRCompositor_IVRCompositor_005_GetVSync(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_GetVSync(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetGamma, 8) +void __thiscall winIVRCompositor_IVRCompositor_005_SetGamma(winIVRCompositor_IVRCompositor_005 *_this, float fGamma) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetGamma(_this->linux_side, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_GetGamma, 4) +float __thiscall winIVRCompositor_IVRCompositor_005_GetGamma(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_GetGamma(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetGraphicsDevice, 16) +void __thiscall winIVRCompositor_IVRCompositor_005_SetGraphicsDevice(winIVRCompositor_IVRCompositor_005 *_this, Compositor_DeviceType eType, void * pDevice) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetGraphicsDevice(_this->linux_side, eType, pDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_WaitGetPoses, 16) +void __thiscall winIVRCompositor_IVRCompositor_005_WaitGetPoses(winIVRCompositor_IVRCompositor_005 *_this, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_WaitGetPoses(_this->linux_side, pPoseArray, unPoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_Submit, 24) +void __thiscall winIVRCompositor_IVRCompositor_005_Submit(winIVRCompositor_IVRCompositor_005 *_this, Hmd_Eye eEye, void * pTexture, Compositor_TextureBounds * pBounds) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_Submit(_this->linux_side, eEye, pTexture, pBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_005_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_GetOverlayDefaults, 12) +void __thiscall winIVRCompositor_IVRCompositor_005_GetOverlayDefaults(winIVRCompositor_IVRCompositor_005 *_this, Compositor_OverlaySettings * pSettings) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_GetOverlayDefaults(_this->linux_side, pSettings); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetOverlay, 20) +void __thiscall winIVRCompositor_IVRCompositor_005_SetOverlay(winIVRCompositor_IVRCompositor_005 *_this, void * pTexture, Compositor_OverlaySettings * pSettings) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetOverlay(_this->linux_side, pTexture, pSettings); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetOverlayRaw, 32) +void __thiscall winIVRCompositor_IVRCompositor_005_SetOverlayRaw(winIVRCompositor_IVRCompositor_005 *_this, void * buffer, uint32_t width, uint32_t height, uint32_t depth, Compositor_OverlaySettings * pSettings) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetOverlayRaw(_this->linux_side, buffer, width, height, depth, pSettings); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetOverlayFromFile, 20) +void __thiscall winIVRCompositor_IVRCompositor_005_SetOverlayFromFile(winIVRCompositor_IVRCompositor_005 *_this, const char * pchFilePath, Compositor_OverlaySettings * pSettings) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetOverlayFromFile(_this->linux_side, pchFilePath, pSettings); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_ClearOverlay, 4) +void __thiscall winIVRCompositor_IVRCompositor_005_ClearOverlay(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_ClearOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_GetFrameTiming, 16) +bool __thiscall winIVRCompositor_IVRCompositor_005_GetFrameTiming(winIVRCompositor_IVRCompositor_005 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_005_FadeToColor(winIVRCompositor_IVRCompositor_005 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_005_FadeGrid(winIVRCompositor_IVRCompositor_005 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_005_CompositorBringToFront(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_005_CompositorGoToBack(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_005_CompositorQuit(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_005_IsFullscreen(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_ComputeOverlayIntersection, 60) +bool __thiscall winIVRCompositor_IVRCompositor_005_ComputeOverlayIntersection(winIVRCompositor_IVRCompositor_005 *_this, Compositor_OverlaySettings * pSettings, float fAspectRatio, TrackingUniverseOrigin eOrigin, HmdVector3_t vSource, HmdVector3_t vDirection, HmdVector2_t * pvecIntersectionUV, HmdVector3_t * pvecIntersectionTrackingSpace) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_ComputeOverlayIntersection(_this->linux_side, pSettings, fAspectRatio, eOrigin, vSource, vDirection, pvecIntersectionUV, pvecIntersectionTrackingSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_005_SetTrackingSpace(winIVRCompositor_IVRCompositor_005 *_this, TrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_005_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_005_GetTrackingSpace, 4) +TrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_005_GetTrackingSpace(winIVRCompositor_IVRCompositor_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_005_GetTrackingSpace(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_005_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_005, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_GetLastError) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_GetVSync) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_GetGamma) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetGraphicsDevice) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_GetOverlayDefaults) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetOverlay) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_ClearOverlay) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_005_GetTrackingSpace) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_005 *create_winIVRCompositor_IVRCompositor_005(void *linux_side) +{ + winIVRCompositor_IVRCompositor_005 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRCompositor_IVRCompositor_005)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_005_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRDriverManager.c b/vrclient_x64/winIVRDriverManager.c new file mode 100644 index 00000000..824ca550 --- /dev/null +++ b/vrclient_x64/winIVRDriverManager.c @@ -0,0 +1,65 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRDriverManager_IVRDriverManager_001.h" + +typedef struct __winIVRDriverManager_IVRDriverManager_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRDriverManager_IVRDriverManager_001; + +DEFINE_THISCALL_WRAPPER(winIVRDriverManager_IVRDriverManager_001_GetDriverCount, 4) +uint32_t __thiscall winIVRDriverManager_IVRDriverManager_001_GetDriverCount(winIVRDriverManager_IVRDriverManager_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRDriverManager_IVRDriverManager_001_GetDriverCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRDriverManager_IVRDriverManager_001_GetDriverName, 20) +uint32_t __thiscall winIVRDriverManager_IVRDriverManager_001_GetDriverName(winIVRDriverManager_IVRDriverManager_001 *_this, DriverId_t nDriver, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRDriverManager_IVRDriverManager_001_GetDriverName(_this->linux_side, nDriver, pchValue, unBufferSize); +} + +extern vtable_ptr winIVRDriverManager_IVRDriverManager_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRDriverManager_IVRDriverManager_001, + VTABLE_ADD_FUNC(winIVRDriverManager_IVRDriverManager_001_GetDriverCount) + VTABLE_ADD_FUNC(winIVRDriverManager_IVRDriverManager_001_GetDriverName) + ); +#ifndef __GNUC__ +} +#endif + +winIVRDriverManager_IVRDriverManager_001 *create_winIVRDriverManager_IVRDriverManager_001(void *linux_side) +{ + winIVRDriverManager_IVRDriverManager_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRDriverManager_IVRDriverManager_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRDriverManager_IVRDriverManager_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRExtendedDisplay.c b/vrclient_x64/winIVRExtendedDisplay.c new file mode 100644 index 00000000..7be2c2da --- /dev/null +++ b/vrclient_x64/winIVRExtendedDisplay.c @@ -0,0 +1,73 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRExtendedDisplay_IVRExtendedDisplay_001.h" + +typedef struct __winIVRExtendedDisplay_IVRExtendedDisplay_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRExtendedDisplay_IVRExtendedDisplay_001; + +DEFINE_THISCALL_WRAPPER(winIVRExtendedDisplay_IVRExtendedDisplay_001_GetWindowBounds, 36) +void __thiscall winIVRExtendedDisplay_IVRExtendedDisplay_001_GetWindowBounds(winIVRExtendedDisplay_IVRExtendedDisplay_001 *_this, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetWindowBounds(_this->linux_side, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRExtendedDisplay_IVRExtendedDisplay_001_GetEyeOutputViewport, 40) +void __thiscall winIVRExtendedDisplay_IVRExtendedDisplay_001_GetEyeOutputViewport(winIVRExtendedDisplay_IVRExtendedDisplay_001 *_this, EVREye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetEyeOutputViewport(_this->linux_side, eEye, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRExtendedDisplay_IVRExtendedDisplay_001_GetDXGIOutputInfo, 20) +void __thiscall winIVRExtendedDisplay_IVRExtendedDisplay_001_GetDXGIOutputInfo(winIVRExtendedDisplay_IVRExtendedDisplay_001 *_this, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + TRACE("%p\n", _this); + cppIVRExtendedDisplay_IVRExtendedDisplay_001_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex, pnAdapterOutputIndex); +} + +extern vtable_ptr winIVRExtendedDisplay_IVRExtendedDisplay_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRExtendedDisplay_IVRExtendedDisplay_001, + VTABLE_ADD_FUNC(winIVRExtendedDisplay_IVRExtendedDisplay_001_GetWindowBounds) + VTABLE_ADD_FUNC(winIVRExtendedDisplay_IVRExtendedDisplay_001_GetEyeOutputViewport) + VTABLE_ADD_FUNC(winIVRExtendedDisplay_IVRExtendedDisplay_001_GetDXGIOutputInfo) + ); +#ifndef __GNUC__ +} +#endif + +winIVRExtendedDisplay_IVRExtendedDisplay_001 *create_winIVRExtendedDisplay_IVRExtendedDisplay_001(void *linux_side) +{ + winIVRExtendedDisplay_IVRExtendedDisplay_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRExtendedDisplay_IVRExtendedDisplay_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRExtendedDisplay_IVRExtendedDisplay_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRNotifications.c b/vrclient_x64/winIVRNotifications.c new file mode 100644 index 00000000..10a0cd2d --- /dev/null +++ b/vrclient_x64/winIVRNotifications.c @@ -0,0 +1,116 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRNotifications_IVRNotifications_002.h" + +typedef struct __winIVRNotifications_IVRNotifications_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRNotifications_IVRNotifications_002; + +DEFINE_THISCALL_WRAPPER(winIVRNotifications_IVRNotifications_002_CreateNotification, 52) +EVRNotificationError __thiscall winIVRNotifications_IVRNotifications_002_CreateNotification(winIVRNotifications_IVRNotifications_002 *_this, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char * pchText, EVRNotificationStyle style, NotificationBitmap_t * pImage, VRNotificationId * pNotificationId) +{ + TRACE("%p\n", _this); + return cppIVRNotifications_IVRNotifications_002_CreateNotification(_this->linux_side, ulOverlayHandle, ulUserValue, type, pchText, style, pImage, pNotificationId); +} + +DEFINE_THISCALL_WRAPPER(winIVRNotifications_IVRNotifications_002_RemoveNotification, 8) +EVRNotificationError __thiscall winIVRNotifications_IVRNotifications_002_RemoveNotification(winIVRNotifications_IVRNotifications_002 *_this, VRNotificationId notificationId) +{ + TRACE("%p\n", _this); + return cppIVRNotifications_IVRNotifications_002_RemoveNotification(_this->linux_side, notificationId); +} + +extern vtable_ptr winIVRNotifications_IVRNotifications_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRNotifications_IVRNotifications_002, + VTABLE_ADD_FUNC(winIVRNotifications_IVRNotifications_002_CreateNotification) + VTABLE_ADD_FUNC(winIVRNotifications_IVRNotifications_002_RemoveNotification) + ); +#ifndef __GNUC__ +} +#endif + +winIVRNotifications_IVRNotifications_002 *create_winIVRNotifications_IVRNotifications_002(void *linux_side) +{ + winIVRNotifications_IVRNotifications_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRNotifications_IVRNotifications_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRNotifications_IVRNotifications_002_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRNotifications_IVRNotifications_001.h" + +typedef struct __winIVRNotifications_IVRNotifications_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRNotifications_IVRNotifications_001; + +DEFINE_THISCALL_WRAPPER(winIVRNotifications_IVRNotifications_001_GetErrorString, 20) +uint32_t __thiscall winIVRNotifications_IVRNotifications_001_GetErrorString(winIVRNotifications_IVRNotifications_001 *_this, NotificationError_t error, char * pchBuffer, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRNotifications_IVRNotifications_001_GetErrorString(_this->linux_side, error, pchBuffer, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRNotifications_IVRNotifications_001_CreateNotification, 60) +NotificationError_t __thiscall winIVRNotifications_IVRNotifications_001_CreateNotification(winIVRNotifications_IVRNotifications_001 *_this, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, const char * strType, const char * strText, const char * strCategory, NotificationBitmap * photo, VRNotificationId * notificationId) +{ + TRACE("%p\n", _this); + return cppIVRNotifications_IVRNotifications_001_CreateNotification(_this->linux_side, ulOverlayHandle, ulUserValue, strType, strText, strCategory, photo, notificationId); +} + +DEFINE_THISCALL_WRAPPER(winIVRNotifications_IVRNotifications_001_DismissNotification, 8) +NotificationError_t __thiscall winIVRNotifications_IVRNotifications_001_DismissNotification(winIVRNotifications_IVRNotifications_001 *_this, VRNotificationId notificationId) +{ + TRACE("%p\n", _this); + return cppIVRNotifications_IVRNotifications_001_DismissNotification(_this->linux_side, notificationId); +} + +extern vtable_ptr winIVRNotifications_IVRNotifications_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRNotifications_IVRNotifications_001, + VTABLE_ADD_FUNC(winIVRNotifications_IVRNotifications_001_GetErrorString) + VTABLE_ADD_FUNC(winIVRNotifications_IVRNotifications_001_CreateNotification) + VTABLE_ADD_FUNC(winIVRNotifications_IVRNotifications_001_DismissNotification) + ); +#ifndef __GNUC__ +} +#endif + +winIVRNotifications_IVRNotifications_001 *create_winIVRNotifications_IVRNotifications_001(void *linux_side) +{ + winIVRNotifications_IVRNotifications_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRNotifications_IVRNotifications_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRNotifications_IVRNotifications_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVROverlay.c b/vrclient_x64/winIVROverlay.c new file mode 100644 index 00000000..57430a75 --- /dev/null +++ b/vrclient_x64/winIVROverlay.c @@ -0,0 +1,7240 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVROverlay_IVROverlay_017.h" + +typedef struct __winIVROverlay_IVROverlay_017 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_017; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_FindOverlay(winIVROverlay_IVROverlay_017 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_CreateOverlay(winIVROverlay_IVROverlay_017 *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_DestroyOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetHighQualityOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_017_GetHighQualityOverlay(winIVROverlay_IVROverlay_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_017_GetOverlayKey(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_017_GetOverlayName(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayName, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayName(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayName(_this->linux_side, ulOverlayHandle, pchName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayImageData(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_017_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_017 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayRenderingPid(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_017_GetOverlayRenderingPid(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayFlag(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayFlag(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayColor(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayColor(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayAlpha(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayAlpha(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTexelAspect(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, fTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTexelAspect, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTexelAspect(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, pfTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlaySortOrder(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlaySortOrder(_this->linux_side, ulOverlayHandle, unSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlaySortOrder, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlaySortOrder(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlaySortOrder(_this->linux_side, ulOverlayHandle, punSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTextureBounds(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTextureBounds(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayRenderModel, 40) +uint32_t __thiscall winIVROverlay_IVROverlay_017_GetOverlayRenderModel(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayRenderModel(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pColor, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayRenderModel, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayRenderModel(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayRenderModel(_this->linux_side, ulOverlayHandle, pchRenderModel, pColor); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTransformType(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTransformOverlayRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTransformOverlayRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_ShowOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_HideOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_017_IsOverlayVisible(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_017_PollNextOverlayEvent(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1011 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayInputMethod(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayInputMethod(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayMouseScale(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayMouseScale(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_017_ComputeOverlayIntersection(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_017_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_017_IsHoverTargetOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_017_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayNeighbor(winIVROverlay_IVROverlay_017 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_017 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayDualAnalogTransform, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayDualAnalogTransform(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * vCenter, float fRadius) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayDualAnalogTransform(_this->linux_side, ulOverlay, eWhich, vCenter, fRadius); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayDualAnalogTransform, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayDualAnalogTransform(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayDualAnalogTransform(_this->linux_side, ulOverlay, eWhich, pvCenter, pfRadius); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayTexture(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_ClearOverlayTexture(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayRaw(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayFromFile(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTexture, 76) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTexture(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPIType, pColorSpace, pTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ReleaseNativeOverlayHandle, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayTextureSize, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayTextureSize(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_CreateDashboardOverlay(winIVROverlay_IVROverlay_017 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_017_IsDashboardVisible(winIVROverlay_IVROverlay_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_017_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_017_ShowDashboard(winIVROverlay_IVROverlay_017 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_017_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_017_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_ShowKeyboard(winIVROverlay_IVROverlay_017 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_017_GetKeyboardText(winIVROverlay_IVROverlay_017 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_017_HideKeyboard(winIVROverlay_IVROverlay_017 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_017_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_017_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_017 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_017_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_017_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_017_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_SetOverlayIntersectionMask, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_SetOverlayIntersectionMask(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_SetOverlayIntersectionMask(_this->linux_side, ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_GetOverlayFlags, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_017_GetOverlayFlags(winIVROverlay_IVROverlay_017 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_GetOverlayFlags(_this->linux_side, ulOverlayHandle, pFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_ShowMessageOverlay, 52) +VRMessageOverlayResponse __thiscall winIVROverlay_IVROverlay_017_ShowMessageOverlay(winIVROverlay_IVROverlay_017 *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_017_ShowMessageOverlay(_this->linux_side, pchText, pchCaption, pchButton0Text, pchButton1Text, pchButton2Text, pchButton3Text); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_017_CloseMessageOverlay, 4) +void __thiscall winIVROverlay_IVROverlay_017_CloseMessageOverlay(winIVROverlay_IVROverlay_017 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_017_CloseMessageOverlay(_this->linux_side); +} + +extern vtable_ptr winIVROverlay_IVROverlay_017_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_017, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayRenderModel) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayRenderModel) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayDualAnalogTransform) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayDualAnalogTransform) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetKeyboardPositionForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_SetOverlayIntersectionMask) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_GetOverlayFlags) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_ShowMessageOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_017_CloseMessageOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_017 *create_winIVROverlay_IVROverlay_017(void *linux_side) +{ + winIVROverlay_IVROverlay_017 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_017)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_017_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_016.h" + +typedef struct __winIVROverlay_IVROverlay_016 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_016; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_FindOverlay(winIVROverlay_IVROverlay_016 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_CreateOverlay(winIVROverlay_IVROverlay_016 *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_DestroyOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetHighQualityOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_016_GetHighQualityOverlay(winIVROverlay_IVROverlay_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_016_GetOverlayKey(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_016_GetOverlayName(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayName, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayName(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayName(_this->linux_side, ulOverlayHandle, pchName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayImageData(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_016_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_016 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayRenderingPid(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_016_GetOverlayRenderingPid(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayFlag(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayFlag(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayColor(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayColor(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayAlpha(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayAlpha(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTexelAspect(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, fTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTexelAspect, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTexelAspect(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, pfTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlaySortOrder(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlaySortOrder(_this->linux_side, ulOverlayHandle, unSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlaySortOrder, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlaySortOrder(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlaySortOrder(_this->linux_side, ulOverlayHandle, punSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTextureBounds(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTextureBounds(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayRenderModel, 40) +uint32_t __thiscall winIVROverlay_IVROverlay_016_GetOverlayRenderModel(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayRenderModel(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pColor, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayRenderModel, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayRenderModel(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayRenderModel(_this->linux_side, ulOverlayHandle, pchRenderModel, pColor); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTransformType(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTransformOverlayRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTransformOverlayRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_ShowOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_HideOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_016_IsOverlayVisible(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_016_PollNextOverlayEvent(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1010 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayInputMethod(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayInputMethod(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayMouseScale(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayMouseScale(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_016_ComputeOverlayIntersection(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_016_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_016_IsHoverTargetOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_016_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayNeighbor(winIVROverlay_IVROverlay_016 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_016 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayTexture(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_ClearOverlayTexture(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayRaw(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayFromFile(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTexture, 76) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTexture(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPIType, pColorSpace, pTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ReleaseNativeOverlayHandle, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayTextureSize, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayTextureSize(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_CreateDashboardOverlay(winIVROverlay_IVROverlay_016 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_016_IsDashboardVisible(winIVROverlay_IVROverlay_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_016_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_016_ShowDashboard(winIVROverlay_IVROverlay_016 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_016_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_016_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_ShowKeyboard(winIVROverlay_IVROverlay_016 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_016_GetKeyboardText(winIVROverlay_IVROverlay_016 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_016_HideKeyboard(winIVROverlay_IVROverlay_016 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_016_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_016_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_016 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_016_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_016_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_016_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_SetOverlayIntersectionMask, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_SetOverlayIntersectionMask(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_SetOverlayIntersectionMask(_this->linux_side, ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_GetOverlayFlags, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_016_GetOverlayFlags(winIVROverlay_IVROverlay_016 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_GetOverlayFlags(_this->linux_side, ulOverlayHandle, pFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_ShowMessageOverlay, 52) +VRMessageOverlayResponse __thiscall winIVROverlay_IVROverlay_016_ShowMessageOverlay(winIVROverlay_IVROverlay_016 *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_016_ShowMessageOverlay(_this->linux_side, pchText, pchCaption, pchButton0Text, pchButton1Text, pchButton2Text, pchButton3Text); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_016_CloseMessageOverlay, 4) +void __thiscall winIVROverlay_IVROverlay_016_CloseMessageOverlay(winIVROverlay_IVROverlay_016 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_016_CloseMessageOverlay(_this->linux_side); +} + +extern vtable_ptr winIVROverlay_IVROverlay_016_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_016, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayRenderModel) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayRenderModel) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetKeyboardPositionForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_SetOverlayIntersectionMask) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_GetOverlayFlags) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_ShowMessageOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_016_CloseMessageOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_016 *create_winIVROverlay_IVROverlay_016(void *linux_side) +{ + winIVROverlay_IVROverlay_016 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_016)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_016_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_014.h" + +typedef struct __winIVROverlay_IVROverlay_014 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_014; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_FindOverlay(winIVROverlay_IVROverlay_014 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_CreateOverlay(winIVROverlay_IVROverlay_014 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_DestroyOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetHighQualityOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_014_GetHighQualityOverlay(winIVROverlay_IVROverlay_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_014_GetOverlayKey(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_014_GetOverlayName(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayImageData(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_014_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_014 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayRenderingPid(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_014_GetOverlayRenderingPid(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayFlag(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayFlag(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayColor(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayColor(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayAlpha(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayAlpha(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTexelAspect(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, fTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTexelAspect, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTexelAspect(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, pfTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlaySortOrder(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlaySortOrder(_this->linux_side, ulOverlayHandle, unSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlaySortOrder, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlaySortOrder(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlaySortOrder(_this->linux_side, ulOverlayHandle, punSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTextureBounds(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTextureBounds(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTransformType(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_ShowOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_HideOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_014_IsOverlayVisible(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_014_PollNextOverlayEvent(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_106 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayInputMethod(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayInputMethod(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayMouseScale(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayMouseScale(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_014_ComputeOverlayIntersection(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_014_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_014_IsHoverTargetOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_014_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayNeighbor(winIVROverlay_IVROverlay_014 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_014 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayTexture(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_ClearOverlayTexture(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayRaw(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayFromFile(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTexture, 76) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTexture(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPIType, pColorSpace, pTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ReleaseNativeOverlayHandle, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayTextureSize, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayTextureSize(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_CreateDashboardOverlay(winIVROverlay_IVROverlay_014 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_014_IsDashboardVisible(winIVROverlay_IVROverlay_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_014_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_014_ShowDashboard(winIVROverlay_IVROverlay_014 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_014_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_014_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_ShowKeyboard(winIVROverlay_IVROverlay_014 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_014_GetKeyboardText(winIVROverlay_IVROverlay_014 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_014_HideKeyboard(winIVROverlay_IVROverlay_014 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_014_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_014_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_014 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_014_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_014_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_014_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_SetOverlayIntersectionMask, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_SetOverlayIntersectionMask(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_SetOverlayIntersectionMask(_this->linux_side, ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_GetOverlayFlags, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_014_GetOverlayFlags(winIVROverlay_IVROverlay_014 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_GetOverlayFlags(_this->linux_side, ulOverlayHandle, pFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_014_ShowMessageOverlay, 52) +VRMessageOverlayResponse __thiscall winIVROverlay_IVROverlay_014_ShowMessageOverlay(winIVROverlay_IVROverlay_014 *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_014_ShowMessageOverlay(_this->linux_side, pchText, pchCaption, pchButton0Text, pchButton1Text, pchButton2Text, pchButton3Text); +} + +extern vtable_ptr winIVROverlay_IVROverlay_014_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_014, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetKeyboardPositionForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_SetOverlayIntersectionMask) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_GetOverlayFlags) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_014_ShowMessageOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_014 *create_winIVROverlay_IVROverlay_014(void *linux_side) +{ + winIVROverlay_IVROverlay_014 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_014)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_014_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_013.h" + +typedef struct __winIVROverlay_IVROverlay_013 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_013; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_FindOverlay(winIVROverlay_IVROverlay_013 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_CreateOverlay(winIVROverlay_IVROverlay_013 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_DestroyOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetHighQualityOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_013_GetHighQualityOverlay(winIVROverlay_IVROverlay_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_013_GetOverlayKey(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_013_GetOverlayName(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayImageData(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_013_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_013 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayRenderingPid(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_013_GetOverlayRenderingPid(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayFlag(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayFlag(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayColor(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayColor(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayAlpha(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayAlpha(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTexelAspect(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, fTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTexelAspect, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTexelAspect(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, pfTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlaySortOrder(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlaySortOrder(_this->linux_side, ulOverlayHandle, unSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlaySortOrder, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlaySortOrder(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlaySortOrder(_this->linux_side, ulOverlayHandle, punSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTextureBounds(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTextureBounds(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTransformType(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_ShowOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_HideOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_013_IsOverlayVisible(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_013_PollNextOverlayEvent(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_104 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayInputMethod(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayInputMethod(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayMouseScale(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayMouseScale(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_013_ComputeOverlayIntersection(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_013_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_013_IsHoverTargetOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_013_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayNeighbor(winIVROverlay_IVROverlay_013 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_013 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayTexture(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_ClearOverlayTexture(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayRaw(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayFromFile(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTexture, 68) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTexture(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPI, pColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ReleaseNativeOverlayHandle, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetOverlayTextureSize, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetOverlayTextureSize(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_CreateDashboardOverlay(winIVROverlay_IVROverlay_013 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_013_IsDashboardVisible(winIVROverlay_IVROverlay_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_013_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_013_ShowDashboard(winIVROverlay_IVROverlay_013 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_013_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_013_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_013 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_ShowKeyboard(winIVROverlay_IVROverlay_013 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_013_GetKeyboardText(winIVROverlay_IVROverlay_013 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_013_HideKeyboard(winIVROverlay_IVROverlay_013 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_013_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_013_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_013 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_013_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_013_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_013_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_013_SetOverlayIntersectionMask, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_013_SetOverlayIntersectionMask(winIVROverlay_IVROverlay_013 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_013_SetOverlayIntersectionMask(_this->linux_side, ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); +} + +extern vtable_ptr winIVROverlay_IVROverlay_013_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_013, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetKeyboardPositionForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_013_SetOverlayIntersectionMask) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_013 *create_winIVROverlay_IVROverlay_013(void *linux_side) +{ + winIVROverlay_IVROverlay_013 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_013)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_013_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_012.h" + +typedef struct __winIVROverlay_IVROverlay_012 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_012; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_FindOverlay(winIVROverlay_IVROverlay_012 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_CreateOverlay(winIVROverlay_IVROverlay_012 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_DestroyOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetHighQualityOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_012_GetHighQualityOverlay(winIVROverlay_IVROverlay_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_012_GetOverlayKey(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_012_GetOverlayName(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayImageData(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_012_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_012 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayRenderingPid(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_012_GetOverlayRenderingPid(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayFlag(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayFlag(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayColor(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayColor(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayAlpha(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayAlpha(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayTextureBounds(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTextureBounds(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTransformType(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_ShowOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_HideOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_012_IsOverlayVisible(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_012_PollNextOverlayEvent(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_101 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayInputMethod(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayInputMethod(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayMouseScale(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayMouseScale(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_012_ComputeOverlayIntersection(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_012_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_012_IsHoverTargetOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_012_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayNeighbor(winIVROverlay_IVROverlay_012 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_012 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayTexture(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_ClearOverlayTexture(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayRaw(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetOverlayFromFile(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTexture, 68) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTexture(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPI, pColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ReleaseNativeOverlayHandle, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetOverlayTextureSize, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetOverlayTextureSize(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_CreateDashboardOverlay(winIVROverlay_IVROverlay_012 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_012_IsDashboardVisible(winIVROverlay_IVROverlay_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_012_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_012_ShowDashboard(winIVROverlay_IVROverlay_012 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_012_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_012_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_ShowKeyboard(winIVROverlay_IVROverlay_012 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_012_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_012_GetKeyboardText(winIVROverlay_IVROverlay_012 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_012_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_012_HideKeyboard(winIVROverlay_IVROverlay_012 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_012_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_012_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_012 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_012_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_012_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_012_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_012 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_012_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +extern vtable_ptr winIVROverlay_IVROverlay_012_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_012, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_012_SetKeyboardPositionForOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_012 *create_winIVROverlay_IVROverlay_012(void *linux_side) +{ + winIVROverlay_IVROverlay_012 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_012)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_012_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_011.h" + +typedef struct __winIVROverlay_IVROverlay_011 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_011; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_FindOverlay(winIVROverlay_IVROverlay_011 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_CreateOverlay(winIVROverlay_IVROverlay_011 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_DestroyOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetHighQualityOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_011_GetHighQualityOverlay(winIVROverlay_IVROverlay_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_011_GetOverlayKey(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_011_GetOverlayName(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayImageData(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_011_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_011 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayRenderingPid(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_011_GetOverlayRenderingPid(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayFlag(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayFlag(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayColor(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayColor(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayAlpha(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayAlpha(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayTextureBounds(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTextureBounds(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTransformType(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_ShowOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_HideOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_011_IsOverlayVisible(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_011_PollNextOverlayEvent(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0920 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayInputMethod(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayInputMethod(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayMouseScale(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayMouseScale(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_011_ComputeOverlayIntersection(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_011_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_011_IsHoverTargetOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_011_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayNeighbor(winIVROverlay_IVROverlay_011 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_011 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayTexture(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_ClearOverlayTexture(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayRaw(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetOverlayFromFile(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetOverlayTexture, 68) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetOverlayTexture(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPI, pColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ReleaseNativeOverlayHandle, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_CreateDashboardOverlay(winIVROverlay_IVROverlay_011 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_011_IsDashboardVisible(winIVROverlay_IVROverlay_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_011_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_011_ShowDashboard(winIVROverlay_IVROverlay_011 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_011_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_011_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_ShowKeyboard(winIVROverlay_IVROverlay_011 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_011_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_011_GetKeyboardText(winIVROverlay_IVROverlay_011 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_011_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_011_HideKeyboard(winIVROverlay_IVROverlay_011 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_011_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_011_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_011 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_011_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_011_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_011_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_011 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_011_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +extern vtable_ptr winIVROverlay_IVROverlay_011_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_011, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_011_SetKeyboardPositionForOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_011 *create_winIVROverlay_IVROverlay_011(void *linux_side) +{ + winIVROverlay_IVROverlay_011 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_011)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_011_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_010.h" + +typedef struct __winIVROverlay_IVROverlay_010 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_010; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_FindOverlay(winIVROverlay_IVROverlay_010 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_CreateOverlay(winIVROverlay_IVROverlay_010 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_DestroyOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetHighQualityOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_010_GetHighQualityOverlay(winIVROverlay_IVROverlay_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_010_GetOverlayKey(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_010_GetOverlayName(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayImageData(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_010_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_010 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayFlag(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayFlag(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayColor(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayColor(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayAlpha(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayAlpha(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayTextureBounds(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayTextureBounds(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayTransformType(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceComponent, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_ShowOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_HideOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_010_IsOverlayVisible(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_PollNextOverlayEvent, 24) +bool __thiscall winIVROverlay_IVROverlay_010_PollNextOverlayEvent(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0918 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayInputMethod(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayInputMethod(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetOverlayMouseScale(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayMouseScale(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_010_ComputeOverlayIntersection(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_010_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_010_IsHoverTargetOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_010_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayNeighbor(winIVROverlay_IVROverlay_010 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_010 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayTexture(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_ClearOverlayTexture(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayRaw(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetOverlayFromFile(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_CreateDashboardOverlay(winIVROverlay_IVROverlay_010 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_010_IsDashboardVisible(winIVROverlay_IVROverlay_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_010_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_010_ShowDashboard(winIVROverlay_IVROverlay_010 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_010_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_010_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_ShowKeyboard(winIVROverlay_IVROverlay_010 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_010_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_010_GetKeyboardText(winIVROverlay_IVROverlay_010 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_010_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_010_HideKeyboard(winIVROverlay_IVROverlay_010 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_010_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_010_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_010 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_010_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_010_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_010_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_010 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_010_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +extern vtable_ptr winIVROverlay_IVROverlay_010_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_010, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_010_SetKeyboardPositionForOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_010 *create_winIVROverlay_IVROverlay_010(void *linux_side) +{ + winIVROverlay_IVROverlay_010 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_010)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_010_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_008.h" + +typedef struct __winIVROverlay_IVROverlay_008 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_008; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_FindOverlay(winIVROverlay_IVROverlay_008 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_CreateOverlay(winIVROverlay_IVROverlay_008 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_DestroyOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetHighQualityOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_008_GetHighQualityOverlay(winIVROverlay_IVROverlay_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_008_GetOverlayKey(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_008_GetOverlayName(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayImageData(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_008_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_008 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayFlag(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayFlag(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayColor(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayColor(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayAlpha(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayAlpha(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayTextureBounds(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayTextureBounds(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayTransformType(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_ShowOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_HideOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_008_IsOverlayVisible(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetTransformForOverlayCoordinates, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_008_PollNextOverlayEvent(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0914 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayInputMethod(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayInputMethod(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetOverlayMouseScale(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayMouseScale(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_008_ComputeOverlayIntersection(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_008_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_008_IsHoverTargetOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_008_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayNeighbor(winIVROverlay_IVROverlay_008 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_008 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayTexture(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_ClearOverlayTexture(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayRaw(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetOverlayFromFile(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_CreateDashboardOverlay(winIVROverlay_IVROverlay_008 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_008_IsDashboardVisible(winIVROverlay_IVROverlay_008 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_008_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_008_ShowDashboard(winIVROverlay_IVROverlay_008 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_008_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_ShowKeyboard(winIVROverlay_IVROverlay_008 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_008_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_008_GetKeyboardText(winIVROverlay_IVROverlay_008 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_008_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_008_HideKeyboard(winIVROverlay_IVROverlay_008 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_008_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetKeyboardTransformAbsolute, 16) +void __thiscall winIVROverlay_IVROverlay_008_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_008 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_008_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_008_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_008_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_008 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_008_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +extern vtable_ptr winIVROverlay_IVROverlay_008_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_008, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_008_SetKeyboardPositionForOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_008 *create_winIVROverlay_IVROverlay_008(void *linux_side) +{ + winIVROverlay_IVROverlay_008 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_008)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_008_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_007.h" + +typedef struct __winIVROverlay_IVROverlay_007 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_007; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_FindOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_FindOverlay(winIVROverlay_IVROverlay_007 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_CreateOverlay, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_CreateOverlay(winIVROverlay_IVROverlay_007 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_DestroyOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetHighQualityOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetHighQualityOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_007_GetHighQualityOverlay(winIVROverlay_IVROverlay_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_007_GetOverlayKey(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_007_GetOverlayName(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayImageData, 40) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayImageData(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_007_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_007 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayFlag(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayFlag, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayFlag(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayColor(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayColor, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayColor(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayAlpha(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayAlpha, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayAlpha(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayWidthInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayAutoCurveDistanceRangeInMeters, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayAutoCurveDistanceRangeInMeters, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayTextureColorSpace, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayTextureBounds(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayTextureBounds, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayTextureBounds(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayTransformType, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayTransformType(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayTransformAbsolute, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayTransformAbsolute, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayTransformTrackedDeviceRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayTransformTrackedDeviceRelative, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_ShowOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_HideOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_007_IsOverlayVisible(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_007_PollNextOverlayEvent(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0912 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayInputMethod, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayInputMethod(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayInputMethod(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetOverlayMouseScale(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayMouseScale, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayMouseScale(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_007_ComputeOverlayIntersection(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_007_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_007_IsHoverTargetOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetGamepadFocusOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_007_GetGamepadFocusOverlay(winIVROverlay_IVROverlay_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetGamepadFocusOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetGamepadFocusOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetGamepadFocusOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulNewFocusOverlay) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetGamepadFocusOverlay(_this->linux_side, ulNewFocusOverlay); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayNeighbor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayNeighbor(winIVROverlay_IVROverlay_007 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayNeighbor(_this->linux_side, eDirection, ulFrom, ulTo); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_MoveGamepadFocusToNeighbor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_MoveGamepadFocusToNeighbor(winIVROverlay_IVROverlay_007 *_this, EOverlayDirection eDirection, VROverlayHandle_t ulFrom) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_MoveGamepadFocusToNeighbor(_this->linux_side, eDirection, ulFrom); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayTexture, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayTexture(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_ClearOverlayTexture(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayRaw, 32) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayRaw(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetOverlayFromFile, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetOverlayFromFile(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_CreateDashboardOverlay, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_CreateDashboardOverlay(winIVROverlay_IVROverlay_007 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_007_IsDashboardVisible(winIVROverlay_IVROverlay_007 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_007_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetDashboardOverlaySceneProcess, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_007_ShowDashboard(winIVROverlay_IVROverlay_007 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_007_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_ShowKeyboard, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_ShowKeyboard(winIVROverlay_IVROverlay_007 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_ShowKeyboardForOverlay, 49) +EVROverlayError __thiscall winIVROverlay_IVROverlay_007_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_007 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_007_GetKeyboardText(winIVROverlay_IVROverlay_007 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_007_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_007_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_007_HideKeyboard(winIVROverlay_IVROverlay_007 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_007_HideKeyboard(_this->linux_side); +} + +extern vtable_ptr winIVROverlay_IVROverlay_007_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_007, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetGamepadFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_MoveGamepadFocusToNeighbor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_007_HideKeyboard) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_007 *create_winIVROverlay_IVROverlay_007(void *linux_side) +{ + winIVROverlay_IVROverlay_007 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_007)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_007_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_005.h" + +typedef struct __winIVROverlay_IVROverlay_005 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_005; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_FindOverlay, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_FindOverlay(winIVROverlay_IVROverlay_005 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_CreateOverlay, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_CreateOverlay(winIVROverlay_IVROverlay_005 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_DestroyOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_DestroyOverlay(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetHighQualityOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetHighQualityOverlay(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_005_GetHighQualityOverlay(winIVROverlay_IVROverlay_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_005_GetOverlayKey(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_005_GetOverlayName(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayImageData, 40) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayImageData(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_005_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_005 *_this, VROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayFlag, 17) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayFlag(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayFlag, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayFlag(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayColor, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayColor(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayColor, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayColor(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayAlpha, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayAlpha(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayAlpha, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayAlpha(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayGamma, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayGamma(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayGamma(_this->linux_side, ulOverlayHandle, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayGamma, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayGamma(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayGamma(_this->linux_side, ulOverlayHandle, pfGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayWidthInMeters, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayWidthInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayAutoCurveDistanceRangeInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayAutoCurveDistanceRangeInMeters, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayTextureBounds(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayTextureBounds(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayTransformType, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayTransformType(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayTransformAbsolute, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayTransformAbsolute, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayTransformTrackedDeviceRelative, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayTransformTrackedDeviceRelative, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_ShowOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_ShowOverlay(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_HideOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_HideOverlay(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_005_IsOverlayVisible(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_005_PollNextOverlayEvent(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_0910 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayInputMethod, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayInputMethod(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayInputMethod, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayInputMethod(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetOverlayMouseScale(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayMouseScale(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_005_ComputeOverlayIntersection(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_005_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_IsFocusOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_005_IsFocusOverlay(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_IsFocusOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayTexture, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayTexture(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayTexture(_this->linux_side, ulOverlayHandle, eTextureType, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_ClearOverlayTexture, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_ClearOverlayTexture(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayRaw, 32) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayRaw(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetOverlayFromFile, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetOverlayFromFile(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_CreateDashboardOverlay, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_CreateDashboardOverlay(winIVROverlay_IVROverlay_005 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_005_IsDashboardVisible(winIVROverlay_IVROverlay_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_005_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_SetDashboardOverlaySceneProcess, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetDashboardOverlaySceneProcess, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_005 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_005_ShowDashboard(winIVROverlay_IVROverlay_005 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_005_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_ShowKeyboard, 33) +VROverlayError __thiscall winIVROverlay_IVROverlay_005_ShowKeyboard(winIVROverlay_IVROverlay_005 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_GetKeyboardText, 16) +uint32_t __thiscall winIVROverlay_IVROverlay_005_GetKeyboardText(winIVROverlay_IVROverlay_005 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_005_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_005_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_005_HideKeyboard(winIVROverlay_IVROverlay_005 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_005_HideKeyboard(_this->linux_side); +} + +extern vtable_ptr winIVROverlay_IVROverlay_005_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_005, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_IsFocusOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_005_HideKeyboard) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_005 *create_winIVROverlay_IVROverlay_005(void *linux_side) +{ + winIVROverlay_IVROverlay_005 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_005)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_005_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_004.h" + +typedef struct __winIVROverlay_IVROverlay_004 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_004; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_FindOverlay, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_FindOverlay(winIVROverlay_IVROverlay_004 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_CreateOverlay, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_CreateOverlay(winIVROverlay_IVROverlay_004 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_DestroyOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_DestroyOverlay(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetHighQualityOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetHighQualityOverlay(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_004_GetHighQualityOverlay(winIVROverlay_IVROverlay_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_004_GetOverlayKey(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_004_GetOverlayName(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayImageData, 40) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayImageData(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_004_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_004 *_this, VROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayFlag, 17) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayFlag(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayFlag, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayFlag(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayColor, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayColor(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayColor, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayColor(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayAlpha, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayAlpha(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayAlpha, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayAlpha(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayGamma, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayGamma(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayGamma(_this->linux_side, ulOverlayHandle, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayGamma, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayGamma(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayGamma(_this->linux_side, ulOverlayHandle, pfGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayWidthInMeters, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayWidthInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayAutoCurveDistanceRangeInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayAutoCurveDistanceRangeInMeters, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayAutoCurveDistanceRangeInMeters(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayAutoCurveDistanceRangeInMeters(_this->linux_side, ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayTextureBounds(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayTextureBounds(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayTransformType, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayTransformType(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayTransformAbsolute, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayTransformAbsolute, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayTransformTrackedDeviceRelative, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayTransformTrackedDeviceRelative, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_ShowOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_ShowOverlay(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_HideOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_HideOverlay(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_004_IsOverlayVisible(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_004_PollNextOverlayEvent(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_098 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayInputMethod, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayInputMethod(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayInputMethod, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayInputMethod(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetOverlayMouseScale(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayMouseScale(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_004_ComputeOverlayIntersection(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_004_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayTexture, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayTexture(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayTexture(_this->linux_side, ulOverlayHandle, eTextureType, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_ClearOverlayTexture, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_ClearOverlayTexture(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayRaw, 32) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayRaw(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetOverlayFromFile, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetOverlayFromFile(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_CreateDashboardOverlay, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_CreateDashboardOverlay(winIVROverlay_IVROverlay_004 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_004_IsDashboardVisible(winIVROverlay_IVROverlay_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_004_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_SetDashboardOverlaySceneProcess, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_GetDashboardOverlaySceneProcess, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_004_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_004 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_004_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_004_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_004_ShowDashboard(winIVROverlay_IVROverlay_004 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_004_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +extern vtable_ptr winIVROverlay_IVROverlay_004_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_004, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayAutoCurveDistanceRangeInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_004_ShowDashboard) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_004 *create_winIVROverlay_IVROverlay_004(void *linux_side) +{ + winIVROverlay_IVROverlay_004 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_004)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_004_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_003.h" + +typedef struct __winIVROverlay_IVROverlay_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_003; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_FindOverlay, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_FindOverlay(winIVROverlay_IVROverlay_003 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_CreateOverlay, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_CreateOverlay(winIVROverlay_IVROverlay_003 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_DestroyOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_DestroyOverlay(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetHighQualityOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetHighQualityOverlay(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_003_GetHighQualityOverlay(winIVROverlay_IVROverlay_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayKey, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_003_GetOverlayKey(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayName, 32) +uint32_t __thiscall winIVROverlay_IVROverlay_003_GetOverlayName(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, VROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayImageData, 40) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayImageData(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_003_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_003 *_this, VROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayFlag, 17) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayFlag(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayFlag, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayFlag(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayColor, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayColor(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayColor, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayColor(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayAlpha, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayAlpha(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayAlpha, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayAlpha(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayGamma, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayGamma(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayGamma(_this->linux_side, ulOverlayHandle, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayGamma, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayGamma(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayGamma(_this->linux_side, ulOverlayHandle, pfGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayWidthInMeters, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayWidthInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayTextureBounds(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayTextureBounds(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayTransformType, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayTransformType(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayTransformAbsolute, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayTransformAbsolute, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayTransformTrackedDeviceRelative, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayTransformTrackedDeviceRelative, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_ShowOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_ShowOverlay(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_HideOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_HideOverlay(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_003_IsOverlayVisible(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_003_PollNextOverlayEvent(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_097 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayInputMethod, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayInputMethod(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayInputMethod, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayInputMethod(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetOverlayMouseScale(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayMouseScale(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_003_ComputeOverlayIntersection(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_003_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayTexture, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayTexture(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayTexture(_this->linux_side, ulOverlayHandle, eTextureType, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_ClearOverlayTexture, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_ClearOverlayTexture(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayRaw, 32) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayRaw(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetOverlayFromFile, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetOverlayFromFile(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_CreateDashboardOverlay, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_CreateDashboardOverlay(winIVROverlay_IVROverlay_003 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_003_IsDashboardVisible(winIVROverlay_IVROverlay_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_003_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_SetDashboardOverlaySceneProcess, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_GetDashboardOverlaySceneProcess, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_003_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_003 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_003_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_003_ShowDashboard, 12) +void __thiscall winIVROverlay_IVROverlay_003_ShowDashboard(winIVROverlay_IVROverlay_003 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_003_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +extern vtable_ptr winIVROverlay_IVROverlay_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_003, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_003_ShowDashboard) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_003 *create_winIVROverlay_IVROverlay_003(void *linux_side) +{ + winIVROverlay_IVROverlay_003 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_003_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_002.h" + +typedef struct __winIVROverlay_IVROverlay_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_002; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_FindOverlay, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_FindOverlay(winIVROverlay_IVROverlay_002 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_CreateOverlay, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_CreateOverlay(winIVROverlay_IVROverlay_002 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_DestroyOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_DestroyOverlay(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetHighQualityOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetHighQualityOverlay(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_002_GetHighQualityOverlay(winIVROverlay_IVROverlay_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_002_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_002 *_this, VROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayFlag, 17) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayFlag(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayFlag, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayFlag(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayColor, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayColor(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayColor, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayColor(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayAlpha, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayAlpha(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayAlpha, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayAlpha(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayGamma, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayGamma(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayGamma(_this->linux_side, ulOverlayHandle, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayGamma, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayGamma(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayGamma(_this->linux_side, ulOverlayHandle, pfGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayWidthInMeters, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayWidthInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayTextureBounds(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayTextureBounds(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayTransformType, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayTransformType(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayTransformAbsolute, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayTransformAbsolute, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayTransformTrackedDeviceRelative, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayTransformTrackedDeviceRelative, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_ShowOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_ShowOverlay(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_HideOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_HideOverlay(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_002_IsOverlayVisible(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_002_PollNextOverlayEvent(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_094 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayInputMethod, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayInputMethod(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayInputMethod, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayInputMethod(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetOverlayMouseScale(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayMouseScale(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_002_ComputeOverlayIntersection(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_002_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayTexture, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayTexture(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, GraphicsAPIConvention eTextureType, void * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayTexture(_this->linux_side, ulOverlayHandle, eTextureType, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_ClearOverlayTexture, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_ClearOverlayTexture(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayRaw, 32) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayRaw(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetOverlayFromFile, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetOverlayFromFile(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_CreateDashboardOverlay, 36) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_CreateDashboardOverlay(winIVROverlay_IVROverlay_002 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_002_IsDashboardVisible(winIVROverlay_IVROverlay_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_002_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_SetDashboardOverlaySceneProcess, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_002_GetDashboardOverlaySceneProcess, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_002_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_002 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_002_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +extern vtable_ptr winIVROverlay_IVROverlay_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_002, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_002_GetDashboardOverlaySceneProcess) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_002 *create_winIVROverlay_IVROverlay_002(void *linux_side) +{ + winIVROverlay_IVROverlay_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_002_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVROverlay_IVROverlay_001.h" + +typedef struct __winIVROverlay_IVROverlay_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_001; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_FindOverlay, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_FindOverlay(winIVROverlay_IVROverlay_001 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_CreateOverlay, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_CreateOverlay(winIVROverlay_IVROverlay_001 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_DestroyOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_DestroyOverlay(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetHighQualityOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetHighQualityOverlay(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetHighQualityOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetHighQualityOverlay, 4) +VROverlayHandle_t __thiscall winIVROverlay_IVROverlay_001_GetHighQualityOverlay(winIVROverlay_IVROverlay_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetHighQualityOverlay(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_001_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_001 *_this, VROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayFlag, 17) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayFlag(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayFlag, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayFlag(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayAlpha, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayAlpha(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayAlpha, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayAlpha(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayGamma, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayGamma(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, float fGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayGamma(_this->linux_side, ulOverlayHandle, fGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayGamma, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayGamma(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, float * pfGamma) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayGamma(_this->linux_side, ulOverlayHandle, pfGamma); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayWidthInMeters, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayWidthInMeters, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayTextureBounds(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayTextureBounds, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayTextureBounds(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayTransformType, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayTransformType(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayTransformAbsolute, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayTransformAbsolute, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, TrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayTransformTrackedDeviceRelative, 24) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayTransformTrackedDeviceRelative, 28) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayVisibility, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayVisibility(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayVisibility * peOverlayVisibility) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayVisibility(_this->linux_side, ulOverlayHandle, peOverlayVisibility); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayVisibility, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayVisibility(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayVisibility eOverlayVisibility) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayVisibility(_this->linux_side, ulOverlayHandle, eOverlayVisibility); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_ShowOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_ShowOverlay(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_HideOverlay, 12) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_HideOverlay(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_001_IsOverlayVisible(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_001_PollNextOverlayEvent(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_092 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayInputMethod, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayInputMethod(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayInputMethod, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayInputMethod(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetOverlayMouseScale(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayMouseScale, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayMouseScale(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_ComputeOverlayIntersection, 28) +bool __thiscall winIVROverlay_IVROverlay_001_ComputeOverlayIntersection(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_HandleControllerOverlayInteractionAsMouse, 16) +bool __thiscall winIVROverlay_IVROverlay_001_HandleControllerOverlayInteractionAsMouse(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_HandleControllerOverlayInteractionAsMouse(_this->linux_side, ulOverlayHandle, unControllerDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayTexture, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayTexture(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, void * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayRaw, 32) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayRaw(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetOverlayFromFile, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetOverlayFromFile(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_IsSystemOverlayVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_001_IsSystemOverlayVisible(winIVROverlay_IVROverlay_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_IsSystemOverlayVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_IsActiveSystemOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_001_IsActiveSystemOverlay(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_IsActiveSystemOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_SetSystemOverlaySceneProcess, 16) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_SetSystemOverlaySceneProcess(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_SetSystemOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_001_GetSystemOverlaySceneProcess, 20) +VROverlayError __thiscall winIVROverlay_IVROverlay_001_GetSystemOverlaySceneProcess(winIVROverlay_IVROverlay_001 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_001_GetSystemOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +extern vtable_ptr winIVROverlay_IVROverlay_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_001, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetHighQualityOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayGamma) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayVisibility) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayVisibility) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_IsSystemOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_IsActiveSystemOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_SetSystemOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_001_GetSystemOverlaySceneProcess) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_001 *create_winIVROverlay_IVROverlay_001(void *linux_side) +{ + winIVROverlay_IVROverlay_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVROverlay_IVROverlay_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRRenderModels.c b/vrclient_x64/winIVRRenderModels.c new file mode 100644 index 00000000..90cf0a8b --- /dev/null +++ b/vrclient_x64/winIVRRenderModels.c @@ -0,0 +1,514 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRRenderModels_IVRRenderModels_005.h" + +typedef struct __winIVRRenderModels_IVRRenderModels_005 { + vtable_ptr *vtable; + void *linux_side; +} winIVRRenderModels_IVRRenderModels_005; + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_LoadRenderModel_Async, 20) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_005_LoadRenderModel_Async(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, winRenderModel_t_1011 ** ppRenderModel) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_LoadRenderModel_Async(_this->linux_side, pchRenderModelName, ppRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_FreeRenderModel, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_005_FreeRenderModel(winIVRRenderModels_IVRRenderModels_005 *_this, winRenderModel_t_1011 * pRenderModel) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_005_FreeRenderModel(_this->linux_side, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_LoadTexture_Async, 16) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_005_LoadTexture_Async(winIVRRenderModels_IVRRenderModels_005 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_1011 ** ppTexture) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_LoadTexture_Async(_this->linux_side, textureId, ppTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_FreeTexture, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_005_FreeTexture(winIVRRenderModels_IVRRenderModels_005 *_this, winRenderModel_TextureMap_t_1011 * pTexture) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_005_FreeTexture(_this->linux_side, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_LoadTextureD3D11_Async, 24) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_005_LoadTextureD3D11_Async(winIVRRenderModels_IVRRenderModels_005 *_this, TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_LoadTextureD3D11_Async(_this->linux_side, textureId, pD3D11Device, ppD3D11Texture2D); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_LoadIntoTextureD3D11_Async, 16) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_005_LoadIntoTextureD3D11_Async(winIVRRenderModels_IVRRenderModels_005 *_this, TextureID_t textureId, void * pDstTexture) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_LoadIntoTextureD3D11_Async(_this->linux_side, textureId, pDstTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_FreeTextureD3D11, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_005_FreeTextureD3D11(winIVRRenderModels_IVRRenderModels_005 *_this, void * pD3D11Texture2D) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_005_FreeTextureD3D11(_this->linux_side, pD3D11Texture2D); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetRenderModelName, 20) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetRenderModelName(winIVRRenderModels_IVRRenderModels_005 *_this, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetRenderModelName(_this->linux_side, unRenderModelIndex, pchRenderModelName, unRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetRenderModelCount, 4) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetRenderModelCount(winIVRRenderModels_IVRRenderModels_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetRenderModelCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetComponentCount, 12) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetComponentCount(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetComponentCount(_this->linux_side, pchRenderModelName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetComponentName, 28) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetComponentName(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetComponentName(_this->linux_side, pchRenderModelName, unComponentIndex, pchComponentName, unComponentNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetComponentButtonMask, 20) +uint64_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetComponentButtonMask(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetComponentButtonMask(_this->linux_side, pchRenderModelName, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetComponentRenderModelName, 32) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetComponentRenderModelName(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetComponentRenderModelName(_this->linux_side, pchRenderModelName, pchComponentName, pchComponentRenderModelName, unComponentRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetComponentState, 44) +bool __thiscall winIVRRenderModels_IVRRenderModels_005_GetComponentState(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, const char * pchComponentName, VRControllerState_t * pControllerState, RenderModel_ControllerMode_State_t * pState, RenderModel_ComponentState_t * pComponentState) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetComponentState(_this->linux_side, pchRenderModelName, pchComponentName, pControllerState, pState, pComponentState); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_RenderModelHasComponent, 20) +bool __thiscall winIVRRenderModels_IVRRenderModels_005_RenderModelHasComponent(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_RenderModelHasComponent(_this->linux_side, pchRenderModelName, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetRenderModelThumbnailURL, 32) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetRenderModelThumbnailURL(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, char * pchThumbnailURL, uint32_t unThumbnailURLLen, EVRRenderModelError * peError) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetRenderModelThumbnailURL(_this->linux_side, pchRenderModelName, pchThumbnailURL, unThumbnailURLLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetRenderModelOriginalPath, 32) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_005_GetRenderModelOriginalPath(winIVRRenderModels_IVRRenderModels_005 *_this, const char * pchRenderModelName, char * pchOriginalPath, uint32_t unOriginalPathLen, EVRRenderModelError * peError) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetRenderModelOriginalPath(_this->linux_side, pchRenderModelName, pchOriginalPath, unOriginalPathLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_005_GetRenderModelErrorNameFromEnum, 8) +const char * __thiscall winIVRRenderModels_IVRRenderModels_005_GetRenderModelErrorNameFromEnum(winIVRRenderModels_IVRRenderModels_005 *_this, EVRRenderModelError error) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_005_GetRenderModelErrorNameFromEnum(_this->linux_side, error); +} + +extern vtable_ptr winIVRRenderModels_IVRRenderModels_005_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRRenderModels_IVRRenderModels_005, + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_LoadRenderModel_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_FreeRenderModel) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_LoadTexture_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_FreeTexture) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_LoadTextureD3D11_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_LoadIntoTextureD3D11_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_FreeTextureD3D11) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetRenderModelCount) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetComponentCount) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetComponentName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetComponentButtonMask) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetComponentRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetComponentState) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_RenderModelHasComponent) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetRenderModelThumbnailURL) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetRenderModelOriginalPath) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_005_GetRenderModelErrorNameFromEnum) + ); +#ifndef __GNUC__ +} +#endif + +winIVRRenderModels_IVRRenderModels_005 *create_winIVRRenderModels_IVRRenderModels_005(void *linux_side) +{ + winIVRRenderModels_IVRRenderModels_005 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRRenderModels_IVRRenderModels_005)); + TRACE("-> %p\n", r); + r->vtable = &winIVRRenderModels_IVRRenderModels_005_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRRenderModels_IVRRenderModels_004.h" + +typedef struct __winIVRRenderModels_IVRRenderModels_004 { + vtable_ptr *vtable; + void *linux_side; +} winIVRRenderModels_IVRRenderModels_004; + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_LoadRenderModel_Async, 20) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_004_LoadRenderModel_Async(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName, winRenderModel_t_0918 ** ppRenderModel) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_LoadRenderModel_Async(_this->linux_side, pchRenderModelName, ppRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_FreeRenderModel, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_004_FreeRenderModel(winIVRRenderModels_IVRRenderModels_004 *_this, winRenderModel_t_0918 * pRenderModel) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_004_FreeRenderModel(_this->linux_side, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_LoadTexture_Async, 16) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_004_LoadTexture_Async(winIVRRenderModels_IVRRenderModels_004 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_0918 ** ppTexture) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_LoadTexture_Async(_this->linux_side, textureId, ppTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_FreeTexture, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_004_FreeTexture(winIVRRenderModels_IVRRenderModels_004 *_this, winRenderModel_TextureMap_t_0918 * pTexture) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_004_FreeTexture(_this->linux_side, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_LoadTextureD3D11_Async, 24) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_004_LoadTextureD3D11_Async(winIVRRenderModels_IVRRenderModels_004 *_this, TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_LoadTextureD3D11_Async(_this->linux_side, textureId, pD3D11Device, ppD3D11Texture2D); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_FreeTextureD3D11, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_004_FreeTextureD3D11(winIVRRenderModels_IVRRenderModels_004 *_this, void * pD3D11Texture2D) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_004_FreeTextureD3D11(_this->linux_side, pD3D11Texture2D); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetRenderModelName, 20) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_004_GetRenderModelName(winIVRRenderModels_IVRRenderModels_004 *_this, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetRenderModelName(_this->linux_side, unRenderModelIndex, pchRenderModelName, unRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetRenderModelCount, 4) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_004_GetRenderModelCount(winIVRRenderModels_IVRRenderModels_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetRenderModelCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetComponentCount, 12) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_004_GetComponentCount(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetComponentCount(_this->linux_side, pchRenderModelName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetComponentName, 28) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_004_GetComponentName(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetComponentName(_this->linux_side, pchRenderModelName, unComponentIndex, pchComponentName, unComponentNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetComponentButtonMask, 20) +uint64_t __thiscall winIVRRenderModels_IVRRenderModels_004_GetComponentButtonMask(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetComponentButtonMask(_this->linux_side, pchRenderModelName, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetComponentRenderModelName, 32) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_004_GetComponentRenderModelName(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetComponentRenderModelName(_this->linux_side, pchRenderModelName, pchComponentName, pchComponentRenderModelName, unComponentRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_GetComponentState, 44) +bool __thiscall winIVRRenderModels_IVRRenderModels_004_GetComponentState(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName, const char * pchComponentName, VRControllerState_t * pControllerState, RenderModel_ControllerMode_State_t * pState, RenderModel_ComponentState_t * pComponentState) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_GetComponentState(_this->linux_side, pchRenderModelName, pchComponentName, pControllerState, pState, pComponentState); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_004_RenderModelHasComponent, 20) +bool __thiscall winIVRRenderModels_IVRRenderModels_004_RenderModelHasComponent(winIVRRenderModels_IVRRenderModels_004 *_this, const char * pchRenderModelName, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_004_RenderModelHasComponent(_this->linux_side, pchRenderModelName, pchComponentName); +} + +extern vtable_ptr winIVRRenderModels_IVRRenderModels_004_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRRenderModels_IVRRenderModels_004, + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_LoadRenderModel_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_FreeRenderModel) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_LoadTexture_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_FreeTexture) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_LoadTextureD3D11_Async) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_FreeTextureD3D11) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetRenderModelCount) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetComponentCount) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetComponentName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetComponentButtonMask) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetComponentRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_GetComponentState) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_004_RenderModelHasComponent) + ); +#ifndef __GNUC__ +} +#endif + +winIVRRenderModels_IVRRenderModels_004 *create_winIVRRenderModels_IVRRenderModels_004(void *linux_side) +{ + winIVRRenderModels_IVRRenderModels_004 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRRenderModels_IVRRenderModels_004)); + TRACE("-> %p\n", r); + r->vtable = &winIVRRenderModels_IVRRenderModels_004_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRRenderModels_IVRRenderModels_002.h" + +typedef struct __winIVRRenderModels_IVRRenderModels_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRRenderModels_IVRRenderModels_002; + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_LoadRenderModel, 20) +bool __thiscall winIVRRenderModels_IVRRenderModels_002_LoadRenderModel(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName, winRenderModel_t_0915 ** ppRenderModel) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_LoadRenderModel(_this->linux_side, pchRenderModelName, ppRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_FreeRenderModel, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_002_FreeRenderModel(winIVRRenderModels_IVRRenderModels_002 *_this, winRenderModel_t_0915 * pRenderModel) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_002_FreeRenderModel(_this->linux_side, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_LoadTexture, 16) +bool __thiscall winIVRRenderModels_IVRRenderModels_002_LoadTexture(winIVRRenderModels_IVRRenderModels_002 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_0915 ** ppTexture) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_LoadTexture(_this->linux_side, textureId, ppTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_FreeTexture, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_002_FreeTexture(winIVRRenderModels_IVRRenderModels_002 *_this, winRenderModel_TextureMap_t_0915 * pTexture) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_002_FreeTexture(_this->linux_side, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetRenderModelName, 20) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_002_GetRenderModelName(winIVRRenderModels_IVRRenderModels_002 *_this, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetRenderModelName(_this->linux_side, unRenderModelIndex, pchRenderModelName, unRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetRenderModelCount, 4) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_002_GetRenderModelCount(winIVRRenderModels_IVRRenderModels_002 *_this) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetRenderModelCount(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetComponentCount, 12) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_002_GetComponentCount(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetComponentCount(_this->linux_side, pchRenderModelName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetComponentName, 28) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_002_GetComponentName(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetComponentName(_this->linux_side, pchRenderModelName, unComponentIndex, pchComponentName, unComponentNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetComponentButtonMask, 20) +uint64_t __thiscall winIVRRenderModels_IVRRenderModels_002_GetComponentButtonMask(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetComponentButtonMask(_this->linux_side, pchRenderModelName, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetComponentRenderModelName, 32) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_002_GetComponentRenderModelName(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName, const char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetComponentRenderModelName(_this->linux_side, pchRenderModelName, pchComponentName, pchComponentRenderModelName, unComponentRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_GetComponentState, 36) +bool __thiscall winIVRRenderModels_IVRRenderModels_002_GetComponentState(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName, const char * pchComponentName, VRControllerState_t * pControllerState, RenderModel_ComponentState_t * pComponentState) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_GetComponentState(_this->linux_side, pchRenderModelName, pchComponentName, pControllerState, pComponentState); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_002_RenderModelHasComponent, 20) +bool __thiscall winIVRRenderModels_IVRRenderModels_002_RenderModelHasComponent(winIVRRenderModels_IVRRenderModels_002 *_this, const char * pchRenderModelName, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_002_RenderModelHasComponent(_this->linux_side, pchRenderModelName, pchComponentName); +} + +extern vtable_ptr winIVRRenderModels_IVRRenderModels_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRRenderModels_IVRRenderModels_002, + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_LoadRenderModel) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_FreeRenderModel) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_LoadTexture) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_FreeTexture) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetRenderModelCount) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetComponentCount) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetComponentName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetComponentButtonMask) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetComponentRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_GetComponentState) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_002_RenderModelHasComponent) + ); +#ifndef __GNUC__ +} +#endif + +winIVRRenderModels_IVRRenderModels_002 *create_winIVRRenderModels_IVRRenderModels_002(void *linux_side) +{ + winIVRRenderModels_IVRRenderModels_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRRenderModels_IVRRenderModels_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRRenderModels_IVRRenderModels_002_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRRenderModels_IVRRenderModels_001.h" + +typedef struct __winIVRRenderModels_IVRRenderModels_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRRenderModels_IVRRenderModels_001; + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_001_LoadRenderModel, 20) +bool __thiscall winIVRRenderModels_IVRRenderModels_001_LoadRenderModel(winIVRRenderModels_IVRRenderModels_001 *_this, const char * pchRenderModelName, winRenderModel_t_0910 * pRenderModel) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_001_LoadRenderModel(_this->linux_side, pchRenderModelName, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_001_FreeRenderModel, 12) +void __thiscall winIVRRenderModels_IVRRenderModels_001_FreeRenderModel(winIVRRenderModels_IVRRenderModels_001 *_this, winRenderModel_t_0910 * pRenderModel) +{ + TRACE("%p\n", _this); + cppIVRRenderModels_IVRRenderModels_001_FreeRenderModel(_this->linux_side, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_001_GetRenderModelName, 20) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_001_GetRenderModelName(winIVRRenderModels_IVRRenderModels_001 *_this, uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_001_GetRenderModelName(_this->linux_side, unRenderModelIndex, pchRenderModelName, unRenderModelNameLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_001_GetRenderModelCount, 4) +uint32_t __thiscall winIVRRenderModels_IVRRenderModels_001_GetRenderModelCount(winIVRRenderModels_IVRRenderModels_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRRenderModels_IVRRenderModels_001_GetRenderModelCount(_this->linux_side); +} + +extern vtable_ptr winIVRRenderModels_IVRRenderModels_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRRenderModels_IVRRenderModels_001, + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_001_LoadRenderModel) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_001_FreeRenderModel) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_001_GetRenderModelName) + VTABLE_ADD_FUNC(winIVRRenderModels_IVRRenderModels_001_GetRenderModelCount) + ); +#ifndef __GNUC__ +} +#endif + +winIVRRenderModels_IVRRenderModels_001 *create_winIVRRenderModels_IVRRenderModels_001(void *linux_side) +{ + winIVRRenderModels_IVRRenderModels_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRRenderModels_IVRRenderModels_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRRenderModels_IVRRenderModels_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRResources.c b/vrclient_x64/winIVRResources.c new file mode 100644 index 00000000..ec2fc257 --- /dev/null +++ b/vrclient_x64/winIVRResources.c @@ -0,0 +1,65 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRResources_IVRResources_001.h" + +typedef struct __winIVRResources_IVRResources_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRResources_IVRResources_001; + +DEFINE_THISCALL_WRAPPER(winIVRResources_IVRResources_001_LoadSharedResource, 24) +uint32_t __thiscall winIVRResources_IVRResources_001_LoadSharedResource(winIVRResources_IVRResources_001 *_this, const char * pchResourceName, char * pchBuffer, uint32_t unBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRResources_IVRResources_001_LoadSharedResource(_this->linux_side, pchResourceName, pchBuffer, unBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRResources_IVRResources_001_GetResourceFullPath, 32) +uint32_t __thiscall winIVRResources_IVRResources_001_GetResourceFullPath(winIVRResources_IVRResources_001 *_this, const char * pchResourceName, const char * pchResourceTypeDirectory, char * pchPathBuffer, uint32_t unBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRResources_IVRResources_001_GetResourceFullPath(_this->linux_side, pchResourceName, pchResourceTypeDirectory, pchPathBuffer, unBufferLen); +} + +extern vtable_ptr winIVRResources_IVRResources_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRResources_IVRResources_001, + VTABLE_ADD_FUNC(winIVRResources_IVRResources_001_LoadSharedResource) + VTABLE_ADD_FUNC(winIVRResources_IVRResources_001_GetResourceFullPath) + ); +#ifndef __GNUC__ +} +#endif + +winIVRResources_IVRResources_001 *create_winIVRResources_IVRResources_001(void *linux_side) +{ + winIVRResources_IVRResources_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRResources_IVRResources_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRResources_IVRResources_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRScreenshots.c b/vrclient_x64/winIVRScreenshots.c new file mode 100644 index 00000000..24bb4043 --- /dev/null +++ b/vrclient_x64/winIVRScreenshots.c @@ -0,0 +1,105 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRScreenshots_IVRScreenshots_001.h" + +typedef struct __winIVRScreenshots_IVRScreenshots_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRScreenshots_IVRScreenshots_001; + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_RequestScreenshot, 32) +EVRScreenshotError __thiscall winIVRScreenshots_IVRScreenshots_001_RequestScreenshot(winIVRScreenshots_IVRScreenshots_001 *_this, ScreenshotHandle_t * pOutScreenshotHandle, EVRScreenshotType type, const char * pchPreviewFilename, const char * pchVRFilename) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_RequestScreenshot(_this->linux_side, pOutScreenshotHandle, type, pchPreviewFilename, pchVRFilename); +} + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_HookScreenshot, 16) +EVRScreenshotError __thiscall winIVRScreenshots_IVRScreenshots_001_HookScreenshot(winIVRScreenshots_IVRScreenshots_001 *_this, EVRScreenshotType * pSupportedTypes, int numTypes) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_HookScreenshot(_this->linux_side, pSupportedTypes, numTypes); +} + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyType, 16) +EVRScreenshotType __thiscall winIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyType(winIVRScreenshots_IVRScreenshots_001 *_this, ScreenshotHandle_t screenshotHandle, EVRScreenshotError * pError) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyType(_this->linux_side, screenshotHandle, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyFilename, 32) +uint32_t __thiscall winIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyFilename(winIVRScreenshots_IVRScreenshots_001 *_this, ScreenshotHandle_t screenshotHandle, EVRScreenshotPropertyFilenames filenameType, char * pchFilename, uint32_t cchFilename, EVRScreenshotError * pError) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyFilename(_this->linux_side, screenshotHandle, filenameType, pchFilename, cchFilename, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_UpdateScreenshotProgress, 12) +EVRScreenshotError __thiscall winIVRScreenshots_IVRScreenshots_001_UpdateScreenshotProgress(winIVRScreenshots_IVRScreenshots_001 *_this, ScreenshotHandle_t screenshotHandle, float flProgress) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_UpdateScreenshotProgress(_this->linux_side, screenshotHandle, flProgress); +} + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_TakeStereoScreenshot, 28) +EVRScreenshotError __thiscall winIVRScreenshots_IVRScreenshots_001_TakeStereoScreenshot(winIVRScreenshots_IVRScreenshots_001 *_this, ScreenshotHandle_t * pOutScreenshotHandle, const char * pchPreviewFilename, const char * pchVRFilename) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_TakeStereoScreenshot(_this->linux_side, pOutScreenshotHandle, pchPreviewFilename, pchVRFilename); +} + +DEFINE_THISCALL_WRAPPER(winIVRScreenshots_IVRScreenshots_001_SubmitScreenshot, 28) +EVRScreenshotError __thiscall winIVRScreenshots_IVRScreenshots_001_SubmitScreenshot(winIVRScreenshots_IVRScreenshots_001 *_this, ScreenshotHandle_t screenshotHandle, EVRScreenshotType type, const char * pchSourcePreviewFilename, const char * pchSourceVRFilename) +{ + TRACE("%p\n", _this); + return cppIVRScreenshots_IVRScreenshots_001_SubmitScreenshot(_this->linux_side, screenshotHandle, type, pchSourcePreviewFilename, pchSourceVRFilename); +} + +extern vtable_ptr winIVRScreenshots_IVRScreenshots_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRScreenshots_IVRScreenshots_001, + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_RequestScreenshot) + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_HookScreenshot) + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyType) + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_GetScreenshotPropertyFilename) + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_UpdateScreenshotProgress) + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_TakeStereoScreenshot) + VTABLE_ADD_FUNC(winIVRScreenshots_IVRScreenshots_001_SubmitScreenshot) + ); +#ifndef __GNUC__ +} +#endif + +winIVRScreenshots_IVRScreenshots_001 *create_winIVRScreenshots_IVRScreenshots_001(void *linux_side) +{ + winIVRScreenshots_IVRScreenshots_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRScreenshots_IVRScreenshots_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRScreenshots_IVRScreenshots_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRSettings.c b/vrclient_x64/winIVRSettings.c new file mode 100644 index 00000000..d3be9d5f --- /dev/null +++ b/vrclient_x64/winIVRSettings.c @@ -0,0 +1,268 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRSettings_IVRSettings_002.h" + +typedef struct __winIVRSettings_IVRSettings_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSettings_IVRSettings_002; + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_GetSettingsErrorNameFromEnum, 8) +const char * __thiscall winIVRSettings_IVRSettings_002_GetSettingsErrorNameFromEnum(winIVRSettings_IVRSettings_002 *_this, EVRSettingsError eError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_002_GetSettingsErrorNameFromEnum(_this->linux_side, eError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_Sync, 13) +bool __thiscall winIVRSettings_IVRSettings_002_Sync(winIVRSettings_IVRSettings_002 *_this, bool bForce, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_002_Sync(_this->linux_side, bForce, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_SetBool, 29) +void __thiscall winIVRSettings_IVRSettings_002_SetBool(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_SetBool(_this->linux_side, pchSection, pchSettingsKey, bValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_SetInt32, 32) +void __thiscall winIVRSettings_IVRSettings_002_SetInt32(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_SetInt32(_this->linux_side, pchSection, pchSettingsKey, nValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_SetFloat, 32) +void __thiscall winIVRSettings_IVRSettings_002_SetFloat(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_SetFloat(_this->linux_side, pchSection, pchSettingsKey, flValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_SetString, 36) +void __thiscall winIVRSettings_IVRSettings_002_SetString(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_SetString(_this->linux_side, pchSection, pchSettingsKey, pchValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_GetBool, 28) +bool __thiscall winIVRSettings_IVRSettings_002_GetBool(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_002_GetBool(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_GetInt32, 28) +int32_t __thiscall winIVRSettings_IVRSettings_002_GetInt32(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_002_GetInt32(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_GetFloat, 28) +float __thiscall winIVRSettings_IVRSettings_002_GetFloat(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_002_GetFloat(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_GetString, 40) +void __thiscall winIVRSettings_IVRSettings_002_GetString(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_GetString(_this->linux_side, pchSection, pchSettingsKey, pchValue, unValueLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_RemoveSection, 20) +void __thiscall winIVRSettings_IVRSettings_002_RemoveSection(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_RemoveSection(_this->linux_side, pchSection, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_002_RemoveKeyInSection, 28) +void __thiscall winIVRSettings_IVRSettings_002_RemoveKeyInSection(winIVRSettings_IVRSettings_002 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_002_RemoveKeyInSection(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +extern vtable_ptr winIVRSettings_IVRSettings_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSettings_IVRSettings_002, + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_GetSettingsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_Sync) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_SetBool) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_SetInt32) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_SetFloat) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_SetString) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_GetBool) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_GetInt32) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_GetFloat) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_GetString) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_RemoveSection) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_002_RemoveKeyInSection) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSettings_IVRSettings_002 *create_winIVRSettings_IVRSettings_002(void *linux_side) +{ + winIVRSettings_IVRSettings_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSettings_IVRSettings_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSettings_IVRSettings_002_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSettings_IVRSettings_001.h" + +typedef struct __winIVRSettings_IVRSettings_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSettings_IVRSettings_001; + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_GetSettingsErrorNameFromEnum, 8) +const char * __thiscall winIVRSettings_IVRSettings_001_GetSettingsErrorNameFromEnum(winIVRSettings_IVRSettings_001 *_this, EVRSettingsError eError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_001_GetSettingsErrorNameFromEnum(_this->linux_side, eError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_Sync, 13) +bool __thiscall winIVRSettings_IVRSettings_001_Sync(winIVRSettings_IVRSettings_001 *_this, bool bForce, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_001_Sync(_this->linux_side, bForce, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_GetBool, 29) +bool __thiscall winIVRSettings_IVRSettings_001_GetBool(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, bool bDefaultValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_001_GetBool(_this->linux_side, pchSection, pchSettingsKey, bDefaultValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_SetBool, 29) +void __thiscall winIVRSettings_IVRSettings_001_SetBool(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_SetBool(_this->linux_side, pchSection, pchSettingsKey, bValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_GetInt32, 32) +int32_t __thiscall winIVRSettings_IVRSettings_001_GetInt32(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, int32_t nDefaultValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_001_GetInt32(_this->linux_side, pchSection, pchSettingsKey, nDefaultValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_SetInt32, 32) +void __thiscall winIVRSettings_IVRSettings_001_SetInt32(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_SetInt32(_this->linux_side, pchSection, pchSettingsKey, nValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_GetFloat, 32) +float __thiscall winIVRSettings_IVRSettings_001_GetFloat(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, float flDefaultValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_001_GetFloat(_this->linux_side, pchSection, pchSettingsKey, flDefaultValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_SetFloat, 32) +void __thiscall winIVRSettings_IVRSettings_001_SetFloat(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_SetFloat(_this->linux_side, pchSection, pchSettingsKey, flValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_GetString, 48) +void __thiscall winIVRSettings_IVRSettings_001_GetString(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, const char * pchDefaultValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_GetString(_this->linux_side, pchSection, pchSettingsKey, pchValue, unValueLen, pchDefaultValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_SetString, 36) +void __thiscall winIVRSettings_IVRSettings_001_SetString(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_SetString(_this->linux_side, pchSection, pchSettingsKey, pchValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_RemoveSection, 20) +void __thiscall winIVRSettings_IVRSettings_001_RemoveSection(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_RemoveSection(_this->linux_side, pchSection, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_001_RemoveKeyInSection, 28) +void __thiscall winIVRSettings_IVRSettings_001_RemoveKeyInSection(winIVRSettings_IVRSettings_001 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_001_RemoveKeyInSection(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +extern vtable_ptr winIVRSettings_IVRSettings_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSettings_IVRSettings_001, + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_GetSettingsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_Sync) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_GetBool) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_SetBool) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_GetInt32) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_SetInt32) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_GetFloat) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_SetFloat) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_GetString) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_SetString) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_RemoveSection) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_001_RemoveKeyInSection) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSettings_IVRSettings_001 *create_winIVRSettings_IVRSettings_001(void *linux_side) +{ + winIVRSettings_IVRSettings_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSettings_IVRSettings_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSettings_IVRSettings_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRSystem.c b/vrclient_x64/winIVRSystem.c new file mode 100644 index 00000000..8f510115 --- /dev/null +++ b/vrclient_x64/winIVRSystem.c @@ -0,0 +1,4495 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRSystem_IVRSystem_017.h" + +typedef struct __winIVRSystem_IVRSystem_017 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_017; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_017_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_017 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetProjectionMatrix, 20) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_017_GetProjectionMatrix(winIVRSystem_IVRSystem_017 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_017_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_017_GetProjectionRaw(winIVRSystem_IVRSystem_017 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_ComputeDistortion, 24) +bool __thiscall winIVRSystem_IVRSystem_017_ComputeDistortion(winIVRSystem_IVRSystem_017 *_this, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_ComputeDistortion(_this->linux_side, eEye, fU, fV, pDistortionCoordinates); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_017_GetEyeToHeadTransform(winIVRSystem_IVRSystem_017 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_017_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_017_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_017 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_017_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_017_GetDXGIOutputInfo(winIVRSystem_IVRSystem_017 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetOutputDevice, 24) +void __thiscall winIVRSystem_IVRSystem_017_GetOutputDevice(winIVRSystem_IVRSystem_017 *_this, uint64_t * pnDevice, ETextureType textureType, VkInstance_T * pInstance) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_GetOutputDevice(_this->linux_side, pnDevice, textureType, pInstance); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_017_IsDisplayOnDesktop(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_017_SetDisplayVisibility(winIVRSystem_IVRSystem_017 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_017_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_017 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_017_ResetSeatedZeroPose(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_017_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_017 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_017_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_017_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_017 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_017_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_017_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_017 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_017_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_017_ApplyTransform(winIVRSystem_IVRSystem_017 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_017_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_017 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_017_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_017_GetTrackedDeviceClass(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_017_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_017_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_017_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_017_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_017_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_017_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_017 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_017_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_017_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_017_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_017 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_PollNextEvent, 16) +bool __thiscall winIVRSystem_IVRSystem_017_PollNextEvent(winIVRSystem_IVRSystem_017 *_this, winVREvent_t_1011 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_PollNextEventWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_017_PollNextEventWithPose(winIVRSystem_IVRSystem_017 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_1011 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_017_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_017 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetHiddenAreaMesh, 16) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_017_GetHiddenAreaMesh(winIVRSystem_IVRSystem_017 *_this, HiddenAreaMesh_t *_r, EVREye eEye, EHiddenAreaMeshType type) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_017_GetHiddenAreaMesh(_this->linux_side, eEye, type); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetControllerState, 20) +bool __thiscall winIVRSystem_IVRSystem_017_GetControllerState(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1011 * pControllerState, uint32_t unControllerStateSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState, unControllerStateSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetControllerStateWithPose, 32) +bool __thiscall winIVRSystem_IVRSystem_017_GetControllerStateWithPose(winIVRSystem_IVRSystem_017 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1011 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_017_TriggerHapticPulse(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_017_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_017 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_017_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_017 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_017_CaptureInputFocus(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_017_ReleaseInputFocus(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_017_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_017_DriverDebugRequest(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_017_PerformFirmwareUpdate(winIVRSystem_IVRSystem_017 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_017_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_017_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_017_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_017_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_017 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_017_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_017_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_017, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetOutputDevice) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_017_AcknowledgeQuit_UserPrompt) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_017 *create_winIVRSystem_IVRSystem_017(void *linux_side) +{ + winIVRSystem_IVRSystem_017 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_017)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_017_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_016.h" + +typedef struct __winIVRSystem_IVRSystem_016 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_016; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_016_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_016 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetProjectionMatrix, 20) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_016_GetProjectionMatrix(winIVRSystem_IVRSystem_016 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_016_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_016_GetProjectionRaw(winIVRSystem_IVRSystem_016 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_ComputeDistortion, 24) +bool __thiscall winIVRSystem_IVRSystem_016_ComputeDistortion(winIVRSystem_IVRSystem_016 *_this, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_ComputeDistortion(_this->linux_side, eEye, fU, fV, pDistortionCoordinates); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_016_GetEyeToHeadTransform(winIVRSystem_IVRSystem_016 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_016_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_016_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_016 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_016_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_016_GetDXGIOutputInfo(winIVRSystem_IVRSystem_016 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetOutputDevice, 16) +void __thiscall winIVRSystem_IVRSystem_016_GetOutputDevice(winIVRSystem_IVRSystem_016 *_this, uint64_t * pnDevice, ETextureType textureType) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_GetOutputDevice(_this->linux_side, pnDevice, textureType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_016_IsDisplayOnDesktop(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_016_SetDisplayVisibility(winIVRSystem_IVRSystem_016 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_016_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_016 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_016_ResetSeatedZeroPose(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_016_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_016 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_016_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_016_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_016 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_016_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_016_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_016 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_016_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_016_ApplyTransform(winIVRSystem_IVRSystem_016 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_016_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_016 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_016_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_016_GetTrackedDeviceClass(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_016_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_016_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_016_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_016_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_016_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_016_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_016 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_016_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_016_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_016_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_016 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_PollNextEvent, 16) +bool __thiscall winIVRSystem_IVRSystem_016_PollNextEvent(winIVRSystem_IVRSystem_016 *_this, winVREvent_t_109 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_PollNextEventWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_016_PollNextEventWithPose(winIVRSystem_IVRSystem_016 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_109 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_016_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_016 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetHiddenAreaMesh, 16) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_016_GetHiddenAreaMesh(winIVRSystem_IVRSystem_016 *_this, HiddenAreaMesh_t *_r, EVREye eEye, EHiddenAreaMeshType type) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_016_GetHiddenAreaMesh(_this->linux_side, eEye, type); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetControllerState, 20) +bool __thiscall winIVRSystem_IVRSystem_016_GetControllerState(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_109 * pControllerState, uint32_t unControllerStateSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState, unControllerStateSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetControllerStateWithPose, 32) +bool __thiscall winIVRSystem_IVRSystem_016_GetControllerStateWithPose(winIVRSystem_IVRSystem_016 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_109 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_016_TriggerHapticPulse(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_016_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_016 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_016_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_016 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_016_CaptureInputFocus(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_016_ReleaseInputFocus(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_016_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_016_DriverDebugRequest(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_016_PerformFirmwareUpdate(winIVRSystem_IVRSystem_016 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_016_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_016_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_016_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_016_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_016 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_016_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_016_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_016, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetOutputDevice) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_016_AcknowledgeQuit_UserPrompt) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_016 *create_winIVRSystem_IVRSystem_016(void *linux_side) +{ + winIVRSystem_IVRSystem_016 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_016)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_016_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_015.h" + +typedef struct __winIVRSystem_IVRSystem_015 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_015; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_015 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetProjectionMatrix, 20) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_015_GetProjectionMatrix(winIVRSystem_IVRSystem_015 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_015_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_015_GetProjectionRaw(winIVRSystem_IVRSystem_015 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_ComputeDistortion, 24) +bool __thiscall winIVRSystem_IVRSystem_015_ComputeDistortion(winIVRSystem_IVRSystem_015 *_this, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_ComputeDistortion(_this->linux_side, eEye, fU, fV, pDistortionCoordinates); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_015_GetEyeToHeadTransform(winIVRSystem_IVRSystem_015 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_015_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_015_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_015 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_015_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_015_GetDXGIOutputInfo(winIVRSystem_IVRSystem_015 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_015_IsDisplayOnDesktop(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_015_SetDisplayVisibility(winIVRSystem_IVRSystem_015 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_015 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_015_ResetSeatedZeroPose(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_015 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_015 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_015 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_015_ApplyTransform(winIVRSystem_IVRSystem_015 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_015 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_015_GetTrackedDeviceClass(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_015_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_015 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_015 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_PollNextEvent, 16) +bool __thiscall winIVRSystem_IVRSystem_015_PollNextEvent(winIVRSystem_IVRSystem_015 *_this, winVREvent_t_107 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_PollNextEventWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_015_PollNextEventWithPose(winIVRSystem_IVRSystem_015 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_107 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_015 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetHiddenAreaMesh, 16) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_015_GetHiddenAreaMesh(winIVRSystem_IVRSystem_015 *_this, HiddenAreaMesh_t *_r, EVREye eEye, EHiddenAreaMeshType type) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_015_GetHiddenAreaMesh(_this->linux_side, eEye, type); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetControllerState, 20) +bool __thiscall winIVRSystem_IVRSystem_015_GetControllerState(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_107 * pControllerState, uint32_t unControllerStateSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState, unControllerStateSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetControllerStateWithPose, 32) +bool __thiscall winIVRSystem_IVRSystem_015_GetControllerStateWithPose(winIVRSystem_IVRSystem_015 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_107 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_015_TriggerHapticPulse(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_015 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_015 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_015_CaptureInputFocus(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_015_ReleaseInputFocus(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_015_DriverDebugRequest(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_015_PerformFirmwareUpdate(winIVRSystem_IVRSystem_015 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_015_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_015 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_015_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_015, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_015_AcknowledgeQuit_UserPrompt) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_015 *create_winIVRSystem_IVRSystem_015(void *linux_side) +{ + winIVRSystem_IVRSystem_015 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_015)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_015_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_014.h" + +typedef struct __winIVRSystem_IVRSystem_014 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_014; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_014_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_014 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_014_GetProjectionMatrix(winIVRSystem_IVRSystem_014 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_014_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_014_GetProjectionRaw(winIVRSystem_IVRSystem_014 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_ComputeDistortion, 24) +bool __thiscall winIVRSystem_IVRSystem_014_ComputeDistortion(winIVRSystem_IVRSystem_014 *_this, EVREye eEye, float fU, float fV, DistortionCoordinates_t * pDistortionCoordinates) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_ComputeDistortion(_this->linux_side, eEye, fU, fV, pDistortionCoordinates); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_014_GetEyeToHeadTransform(winIVRSystem_IVRSystem_014 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_014_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_014_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_014 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_014_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_014_GetDXGIOutputInfo(winIVRSystem_IVRSystem_014 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_014_IsDisplayOnDesktop(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_014_SetDisplayVisibility(winIVRSystem_IVRSystem_014 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_014_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_014 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_014_ResetSeatedZeroPose(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_014_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_014 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_014_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_014_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_014 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_014_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_014_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_014 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_014_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_014_ApplyTransform(winIVRSystem_IVRSystem_014 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_014_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_014 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_014_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_014_GetTrackedDeviceClass(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_014_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_014_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_014_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_014_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_014_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_014_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_014 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_014_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_014_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_014_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_014 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_PollNextEvent, 16) +bool __thiscall winIVRSystem_IVRSystem_014_PollNextEvent(winIVRSystem_IVRSystem_014 *_this, winVREvent_t_104 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_PollNextEventWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_014_PollNextEventWithPose(winIVRSystem_IVRSystem_014 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_104 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_014_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_014 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetHiddenAreaMesh, 16) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_014_GetHiddenAreaMesh(winIVRSystem_IVRSystem_014 *_this, HiddenAreaMesh_t *_r, EVREye eEye, EHiddenAreaMeshType type) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_014_GetHiddenAreaMesh(_this->linux_side, eEye, type); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetControllerState, 20) +bool __thiscall winIVRSystem_IVRSystem_014_GetControllerState(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_104 * pControllerState, uint32_t unControllerStateSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState, unControllerStateSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetControllerStateWithPose, 32) +bool __thiscall winIVRSystem_IVRSystem_014_GetControllerStateWithPose(winIVRSystem_IVRSystem_014 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_104 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_014_TriggerHapticPulse(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_014_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_014 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_014_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_014 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_014_CaptureInputFocus(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_014_ReleaseInputFocus(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_014_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_014_DriverDebugRequest(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_014_PerformFirmwareUpdate(winIVRSystem_IVRSystem_014 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_014_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_014_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_014_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_014_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_014 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_014_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_014_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_014, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_014_AcknowledgeQuit_UserPrompt) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_014 *create_winIVRSystem_IVRSystem_014(void *linux_side) +{ + winIVRSystem_IVRSystem_014 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_014)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_014_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_012.h" + +typedef struct __winIVRSystem_IVRSystem_012 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_012; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_012_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_012 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_012_GetProjectionMatrix(winIVRSystem_IVRSystem_012 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_012_GetProjectionRaw(winIVRSystem_IVRSystem_012 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_012_ComputeDistortion(winIVRSystem_IVRSystem_012 *_this, DistortionCoordinates_t *_r, EVREye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_012_GetEyeToHeadTransform(winIVRSystem_IVRSystem_012 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_012_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_012 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_012_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_012_GetDXGIOutputInfo(winIVRSystem_IVRSystem_012 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_012_IsDisplayOnDesktop(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_012_SetDisplayVisibility(winIVRSystem_IVRSystem_012 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_012_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_012 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_012_ResetSeatedZeroPose(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_012_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_012 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_012_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_012 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_012_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_012 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_012_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_012_ApplyTransform(winIVRSystem_IVRSystem_012 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_012_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_012 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_012_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_012_GetTrackedDeviceClass(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_012_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_012_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_012_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_012_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_012_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_012_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_012 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_012_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_012_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_012 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_PollNextEvent, 16) +bool __thiscall winIVRSystem_IVRSystem_012_PollNextEvent(winIVRSystem_IVRSystem_012 *_this, winVREvent_t_103 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_PollNextEventWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_012_PollNextEventWithPose(winIVRSystem_IVRSystem_012 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_103 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_012_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_012 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_012_GetHiddenAreaMesh(winIVRSystem_IVRSystem_012 *_this, HiddenAreaMesh_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_012_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_012_GetControllerState(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_103 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_012_GetControllerStateWithPose(winIVRSystem_IVRSystem_012 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_103 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_012_TriggerHapticPulse(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_012_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_012 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_012_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_012 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_012_CaptureInputFocus(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_012_ReleaseInputFocus(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_012_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_012_DriverDebugRequest(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_012_PerformFirmwareUpdate(winIVRSystem_IVRSystem_012 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_012_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_012_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_012_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_012_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_012 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_012_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_012_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_012, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_012_AcknowledgeQuit_UserPrompt) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_012 *create_winIVRSystem_IVRSystem_012(void *linux_side) +{ + winIVRSystem_IVRSystem_012 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_012)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_012_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_011.h" + +typedef struct __winIVRSystem_IVRSystem_011 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_011; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_011_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_011 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_011_GetProjectionMatrix(winIVRSystem_IVRSystem_011 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_011_GetProjectionRaw(winIVRSystem_IVRSystem_011 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_011_ComputeDistortion(winIVRSystem_IVRSystem_011 *_this, DistortionCoordinates_t *_r, EVREye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_011_GetEyeToHeadTransform(winIVRSystem_IVRSystem_011 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_011_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_011 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_011_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_011_GetDXGIOutputInfo(winIVRSystem_IVRSystem_011 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_011_IsDisplayOnDesktop(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_011_SetDisplayVisibility(winIVRSystem_IVRSystem_011 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_011_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_011 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_011_ResetSeatedZeroPose(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_011_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_011 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_011_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_011 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_011_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_011 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_011_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_011_ApplyTransform(winIVRSystem_IVRSystem_011 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_011_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_011 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_011_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_011_GetTrackedDeviceClass(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_011_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_011_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_011_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_011_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_011_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_011_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_011 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_011_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_011_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_011 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_PollNextEvent, 16) +bool __thiscall winIVRSystem_IVRSystem_011_PollNextEvent(winIVRSystem_IVRSystem_011 *_this, winVREvent_t_0918 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_PollNextEventWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_011_PollNextEventWithPose(winIVRSystem_IVRSystem_011 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_0918 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_011_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_011 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_011_GetHiddenAreaMesh(winIVRSystem_IVRSystem_011 *_this, HiddenAreaMesh_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_011_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_011_GetControllerState(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0918 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_011_GetControllerStateWithPose(winIVRSystem_IVRSystem_011 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0918 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_011_TriggerHapticPulse(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_011_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_011 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_011_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_011 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_011_CaptureInputFocus(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_011_ReleaseInputFocus(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_011_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_011_DriverDebugRequest(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_011_PerformFirmwareUpdate(winIVRSystem_IVRSystem_011 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_011_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_011_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_011_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_011 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_PerformanceTestEnableCapture, 5) +void __thiscall winIVRSystem_IVRSystem_011_PerformanceTestEnableCapture(winIVRSystem_IVRSystem_011 *_this, bool bEnable) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_PerformanceTestEnableCapture(_this->linux_side, bEnable); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_011_PerformanceTestReportFidelityLevelChange, 8) +void __thiscall winIVRSystem_IVRSystem_011_PerformanceTestReportFidelityLevelChange(winIVRSystem_IVRSystem_011 *_this, int nFidelityLevel) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_011_PerformanceTestReportFidelityLevelChange(_this->linux_side, nFidelityLevel); +} + +extern vtable_ptr winIVRSystem_IVRSystem_011_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_011, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_AcknowledgeQuit_UserPrompt) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_PerformanceTestEnableCapture) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_011_PerformanceTestReportFidelityLevelChange) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_011 *create_winIVRSystem_IVRSystem_011(void *linux_side) +{ + winIVRSystem_IVRSystem_011 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_011)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_011_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_010.h" + +typedef struct __winIVRSystem_IVRSystem_010 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_010; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_010_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_010 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_010_GetProjectionMatrix(winIVRSystem_IVRSystem_010 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_010_GetProjectionRaw(winIVRSystem_IVRSystem_010 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_010_ComputeDistortion(winIVRSystem_IVRSystem_010 *_this, DistortionCoordinates_t *_r, EVREye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_010_GetEyeToHeadTransform(winIVRSystem_IVRSystem_010 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_010_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_010 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_010_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_010_GetDXGIOutputInfo(winIVRSystem_IVRSystem_010 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_010_IsDisplayOnDesktop(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_010_SetDisplayVisibility(winIVRSystem_IVRSystem_010 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_010_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_010 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_010_ResetSeatedZeroPose(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_010_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_010 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_010_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_010 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_010_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_010 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_010_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_010_ApplyTransform(winIVRSystem_IVRSystem_010 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetTrackedDeviceIndexForControllerRole, 8) +TrackedDeviceIndex_t __thiscall winIVRSystem_IVRSystem_010_GetTrackedDeviceIndexForControllerRole(winIVRSystem_IVRSystem_010 *_this, ETrackedControllerRole unDeviceType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetTrackedDeviceIndexForControllerRole(_this->linux_side, unDeviceType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetControllerRoleForTrackedDeviceIndex, 8) +ETrackedControllerRole __thiscall winIVRSystem_IVRSystem_010_GetControllerRoleForTrackedDeviceIndex(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetControllerRoleForTrackedDeviceIndex(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_010_GetTrackedDeviceClass(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_010_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_010_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_010_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_010_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_010_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_010_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_010 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_010_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_010_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_010 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_PollNextEvent, 12) +bool __thiscall winIVRSystem_IVRSystem_010_PollNextEvent(winIVRSystem_IVRSystem_010 *_this, winVREvent_t_0914 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_PollNextEvent(_this->linux_side, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_PollNextEventWithPose, 24) +bool __thiscall winIVRSystem_IVRSystem_010_PollNextEventWithPose(winIVRSystem_IVRSystem_010 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_0914 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_010_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_010 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_010_GetHiddenAreaMesh(winIVRSystem_IVRSystem_010 *_this, HiddenAreaMesh_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_010_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_010_GetControllerState(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0914 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_010_GetControllerStateWithPose(winIVRSystem_IVRSystem_010 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0914 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_010_TriggerHapticPulse(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_010_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_010 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_010_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_010 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_010_CaptureInputFocus(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_010_ReleaseInputFocus(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_010_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_010_DriverDebugRequest(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_010_PerformFirmwareUpdate(winIVRSystem_IVRSystem_010 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_010_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_010_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_010_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_010 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_PerformanceTestEnableCapture, 5) +void __thiscall winIVRSystem_IVRSystem_010_PerformanceTestEnableCapture(winIVRSystem_IVRSystem_010 *_this, bool bEnable) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_PerformanceTestEnableCapture(_this->linux_side, bEnable); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_010_PerformanceTestReportFidelityLevelChange, 8) +void __thiscall winIVRSystem_IVRSystem_010_PerformanceTestReportFidelityLevelChange(winIVRSystem_IVRSystem_010 *_this, int nFidelityLevel) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_010_PerformanceTestReportFidelityLevelChange(_this->linux_side, nFidelityLevel); +} + +extern vtable_ptr winIVRSystem_IVRSystem_010_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_010, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetTrackedDeviceIndexForControllerRole) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetControllerRoleForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_AcknowledgeQuit_UserPrompt) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_PerformanceTestEnableCapture) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_010_PerformanceTestReportFidelityLevelChange) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_010 *create_winIVRSystem_IVRSystem_010(void *linux_side) +{ + winIVRSystem_IVRSystem_010 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_010)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_010_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_009.h" + +typedef struct __winIVRSystem_IVRSystem_009 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_009; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_009_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_009 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_009_GetProjectionMatrix(winIVRSystem_IVRSystem_009 *_this, HmdMatrix44_t *_r, EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_009_GetProjectionRaw(winIVRSystem_IVRSystem_009 *_this, EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_009_ComputeDistortion(winIVRSystem_IVRSystem_009 *_this, DistortionCoordinates_t *_r, EVREye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_009_GetEyeToHeadTransform(winIVRSystem_IVRSystem_009 *_this, HmdMatrix34_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_009_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_009 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_009_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetDXGIOutputInfo, 12) +void __thiscall winIVRSystem_IVRSystem_009_GetDXGIOutputInfo(winIVRSystem_IVRSystem_009 *_this, int32_t * pnAdapterIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_009_IsDisplayOnDesktop(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_009_SetDisplayVisibility(winIVRSystem_IVRSystem_009 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_009_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_009 *_this, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_009_ResetSeatedZeroPose(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_009_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_009 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_009_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_009 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_009_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_009 *_this, ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_009_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_ApplyTransform, 28) +void __thiscall winIVRSystem_IVRSystem_009_ApplyTransform(winIVRSystem_IVRSystem_009 *_this, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pTrackedDevicePose, HmdMatrix34_t * pTransform) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_ApplyTransform(_this->linux_side, pOutputPose, pTrackedDevicePose, pTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetTrackedDeviceClass, 8) +ETrackedDeviceClass __thiscall winIVRSystem_IVRSystem_009_GetTrackedDeviceClass(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_009_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_009_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_009_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_009_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_009_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_009_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_009 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_009_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_009_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_009 *_this, ETrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_PollNextEvent, 12) +bool __thiscall winIVRSystem_IVRSystem_009_PollNextEvent(winIVRSystem_IVRSystem_009 *_this, winVREvent_t_0912 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_PollNextEvent(_this->linux_side, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_PollNextEventWithPose, 24) +bool __thiscall winIVRSystem_IVRSystem_009_PollNextEventWithPose(winIVRSystem_IVRSystem_009 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_0912 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_009_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_009 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_009_GetHiddenAreaMesh(winIVRSystem_IVRSystem_009 *_this, HiddenAreaMesh_t *_r, EVREye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_009_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_009_GetControllerState(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0912 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_009_GetControllerStateWithPose(winIVRSystem_IVRSystem_009 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0912 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_009_TriggerHapticPulse(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_009_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_009 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_009_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_009 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_009_CaptureInputFocus(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_009_ReleaseInputFocus(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_009_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_009_DriverDebugRequest(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_PerformFirmwareUpdate, 8) +EVRFirmwareError __thiscall winIVRSystem_IVRSystem_009_PerformFirmwareUpdate(winIVRSystem_IVRSystem_009 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_009_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_AcknowledgeQuit_Exiting, 4) +void __thiscall winIVRSystem_IVRSystem_009_AcknowledgeQuit_Exiting(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_AcknowledgeQuit_Exiting(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_009_AcknowledgeQuit_UserPrompt, 4) +void __thiscall winIVRSystem_IVRSystem_009_AcknowledgeQuit_UserPrompt(winIVRSystem_IVRSystem_009 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_009_AcknowledgeQuit_UserPrompt(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_009_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_009, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_SetDisplayVisibility) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_ApplyTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_AcknowledgeQuit_Exiting) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_009_AcknowledgeQuit_UserPrompt) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_009 *create_winIVRSystem_IVRSystem_009(void *linux_side) +{ + winIVRSystem_IVRSystem_009 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_009)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_009_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_006.h" + +typedef struct __winIVRSystem_IVRSystem_006 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_006; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetWindowBounds, 36) +void __thiscall winIVRSystem_IVRSystem_006_GetWindowBounds(winIVRSystem_IVRSystem_006 *_this, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_GetWindowBounds(_this->linux_side, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_006_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_006 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetEyeOutputViewport, 40) +void __thiscall winIVRSystem_IVRSystem_006_GetEyeOutputViewport(winIVRSystem_IVRSystem_006 *_this, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_GetEyeOutputViewport(_this->linux_side, eEye, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_006_GetProjectionMatrix(winIVRSystem_IVRSystem_006 *_this, HmdMatrix44_t *_r, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_006_GetProjectionRaw(winIVRSystem_IVRSystem_006 *_this, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_006_ComputeDistortion(winIVRSystem_IVRSystem_006 *_this, DistortionCoordinates_t *_r, Hmd_Eye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_006_GetEyeToHeadTransform(winIVRSystem_IVRSystem_006 *_this, HmdMatrix34_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_006_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_006 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_006_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetDXGIOutputInfo, 20) +void __thiscall winIVRSystem_IVRSystem_006_GetDXGIOutputInfo(winIVRSystem_IVRSystem_006 *_this, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex, pnAdapterOutputIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_AttachToWindow, 12) +bool __thiscall winIVRSystem_IVRSystem_006_AttachToWindow(winIVRSystem_IVRSystem_006 *_this, void * hWnd) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_AttachToWindow(_this->linux_side, hWnd); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_006_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_006 *_this, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_006_ResetSeatedZeroPose(winIVRSystem_IVRSystem_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_006_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_006 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetRawZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_006_GetRawZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_006 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_GetRawZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_006_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetTrackedDeviceActivityLevel, 8) +EDeviceActivityLevel __thiscall winIVRSystem_IVRSystem_006_GetTrackedDeviceActivityLevel(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetTrackedDeviceActivityLevel(_this->linux_side, unDeviceId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetTrackedDeviceClass, 8) +TrackedDeviceClass __thiscall winIVRSystem_IVRSystem_006_GetTrackedDeviceClass(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_006_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_006_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_006_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_006_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_006_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_006_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_006 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_006_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_006_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_006 *_this, TrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_PollNextEvent, 12) +bool __thiscall winIVRSystem_IVRSystem_006_PollNextEvent(winIVRSystem_IVRSystem_006 *_this, winVREvent_t_0910 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_PollNextEvent(_this->linux_side, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_PollNextEventWithPose, 24) +bool __thiscall winIVRSystem_IVRSystem_006_PollNextEventWithPose(winIVRSystem_IVRSystem_006 *_this, TrackingUniverseOrigin eOrigin, winVREvent_t_0910 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_006_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_006 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_006_GetHiddenAreaMesh(winIVRSystem_IVRSystem_006 *_this, HiddenAreaMesh_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_006_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_006_GetControllerState(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0910 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_006_GetControllerStateWithPose(winIVRSystem_IVRSystem_006 *_this, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_0910 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_006_TriggerHapticPulse(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_006_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_006 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_006_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_006 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_006_CaptureInputFocus(winIVRSystem_IVRSystem_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_006_ReleaseInputFocus(winIVRSystem_IVRSystem_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_006_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_006_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_006_DriverDebugRequest(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_PerformFirmwareUpdate, 8) +VRFirmwareError __thiscall winIVRSystem_IVRSystem_006_PerformFirmwareUpdate(winIVRSystem_IVRSystem_006 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_PerformFirmwareUpdate(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_IsDisplayOnDesktop, 4) +bool __thiscall winIVRSystem_IVRSystem_006_IsDisplayOnDesktop(winIVRSystem_IVRSystem_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_IsDisplayOnDesktop(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_006_SetDisplayVisibility, 5) +bool __thiscall winIVRSystem_IVRSystem_006_SetDisplayVisibility(winIVRSystem_IVRSystem_006 *_this, bool bIsVisibleOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_006_SetDisplayVisibility(_this->linux_side, bIsVisibleOnDesktop); +} + +extern vtable_ptr winIVRSystem_IVRSystem_006_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_006, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetWindowBounds) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetEyeOutputViewport) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_AttachToWindow) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetRawZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetTrackedDeviceActivityLevel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_DriverDebugRequest) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_PerformFirmwareUpdate) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_IsDisplayOnDesktop) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_006_SetDisplayVisibility) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_006 *create_winIVRSystem_IVRSystem_006(void *linux_side) +{ + winIVRSystem_IVRSystem_006 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_006)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_006_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_005.h" + +typedef struct __winIVRSystem_IVRSystem_005 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_005; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetWindowBounds, 36) +void __thiscall winIVRSystem_IVRSystem_005_GetWindowBounds(winIVRSystem_IVRSystem_005 *_this, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_GetWindowBounds(_this->linux_side, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_005_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_005 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetEyeOutputViewport, 40) +void __thiscall winIVRSystem_IVRSystem_005_GetEyeOutputViewport(winIVRSystem_IVRSystem_005 *_this, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_GetEyeOutputViewport(_this->linux_side, eEye, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_005_GetProjectionMatrix(winIVRSystem_IVRSystem_005 *_this, HmdMatrix44_t *_r, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_005_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_005_GetProjectionRaw(winIVRSystem_IVRSystem_005 *_this, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_005_ComputeDistortion(winIVRSystem_IVRSystem_005 *_this, DistortionCoordinates_t *_r, Hmd_Eye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_005_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_005_GetEyeToHeadTransform(winIVRSystem_IVRSystem_005 *_this, HmdMatrix34_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_005_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_005_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_005 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_005_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetDXGIOutputInfo, 20) +void __thiscall winIVRSystem_IVRSystem_005_GetDXGIOutputInfo(winIVRSystem_IVRSystem_005 *_this, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex, pnAdapterOutputIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_AttachToWindow, 12) +bool __thiscall winIVRSystem_IVRSystem_005_AttachToWindow(winIVRSystem_IVRSystem_005 *_this, void * hWnd) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_AttachToWindow(_this->linux_side, hWnd); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_005_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_005 *_this, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_005_ResetSeatedZeroPose(winIVRSystem_IVRSystem_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_005_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_005 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_005_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetSortedTrackedDeviceIndicesOfClass, 24) +uint32_t __thiscall winIVRSystem_IVRSystem_005_GetSortedTrackedDeviceIndicesOfClass(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetSortedTrackedDeviceIndicesOfClass(_this->linux_side, eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetTrackedDeviceClass, 8) +TrackedDeviceClass __thiscall winIVRSystem_IVRSystem_005_GetTrackedDeviceClass(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_005_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_005_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_005_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_005_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_005_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_005_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_005 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_005_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_005_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_005_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_005 *_this, TrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_PollNextEvent, 12) +bool __thiscall winIVRSystem_IVRSystem_005_PollNextEvent(winIVRSystem_IVRSystem_005 *_this, winVREvent_t_098 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_PollNextEvent(_this->linux_side, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_PollNextEventWithPose, 24) +bool __thiscall winIVRSystem_IVRSystem_005_PollNextEventWithPose(winIVRSystem_IVRSystem_005 *_this, TrackingUniverseOrigin eOrigin, winVREvent_t_098 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_005_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_005 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_005_GetHiddenAreaMesh(winIVRSystem_IVRSystem_005 *_this, HiddenAreaMesh_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_005_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_005_GetControllerState(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_098 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_005_GetControllerStateWithPose(winIVRSystem_IVRSystem_005 *_this, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_098 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_005_TriggerHapticPulse(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_005_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_005 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_005_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_005 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_005_CaptureInputFocus(winIVRSystem_IVRSystem_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_005_ReleaseInputFocus(winIVRSystem_IVRSystem_005 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_005_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_005_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_005 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_005_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_005_DriverDebugRequest(winIVRSystem_IVRSystem_005 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_005_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +extern vtable_ptr winIVRSystem_IVRSystem_005_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_005, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetWindowBounds) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetEyeOutputViewport) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_AttachToWindow) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetSortedTrackedDeviceIndicesOfClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_005_DriverDebugRequest) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_005 *create_winIVRSystem_IVRSystem_005(void *linux_side) +{ + winIVRSystem_IVRSystem_005 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_005)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_005_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_004.h" + +typedef struct __winIVRSystem_IVRSystem_004 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_004; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetWindowBounds, 36) +void __thiscall winIVRSystem_IVRSystem_004_GetWindowBounds(winIVRSystem_IVRSystem_004 *_this, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_GetWindowBounds(_this->linux_side, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_004_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_004 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetEyeOutputViewport, 40) +void __thiscall winIVRSystem_IVRSystem_004_GetEyeOutputViewport(winIVRSystem_IVRSystem_004 *_this, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_GetEyeOutputViewport(_this->linux_side, eEye, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_004_GetProjectionMatrix(winIVRSystem_IVRSystem_004 *_this, HmdMatrix44_t *_r, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_004_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_004_GetProjectionRaw(winIVRSystem_IVRSystem_004 *_this, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_004_ComputeDistortion(winIVRSystem_IVRSystem_004 *_this, DistortionCoordinates_t *_r, Hmd_Eye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_004_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_004_GetEyeToHeadTransform(winIVRSystem_IVRSystem_004 *_this, HmdMatrix34_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_004_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_004_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_004 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_004_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetDXGIOutputInfo, 20) +void __thiscall winIVRSystem_IVRSystem_004_GetDXGIOutputInfo(winIVRSystem_IVRSystem_004 *_this, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex, pnAdapterOutputIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_AttachToWindow, 12) +bool __thiscall winIVRSystem_IVRSystem_004_AttachToWindow(winIVRSystem_IVRSystem_004 *_this, void * hWnd) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_AttachToWindow(_this->linux_side, hWnd); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_004_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_004 *_this, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_004_ResetSeatedZeroPose(winIVRSystem_IVRSystem_004 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_004_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_004 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_004_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetTrackedDeviceClass, 8) +TrackedDeviceClass __thiscall winIVRSystem_IVRSystem_004_GetTrackedDeviceClass(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_004_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_004_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_004_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_004_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_004_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_004_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_004 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_004_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_004_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_004_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_004 *_this, TrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_PollNextEvent, 12) +bool __thiscall winIVRSystem_IVRSystem_004_PollNextEvent(winIVRSystem_IVRSystem_004 *_this, winVREvent_t_092 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_PollNextEvent(_this->linux_side, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_PollNextEventWithPose, 24) +bool __thiscall winIVRSystem_IVRSystem_004_PollNextEventWithPose(winIVRSystem_IVRSystem_004 *_this, TrackingUniverseOrigin eOrigin, winVREvent_t_092 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_004_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_004 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_004_GetHiddenAreaMesh(winIVRSystem_IVRSystem_004 *_this, HiddenAreaMesh_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_004_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_004_GetControllerState(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_092 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_004_GetControllerStateWithPose(winIVRSystem_IVRSystem_004 *_this, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_092 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_004_TriggerHapticPulse(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_004_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_004 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_004_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_004 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_004_CaptureInputFocus(winIVRSystem_IVRSystem_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_004_ReleaseInputFocus(winIVRSystem_IVRSystem_004 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_004_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_004_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_004 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_004_DriverDebugRequest, 28) +uint32_t __thiscall winIVRSystem_IVRSystem_004_DriverDebugRequest(winIVRSystem_IVRSystem_004 *_this, TrackedDeviceIndex_t unDeviceIndex, const char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_004_DriverDebugRequest(_this->linux_side, unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); +} + +extern vtable_ptr winIVRSystem_IVRSystem_004_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_004, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetWindowBounds) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetEyeOutputViewport) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_AttachToWindow) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_IsInputFocusCapturedByAnotherProcess) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_004_DriverDebugRequest) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_004 *create_winIVRSystem_IVRSystem_004(void *linux_side) +{ + winIVRSystem_IVRSystem_004 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_004)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_004_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRSystem_IVRSystem_003.h" + +typedef struct __winIVRSystem_IVRSystem_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSystem_IVRSystem_003; + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetWindowBounds, 36) +void __thiscall winIVRSystem_IVRSystem_003_GetWindowBounds(winIVRSystem_IVRSystem_003 *_this, int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_GetWindowBounds(_this->linux_side, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetRecommendedRenderTargetSize, 20) +void __thiscall winIVRSystem_IVRSystem_003_GetRecommendedRenderTargetSize(winIVRSystem_IVRSystem_003 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_GetRecommendedRenderTargetSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetEyeOutputViewport, 40) +void __thiscall winIVRSystem_IVRSystem_003_GetEyeOutputViewport(winIVRSystem_IVRSystem_003 *_this, Hmd_Eye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_GetEyeOutputViewport(_this->linux_side, eEye, pnX, pnY, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetProjectionMatrix, 24) +HmdMatrix44_t *__thiscall winIVRSystem_IVRSystem_003_GetProjectionMatrix(winIVRSystem_IVRSystem_003 *_this, HmdMatrix44_t *_r, Hmd_Eye eEye, float fNearZ, float fFarZ, GraphicsAPIConvention eProjType) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_003_GetProjectionMatrix(_this->linux_side, eEye, fNearZ, fFarZ, eProjType); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetProjectionRaw, 40) +void __thiscall winIVRSystem_IVRSystem_003_GetProjectionRaw(winIVRSystem_IVRSystem_003 *_this, Hmd_Eye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_GetProjectionRaw(_this->linux_side, eEye, pfLeft, pfRight, pfTop, pfBottom); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_ComputeDistortion, 20) +DistortionCoordinates_t *__thiscall winIVRSystem_IVRSystem_003_ComputeDistortion(winIVRSystem_IVRSystem_003 *_this, DistortionCoordinates_t *_r, Hmd_Eye eEye, float fU, float fV) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_003_ComputeDistortion(_this->linux_side, eEye, fU, fV); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetEyeToHeadTransform, 12) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_003_GetEyeToHeadTransform(winIVRSystem_IVRSystem_003 *_this, HmdMatrix34_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_003_GetEyeToHeadTransform(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetTimeSinceLastVsync, 20) +bool __thiscall winIVRSystem_IVRSystem_003_GetTimeSinceLastVsync(winIVRSystem_IVRSystem_003 *_this, float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetTimeSinceLastVsync(_this->linux_side, pfSecondsSinceLastVsync, pulFrameCounter); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetD3D9AdapterIndex, 4) +int32_t __thiscall winIVRSystem_IVRSystem_003_GetD3D9AdapterIndex(winIVRSystem_IVRSystem_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetD3D9AdapterIndex(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetDXGIOutputInfo, 20) +void __thiscall winIVRSystem_IVRSystem_003_GetDXGIOutputInfo(winIVRSystem_IVRSystem_003 *_this, int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_GetDXGIOutputInfo(_this->linux_side, pnAdapterIndex, pnAdapterOutputIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_AttachToWindow, 12) +bool __thiscall winIVRSystem_IVRSystem_003_AttachToWindow(winIVRSystem_IVRSystem_003 *_this, void * hWnd) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_AttachToWindow(_this->linux_side, hWnd); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetDeviceToAbsoluteTrackingPose, 24) +void __thiscall winIVRSystem_IVRSystem_003_GetDeviceToAbsoluteTrackingPose(winIVRSystem_IVRSystem_003 *_this, TrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_GetDeviceToAbsoluteTrackingPose(_this->linux_side, eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_ResetSeatedZeroPose, 4) +void __thiscall winIVRSystem_IVRSystem_003_ResetSeatedZeroPose(winIVRSystem_IVRSystem_003 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_ResetSeatedZeroPose(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetSeatedZeroPoseToStandingAbsoluteTrackingPose, 8) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_003_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(winIVRSystem_IVRSystem_003 *_this, HmdMatrix34_t *_r) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_003_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(_this->linux_side); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_LoadRenderModel, 20) +bool __thiscall winIVRSystem_IVRSystem_003_LoadRenderModel(winIVRSystem_IVRSystem_003 *_this, const char * pchRenderModelName, winRenderModel_t_091 * pRenderModel) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_LoadRenderModel(_this->linux_side, pchRenderModelName, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_FreeRenderModel, 12) +void __thiscall winIVRSystem_IVRSystem_003_FreeRenderModel(winIVRSystem_IVRSystem_003 *_this, winRenderModel_t_091 * pRenderModel) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_FreeRenderModel(_this->linux_side, pRenderModel); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetTrackedDeviceClass, 8) +TrackedDeviceClass __thiscall winIVRSystem_IVRSystem_003_GetTrackedDeviceClass(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetTrackedDeviceClass(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_IsTrackedDeviceConnected, 8) +bool __thiscall winIVRSystem_IVRSystem_003_IsTrackedDeviceConnected(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_IsTrackedDeviceConnected(_this->linux_side, unDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetBoolTrackedDeviceProperty, 20) +bool __thiscall winIVRSystem_IVRSystem_003_GetBoolTrackedDeviceProperty(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetBoolTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetFloatTrackedDeviceProperty, 20) +float __thiscall winIVRSystem_IVRSystem_003_GetFloatTrackedDeviceProperty(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetFloatTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetInt32TrackedDeviceProperty, 20) +int32_t __thiscall winIVRSystem_IVRSystem_003_GetInt32TrackedDeviceProperty(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetInt32TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetUint64TrackedDeviceProperty, 20) +uint64_t __thiscall winIVRSystem_IVRSystem_003_GetUint64TrackedDeviceProperty(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetUint64TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetMatrix34TrackedDeviceProperty, 24) +HmdMatrix34_t *__thiscall winIVRSystem_IVRSystem_003_GetMatrix34TrackedDeviceProperty(winIVRSystem_IVRSystem_003 *_this, HmdMatrix34_t *_r, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_003_GetMatrix34TrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pError); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetStringTrackedDeviceProperty, 32) +uint32_t __thiscall winIVRSystem_IVRSystem_003_GetStringTrackedDeviceProperty(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, TrackedPropertyError * pError) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetStringTrackedDeviceProperty(_this->linux_side, unDeviceIndex, prop, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetPropErrorNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_003_GetPropErrorNameFromEnum(winIVRSystem_IVRSystem_003 *_this, TrackedPropertyError error) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetPropErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_PollNextEvent, 12) +bool __thiscall winIVRSystem_IVRSystem_003_PollNextEvent(winIVRSystem_IVRSystem_003 *_this, winVREvent_t_091 * pEvent) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_PollNextEvent(_this->linux_side, pEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_PollNextEventWithPose, 24) +bool __thiscall winIVRSystem_IVRSystem_003_PollNextEventWithPose(winIVRSystem_IVRSystem_003 *_this, TrackingUniverseOrigin eOrigin, winVREvent_t_091 * pEvent, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetEventTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_003_GetEventTypeNameFromEnum(winIVRSystem_IVRSystem_003 *_this, EVREventType eType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetEventTypeNameFromEnum(_this->linux_side, eType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetHiddenAreaMesh, 12) +HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_003_GetHiddenAreaMesh(winIVRSystem_IVRSystem_003 *_this, HiddenAreaMesh_t *_r, Hmd_Eye eEye) +{ + TRACE("%p\n", _this); + *_r = cppIVRSystem_IVRSystem_003_GetHiddenAreaMesh(_this->linux_side, eEye); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetControllerState, 16) +bool __thiscall winIVRSystem_IVRSystem_003_GetControllerState(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_091 * pControllerState) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetControllerStateWithPose, 28) +bool __thiscall winIVRSystem_IVRSystem_003_GetControllerStateWithPose(winIVRSystem_IVRSystem_003 *_this, TrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_091 * pControllerState, TrackedDevicePose_t * pTrackedDevicePose) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, pTrackedDevicePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_TriggerHapticPulse, 14) +void __thiscall winIVRSystem_IVRSystem_003_TriggerHapticPulse(winIVRSystem_IVRSystem_003 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_TriggerHapticPulse(_this->linux_side, unControllerDeviceIndex, unAxisId, usDurationMicroSec); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetButtonIdNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_003_GetButtonIdNameFromEnum(winIVRSystem_IVRSystem_003 *_this, EVRButtonId eButtonId) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetButtonIdNameFromEnum(_this->linux_side, eButtonId); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_GetControllerAxisTypeNameFromEnum, 8) +const char * __thiscall winIVRSystem_IVRSystem_003_GetControllerAxisTypeNameFromEnum(winIVRSystem_IVRSystem_003 *_this, EVRControllerAxisType eAxisType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_GetControllerAxisTypeNameFromEnum(_this->linux_side, eAxisType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_HandleControllerOverlayInteractionAsMouse, 140) +bool __thiscall winIVRSystem_IVRSystem_003_HandleControllerOverlayInteractionAsMouse(winIVRSystem_IVRSystem_003 *_this, Compositor_OverlaySettings * overlaySettings, HmdVector2_t vecWindowClientPositionOnScreen, HmdVector2_t vecWindowClientSize, TrackedDeviceIndex_t unControllerDeviceIndex, EVRControllerEventOutputType eOutputType) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_HandleControllerOverlayInteractionAsMouse(_this->linux_side, overlaySettings, vecWindowClientPositionOnScreen, vecWindowClientSize, unControllerDeviceIndex, eOutputType); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_CaptureInputFocus, 4) +bool __thiscall winIVRSystem_IVRSystem_003_CaptureInputFocus(winIVRSystem_IVRSystem_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_CaptureInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_ReleaseInputFocus, 4) +void __thiscall winIVRSystem_IVRSystem_003_ReleaseInputFocus(winIVRSystem_IVRSystem_003 *_this) +{ + TRACE("%p\n", _this); + cppIVRSystem_IVRSystem_003_ReleaseInputFocus(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_003_IsInputFocusCapturedByAnotherProcess, 4) +bool __thiscall winIVRSystem_IVRSystem_003_IsInputFocusCapturedByAnotherProcess(winIVRSystem_IVRSystem_003 *_this) +{ + TRACE("%p\n", _this); + return cppIVRSystem_IVRSystem_003_IsInputFocusCapturedByAnotherProcess(_this->linux_side); +} + +extern vtable_ptr winIVRSystem_IVRSystem_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSystem_IVRSystem_003, + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetWindowBounds) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetRecommendedRenderTargetSize) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetEyeOutputViewport) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetProjectionMatrix) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetProjectionRaw) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_ComputeDistortion) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetEyeToHeadTransform) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetTimeSinceLastVsync) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetD3D9AdapterIndex) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetDXGIOutputInfo) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_AttachToWindow) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetDeviceToAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_ResetSeatedZeroPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetSeatedZeroPoseToStandingAbsoluteTrackingPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_LoadRenderModel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_FreeRenderModel) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetTrackedDeviceClass) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_IsTrackedDeviceConnected) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetBoolTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetFloatTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetInt32TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetUint64TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetMatrix34TrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetStringTrackedDeviceProperty) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetPropErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_PollNextEvent) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_PollNextEventWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetEventTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetHiddenAreaMesh) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetControllerState) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetControllerStateWithPose) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_TriggerHapticPulse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetButtonIdNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_GetControllerAxisTypeNameFromEnum) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_HandleControllerOverlayInteractionAsMouse) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_CaptureInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_ReleaseInputFocus) + VTABLE_ADD_FUNC(winIVRSystem_IVRSystem_003_IsInputFocusCapturedByAnotherProcess) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSystem_IVRSystem_003 *create_winIVRSystem_IVRSystem_003(void *linux_side) +{ + winIVRSystem_IVRSystem_003 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRSystem_IVRSystem_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSystem_IVRSystem_003_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/winIVRTrackedCamera.c b/vrclient_x64/winIVRTrackedCamera.c new file mode 100644 index 00000000..45eee7c6 --- /dev/null +++ b/vrclient_x64/winIVRTrackedCamera.c @@ -0,0 +1,407 @@ +/* This file is auto-generated, do not edit. */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRTrackedCamera_IVRTrackedCamera_003.h" + +typedef struct __winIVRTrackedCamera_IVRTrackedCamera_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVRTrackedCamera_IVRTrackedCamera_003; + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraErrorNameFromEnum, 8) +const char * __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraErrorNameFromEnum(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, EVRTrackedCameraError eCameraError) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraErrorNameFromEnum(_this->linux_side, eCameraError); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_HasCamera, 16) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_HasCamera(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_HasCamera(_this->linux_side, nDeviceIndex, pHasCamera); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraFrameSize, 36) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraFrameSize(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraFrameSize(_this->linux_side, nDeviceIndex, eFrameType, pnWidth, pnHeight, pnFrameBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraIntrinsics, 28) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraIntrinsics(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraIntrinsics(_this->linux_side, nDeviceIndex, eFrameType, pFocalLength, pCenter); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraProjection, 28) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraProjection(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetCameraProjection(_this->linux_side, nDeviceIndex, eFrameType, flZNear, flZFar, pProjection); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_AcquireVideoStreamingService, 16) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_AcquireVideoStreamingService(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_AcquireVideoStreamingService(_this->linux_side, nDeviceIndex, pHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamingService, 12) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamingService(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedCameraHandle_t hTrackedCamera) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamingService(_this->linux_side, hTrackedCamera); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamFrameBuffer, 40) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamFrameBuffer(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamFrameBuffer(_this->linux_side, hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, pFrameHeader, nFrameHeaderSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureSize, 36) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureSize(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, VRTextureBounds_t * pTextureBounds, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureSize(_this->linux_side, nDeviceIndex, eFrameType, pTextureBounds, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureD3D11, 44) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureD3D11(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureD3D11(_this->linux_side, hTrackedCamera, eFrameType, pD3D11DeviceOrResource, ppD3D11ShaderResourceView, pFrameHeader, nFrameHeaderSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureGL, 36) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureGL(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureGL(_this->linux_side, hTrackedCamera, eFrameType, pglTextureId, pFrameHeader, nFrameHeaderSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamTextureGL, 16) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamTextureGL(winIVRTrackedCamera_IVRTrackedCamera_003 *_this, TrackedCameraHandle_t hTrackedCamera, glUInt_t glTextureId) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamTextureGL(_this->linux_side, hTrackedCamera, glTextureId); +} + +extern vtable_ptr winIVRTrackedCamera_IVRTrackedCamera_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRTrackedCamera_IVRTrackedCamera_003, + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_HasCamera) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraFrameSize) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraIntrinsics) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetCameraProjection) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_AcquireVideoStreamingService) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamingService) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamFrameBuffer) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureSize) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureD3D11) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_GetVideoStreamTextureGL) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_003_ReleaseVideoStreamTextureGL) + ); +#ifndef __GNUC__ +} +#endif + +winIVRTrackedCamera_IVRTrackedCamera_003 *create_winIVRTrackedCamera_IVRTrackedCamera_003(void *linux_side) +{ + winIVRTrackedCamera_IVRTrackedCamera_003 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRTrackedCamera_IVRTrackedCamera_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVRTrackedCamera_IVRTrackedCamera_003_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRTrackedCamera_IVRTrackedCamera_002.h" + +typedef struct __winIVRTrackedCamera_IVRTrackedCamera_002 { + vtable_ptr *vtable; + void *linux_side; +} winIVRTrackedCamera_IVRTrackedCamera_002; + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraErrorNameFromEnum, 8) +const char * __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraErrorNameFromEnum(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, EVRTrackedCameraError eCameraError) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraErrorNameFromEnum(_this->linux_side, eCameraError); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_HasCamera, 16) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_HasCamera(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_HasCamera(_this->linux_side, nDeviceIndex, pHasCamera); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraFrameSize, 36) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraFrameSize(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraFrameSize(_this->linux_side, nDeviceIndex, eFrameType, pnWidth, pnHeight, pnFrameBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraIntrinisics, 28) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraIntrinisics(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraIntrinisics(_this->linux_side, nDeviceIndex, eFrameType, pFocalLength, pCenter); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraProjection, 28) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraProjection(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_GetCameraProjection(_this->linux_side, nDeviceIndex, eFrameType, flZNear, flZFar, pProjection); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_AcquireVideoStreamingService, 16) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_AcquireVideoStreamingService(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_AcquireVideoStreamingService(_this->linux_side, nDeviceIndex, pHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_ReleaseVideoStreamingService, 12) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_ReleaseVideoStreamingService(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedCameraHandle_t hTrackedCamera) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_ReleaseVideoStreamingService(_this->linux_side, hTrackedCamera); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_002_GetVideoStreamFrameBuffer, 40) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_002_GetVideoStreamFrameBuffer(winIVRTrackedCamera_IVRTrackedCamera_002 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_002_GetVideoStreamFrameBuffer(_this->linux_side, hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, pFrameHeader, nFrameHeaderSize); +} + +extern vtable_ptr winIVRTrackedCamera_IVRTrackedCamera_002_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRTrackedCamera_IVRTrackedCamera_002, + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_HasCamera) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraFrameSize) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraIntrinisics) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_GetCameraProjection) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_AcquireVideoStreamingService) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_ReleaseVideoStreamingService) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_002_GetVideoStreamFrameBuffer) + ); +#ifndef __GNUC__ +} +#endif + +winIVRTrackedCamera_IVRTrackedCamera_002 *create_winIVRTrackedCamera_IVRTrackedCamera_002(void *linux_side) +{ + winIVRTrackedCamera_IVRTrackedCamera_002 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRTrackedCamera_IVRTrackedCamera_002)); + TRACE("-> %p\n", r); + r->vtable = &winIVRTrackedCamera_IVRTrackedCamera_002_vtable; + r->linux_side = linux_side; + return r; +} + +#include "cppIVRTrackedCamera_IVRTrackedCamera_001.h" + +typedef struct __winIVRTrackedCamera_IVRTrackedCamera_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRTrackedCamera_IVRTrackedCamera_001; + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_HasCamera, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_HasCamera(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_HasCamera(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFirmwareDescription, 20) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFirmwareDescription(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, char * pBuffer, uint32_t nBufferLen) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFirmwareDescription(_this->linux_side, nDeviceIndex, pBuffer, nBufferLen); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFrameDimensions, 28) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFrameDimensions(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFrameDimensions(_this->linux_side, nDeviceIndex, nVideoStreamFormat, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_SetCameraVideoStreamFormat, 12) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_SetCameraVideoStreamFormat(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_SetCameraVideoStreamFormat(_this->linux_side, nDeviceIndex, nVideoStreamFormat); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraVideoStreamFormat, 8) +ECameraVideoStreamFormat __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraVideoStreamFormat(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraVideoStreamFormat(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_EnableCameraForStreaming, 9) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_EnableCameraForStreaming(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, bool bEnable) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_EnableCameraForStreaming(_this->linux_side, nDeviceIndex, bEnable); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_StartVideoStream, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_StartVideoStream(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_StartVideoStream(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_StopVideoStream, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_StopVideoStream(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_StopVideoStream(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamActive, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamActive(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamActive(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamElapsedTime, 8) +float __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamElapsedTime(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamElapsedTime(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamFrame, 8) +const CameraVideoStreamFrame_t * __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamFrame(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamFrame(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_ReleaseVideoStreamFrame, 16) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_ReleaseVideoStreamFrame(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, CameraVideoStreamFrame_t * pFrameImage) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_ReleaseVideoStreamFrame(_this->linux_side, nDeviceIndex, pFrameImage); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_SetAutoExposure, 9) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_SetAutoExposure(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, bool bEnable) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_SetAutoExposure(_this->linux_side, nDeviceIndex, bEnable); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_PauseVideoStream, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_PauseVideoStream(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_PauseVideoStream(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_ResumeVideoStream, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_ResumeVideoStream(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_ResumeVideoStream(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamPaused, 8) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamPaused(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamPaused(_this->linux_side, nDeviceIndex); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraDistortion, 32) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraDistortion(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, float flInputU, float flInputV, float * pflOutputU, float * pflOutputV) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraDistortion(_this->linux_side, nDeviceIndex, flInputU, flInputV, pflOutputU, pflOutputV); +} + +DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraProjection, 32) +bool __thiscall winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraProjection(winIVRTrackedCamera_IVRTrackedCamera_001 *_this, TrackedDeviceIndex_t nDeviceIndex, float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, HmdMatrix44_t * pProjection) +{ + TRACE("%p\n", _this); + return cppIVRTrackedCamera_IVRTrackedCamera_001_GetCameraProjection(_this->linux_side, nDeviceIndex, flWidthPixels, flHeightPixels, flZNear, flZFar, pProjection); +} + +extern vtable_ptr winIVRTrackedCamera_IVRTrackedCamera_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRTrackedCamera_IVRTrackedCamera_001, + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_HasCamera) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFirmwareDescription) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraFrameDimensions) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_SetCameraVideoStreamFormat) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraVideoStreamFormat) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_EnableCameraForStreaming) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_StartVideoStream) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_StopVideoStream) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamActive) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamElapsedTime) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetVideoStreamFrame) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_ReleaseVideoStreamFrame) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_SetAutoExposure) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_PauseVideoStream) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_ResumeVideoStream) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_IsVideoStreamPaused) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraDistortion) + VTABLE_ADD_FUNC(winIVRTrackedCamera_IVRTrackedCamera_001_GetCameraProjection) + ); +#ifndef __GNUC__ +} +#endif + +winIVRTrackedCamera_IVRTrackedCamera_001 *create_winIVRTrackedCamera_IVRTrackedCamera_001(void *linux_side) +{ + winIVRTrackedCamera_IVRTrackedCamera_001 *r = HeapAlloc(GetProcessHeap(), 0, sizeof(winIVRTrackedCamera_IVRTrackedCamera_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRTrackedCamera_IVRTrackedCamera_001_vtable; + r->linux_side = linux_side; + return r; +} + diff --git a/vrclient_x64/win_constructors.h b/vrclient_x64/win_constructors.h new file mode 100644 index 00000000..cfaf013e --- /dev/null +++ b/vrclient_x64/win_constructors.h @@ -0,0 +1,70 @@ +extern void *create_winIVRSystem_IVRSystem_017(void *); +extern void *create_winIVRApplications_IVRApplications_006(void *); +extern void *create_winIVRSettings_IVRSettings_002(void *); +extern void *create_winIVRChaperone_IVRChaperone_003(void *); +extern void *create_winIVRChaperoneSetup_IVRChaperoneSetup_005(void *); +extern void *create_winIVRCompositor_IVRCompositor_022(void *); +extern void *create_winIVRNotifications_IVRNotifications_002(void *); +extern void *create_winIVROverlay_IVROverlay_017(void *); +extern void *create_winIVRRenderModels_IVRRenderModels_005(void *); +extern void *create_winIVRExtendedDisplay_IVRExtendedDisplay_001(void *); +extern void *create_winIVRTrackedCamera_IVRTrackedCamera_003(void *); +extern void *create_winIVRScreenshots_IVRScreenshots_001(void *); +extern void *create_winIVRResources_IVRResources_001(void *); +extern void *create_winIVRDriverManager_IVRDriverManager_001(void *); +extern void *create_winIVRClientCore_IVRClientCore_003(void *); +extern void *create_winIVRCompositor_IVRCompositor_021(void *); +extern void *create_winIVROverlay_IVROverlay_016(void *); +extern void *create_winIVRSystem_IVRSystem_016(void *); +extern void *create_winIVRCompositor_IVRCompositor_020(void *); +extern void *create_winIVRClientCore_IVRClientCore_002(void *); +extern void *create_winIVRSystem_IVRSystem_015(void *); +extern void *create_winIVROverlay_IVROverlay_014(void *); +extern void *create_winIVRCompositor_IVRCompositor_019(void *); +extern void *create_winIVRSystem_IVRSystem_014(void *); +extern void *create_winIVRCompositor_IVRCompositor_018(void *); +extern void *create_winIVROverlay_IVROverlay_013(void *); +extern void *create_winIVRSystem_IVRSystem_012(void *); +extern void *create_winIVRCompositor_IVRCompositor_016(void *); +extern void *create_winIVRSettings_IVRSettings_001(void *); +extern void *create_winIVRApplications_IVRApplications_005(void *); +extern void *create_winIVRCompositor_IVRCompositor_015(void *); +extern void *create_winIVROverlay_IVROverlay_012(void *); +extern void *create_winIVRTrackedCamera_IVRTrackedCamera_002(void *); +extern void *create_winIVRCompositor_IVRCompositor_014(void *); +extern void *create_winIVROverlay_IVROverlay_011(void *); +extern void *create_winIVRCompositor_IVRCompositor_013(void *); +extern void *create_winIVRSystem_IVRSystem_011(void *); +extern void *create_winIVRApplications_IVRApplications_004(void *); +extern void *create_winIVROverlay_IVROverlay_010(void *); +extern void *create_winIVRRenderModels_IVRRenderModels_004(void *); +extern void *create_winIVRCompositor_IVRCompositor_012(void *); +extern void *create_winIVRApplications_IVRApplications_003(void *); +extern void *create_winIVRCompositor_IVRCompositor_011(void *); +extern void *create_winIVRRenderModels_IVRRenderModels_002(void *); +extern void *create_winIVRSystem_IVRSystem_010(void *); +extern void *create_winIVRApplications_IVRApplications_002(void *); +extern void *create_winIVRChaperoneSetup_IVRChaperoneSetup_004(void *); +extern void *create_winIVRCompositor_IVRCompositor_010(void *); +extern void *create_winIVROverlay_IVROverlay_008(void *); +extern void *create_winIVRTrackedCamera_IVRTrackedCamera_001(void *); +extern void *create_winIVRCompositor_IVRCompositor_009(void *); +extern void *create_winIVRSystem_IVRSystem_009(void *); +extern void *create_winIVROverlay_IVROverlay_007(void *); +extern void *create_winIVRSystem_IVRSystem_006(void *); +extern void *create_winIVRApplications_IVRApplications_001(void *); +extern void *create_winIVRChaperone_IVRChaperone_002(void *); +extern void *create_winIVRCompositor_IVRCompositor_008(void *); +extern void *create_winIVRNotifications_IVRNotifications_001(void *); +extern void *create_winIVROverlay_IVROverlay_005(void *); +extern void *create_winIVRRenderModels_IVRRenderModels_001(void *); +extern void *create_winIVRSystem_IVRSystem_005(void *); +extern void *create_winIVRCompositor_IVRCompositor_007(void *); +extern void *create_winIVROverlay_IVROverlay_004(void *); +extern void *create_winIVROverlay_IVROverlay_003(void *); +extern void *create_winIVROverlay_IVROverlay_002(void *); +extern void *create_winIVRSystem_IVRSystem_004(void *); +extern void *create_winIVRCompositor_IVRCompositor_006(void *); +extern void *create_winIVROverlay_IVROverlay_001(void *); +extern void *create_winIVRSystem_IVRSystem_003(void *); +extern void *create_winIVRCompositor_IVRCompositor_005(void *); diff --git a/vrclient_x64/win_constructors_table.dat b/vrclient_x64/win_constructors_table.dat new file mode 100644 index 00000000..0fcaee9e --- /dev/null +++ b/vrclient_x64/win_constructors_table.dat @@ -0,0 +1,70 @@ + {"IVRSystem_017", &create_winIVRSystem_IVRSystem_017}, + {"IVRApplications_006", &create_winIVRApplications_IVRApplications_006}, + {"IVRSettings_002", &create_winIVRSettings_IVRSettings_002}, + {"IVRChaperone_003", &create_winIVRChaperone_IVRChaperone_003}, + {"IVRChaperoneSetup_005", &create_winIVRChaperoneSetup_IVRChaperoneSetup_005}, + {"IVRCompositor_022", &create_winIVRCompositor_IVRCompositor_022}, + {"IVRNotifications_002", &create_winIVRNotifications_IVRNotifications_002}, + {"IVROverlay_017", &create_winIVROverlay_IVROverlay_017}, + {"IVRRenderModels_005", &create_winIVRRenderModels_IVRRenderModels_005}, + {"IVRExtendedDisplay_001", &create_winIVRExtendedDisplay_IVRExtendedDisplay_001}, + {"IVRTrackedCamera_003", &create_winIVRTrackedCamera_IVRTrackedCamera_003}, + {"IVRScreenshots_001", &create_winIVRScreenshots_IVRScreenshots_001}, + {"IVRResources_001", &create_winIVRResources_IVRResources_001}, + {"IVRDriverManager_001", &create_winIVRDriverManager_IVRDriverManager_001}, + {"IVRClientCore_003", &create_winIVRClientCore_IVRClientCore_003}, + {"IVRCompositor_021", &create_winIVRCompositor_IVRCompositor_021}, + {"IVROverlay_016", &create_winIVROverlay_IVROverlay_016}, + {"IVRSystem_016", &create_winIVRSystem_IVRSystem_016}, + {"IVRCompositor_020", &create_winIVRCompositor_IVRCompositor_020}, + {"IVRClientCore_002", &create_winIVRClientCore_IVRClientCore_002}, + {"IVRSystem_015", &create_winIVRSystem_IVRSystem_015}, + {"IVROverlay_014", &create_winIVROverlay_IVROverlay_014}, + {"IVRCompositor_019", &create_winIVRCompositor_IVRCompositor_019}, + {"IVRSystem_014", &create_winIVRSystem_IVRSystem_014}, + {"IVRCompositor_018", &create_winIVRCompositor_IVRCompositor_018}, + {"IVROverlay_013", &create_winIVROverlay_IVROverlay_013}, + {"IVRSystem_012", &create_winIVRSystem_IVRSystem_012}, + {"IVRCompositor_016", &create_winIVRCompositor_IVRCompositor_016}, + {"IVRSettings_001", &create_winIVRSettings_IVRSettings_001}, + {"IVRApplications_005", &create_winIVRApplications_IVRApplications_005}, + {"IVRCompositor_015", &create_winIVRCompositor_IVRCompositor_015}, + {"IVROverlay_012", &create_winIVROverlay_IVROverlay_012}, + {"IVRTrackedCamera_002", &create_winIVRTrackedCamera_IVRTrackedCamera_002}, + {"IVRCompositor_014", &create_winIVRCompositor_IVRCompositor_014}, + {"IVROverlay_011", &create_winIVROverlay_IVROverlay_011}, + {"IVRCompositor_013", &create_winIVRCompositor_IVRCompositor_013}, + {"IVRSystem_011", &create_winIVRSystem_IVRSystem_011}, + {"IVRApplications_004", &create_winIVRApplications_IVRApplications_004}, + {"IVROverlay_010", &create_winIVROverlay_IVROverlay_010}, + {"IVRRenderModels_004", &create_winIVRRenderModels_IVRRenderModels_004}, + {"IVRCompositor_012", &create_winIVRCompositor_IVRCompositor_012}, + {"IVRApplications_003", &create_winIVRApplications_IVRApplications_003}, + {"IVRCompositor_011", &create_winIVRCompositor_IVRCompositor_011}, + {"IVRRenderModels_002", &create_winIVRRenderModels_IVRRenderModels_002}, + {"IVRSystem_010", &create_winIVRSystem_IVRSystem_010}, + {"IVRApplications_002", &create_winIVRApplications_IVRApplications_002}, + {"IVRChaperoneSetup_004", &create_winIVRChaperoneSetup_IVRChaperoneSetup_004}, + {"IVRCompositor_010", &create_winIVRCompositor_IVRCompositor_010}, + {"IVROverlay_008", &create_winIVROverlay_IVROverlay_008}, + {"IVRTrackedCamera_001", &create_winIVRTrackedCamera_IVRTrackedCamera_001}, + {"IVRCompositor_009", &create_winIVRCompositor_IVRCompositor_009}, + {"IVRSystem_009", &create_winIVRSystem_IVRSystem_009}, + {"IVROverlay_007", &create_winIVROverlay_IVROverlay_007}, + {"IVRSystem_006", &create_winIVRSystem_IVRSystem_006}, + {"IVRApplications_001", &create_winIVRApplications_IVRApplications_001}, + {"IVRChaperone_002", &create_winIVRChaperone_IVRChaperone_002}, + {"IVRCompositor_008", &create_winIVRCompositor_IVRCompositor_008}, + {"IVRNotifications_001", &create_winIVRNotifications_IVRNotifications_001}, + {"IVROverlay_005", &create_winIVROverlay_IVROverlay_005}, + {"IVRRenderModels_001", &create_winIVRRenderModels_IVRRenderModels_001}, + {"IVRSystem_005", &create_winIVRSystem_IVRSystem_005}, + {"IVRCompositor_007", &create_winIVRCompositor_IVRCompositor_007}, + {"IVROverlay_004", &create_winIVROverlay_IVROverlay_004}, + {"IVROverlay_003", &create_winIVROverlay_IVROverlay_003}, + {"IVROverlay_002", &create_winIVROverlay_IVROverlay_002}, + {"IVRSystem_004", &create_winIVRSystem_IVRSystem_004}, + {"IVRCompositor_006", &create_winIVRCompositor_IVRCompositor_006}, + {"IVROverlay_001", &create_winIVROverlay_IVROverlay_001}, + {"IVRSystem_003", &create_winIVRSystem_IVRSystem_003}, + {"IVRCompositor_005", &create_winIVRCompositor_IVRCompositor_005},