From e9b60f0ce97f41fd9eb5a2b52e42e9cab5a196bd Mon Sep 17 00:00:00 2001 From: Vixea Date: Sun, 29 Jun 2025 21:33:23 -0500 Subject: [PATCH] update-openvr --- alvr/server_openvr/cpp/alvr_server/HMD.cpp | 8 ++++++++ alvr/server_openvr/cpp/alvr_server/HMD.h | 4 ++++ .../cpp/platform/win32/OvrDirectModeComponent.cpp | 2 +- .../cpp/platform/win32/OvrDirectModeComponent.h | 2 +- openvr | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/alvr/server_openvr/cpp/alvr_server/HMD.cpp b/alvr/server_openvr/cpp/alvr_server/HMD.cpp index 608be70c36..b6c071f300 100644 --- a/alvr/server_openvr/cpp/alvr_server/HMD.cpp +++ b/alvr/server_openvr/cpp/alvr_server/HMD.cpp @@ -367,3 +367,11 @@ void Hmd::GetProjectionRaw(vr::EVREye eye, float* left, float* right, float* top vr::DistortionCoordinates_t Hmd::ComputeDistortion(vr::EVREye, float u, float v) { return { { u, v }, { u, v }, { u, v } }; } + +bool Hmd::ComputeInverseDistortion( + vr::HmdVector2_t* pResult, vr::EVREye eEye, uint32_t unChannel, float fU, float fV +) { + // Fail and hope everything is fine, this assumes false == fail the documentation doesn't + // specify + return false; +} diff --git a/alvr/server_openvr/cpp/alvr_server/HMD.h b/alvr/server_openvr/cpp/alvr_server/HMD.h index ec6bb9f56c..39ad3ad134 100644 --- a/alvr/server_openvr/cpp/alvr_server/HMD.h +++ b/alvr/server_openvr/cpp/alvr_server/HMD.h @@ -74,4 +74,8 @@ class Hmd : public TrackedDevice, vr::IVRDisplayComponent { virtual void GetProjectionRaw(vr::EVREye eEye, float* pfLeft, float* pfRight, float* pfTop, float* pfBottom); virtual vr::DistortionCoordinates_t ComputeDistortion(vr::EVREye eEye, float fU, float fV); + // TODO: Implement? + virtual bool ComputeInverseDistortion( + vr::HmdVector2_t* pResult, vr::EVREye eEye, uint32_t unChannel, float fU, float fV + ); }; diff --git a/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.cpp b/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.cpp index d1a18787cf..02f9d027d3 100644 --- a/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.cpp +++ b/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.cpp @@ -259,7 +259,7 @@ void OvrDirectModeComponent::Present(vr::SharedTextureHandle_t syncTexture) { m_presentMutex.unlock(); } -void OvrDirectModeComponent::PostPresent() { +void OvrDirectModeComponent::PostPresent(const Throttling_t* pThrottling) { Debug("OvrDirectModeComponent::PostPresent"); WaitForVSync(); diff --git a/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.h b/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.h index adef8973ea..cbe492d1b6 100644 --- a/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.h +++ b/alvr/server_openvr/cpp/platform/win32/OvrDirectModeComponent.h @@ -46,7 +46,7 @@ class OvrDirectModeComponent : public vr::IVRDriverDirectModeComponent { /** Called after Present to allow driver to take more time until vsync after they've * successfully acquired the sync texture in Present.*/ - virtual void PostPresent(); + virtual void PostPresent(const Throttling_t* pThrottling); void CopyTexture(uint32_t layerCount); diff --git a/openvr b/openvr index 4c85abcb7f..ebd4253312 160000 --- a/openvr +++ b/openvr @@ -1 +1 @@ -Subproject commit 4c85abcb7f7f1f02adaf3812018c99fc593bc341 +Subproject commit ebd425331229365dc3ec42d1bb8b2cc3c2332f81