Monado OpenXR Runtime
Loading...
Searching...
No Matches
XRTVRSystem_007.hpp
Go to the documentation of this file.
1// Copyright 2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Implementation of the IVRSystem interface version 007.
6 *
7 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
8 * @ingroup openvr_interfaces
9 */
10
11#pragma once
12
14
15#include "openvr_interfaces_unified.h"
16#include "openvr_forward_macros.h"
17
19#include "XRTVRSystem_010.hpp"
20
21
22namespace xrt::state_trackers::openvr {
23
24using namespace vr;
25
26class XRTVRSystem_007 : public XRTVRSystem_010, public vr::IVRSystem_007
27{
28public:
29 // @todo Remove when clang-format is updated in CI
30 // clang-format off
32 // clang-format on
33
34 void *
35 getFnTable()
36 {
37 // No FnTable available for IVRSystem_007.
38 return nullptr;
39 }
40
41 ForwardDeclareBase_IVRSystem(XRTVRSystem_010);
42
43 void
44 GetWindowBounds(int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight) override
45 {
46 openvr_logger logger;
47 OPENVR_LOGGER_INIT(logger);
48
49 // i guess this is fine?
50
51 (*pnX) = 0;
52 (*pnY) = 0;
53
54 ForwardBase_IVRSystem::GetRecommendedRenderTargetSize(pnWidth, pnHeight);
55
56 (*pnWidth) *= 2;
57 }
58
59 Forward_IVRSystem_GetRecommendedRenderTargetSize();
60
61 void
62 GetEyeOutputViewport(Hmd_Eye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight) override
63 {
64 openvr_logger logger;
65 OPENVR_LOGGER_INIT(logger);
66
67 (*pnX) = 0;
68 (*pnY) = 0;
69
70 ForwardBase_IVRSystem::GetRecommendedRenderTargetSize(pnWidth, pnHeight);
71
72 (*pnWidth) *= 2;
73
74 if (eEye != Hmd_Eye::Eye_Left) {
75 // Half the window width over
76 (*pnX) += (*pnWidth) / 2;
77 }
78
80 "GetEyeOutputViewport(eEye=?, pnX=%p, pnY=%p, pnWidth=%p, pnHeight=%p)",
81 static_cast<const void *>(pnX), static_cast<const void *>(pnY),
82 static_cast<const void *>(pnWidth), static_cast<const void *>(pnHeight));
83 }
84
85 Forward_IVRSystem_GetProjectionMatrix_014();
86 Forward_IVRSystem_GetProjectionRaw_026();
87 Forward_IVRSystem_ComputeDistortion_012();
88 Forward_IVRSystem_GetEyeToHeadTransform_026();
89 Forward_IVRSystem_GetTimeSinceLastVsync();
90 Forward_IVRSystem_GetD3D9AdapterIndex();
91
92 void
93 GetDXGIOutputInfo(int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex) override
94 {
95 int32_t adapterIndex;
96 ForwardBase_IVRSystem::GetDXGIOutputInfo(&adapterIndex);
97
98 (*pnAdapterIndex) = adapterIndex;
99 (*pnAdapterOutputIndex) = adapterIndex;
100 }
101
102 bool
103 AttachToWindow(void *hWnd) override
104 {
105 openvr_logger logger;
106 OPENVR_LOGGER_INIT(logger);
107
108 OPENVR_LOG_UNIMPLEMENTED_RET(logger, "AttachToWindow(hWnd=%p) -> true", true,
109 static_cast<const void *>(hWnd));
110 }
111
112 Forward_IVRSystem_GetDeviceToAbsoluteTrackingPose_026();
113 Forward_IVRSystem_ResetSeatedZeroPose();
114 Forward_IVRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
115 Forward_IVRSystem_GetRawZeroPoseToStandingAbsoluteTrackingPose();
116 Forward_IVRSystem_GetSortedTrackedDeviceIndicesOfClass_026();
117 Forward_IVRSystem_GetTrackedDeviceActivityLevel();
118
119 void
120 ApplyTransform(TrackedDevicePose_t *pOutputPose,
121 const TrackedDevicePose_t &trackedDevicePose,
122 const HmdMatrix34_t &transform) override
123 {
124 return ForwardBase_IVRSystem::ApplyTransform(pOutputPose, &trackedDevicePose, &transform);
125 }
126
127 Forward_IVRSystem_GetTrackedDeviceClass_026();
128 Forward_IVRSystem_IsTrackedDeviceConnected();
129 Forward_IVRSystem_GetBoolTrackedDeviceProperty_026();
130 Forward_IVRSystem_GetFloatTrackedDeviceProperty_026();
131 Forward_IVRSystem_GetInt32TrackedDeviceProperty_026();
132 Forward_IVRSystem_GetUint64TrackedDeviceProperty_026();
133 Forward_IVRSystem_GetMatrix34TrackedDeviceProperty_026();
134 Forward_IVRSystem_GetStringTrackedDeviceProperty_026();
135 Forward_IVRSystem_GetPropErrorNameFromEnum_026();
136 Forward_IVRSystem_PollNextEvent_010();
137 Forward_IVRSystem_PollNextEventWithPose_010();
138 Forward_IVRSystem_GetEventTypeNameFromEnum();
139 Forward_IVRSystem_GetHiddenAreaMesh_012();
140 Forward_IVRSystem_GetControllerState_012();
141 Forward_IVRSystem_GetControllerStateWithPose_012();
142 Forward_IVRSystem_TriggerHapticPulse();
143 Forward_IVRSystem_GetButtonIdNameFromEnum();
144 Forward_IVRSystem_GetControllerAxisTypeNameFromEnum();
145 Forward_IVRSystem_CaptureInputFocus();
146 Forward_IVRSystem_ReleaseInputFocus();
147 Forward_IVRSystem_IsInputFocusCapturedByAnotherProcess();
148 Forward_IVRSystem_DriverDebugRequest_017();
149 Forward_IVRSystem_PerformFirmwareUpdate_026();
150 Forward_IVRSystem_IsDisplayOnDesktop();
151 Forward_IVRSystem_SetDisplayVisibility();
152};
153
154}; // namespace xrt::state_trackers::openvr
Implementation of the latest IVRSystem interface version.
Implementation of the IVRSystem interface version 010.
Definition XRTVRClientCore.hpp:152
Definition XRTVRSystem_007.hpp:27
Definition XRTVRSystem_010.hpp:27
Definitions missing from C++ header, present in C.
Definition blockqueue.hpp:15
Logging functions.
#define OPENVR_LOG_UNIMPLEMENTED(logger, fmt,...)
Specialized macro for logging an unimplemented function.
Definition openvr_logger.hpp:51
#define OPENVR_LOG_UNIMPLEMENTED_RET(logger, fmt, ret,...)
Specialized macro for logging an unimplemented function and returning a value.
Definition openvr_logger.hpp:57
Definition openvr_logger.hpp:30