Monado OpenXR Runtime
Loading...
Searching...
No Matches
XRTVRCompositor_008.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 IVRCompositor interface version 008.
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
20
21
22namespace xrt::state_trackers::openvr {
23
24using namespace vr;
25
26class XRTVRCompositor_008 : public XRTVRCompositor_015, public vr::IVRCompositor_008
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 IVRCompositor_008.
38 return nullptr;
39 }
40
41 ForwardDeclareBase_IVRCompositor(XRTVRCompositor_015);
42
43 uint32_t
44 GetLastError(VR_OUT_STRING() char *pchBuffer, uint32_t unBufferSize) override
45 {
46 openvr_logger logger;
47 OPENVR_LOGGER_INIT(logger);
48
49 OPENVR_LOG_UNIMPLEMENTED_RET(logger, "GetLastError(pchBuffer=%p, unBufferSize=%llu) -> 0", 0,
50 static_cast<const void *>(pchBuffer),
51 static_cast<unsigned long long>(unBufferSize));
52 }
53
54 void
55 SetVSync(bool bVSync) override
56 {
57 openvr_logger logger;
58 OPENVR_LOGGER_INIT(logger);
59
60 OPENVR_LOG_UNIMPLEMENTED(logger, "SetVSync(bVSync=%d)", static_cast<int>(bVSync));
61 }
62
63 bool
64 GetVSync() override
65 {
66 openvr_logger logger;
67 OPENVR_LOGGER_INIT(logger);
68
69 OPENVR_LOG_UNIMPLEMENTED_RET(logger, "GetVSync() -> false", false);
70 }
71
72 void
73 SetGamma(float fGamma) override
74 {
75 openvr_logger logger;
76 OPENVR_LOGGER_INIT(logger);
77
78 OPENVR_LOG_UNIMPLEMENTED(logger, "SetGamma(fGamma=%f)", fGamma);
79 }
80
81 float
82 GetGamma() override
83 {
84 openvr_logger logger;
85 OPENVR_LOGGER_INIT(logger);
86
87 OPENVR_LOG_UNIMPLEMENTED_RET(logger, "GetGamma() -> 0.0f", 0.0f);
88 }
89
90 Forward_IVRCompositor_WaitGetPoses_029();
91
92 VRCompositorError
93 Submit(Hmd_Eye eEye,
94 GraphicsAPIConvention eTextureType,
95 void *pTexture,
96 const VRTextureBounds_t *pBounds,
97 VRSubmitFlags_t nSubmitFlags = Submit_Default) override
98 {
99 openvr_logger logger;
100 OPENVR_LOGGER_INIT(logger);
101
102 // @todo implement this, it appears to be `void*` is a GLuint for an OpenGL texture ID, unsure for DX
103 // for now. Use eTextureType to determine
104
106 "Submit(eEye=%d, eTextureType=%d, pTexture=%p, pBounds=%p, "
107 "nSubmitFlags=%d) -> VRCompositorError_RequestFailed",
108 EVRCompositorError::VRCompositorError_RequestFailed,
109 static_cast<int>(eEye), static_cast<int>(eTextureType),
110 static_cast<const void *>(pTexture), static_cast<const void *>(pBounds),
111 static_cast<int>(nSubmitFlags));
112 }
113
114 Forward_IVRCompositor_ClearLastSubmittedFrame();
115 Forward_IVRCompositor_GetFrameTiming();
116 Forward_IVRCompositor_FadeToColor();
117 Forward_IVRCompositor_FadeGrid_026();
118
119 void
120 SetSkyboxOverride(GraphicsAPIConvention eTextureType,
121 void *pFront,
122 void *pBack,
123 void *pLeft,
124 void *pRight,
125 void *pTop,
126 void *pBottom) override
127 {
128 openvr_logger logger;
129 OPENVR_LOGGER_INIT(logger);
130
132 logger,
133 "SetSkyboxOverride(eTextureType=%d, pFront=%p, pBack=%p, pLeft=%p, pRight=%p, pTop=%p, pBottom=%p)",
134 static_cast<int>(eTextureType), static_cast<const void *>(pFront), static_cast<const void *>(pBack),
135 static_cast<const void *>(pLeft), static_cast<const void *>(pRight),
136 static_cast<const void *>(pTop), static_cast<const void *>(pBottom));
137 }
138
139 Forward_IVRCompositor_ClearSkyboxOverride();
140 Forward_IVRCompositor_CompositorBringToFront();
141 Forward_IVRCompositor_CompositorGoToBack();
142 Forward_IVRCompositor_CompositorQuit();
143 Forward_IVRCompositor_IsFullscreen();
144 Forward_IVRCompositor_SetTrackingSpace_029();
145 Forward_IVRCompositor_GetTrackingSpace_029();
146 Forward_IVRCompositor_GetCurrentSceneFocusProcess();
147 Forward_IVRCompositor_CanRenderScene();
148 Forward_IVRCompositor_ShowMirrorWindow();
149 Forward_IVRCompositor_HideMirrorWindow();
150 Forward_IVRCompositor_CompositorDumpImages();
151 Forward_IVRCompositor_GetFrameTimeRemaining();
152 Forward_IVRCompositor_GetLastFrameRenderer();
153
154 Forward_IVRCompositor_GetLastPoses_029();
155
156 Forward_IVRCompositor_PostPresentHandoff();
157};
158
159}; // namespace xrt::state_trackers::openvr
Implementation of the latest IVRCompositor interface version.
Implementation of the IVRCompositor interface version 015.
Definition XRTVRClientCore.hpp:152
Definition XRTVRCompositor_008.hpp:27
Definition XRTVRCompositor_015.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