diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/video/openvr | |
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/video/openvr')
| -rw-r--r-- | contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.c | 1664 | ||||
| -rw-r--r-- | contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.h | 106 | ||||
| -rw-r--r-- | contrib/SDL-3.2.8/src/video/openvr/openvr_capi.h | 3200 |
3 files changed, 4970 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.c b/contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.c new file mode 100644 index 0000000..6387c37 --- /dev/null +++ b/contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.c | |||
| @@ -0,0 +1,1664 @@ | |||
| 1 | /* | ||
| 2 | Simple DirectMedia Layer | ||
| 3 | Copyright (C) 2022 Charles Lohr <charlesl@valvesoftware.com> | ||
| 4 | |||
| 5 | This software is provided 'as-is', without any express or implied | ||
| 6 | warranty. In no event will the authors be held liable for any damages | ||
| 7 | arising from the use of this software. | ||
| 8 | |||
| 9 | Permission is granted to anyone to use this software for any purpose, | ||
| 10 | including commercial applications, and to alter it and redistribute it | ||
| 11 | freely, subject to the following restrictions: | ||
| 12 | |||
| 13 | 1. The origin of this software must not be misrepresented; you must not | ||
| 14 | claim that you wrote the original software. If you use this software | ||
| 15 | in a product, an acknowledgment in the product documentation would be | ||
| 16 | appreciated but is not required. | ||
| 17 | 2. Altered source versions must be plainly marked as such, and must not be | ||
| 18 | misrepresented as being the original software. | ||
| 19 | 3. This notice may not be removed or altered from any source distribution. | ||
| 20 | */ | ||
| 21 | #include "SDL_internal.h" | ||
| 22 | |||
| 23 | #ifdef SDL_VIDEO_DRIVER_OPENVR | ||
| 24 | |||
| 25 | #define DEBUG_OPENVR | ||
| 26 | |||
| 27 | #include "../../events/SDL_mouse_c.h" | ||
| 28 | #include "../../events/SDL_keyboard_c.h" | ||
| 29 | #include "../../events/SDL_events_c.h" | ||
| 30 | #include "../SDL_sysvideo.h" | ||
| 31 | #include "../SDL_pixels_c.h" | ||
| 32 | #include "../SDL_egl_c.h" | ||
| 33 | #include "SDL_openvrvideo.h" | ||
| 34 | |||
| 35 | #include <SDL3/SDL_opengl.h> | ||
| 36 | |||
| 37 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 38 | #include "../windows/SDL_windowsopengles.h" | ||
| 39 | #include "../windows/SDL_windowsopengl.h" | ||
| 40 | #include "../windows/SDL_windowsvulkan.h" | ||
| 41 | #define DEFAULT_OPENGL "OPENGL32.DLL" | ||
| 42 | static bool OPENVR_GL_LoadLibrary(SDL_VideoDevice *_this, const char *path); | ||
| 43 | static SDL_GLContext OPENVR_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 44 | |||
| 45 | struct SDL_GLContextState | ||
| 46 | { | ||
| 47 | HGLRC hglrc; | ||
| 48 | }; | ||
| 49 | |||
| 50 | #else | ||
| 51 | #include <SDL3/SDL_opengles2_gl2.h> | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #define MARKER_ID 0 | ||
| 55 | #define MARKER_STR "vr-marker,frame_end,type,application" | ||
| 56 | |||
| 57 | #undef EXTERN_C | ||
| 58 | |||
| 59 | // For access to functions that don't get the video data context. | ||
| 60 | SDL_VideoData * global_openvr_driver; | ||
| 61 | |||
| 62 | static void InitializeMouseFunctions(); | ||
| 63 | |||
| 64 | struct SDL_CursorData | ||
| 65 | { | ||
| 66 | unsigned texture_id_handle; | ||
| 67 | int hot_x, hot_y; | ||
| 68 | int w, h; | ||
| 69 | }; | ||
| 70 | |||
| 71 | // GL Extensions for functions we will be using. | ||
| 72 | static void (APIENTRY *ov_glGenFramebuffers)(GLsizei n, GLuint *framebuffers); | ||
| 73 | static void (APIENTRY *ov_glGenRenderbuffers)(GLsizei n, GLuint *renderbuffers); | ||
| 74 | static void (APIENTRY *ov_glBindFramebuffer)(GLenum target, GLuint framebuffer); | ||
| 75 | static void (APIENTRY *ov_glBindRenderbuffer)(GLenum target, GLuint renderbuffer); | ||
| 76 | static void (APIENTRY *ov_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); | ||
| 77 | static void (APIENTRY *ov_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); | ||
| 78 | static void (APIENTRY *ov_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); | ||
| 79 | static GLenum (APIENTRY *ov_glCheckNamedFramebufferStatus)(GLuint framebuffer, GLenum target); | ||
| 80 | static GLenum (APIENTRY *ov_glGetError)(); | ||
| 81 | static void (APIENTRY *ov_glFlush)(); | ||
| 82 | static void (APIENTRY *ov_glFinish)(); | ||
| 83 | static void (APIENTRY *ov_glGenTextures)(GLsizei n, GLuint *textures); | ||
| 84 | static void (APIENTRY *ov_glDeleteTextures)(GLsizei n, GLuint *textures); | ||
| 85 | static void (APIENTRY *ov_glTexParameterf)(GLenum target, GLenum pname, GLfloat param); | ||
| 86 | static void (APIENTRY *ov_glTexParameteri)(GLenum target, GLenum pname, GLenum param); | ||
| 87 | static void (APIENTRY *ov_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *data); | ||
| 88 | static void (APIENTRY *ov_glBindTexture)(GLenum target, GLuint texture); | ||
| 89 | static void (APIENTRY *ov_glDrawBuffers)(GLsizei n, const GLenum *bufs); | ||
| 90 | static void (APIENTRY *ov_glGetIntegerv)(GLenum pname, GLint * data); | ||
| 91 | static const GLubyte *(APIENTRY *ov_glGetStringi)(GLenum name, GLuint index); | ||
| 92 | static void (APIENTRY *ov_glClear)(GLbitfield mask); | ||
| 93 | static void (APIENTRY *ov_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); | ||
| 94 | static void (APIENTRY *ov_glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); | ||
| 95 | static void (APIENTRY *ov_glDebugMessageInsert)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message); | ||
| 96 | |||
| 97 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 98 | static PROC (*ov_wglGetProcAddress)(LPCSTR); | ||
| 99 | static HGLRC (*ov_wglCreateContext)(HDC); | ||
| 100 | static BOOL (*ov_wglDeleteContext)(HGLRC); | ||
| 101 | static BOOL (*ov_wglMakeCurrent)(HDC, HGLRC); | ||
| 102 | //static HGLRC (*ov_wglGetCurrentContext)(void); | ||
| 103 | #endif | ||
| 104 | |||
| 105 | |||
| 106 | #define OPENVR_DEFAULT_WIDTH 1920 | ||
| 107 | #define OPENVR_DEFAULT_HEIGHT 1080 | ||
| 108 | |||
| 109 | #define OPENVR_SetupProc(proc) { proc = (void*)SDL_GL_GetProcAddress((#proc)+3); if (!proc) { failed_extension = (#proc)+3; } } | ||
| 110 | |||
| 111 | static bool OPENVR_InitExtensions(SDL_VideoDevice *_this) | ||
| 112 | { | ||
| 113 | if (!ov_glGetError) { | ||
| 114 | const char * failed_extension = 0; | ||
| 115 | OPENVR_SetupProc(ov_glGenFramebuffers); | ||
| 116 | OPENVR_SetupProc(ov_glGenRenderbuffers); | ||
| 117 | OPENVR_SetupProc(ov_glBindFramebuffer); | ||
| 118 | OPENVR_SetupProc(ov_glBindRenderbuffer); | ||
| 119 | OPENVR_SetupProc(ov_glRenderbufferStorage); | ||
| 120 | OPENVR_SetupProc(ov_glFramebufferRenderbuffer); | ||
| 121 | OPENVR_SetupProc(ov_glFramebufferTexture2D); | ||
| 122 | OPENVR_SetupProc(ov_glCheckNamedFramebufferStatus); | ||
| 123 | OPENVR_SetupProc(ov_glGetError); | ||
| 124 | OPENVR_SetupProc(ov_glFlush); | ||
| 125 | OPENVR_SetupProc(ov_glFinish); | ||
| 126 | OPENVR_SetupProc(ov_glGenTextures); | ||
| 127 | OPENVR_SetupProc(ov_glDeleteTextures); | ||
| 128 | OPENVR_SetupProc(ov_glTexParameterf); | ||
| 129 | OPENVR_SetupProc(ov_glTexParameteri); | ||
| 130 | OPENVR_SetupProc(ov_glTexImage2D); | ||
| 131 | OPENVR_SetupProc(ov_glBindTexture); | ||
| 132 | OPENVR_SetupProc(ov_glDrawBuffers); | ||
| 133 | OPENVR_SetupProc(ov_glClear); | ||
| 134 | OPENVR_SetupProc(ov_glClearColor); | ||
| 135 | OPENVR_SetupProc(ov_glColorMask); | ||
| 136 | OPENVR_SetupProc(ov_glGetStringi); | ||
| 137 | OPENVR_SetupProc(ov_glGetIntegerv); | ||
| 138 | OPENVR_SetupProc(ov_glDebugMessageInsert); | ||
| 139 | if (failed_extension) { | ||
| 140 | return SDL_SetError("Error loading GL extension for %s", failed_extension); | ||
| 141 | } | ||
| 142 | } | ||
| 143 | return true; | ||
| 144 | } | ||
| 145 | |||
| 146 | static bool OPENVR_SetOverlayError(EVROverlayError e) | ||
| 147 | { | ||
| 148 | switch (e) { | ||
| 149 | #define CASE(X) case EVROverlayError_VROverlayError_##X: return SDL_SetError("VROverlayError %s", #X) | ||
| 150 | CASE(UnknownOverlay); | ||
| 151 | CASE(InvalidHandle); | ||
| 152 | CASE(PermissionDenied); | ||
| 153 | CASE(OverlayLimitExceeded); | ||
| 154 | CASE(WrongVisibilityType); | ||
| 155 | CASE(KeyTooLong); | ||
| 156 | CASE(NameTooLong); | ||
| 157 | CASE(KeyInUse); | ||
| 158 | CASE(WrongTransformType); | ||
| 159 | CASE(InvalidTrackedDevice); | ||
| 160 | CASE(InvalidParameter); | ||
| 161 | CASE(ThumbnailCantBeDestroyed); | ||
| 162 | CASE(ArrayTooSmall); | ||
| 163 | CASE(RequestFailed); | ||
| 164 | CASE(InvalidTexture); | ||
| 165 | CASE(UnableToLoadFile); | ||
| 166 | CASE(KeyboardAlreadyInUse); | ||
| 167 | CASE(NoNeighbor); | ||
| 168 | CASE(TooManyMaskPrimitives); | ||
| 169 | CASE(BadMaskPrimitive); | ||
| 170 | CASE(TextureAlreadyLocked); | ||
| 171 | CASE(TextureLockCapacityReached); | ||
| 172 | CASE(TextureNotLocked); | ||
| 173 | CASE(TimedOut); | ||
| 174 | #undef CASE | ||
| 175 | default: | ||
| 176 | return SDL_SetError("Unknown VROverlayError %d", e); | ||
| 177 | } | ||
| 178 | } | ||
| 179 | |||
| 180 | static bool OPENVR_InitializeOverlay(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 181 | |||
| 182 | static bool OPENVR_VideoInit(SDL_VideoDevice *_this) | ||
| 183 | { | ||
| 184 | SDL_VideoData *data = (SDL_VideoData *)_this->internal; | ||
| 185 | |||
| 186 | const char * hintWidth = SDL_GetHint("SDL_DEFAULT_WIDTH"); | ||
| 187 | const char * hintHeight = SDL_GetHint("SDL_DEFAULT_HEIGHT"); | ||
| 188 | const char * hintFPS = SDL_GetHint("SDL_DEFAULT_FPS"); | ||
| 189 | int width = hintWidth ? SDL_atoi(hintWidth) : 0; | ||
| 190 | int height = hintHeight ? SDL_atoi(hintHeight) : 0; | ||
| 191 | int fps = hintFPS ? SDL_atoi(hintFPS) : 0; | ||
| 192 | |||
| 193 | SDL_VideoDisplay display; | ||
| 194 | SDL_zero(display); | ||
| 195 | display.desktop_mode.format = SDL_PIXELFORMAT_RGBA32; | ||
| 196 | display.desktop_mode.w = OPENVR_DEFAULT_WIDTH; | ||
| 197 | display.desktop_mode.h = OPENVR_DEFAULT_HEIGHT; | ||
| 198 | display.natural_orientation = SDL_ORIENTATION_LANDSCAPE; | ||
| 199 | display.current_orientation = SDL_ORIENTATION_LANDSCAPE; | ||
| 200 | display.content_scale = 1.0f; | ||
| 201 | if (height > 0 && width > 0) { | ||
| 202 | display.desktop_mode.w = width; | ||
| 203 | display.desktop_mode.h = height; | ||
| 204 | } | ||
| 205 | if (fps) { | ||
| 206 | display.desktop_mode.refresh_rate = fps; | ||
| 207 | } else { | ||
| 208 | display.desktop_mode.refresh_rate = data->oSystem->GetFloatTrackedDeviceProperty(k_unTrackedDeviceIndex_Hmd, ETrackedDeviceProperty_Prop_DisplayFrequency_Float, 0); | ||
| 209 | } | ||
| 210 | |||
| 211 | display.internal = (SDL_DisplayData *)data; | ||
| 212 | display.name = (char*)"OpenVRDisplay"; | ||
| 213 | SDL_AddVideoDisplay(&display, false); | ||
| 214 | |||
| 215 | return true; | ||
| 216 | } | ||
| 217 | |||
| 218 | static void OPENVR_VideoQuit(SDL_VideoDevice *_this) | ||
| 219 | { | ||
| 220 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 221 | if (videodata->bDidCreateOverlay && videodata->overlayID != 0) { | ||
| 222 | videodata->oOverlay->DestroyOverlay(videodata->overlayID); | ||
| 223 | } | ||
| 224 | } | ||
| 225 | |||
| 226 | static void OPENVR_Destroy(SDL_VideoDevice *device) | ||
| 227 | { | ||
| 228 | SDL_VideoData *data = device->internal; | ||
| 229 | |||
| 230 | #ifdef SDL_PLATFORM_WINDOWS | ||
| 231 | SDL_UnregisterApp(); | ||
| 232 | #endif | ||
| 233 | |||
| 234 | if (data) { | ||
| 235 | if (data->openVRLIB) { | ||
| 236 | SDL_UnloadObject(data->openVRLIB); | ||
| 237 | } | ||
| 238 | } | ||
| 239 | SDL_free(device->internal); | ||
| 240 | SDL_free(device); | ||
| 241 | } | ||
| 242 | |||
| 243 | static uint32_t *ImageSDLToOpenVRGL(SDL_Surface * surf, bool bFlipY) | ||
| 244 | { | ||
| 245 | int w = surf->w; | ||
| 246 | int h = surf->h; | ||
| 247 | int pitch = surf->pitch; | ||
| 248 | int x, y; | ||
| 249 | uint32_t * pxd = SDL_malloc(4 * surf->w * surf->h); | ||
| 250 | for(y = 0; y < h; y++) { | ||
| 251 | uint32_t * iline = (uint32_t*)&(((uint8_t*)surf->pixels)[y*pitch]); | ||
| 252 | uint32_t * oline = &pxd[(bFlipY?(h-y-1):y)*w]; | ||
| 253 | for(x = 0; x < w; x++) | ||
| 254 | { | ||
| 255 | uint32_t pr = iline[x]; | ||
| 256 | oline[x] = (pr & 0xff00ff00) | ((pr & 0xff) << 16) | ((pr & 0xff0000)>>16); | ||
| 257 | } | ||
| 258 | } | ||
| 259 | return pxd; | ||
| 260 | } | ||
| 261 | |||
| 262 | static bool OPENVR_CheckRenderbuffer(SDL_VideoDevice *_this) | ||
| 263 | { | ||
| 264 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 265 | |||
| 266 | if (videodata->targw == 0 || videodata->targh == 0) { | ||
| 267 | videodata->targw = OPENVR_DEFAULT_WIDTH; | ||
| 268 | videodata->targh = OPENVR_DEFAULT_HEIGHT; | ||
| 269 | } | ||
| 270 | |||
| 271 | if (videodata->targh != videodata->last_targh | ||
| 272 | || videodata->targw != videodata->last_targw) { | ||
| 273 | |||
| 274 | struct HmdVector2_t ms; | ||
| 275 | int status; | ||
| 276 | |||
| 277 | if (videodata->fbo <= 0) { | ||
| 278 | ov_glGenFramebuffers(1, &videodata->fbo); | ||
| 279 | ov_glGenRenderbuffers(1, &videodata->rbo); | ||
| 280 | ov_glGenTextures(1, &videodata->overlaytexture); | ||
| 281 | } | ||
| 282 | |||
| 283 | // Generate the OpenGL Backing buffers/etc. | ||
| 284 | ov_glBindFramebuffer(GL_FRAMEBUFFER, videodata->fbo); | ||
| 285 | ov_glBindRenderbuffer(GL_RENDERBUFFER, videodata->rbo); | ||
| 286 | ov_glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, videodata->targw, videodata->targh); | ||
| 287 | ov_glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, videodata->rbo); | ||
| 288 | ov_glBindTexture(GL_TEXTURE_2D, videodata->overlaytexture); | ||
| 289 | ov_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); | ||
| 290 | ov_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); | ||
| 291 | ov_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, videodata->targw, videodata->targh, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); | ||
| 292 | ov_glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, videodata->overlaytexture, 0); | ||
| 293 | status = ov_glCheckNamedFramebufferStatus(videodata->fbo, GL_FRAMEBUFFER); | ||
| 294 | if (status != GL_FRAMEBUFFER_COMPLETE) { | ||
| 295 | return SDL_SetError("OPENVR: Can't generate overlay buffer"); | ||
| 296 | } | ||
| 297 | ov_glBindFramebuffer(GL_FRAMEBUFFER, 0); | ||
| 298 | |||
| 299 | ms.v[0] = (float)videodata->targw; | ||
| 300 | ms.v[1] = (float)videodata->targh; | ||
| 301 | videodata->oOverlay->SetOverlayMouseScale(videodata->overlayID, &ms); | ||
| 302 | |||
| 303 | videodata->last_targh = videodata->targh; | ||
| 304 | videodata->last_targw = videodata->targw; | ||
| 305 | } | ||
| 306 | return true; | ||
| 307 | } | ||
| 308 | |||
| 309 | static bool OPENVR_VirtualControllerRumble(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) | ||
| 310 | { | ||
| 311 | // On XBOX Controllers Low/High maps to Left/Right | ||
| 312 | SDL_VideoData *videodata = (SDL_VideoData *)userdata; | ||
| 313 | |||
| 314 | const float k_flIntensity = 320.f; // Maximum frequency | ||
| 315 | float flLeftFrequency = (float)low_frequency_rumble * k_flIntensity / 65535.f; | ||
| 316 | float flRightFrequency = (float)high_frequency_rumble * k_flIntensity / 65535.f; | ||
| 317 | float flDurationSeconds = 2.f; | ||
| 318 | float flAmplitude = 1.f; | ||
| 319 | |||
| 320 | videodata->oInput->TriggerHapticVibrationAction(videodata->input_action_handles_haptics[0], 0, flDurationSeconds, flLeftFrequency, flAmplitude, 0); | ||
| 321 | videodata->oInput->TriggerHapticVibrationAction(videodata->input_action_handles_haptics[1], 0, flDurationSeconds, flRightFrequency, flAmplitude, 0); | ||
| 322 | |||
| 323 | return true; | ||
| 324 | } | ||
| 325 | |||
| 326 | static bool OPENVR_VirtualControllerRumbleTriggers(void *userdata, Uint16 left_rumble, Uint16 right_rumble) | ||
| 327 | { | ||
| 328 | SDL_VideoData *videodata = (SDL_VideoData *)userdata; | ||
| 329 | videodata->oInput->TriggerHapticVibrationAction(videodata->input_action_handles_haptics[0], 0, 0.1f, left_rumble, 1.0, 0); | ||
| 330 | videodata->oInput->TriggerHapticVibrationAction(videodata->input_action_handles_haptics[1], 0, 0.1f, right_rumble, 1.0, 0); | ||
| 331 | return true; | ||
| 332 | } | ||
| 333 | |||
| 334 | static void OPENVR_VirtualControllerUpdate(void *userdata) | ||
| 335 | { | ||
| 336 | SDL_VideoData *videodata = (SDL_VideoData *)userdata; | ||
| 337 | SDL_Joystick * joystick = videodata->virtual_joystick; | ||
| 338 | InputDigitalActionData_t digital_input_action; | ||
| 339 | InputAnalogActionData_t analog_input_action; | ||
| 340 | EVRInputError e; | ||
| 341 | #ifdef DEBUG_OPENVR | ||
| 342 | //char cts[10240]; | ||
| 343 | //char * ctsx = cts; | ||
| 344 | #endif | ||
| 345 | VRActiveActionSet_t actionSet = { 0 }; | ||
| 346 | actionSet.ulActionSet = videodata->input_action_set; | ||
| 347 | e = videodata->oInput->UpdateActionState(&actionSet, sizeof(actionSet), 1); | ||
| 348 | if (e) | ||
| 349 | { | ||
| 350 | #ifdef DEBUG_OPENVR | ||
| 351 | SDL_Log("ERROR: Failed to update action state"); | ||
| 352 | #endif | ||
| 353 | return; | ||
| 354 | } | ||
| 355 | |||
| 356 | for (int d = 0; d < videodata->input_action_handles_buttons_count; d++) | ||
| 357 | { | ||
| 358 | if (videodata->input_action_handles_buttons[d] == k_ulInvalidActionHandle) | ||
| 359 | continue; | ||
| 360 | e = videodata->oInput->GetDigitalActionData(videodata->input_action_handles_buttons[d], &digital_input_action, sizeof(digital_input_action), k_ulInvalidInputValueHandle); | ||
| 361 | if (e) | ||
| 362 | { | ||
| 363 | #ifdef DEBUG_OPENVR | ||
| 364 | SDL_Log("ERROR: Failed to get digital action data: %d", d); | ||
| 365 | #endif | ||
| 366 | return; | ||
| 367 | } | ||
| 368 | SDL_SetJoystickVirtualButton(joystick, d, digital_input_action.bState); | ||
| 369 | #ifdef DEBUG_OPENVR | ||
| 370 | //ctsx+=sprintf(ctsx,"%d", digital_input_action.bState); | ||
| 371 | #endif | ||
| 372 | } | ||
| 373 | |||
| 374 | // Left Stick | ||
| 375 | e = videodata->oInput->GetAnalogActionData(videodata->input_action_handles_axes[0], &analog_input_action, sizeof(analog_input_action), k_ulInvalidInputValueHandle); | ||
| 376 | if (e) | ||
| 377 | { | ||
| 378 | #ifdef DEBUG_OPENVR | ||
| 379 | SDL_Log("ERROR: Failed to get analog action data: left stick"); | ||
| 380 | #endif | ||
| 381 | return; | ||
| 382 | } | ||
| 383 | SDL_SetJoystickVirtualAxis(joystick, SDL_GAMEPAD_AXIS_LEFTX, (Sint16)(analog_input_action.x * SDL_JOYSTICK_AXIS_MAX)); | ||
| 384 | SDL_SetJoystickVirtualAxis(joystick, SDL_GAMEPAD_AXIS_LEFTY, (Sint16)(-analog_input_action.y * SDL_JOYSTICK_AXIS_MAX)); | ||
| 385 | |||
| 386 | // Right Stick | ||
| 387 | e = videodata->oInput->GetAnalogActionData(videodata->input_action_handles_axes[1], &analog_input_action, sizeof(analog_input_action), k_ulInvalidInputValueHandle); | ||
| 388 | if (e) | ||
| 389 | { | ||
| 390 | #ifdef DEBUG_OPENVR | ||
| 391 | SDL_Log("ERROR: Failed to get analog action data: right stick"); | ||
| 392 | #endif | ||
| 393 | return; | ||
| 394 | } | ||
| 395 | SDL_SetJoystickVirtualAxis(joystick, SDL_GAMEPAD_AXIS_RIGHTX, (Sint16)(analog_input_action.x * SDL_JOYSTICK_AXIS_MAX)); | ||
| 396 | SDL_SetJoystickVirtualAxis(joystick, SDL_GAMEPAD_AXIS_RIGHTY, (Sint16)(-analog_input_action.y * SDL_JOYSTICK_AXIS_MAX)); | ||
| 397 | |||
| 398 | // Left Trigger | ||
| 399 | e = videodata->oInput->GetAnalogActionData(videodata->input_action_handles_axes[2], &analog_input_action, sizeof(analog_input_action), k_ulInvalidInputValueHandle); | ||
| 400 | if (e) | ||
| 401 | { | ||
| 402 | #ifdef DEBUG_OPENVR | ||
| 403 | SDL_Log("ERROR: Failed to get analog action data: left trigger"); | ||
| 404 | #endif | ||
| 405 | return; | ||
| 406 | } | ||
| 407 | SDL_SetJoystickVirtualAxis(joystick, SDL_GAMEPAD_AXIS_LEFT_TRIGGER, (Sint16)((analog_input_action.x * 2.0f - 1.0f) * SDL_JOYSTICK_AXIS_MAX)); | ||
| 408 | |||
| 409 | // Right Trigger | ||
| 410 | e = videodata->oInput->GetAnalogActionData(videodata->input_action_handles_axes[3], &analog_input_action, sizeof(analog_input_action), k_ulInvalidInputValueHandle); | ||
| 411 | if (e) | ||
| 412 | { | ||
| 413 | #ifdef DEBUG_OPENVR | ||
| 414 | SDL_Log("ERROR: Failed to get analog action data: right trigger"); | ||
| 415 | #endif | ||
| 416 | return; | ||
| 417 | } | ||
| 418 | SDL_SetJoystickVirtualAxis(joystick, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, (Sint16)((analog_input_action.x * 2.0f - 1.0f) * SDL_JOYSTICK_AXIS_MAX)); | ||
| 419 | |||
| 420 | #if 0 | ||
| 421 | for (a = 0; a < videodata->input_action_handles_axes_count; a++) | ||
| 422 | { | ||
| 423 | float xval = 0.0f; | ||
| 424 | e = videodata->oInput->GetAnalogActionData(videodata->input_action_handles_axes[a], &analog_input_action, sizeof(analog_input_action), k_ulInvalidInputValueHandle); | ||
| 425 | if (e) goto updatefail; | ||
| 426 | xval = analog_input_action.x; | ||
| 427 | if (a == SDL_CONTROLLER_AXIS_LEFTY || a == SDL_CONTROLLER_AXIS_RIGHTY) | ||
| 428 | xval *= -1.0f; | ||
| 429 | if (a == SDL_GAMEPAD_AXIS_LEFT_TRIGGER || a == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) | ||
| 430 | xval = xval * 2.0f - 1.0f; | ||
| 431 | //SDL_SetJoystickVirtualAxis(joystick, a, analog_input_action.x*32767); | ||
| 432 | xval *= SDL_JOYSTICK_AXIS_MAX; | ||
| 433 | SDL_SetJoystickVirtualAxis(joystick, a, xval); | ||
| 434 | #ifdef DEBUG_OPENVR | ||
| 435 | //ctsx+=sprintf(ctsx,"[%f]", analog_input_action.x); | ||
| 436 | #endif | ||
| 437 | } | ||
| 438 | #endif | ||
| 439 | #ifdef DEBUG_OPENVR | ||
| 440 | //SDL_Log("Debug Input States: %s", cts); | ||
| 441 | #endif | ||
| 442 | return; | ||
| 443 | } | ||
| 444 | |||
| 445 | static bool OPENVR_SetupJoystickBasedOnLoadedActionManifest(SDL_VideoData * videodata) | ||
| 446 | { | ||
| 447 | SDL_VirtualJoystickDesc desc; | ||
| 448 | int virtual_index; | ||
| 449 | |||
| 450 | EVRInputError e = 0; | ||
| 451 | |||
| 452 | char * k_pchBooleanActionPaths[SDL_GAMEPAD_BUTTON_COUNT] = { | ||
| 453 | "/actions/virtualgamepad/in/a", | ||
| 454 | "/actions/virtualgamepad/in/b", | ||
| 455 | "/actions/virtualgamepad/in/x", | ||
| 456 | "/actions/virtualgamepad/in/y", | ||
| 457 | "/actions/virtualgamepad/in/back", | ||
| 458 | "/actions/virtualgamepad/in/guide", | ||
| 459 | "/actions/virtualgamepad/in/start", | ||
| 460 | "/actions/virtualgamepad/in/stick_click_left", | ||
| 461 | "/actions/virtualgamepad/in/stick_click_right", | ||
| 462 | "/actions/virtualgamepad/in/shoulder_left", | ||
| 463 | "/actions/virtualgamepad/in/shoulder_right", | ||
| 464 | "/actions/virtualgamepad/in/dpad_up", | ||
| 465 | "/actions/virtualgamepad/in/dpad_down", | ||
| 466 | "/actions/virtualgamepad/in/dpad_left", | ||
| 467 | "/actions/virtualgamepad/in/dpad_right", | ||
| 468 | "/actions/virtualgamepad/in/misc_1", | ||
| 469 | "/actions/virtualgamepad/in/paddle_1", | ||
| 470 | "/actions/virtualgamepad/in/paddle_2", | ||
| 471 | "/actions/virtualgamepad/in/paddle_3", | ||
| 472 | "/actions/virtualgamepad/in/paddle_4", | ||
| 473 | "/actions/virtualgamepad/in/touchpad_click", | ||
| 474 | "/actions/virtualgamepad/in/misc_2", | ||
| 475 | "/actions/virtualgamepad/in/misc_3", | ||
| 476 | "/actions/virtualgamepad/in/misc_4", | ||
| 477 | "/actions/virtualgamepad/in/misc_5", | ||
| 478 | "/actions/virtualgamepad/in/misc_6", | ||
| 479 | }; | ||
| 480 | char * k_pchAnalogActionPaths[4] = { | ||
| 481 | "/actions/virtualgamepad/in/stick_left", | ||
| 482 | "/actions/virtualgamepad/in/stick_right", | ||
| 483 | "/actions/virtualgamepad/in/trigger_left", | ||
| 484 | "/actions/virtualgamepad/in/trigger_right", | ||
| 485 | }; | ||
| 486 | |||
| 487 | if ((e = videodata->oInput->GetActionSetHandle("/actions/virtualgamepad", &videodata->input_action_set)) != EVRInputError_VRInputError_None) | ||
| 488 | { | ||
| 489 | #ifdef DEBUG_OPENVR | ||
| 490 | SDL_Log("ERROR: Failed to get action set handle: %d", e); | ||
| 491 | #endif | ||
| 492 | return SDL_SetError("Failed to get action set handle"); | ||
| 493 | } | ||
| 494 | |||
| 495 | videodata->input_action_handles_buttons_count = sizeof(k_pchBooleanActionPaths) / sizeof(k_pchBooleanActionPaths[0]); | ||
| 496 | videodata->input_action_handles_buttons = SDL_malloc(videodata->input_action_handles_buttons_count * sizeof(VRActionHandle_t)); | ||
| 497 | |||
| 498 | for (int i = 0; i < videodata->input_action_handles_buttons_count; i++) | ||
| 499 | { | ||
| 500 | e = videodata->oInput->GetActionHandle(k_pchBooleanActionPaths[i], &videodata->input_action_handles_buttons[i]); | ||
| 501 | if (e) | ||
| 502 | { | ||
| 503 | SDL_Log("ERROR: Failed to get button action %d ('%s')", i, k_pchBooleanActionPaths[i]); | ||
| 504 | return SDL_SetError("ERROR: Failed to get button action"); | ||
| 505 | } | ||
| 506 | } | ||
| 507 | |||
| 508 | videodata->input_action_handles_axes_count = sizeof(k_pchAnalogActionPaths) / sizeof(k_pchAnalogActionPaths[0]); | ||
| 509 | videodata->input_action_handles_axes = SDL_malloc(videodata->input_action_handles_axes_count * sizeof(VRActionHandle_t)); | ||
| 510 | |||
| 511 | for (int i = 0; i < videodata->input_action_handles_axes_count; i++) | ||
| 512 | { | ||
| 513 | e = videodata->oInput->GetActionHandle(k_pchAnalogActionPaths[i], &videodata->input_action_handles_axes[i]); | ||
| 514 | if (e) | ||
| 515 | { | ||
| 516 | SDL_Log("ERROR: Failed to get analog action %d ('%s')", i, k_pchAnalogActionPaths[i]); | ||
| 517 | return SDL_SetError("ERROR: Failed to get analog action"); | ||
| 518 | } | ||
| 519 | } | ||
| 520 | |||
| 521 | e = videodata->oInput->GetActionHandle("/actions/virtualgamepad/out/haptic_left", &videodata->input_action_handles_haptics[0]); | ||
| 522 | e |= videodata->oInput->GetActionHandle("/actions/virtualgamepad/out/haptic_right", &videodata->input_action_handles_haptics[1]); | ||
| 523 | if (e) | ||
| 524 | { | ||
| 525 | #ifdef DEBUG_OPENVR | ||
| 526 | SDL_Log("ERROR: Failed to get haptics action"); | ||
| 527 | #endif | ||
| 528 | return SDL_SetError("ERROR: Failed to get haptics action"); | ||
| 529 | } | ||
| 530 | |||
| 531 | // Create a virtual joystick. | ||
| 532 | SDL_INIT_INTERFACE(&desc); | ||
| 533 | desc.type = SDL_JOYSTICK_TYPE_GAMEPAD; | ||
| 534 | desc.naxes = SDL_GAMEPAD_AXIS_COUNT; | ||
| 535 | desc.nbuttons = SDL_GAMEPAD_BUTTON_COUNT; | ||
| 536 | desc.Rumble = OPENVR_VirtualControllerRumble; | ||
| 537 | desc.RumbleTriggers = OPENVR_VirtualControllerRumbleTriggers; | ||
| 538 | desc.Update = OPENVR_VirtualControllerUpdate; | ||
| 539 | desc.userdata = videodata; | ||
| 540 | virtual_index = SDL_AttachVirtualJoystick(&desc); | ||
| 541 | |||
| 542 | if (virtual_index < 0) { | ||
| 543 | return SDL_SetError("OPENVR: Couldn't open virtual joystick device: %s", SDL_GetError()); | ||
| 544 | } else { | ||
| 545 | videodata->virtual_joystick = SDL_OpenJoystick(virtual_index); | ||
| 546 | if (!videodata->virtual_joystick) { | ||
| 547 | return SDL_SetError("OPENVR: Couldn't open virtual joystick device: %s", SDL_GetError()); | ||
| 548 | } | ||
| 549 | } | ||
| 550 | |||
| 551 | #ifdef DEBUG_OPENVR | ||
| 552 | SDL_Log("Loaded virtual joystick with %d buttons and %d axes", videodata->input_action_handles_buttons_count, videodata->input_action_handles_axes_count); | ||
| 553 | #endif | ||
| 554 | |||
| 555 | return false; | ||
| 556 | } | ||
| 557 | |||
| 558 | static bool OPENVR_InitializeOverlay(SDL_VideoDevice *_this,SDL_Window *window) | ||
| 559 | { | ||
| 560 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 561 | |||
| 562 | // Wait til here, to make sure we have our context setup correctly. | ||
| 563 | if (!OPENVR_InitExtensions(_this)) { | ||
| 564 | return false; | ||
| 565 | } | ||
| 566 | |||
| 567 | // Generate the overlay. | ||
| 568 | { | ||
| 569 | const char * hint = SDL_GetHint("SDL_OPENVR_OVERLAY_NAME"); | ||
| 570 | char * cursorname = 0; | ||
| 571 | if (!hint) { | ||
| 572 | hint = "sdl"; | ||
| 573 | } | ||
| 574 | |||
| 575 | SDL_asprintf(&videodata->sOverlayName, "%s-overlay",hint); | ||
| 576 | if (!videodata->sOverlayName) { | ||
| 577 | return false; | ||
| 578 | } | ||
| 579 | SDL_asprintf(&cursorname, "%s-cursor",hint); | ||
| 580 | if (!cursorname) { | ||
| 581 | return false; | ||
| 582 | } | ||
| 583 | |||
| 584 | EVROverlayError result = videodata->oOverlay->CreateDashboardOverlay(videodata->sOverlayName, | ||
| 585 | window->title, &videodata->overlayID, &videodata->thumbID); | ||
| 586 | if (result != EVROverlayError_VROverlayError_None) { | ||
| 587 | SDL_free(cursorname); | ||
| 588 | return SDL_SetError("Could not create dashboard overlay (%d)", result ); | ||
| 589 | } | ||
| 590 | result = videodata->oOverlay->CreateOverlay(cursorname, window->title, &videodata->cursorID); | ||
| 591 | if (result != EVROverlayError_VROverlayError_None) { | ||
| 592 | SDL_free(cursorname); | ||
| 593 | return SDL_SetError("Could not create cursor overlay (%d)", result ); | ||
| 594 | } | ||
| 595 | SDL_PropertiesID props = SDL_GetWindowProperties(window); | ||
| 596 | SDL_SetNumberProperty(props, SDL_PROP_WINDOW_OPENVR_OVERLAY_ID, videodata->overlayID); | ||
| 597 | SDL_free(cursorname); | ||
| 598 | videodata->bHasShownOverlay = false; | ||
| 599 | } | ||
| 600 | { | ||
| 601 | const char * hint = SDL_GetHint("SDL_OPENVR_OVERLAY_PANEL_WIDTH"); | ||
| 602 | float fWidth = hint ? (float)SDL_atof(hint) : 1.0f; | ||
| 603 | videodata->oOverlay->SetOverlayWidthInMeters(videodata->overlayID, fWidth); | ||
| 604 | } | ||
| 605 | { | ||
| 606 | const char * hint = SDL_GetHint("SDL_OPENVR_CURSOR_WIDTH"); | ||
| 607 | // Default is what SteamVR Does | ||
| 608 | float fCursorWidth = hint ? (float)SDL_atof(hint) : 0.06f; | ||
| 609 | videodata->oOverlay->SetOverlayWidthInMeters(videodata->cursorID, fCursorWidth * 0.5f); | ||
| 610 | } | ||
| 611 | { | ||
| 612 | const char * hint = SDL_GetHint("SDL_OPENVR_WINDOW_ICON_FILE"); | ||
| 613 | videodata->bIconOverridden = false; | ||
| 614 | if (hint) { | ||
| 615 | char * tmpcopy = SDL_strdup(hint); | ||
| 616 | EVROverlayError err = videodata->oOverlay->SetOverlayFromFile(videodata->thumbID, tmpcopy); | ||
| 617 | SDL_free(tmpcopy); | ||
| 618 | if (err == EVROverlayError_VROverlayError_None) { | ||
| 619 | videodata->bIconOverridden = SDL_GetHintBoolean("SDL_OPENVR_WINDOW_ICON_OVERRIDE",false); | ||
| 620 | } | ||
| 621 | } | ||
| 622 | } | ||
| 623 | { | ||
| 624 | VRTextureBounds_t bounds; | ||
| 625 | bounds.uMin = 0; | ||
| 626 | bounds.uMax = 1; | ||
| 627 | bounds.vMin = 0; | ||
| 628 | bounds.vMax = 1; | ||
| 629 | videodata->oOverlay->SetOverlayTextureBounds(videodata->overlayID, &bounds); | ||
| 630 | } | ||
| 631 | |||
| 632 | if (!OPENVR_CheckRenderbuffer(_this)) { | ||
| 633 | return false; | ||
| 634 | } | ||
| 635 | |||
| 636 | |||
| 637 | global_openvr_driver = videodata; | ||
| 638 | InitializeMouseFunctions(); | ||
| 639 | |||
| 640 | // Actually show the overlay. | ||
| 641 | videodata->oOverlay->SetOverlayFlag(videodata->overlayID, 1<<23, true); //vr::VROverlayFlags_EnableControlBar | ||
| 642 | videodata->oOverlay->SetOverlayFlag(videodata->overlayID, 1<<24, true); //vr::VROverlayFlags_EnableControlBarKeyboard | ||
| 643 | videodata->oOverlay->SetOverlayFlag(videodata->overlayID, 1<<25, true); //vr::VROverlayFlags_EnableControlBarClose | ||
| 644 | videodata->oOverlay->SetOverlayName(videodata->overlayID, window->title); | ||
| 645 | |||
| 646 | videodata->bDidCreateOverlay = true; | ||
| 647 | videodata->window = window; | ||
| 648 | |||
| 649 | return true; | ||
| 650 | } | ||
| 651 | |||
| 652 | |||
| 653 | static bool OPENVR_SetupFrame(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 654 | { | ||
| 655 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 656 | static const GLenum buffers[8] = { GL_COLOR_ATTACHMENT0_EXT }; | ||
| 657 | |||
| 658 | videodata->is_buffer_rendering = true; | ||
| 659 | |||
| 660 | #ifdef DEBUG_OPENVR | ||
| 661 | { | ||
| 662 | int error = ov_glGetError(); | ||
| 663 | if (error) | ||
| 664 | SDL_Log("Found GL Error before beginning frame: %d / (Framebuffer:%d)", error, ov_glCheckNamedFramebufferStatus(videodata->fbo, GL_FRAMEBUFFER)); | ||
| 665 | } | ||
| 666 | #endif | ||
| 667 | |||
| 668 | ov_glBindFramebuffer(GL_FRAMEBUFFER, videodata->fbo); | ||
| 669 | ov_glDrawBuffers(1, buffers); | ||
| 670 | |||
| 671 | // Set the alpha channel for non-transparent windows | ||
| 672 | if (!(window->flags & SDL_WINDOW_TRANSPARENT)) { | ||
| 673 | ov_glClearColor(0.0f, 0.0f, 0.0f, 1.0f); | ||
| 674 | ov_glColorMask(false, false, false, true); | ||
| 675 | ov_glClear(GL_COLOR_BUFFER_BIT); | ||
| 676 | ov_glColorMask(true, true, true, true); | ||
| 677 | } | ||
| 678 | |||
| 679 | ov_glBindTexture( GL_TEXTURE_2D, videodata->saved_texture_state ); | ||
| 680 | |||
| 681 | return true; | ||
| 682 | } | ||
| 683 | |||
| 684 | static bool OPENVR_ReleaseFrame(SDL_VideoDevice *_this) | ||
| 685 | { | ||
| 686 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 687 | ov_glGetIntegerv(GL_TEXTURE_BINDING_2D, &videodata->saved_texture_state); | ||
| 688 | |||
| 689 | if (!ov_glGetError) { | ||
| 690 | return true; | ||
| 691 | } | ||
| 692 | |||
| 693 | if (!videodata->is_buffer_rendering) { | ||
| 694 | return true; | ||
| 695 | } | ||
| 696 | |||
| 697 | #ifdef DEBUG_OPENVR | ||
| 698 | { | ||
| 699 | int error = ov_glGetError(); | ||
| 700 | if (error) { | ||
| 701 | SDL_Log("Found GL Error before release frame: %d / (Framebuffer:%d)", error, ov_glCheckNamedFramebufferStatus(videodata->fbo, GL_FRAMEBUFFER)); | ||
| 702 | } | ||
| 703 | } | ||
| 704 | #endif | ||
| 705 | |||
| 706 | videodata->is_buffer_rendering = false; | ||
| 707 | |||
| 708 | ov_glBindFramebuffer(GL_FRAMEBUFFER, 0); | ||
| 709 | |||
| 710 | if (videodata->overlaytexture != 0 && | ||
| 711 | videodata->targh == videodata->last_targh && | ||
| 712 | videodata->targw == videodata->last_targw) { | ||
| 713 | // Only submit frames to OpenVR if the textu re exists. | ||
| 714 | struct Texture_t tex; | ||
| 715 | |||
| 716 | // Setup a Texture_t object to send in the texture. | ||
| 717 | tex.eColorSpace = EColorSpace_ColorSpace_Auto; | ||
| 718 | tex.eType = ETextureType_TextureType_OpenGL; | ||
| 719 | tex.handle = (void *)(intptr_t)videodata->overlaytexture; | ||
| 720 | |||
| 721 | // Send texture into OpenVR as the overlay. | ||
| 722 | videodata->oOverlay->SetOverlayTexture(videodata->overlayID, &tex); | ||
| 723 | } | ||
| 724 | |||
| 725 | if (!videodata->bHasShownOverlay && videodata->bDidCreateOverlay) { | ||
| 726 | videodata->oOverlay->ShowDashboard(videodata->sOverlayName); | ||
| 727 | videodata->bHasShownOverlay = true; | ||
| 728 | } | ||
| 729 | |||
| 730 | if (videodata->renderdoc_debugmarker_frame_end) { | ||
| 731 | ov_glDebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, | ||
| 732 | GL_DEBUG_TYPE_MARKER, MARKER_ID, GL_DEBUG_SEVERITY_NOTIFICATION, -1, | ||
| 733 | MARKER_STR); | ||
| 734 | } | ||
| 735 | |||
| 736 | return OPENVR_CheckRenderbuffer(_this); | ||
| 737 | } | ||
| 738 | |||
| 739 | static void OPENVR_HandleResize(SDL_VideoDevice *_this, int w, int h) | ||
| 740 | { | ||
| 741 | SDL_VideoData *data = (SDL_VideoData *)_this->internal; | ||
| 742 | data->targw = w; | ||
| 743 | data->targh = h; | ||
| 744 | } | ||
| 745 | |||
| 746 | static bool OPENVR_SetDisplayMode(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_DisplayMode *mode) | ||
| 747 | { | ||
| 748 | return true; | ||
| 749 | } | ||
| 750 | |||
| 751 | |||
| 752 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 753 | static LRESULT CALLBACK OpenVRVideoWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | ||
| 754 | { | ||
| 755 | switch (msg) { | ||
| 756 | case WM_DESTROY: | ||
| 757 | return 0; | ||
| 758 | } | ||
| 759 | return DefWindowProc(hwnd, msg, wParam, lParam); | ||
| 760 | } | ||
| 761 | |||
| 762 | static bool OPENVR_GL_LoadLibrary(SDL_VideoDevice *_this, const char *path) | ||
| 763 | { | ||
| 764 | if (path == NULL) { | ||
| 765 | path = SDL_GetHint(SDL_HINT_OPENGL_LIBRARY); | ||
| 766 | } | ||
| 767 | |||
| 768 | if (path == NULL) { | ||
| 769 | path = DEFAULT_OPENGL; | ||
| 770 | } | ||
| 771 | _this->gl_config.dll_handle = SDL_LoadObject(path); | ||
| 772 | if (!_this->gl_config.dll_handle) { | ||
| 773 | return false; | ||
| 774 | } | ||
| 775 | SDL_strlcpy(_this->gl_config.driver_path, path, | ||
| 776 | SDL_arraysize(_this->gl_config.driver_path)); | ||
| 777 | |||
| 778 | // Allocate OpenGL memory | ||
| 779 | _this->gl_data = (struct SDL_GLDriverData *)SDL_calloc(1, sizeof(struct SDL_GLDriverData)); | ||
| 780 | if (!_this->gl_data) { | ||
| 781 | return false; | ||
| 782 | } | ||
| 783 | _this->gl_config.driver_loaded = true; | ||
| 784 | |||
| 785 | return true; | ||
| 786 | } | ||
| 787 | |||
| 788 | static SDL_FunctionPointer OPENVR_GL_GetProcAddress(SDL_VideoDevice *_this, const char *proc) | ||
| 789 | { | ||
| 790 | SDL_FunctionPointer result = NULL; | ||
| 791 | if (ov_wglGetProcAddress) { | ||
| 792 | result = (SDL_FunctionPointer)ov_wglGetProcAddress(proc); | ||
| 793 | if (result) { | ||
| 794 | return result; | ||
| 795 | } | ||
| 796 | } | ||
| 797 | |||
| 798 | return SDL_LoadFunction(_this->gl_config.dll_handle, proc); | ||
| 799 | } | ||
| 800 | |||
| 801 | static void OPENVR_GL_UnloadLibrary(SDL_VideoDevice *_this) | ||
| 802 | { | ||
| 803 | SDL_GL_UnloadLibrary(); | ||
| 804 | } | ||
| 805 | |||
| 806 | static SDL_GLContext OPENVR_GL_CreateContext(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 807 | { | ||
| 808 | GLint numExtensions; | ||
| 809 | int i; | ||
| 810 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 811 | if (!videodata->hglrc) { | ||
| 812 | // Crate a surfaceless EGL Context | ||
| 813 | HWND hwnd; | ||
| 814 | |||
| 815 | WNDCLASSA wnd; | ||
| 816 | wnd.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; | ||
| 817 | wnd.lpfnWndProc = OpenVRVideoWndProc; | ||
| 818 | wnd.cbClsExtra = 0; | ||
| 819 | wnd.cbWndExtra = 0; | ||
| 820 | wnd.hInstance = GetModuleHandle(NULL); | ||
| 821 | wnd.hIcon = LoadIcon(NULL, IDI_APPLICATION); | ||
| 822 | wnd.hCursor = LoadCursor(NULL, IDC_ARROW); | ||
| 823 | wnd.hbrBackground = (HBRUSH)(COLOR_BACKGROUND); | ||
| 824 | wnd.lpszMenuName = NULL; | ||
| 825 | wnd.lpszClassName = "SDL_openvrvideo_classname"; | ||
| 826 | RegisterClassA(&wnd); | ||
| 827 | hwnd = CreateWindowA("SDL_openvrvideo_classname", "SDL_openvrvideo_windowname", (WS_OVERLAPPEDWINDOW), 0, 0, | ||
| 828 | 100, 100, NULL, NULL, GetModuleHandle(NULL), NULL); | ||
| 829 | |||
| 830 | MSG msg; | ||
| 831 | while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { | ||
| 832 | TranslateMessage(&msg); | ||
| 833 | DispatchMessage(&msg); | ||
| 834 | } | ||
| 835 | |||
| 836 | videodata->hdc = GetDC(hwnd); | ||
| 837 | |||
| 838 | static PIXELFORMATDESCRIPTOR pfd = | ||
| 839 | { | ||
| 840 | sizeof(PIXELFORMATDESCRIPTOR), | ||
| 841 | 1, | ||
| 842 | PFD_DRAW_TO_WINDOW | | ||
| 843 | PFD_SUPPORT_OPENGL | | ||
| 844 | PFD_DOUBLEBUFFER, | ||
| 845 | PFD_TYPE_RGBA, | ||
| 846 | 24, | ||
| 847 | 8, 0, 8, 8, 8, 16, | ||
| 848 | 8, | ||
| 849 | 24, | ||
| 850 | 32, | ||
| 851 | 8, 8, 8, 8, | ||
| 852 | 16, | ||
| 853 | 0, | ||
| 854 | 0, | ||
| 855 | PFD_MAIN_PLANE, | ||
| 856 | 0, | ||
| 857 | 0, 0, 0 | ||
| 858 | }; | ||
| 859 | GLuint PixelFormat = ChoosePixelFormat(videodata->hdc, &pfd); | ||
| 860 | if (!SetPixelFormat(videodata->hdc, PixelFormat, &pfd)) { | ||
| 861 | SDL_SetError( "Could not set pixel format" ); | ||
| 862 | return NULL; | ||
| 863 | } | ||
| 864 | HMODULE opengl = GetModuleHandleA(DEFAULT_OPENGL); | ||
| 865 | if (!opengl) { | ||
| 866 | SDL_SetError("Could not open OpenGL Library %s", DEFAULT_OPENGL); | ||
| 867 | return NULL; | ||
| 868 | } | ||
| 869 | |||
| 870 | ov_wglMakeCurrent = (BOOL(*)(HDC, HGLRC))GetProcAddress(opengl, "wglMakeCurrent"); | ||
| 871 | ov_wglCreateContext = (HGLRC(*)(HDC))GetProcAddress(opengl, "wglCreateContext"); | ||
| 872 | ov_wglGetProcAddress = (PROC(*)(LPCSTR))GetProcAddress(opengl, "wglGetProcAddress"); | ||
| 873 | ov_wglDeleteContext = (BOOL(*)(HGLRC))GetProcAddress(opengl, "wglDeleteContext"); | ||
| 874 | if (!ov_wglMakeCurrent || !ov_wglCreateContext) { | ||
| 875 | SDL_SetError("Cannot get wgl context procs(%p, %p)", ov_wglMakeCurrent, ov_wglCreateContext); | ||
| 876 | return NULL; | ||
| 877 | } | ||
| 878 | |||
| 879 | videodata->hglrc = ov_wglCreateContext(videodata->hdc); | ||
| 880 | if (!videodata->hglrc || !ov_wglMakeCurrent(videodata->hdc, videodata->hglrc)) { | ||
| 881 | SDL_SetError("Could not make current OpenGL context."); | ||
| 882 | return NULL; | ||
| 883 | } | ||
| 884 | } | ||
| 885 | |||
| 886 | i = OPENVR_InitExtensions(_this); | ||
| 887 | if (i == 0) { | ||
| 888 | return NULL; | ||
| 889 | } | ||
| 890 | |||
| 891 | videodata->renderdoc_debugmarker_frame_end = false; | ||
| 892 | |||
| 893 | ov_glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); | ||
| 894 | for (i = 0; i < numExtensions; i++) { | ||
| 895 | const char *ccc = (const char *)ov_glGetStringi(GL_EXTENSIONS, i); | ||
| 896 | if (SDL_strcmp(ccc, "GL_KHR_debug") == 0) { | ||
| 897 | #ifdef DEBUG_OPENVR | ||
| 898 | SDL_Log("Found renderdoc debug extension."); | ||
| 899 | #endif | ||
| 900 | videodata->renderdoc_debugmarker_frame_end = true; | ||
| 901 | } | ||
| 902 | } | ||
| 903 | |||
| 904 | if (!videodata->bDidCreateOverlay) { | ||
| 905 | if (!OPENVR_InitializeOverlay(_this, window)) { | ||
| 906 | return NULL; | ||
| 907 | } | ||
| 908 | } | ||
| 909 | |||
| 910 | OPENVR_CheckRenderbuffer(_this); | ||
| 911 | |||
| 912 | OPENVR_SetupFrame(_this, window); | ||
| 913 | |||
| 914 | SDL_GLContext result = SDL_malloc(sizeof(struct SDL_GLContextState)); | ||
| 915 | if (!result) { | ||
| 916 | return NULL; | ||
| 917 | } | ||
| 918 | result->hglrc = videodata->hglrc; | ||
| 919 | return result; | ||
| 920 | } | ||
| 921 | |||
| 922 | static bool OPENVR_GL_MakeCurrent(SDL_VideoDevice *_this, SDL_Window *wnd, SDL_GLContext context) | ||
| 923 | { | ||
| 924 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 925 | ov_wglMakeCurrent(videodata->hdc, videodata->hglrc); | ||
| 926 | return true; | ||
| 927 | } | ||
| 928 | |||
| 929 | static bool OPENVR_GL_SetSwapInterval(SDL_VideoDevice *_this, int interval) | ||
| 930 | { | ||
| 931 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 932 | videodata->swap_interval = interval; | ||
| 933 | return true; | ||
| 934 | } | ||
| 935 | |||
| 936 | static bool OPENVR_GL_GetSwapInterval(SDL_VideoDevice *_this, int *swapInterval) | ||
| 937 | { | ||
| 938 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 939 | if (swapInterval) | ||
| 940 | *swapInterval = videodata->swap_interval; | ||
| 941 | else | ||
| 942 | return SDL_SetError("OPENVR: null passed in for GetSwapInterval"); | ||
| 943 | return true; | ||
| 944 | } | ||
| 945 | |||
| 946 | static bool OPENVR_GL_DestroyContext(SDL_VideoDevice *_this, SDL_GLContext context) | ||
| 947 | { | ||
| 948 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 949 | ov_wglMakeCurrent(videodata->hdc, NULL); | ||
| 950 | ov_wglDeleteContext(videodata->hglrc); | ||
| 951 | return true; | ||
| 952 | } | ||
| 953 | |||
| 954 | |||
| 955 | #else | ||
| 956 | |||
| 957 | static EGLint context_attribs[] = { | ||
| 958 | EGL_CONTEXT_CLIENT_VERSION, 2, | ||
| 959 | EGL_NONE | ||
| 960 | }; | ||
| 961 | |||
| 962 | static bool SDL_EGL_InitInternal(SDL_VideoData * vd) | ||
| 963 | { | ||
| 964 | // Crate a surfaceless EGL Context | ||
| 965 | EGLint major, minor; | ||
| 966 | EGLConfig eglCfg=NULL; | ||
| 967 | EGLBoolean b; | ||
| 968 | |||
| 969 | vd->eglDpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); | ||
| 970 | #ifdef DEBUG_OPENVR | ||
| 971 | SDL_Log("EGL Display: %p", vd->eglDpy); | ||
| 972 | #endif | ||
| 973 | |||
| 974 | if (vd->eglDpy == 0) { | ||
| 975 | return SDL_SetError("No EGL Display"); | ||
| 976 | } | ||
| 977 | |||
| 978 | b = eglInitialize(vd->eglDpy, &major, &minor); | ||
| 979 | if (!b) { | ||
| 980 | return SDL_SetError("eglInitialize failed"); | ||
| 981 | } | ||
| 982 | |||
| 983 | eglBindAPI(EGL_OPENGL_API); | ||
| 984 | #ifdef DEBUG_OPENVR | ||
| 985 | SDL_Log("EGL Major Minor: %d %d = %d", major, minor, b); | ||
| 986 | #endif | ||
| 987 | |||
| 988 | vd->eglCtx = eglCreateContext(vd->eglDpy, eglCfg, EGL_NO_CONTEXT, context_attribs); | ||
| 989 | |||
| 990 | #ifdef DEBUG_OPENVR | ||
| 991 | { | ||
| 992 | int err = eglGetError(); | ||
| 993 | if (err != EGL_SUCCESS) { | ||
| 994 | return SDL_SetError("EGL Error after eglCreateContext %d", err); | ||
| 995 | } | ||
| 996 | } | ||
| 997 | #endif | ||
| 998 | |||
| 999 | if (!vd->eglCtx) { | ||
| 1000 | return SDL_SetError("No EGL context available"); | ||
| 1001 | } | ||
| 1002 | |||
| 1003 | eglMakeCurrent(vd->eglDpy, EGL_NO_SURFACE, EGL_NO_SURFACE, vd->eglCtx); | ||
| 1004 | |||
| 1005 | return true; | ||
| 1006 | } | ||
| 1007 | |||
| 1008 | // Linux, EGL, etc. | ||
| 1009 | static bool OVR_EGL_LoadLibrary(SDL_VideoDevice *_this, const char *path) | ||
| 1010 | { | ||
| 1011 | return SDL_EGL_LoadLibrary(_this, path, /*displaydata->native_display*/0, 0); | ||
| 1012 | } | ||
| 1013 | |||
| 1014 | static SDL_FunctionPointer OVR_EGL_GetProcAddress(SDL_VideoDevice *_this, const char *proc) | ||
| 1015 | { | ||
| 1016 | return SDL_EGL_GetProcAddress(proc); | ||
| 1017 | } | ||
| 1018 | static void OVR_EGL_UnloadLibrary(SDL_VideoDevice *_this) | ||
| 1019 | { | ||
| 1020 | return SDL_EGL_UnloadLibrary(_this); | ||
| 1021 | } | ||
| 1022 | static SDL_GLContext OVR_EGL_CreateContext(SDL_VideoDevice *_this, SDL_Window * window) | ||
| 1023 | { | ||
| 1024 | GLint numExtensions; | ||
| 1025 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1026 | if (!videodata->eglCtx) { | ||
| 1027 | if (!SDL_EGL_InitInternal(videodata)) { | ||
| 1028 | return NULL; | ||
| 1029 | } | ||
| 1030 | } | ||
| 1031 | |||
| 1032 | if (!OPENVR_InitExtensions(_this)) { | ||
| 1033 | return NULL; | ||
| 1034 | } | ||
| 1035 | |||
| 1036 | videodata->renderdoc_debugmarker_frame_end = false; | ||
| 1037 | |||
| 1038 | ov_glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); | ||
| 1039 | for(int i = 0; i < numExtensions; i++) { | ||
| 1040 | const char * ccc = (const char*)ov_glGetStringi(GL_EXTENSIONS, i); | ||
| 1041 | if (SDL_strcmp(ccc, "GL_KHR_debug") == 0) { | ||
| 1042 | #ifdef DEBUG_OPENVR | ||
| 1043 | SDL_Log("Found renderdoc debug extension."); | ||
| 1044 | #endif | ||
| 1045 | videodata->renderdoc_debugmarker_frame_end = true; | ||
| 1046 | } | ||
| 1047 | } | ||
| 1048 | |||
| 1049 | if (!videodata->bDidCreateOverlay) { | ||
| 1050 | if (!OPENVR_InitializeOverlay(_this, window)) { | ||
| 1051 | return NULL; | ||
| 1052 | } | ||
| 1053 | } | ||
| 1054 | |||
| 1055 | OPENVR_CheckRenderbuffer(_this); | ||
| 1056 | |||
| 1057 | OPENVR_SetupFrame(_this, window); | ||
| 1058 | |||
| 1059 | return videodata->eglCtx; | ||
| 1060 | } | ||
| 1061 | |||
| 1062 | static bool OVR_EGL_MakeCurrent(SDL_VideoDevice *_this, SDL_Window * wnd, SDL_GLContext context) | ||
| 1063 | { | ||
| 1064 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1065 | eglMakeCurrent(videodata->eglDpy, EGL_NO_SURFACE, EGL_NO_SURFACE, videodata->eglCtx); | ||
| 1066 | return true; | ||
| 1067 | } | ||
| 1068 | |||
| 1069 | static bool OVR_EGL_SetSwapInterval(SDL_VideoDevice *_this, int interval) | ||
| 1070 | { | ||
| 1071 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1072 | videodata->swap_interval = interval; | ||
| 1073 | return true; | ||
| 1074 | } | ||
| 1075 | |||
| 1076 | static bool OVR_EGL_GetSwapInterval(SDL_VideoDevice *_this, int * swapInterval) | ||
| 1077 | { | ||
| 1078 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1079 | if (swapInterval) | ||
| 1080 | *swapInterval = videodata->swap_interval; | ||
| 1081 | else | ||
| 1082 | return SDL_SetError("OPENVR: null passed in for GetSwapInterval"); | ||
| 1083 | return true; | ||
| 1084 | } | ||
| 1085 | |||
| 1086 | static bool OVR_EGL_DestroyContext(SDL_VideoDevice *_this, SDL_GLContext context) | ||
| 1087 | { | ||
| 1088 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1089 | if (videodata->eglDpy) { | ||
| 1090 | eglTerminate(videodata->eglDpy); | ||
| 1091 | } | ||
| 1092 | return true; | ||
| 1093 | } | ||
| 1094 | |||
| 1095 | #endif | ||
| 1096 | |||
| 1097 | static bool OPENVR_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props) | ||
| 1098 | { | ||
| 1099 | SDL_WindowData *data; | ||
| 1100 | |||
| 1101 | // Allocate window internal data | ||
| 1102 | data = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); | ||
| 1103 | if (data == NULL) { | ||
| 1104 | return SDL_OutOfMemory(); | ||
| 1105 | } | ||
| 1106 | |||
| 1107 | window->max_w = 4096; | ||
| 1108 | window->max_h = 4096; | ||
| 1109 | window->min_w = 1; | ||
| 1110 | window->min_h = 1; | ||
| 1111 | |||
| 1112 | // Setup driver data for this window | ||
| 1113 | window->internal = data; | ||
| 1114 | return true; | ||
| 1115 | } | ||
| 1116 | |||
| 1117 | |||
| 1118 | static void OPENVR_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1119 | { | ||
| 1120 | SDL_WindowData *data; | ||
| 1121 | |||
| 1122 | data = window->internal; | ||
| 1123 | if (data) { | ||
| 1124 | SDL_free(data); | ||
| 1125 | } | ||
| 1126 | window->internal = NULL; | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | static void OPENVR_SetWindowTitle(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1130 | { | ||
| 1131 | SDL_VideoData * data = (SDL_VideoData *)_this->internal; | ||
| 1132 | if (data->bDidCreateOverlay) { | ||
| 1133 | data->oOverlay->SetOverlayName(data->overlayID, window->title); | ||
| 1134 | } | ||
| 1135 | } | ||
| 1136 | |||
| 1137 | static void OPENVR_SetWindowSize(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1138 | { | ||
| 1139 | SDL_VideoData *data = (SDL_VideoData *)_this->internal; | ||
| 1140 | |||
| 1141 | if (window->pending.w != window->w) { | ||
| 1142 | window->w = window->pending.w; | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | if (window->pending.h != window->h) { | ||
| 1146 | window->h = window->pending.h; | ||
| 1147 | } | ||
| 1148 | |||
| 1149 | if (data->targh != window->h || data->targw != window->w) { | ||
| 1150 | OPENVR_HandleResize(_this, window->w, window->h); | ||
| 1151 | } | ||
| 1152 | |||
| 1153 | SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, window->w, window->h); | ||
| 1154 | } | ||
| 1155 | |||
| 1156 | static void OPENVR_GetWindowSizeInPixels(SDL_VideoDevice *_this, SDL_Window *window, int *w, int *h) | ||
| 1157 | { | ||
| 1158 | SDL_VideoData *data = (SDL_VideoData *)_this->internal; | ||
| 1159 | *w = data->targw; | ||
| 1160 | *h = data->targh; | ||
| 1161 | } | ||
| 1162 | |||
| 1163 | static void OPENVR_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1164 | { | ||
| 1165 | SDL_VideoData *data = (SDL_VideoData *)_this->internal; | ||
| 1166 | if (data->targh != window->h || data->targw != window->w) { | ||
| 1167 | OPENVR_HandleResize(_this, window->w, window->h); | ||
| 1168 | } | ||
| 1169 | |||
| 1170 | data->oOverlay->ShowDashboard(data->sOverlayName); | ||
| 1171 | |||
| 1172 | window->flags |= (SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS); | ||
| 1173 | SDL_SetKeyboardFocus(window); | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | static void OPENVR_HideWindow(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1177 | { | ||
| 1178 | return; | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | static bool OPENVR_GL_SwapWindow(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1182 | { | ||
| 1183 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1184 | |||
| 1185 | // This is a little weird. On Windows, we don't necessarily call the normal | ||
| 1186 | // context creation function, and we might get here without having our buffers | ||
| 1187 | // initialized. | ||
| 1188 | if (!videodata->bDidCreateOverlay) { | ||
| 1189 | if (!OPENVR_InitializeOverlay(_this, window)) { | ||
| 1190 | return false; | ||
| 1191 | } | ||
| 1192 | } | ||
| 1193 | |||
| 1194 | if (!OPENVR_ReleaseFrame(_this)) { | ||
| 1195 | return false; | ||
| 1196 | } | ||
| 1197 | |||
| 1198 | // If swap_interval is nonzero (i.e. -1 or 1) we want to wait for vsync on the compositor. | ||
| 1199 | if (videodata->swap_interval != 0) { | ||
| 1200 | videodata->oOverlay->WaitFrameSync(100); | ||
| 1201 | } | ||
| 1202 | |||
| 1203 | if (!OPENVR_SetupFrame(_this, window)) { | ||
| 1204 | return false; | ||
| 1205 | } | ||
| 1206 | |||
| 1207 | return true; | ||
| 1208 | } | ||
| 1209 | |||
| 1210 | static void OPENVR_HandleMouse(float x, float y, int btn, int evt) | ||
| 1211 | { | ||
| 1212 | if (evt == 2) { | ||
| 1213 | SDL_SendMouseMotion(0, NULL, SDL_GLOBAL_MOUSE_ID, false, x, y); | ||
| 1214 | } else { | ||
| 1215 | const Uint8 button = SDL_BUTTON_LEFT + btn; | ||
| 1216 | const bool down = (evt != 0); | ||
| 1217 | SDL_SendMouseButton(0, NULL, SDL_GLOBAL_MOUSE_ID, button, down); | ||
| 1218 | } | ||
| 1219 | } | ||
| 1220 | |||
| 1221 | |||
| 1222 | static bool OPENVR_HasScreenKeyboardSupport(SDL_VideoDevice *_this) | ||
| 1223 | { | ||
| 1224 | return true; | ||
| 1225 | } | ||
| 1226 | |||
| 1227 | static void OPENVR_ShowScreenKeyboard(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID props) | ||
| 1228 | { | ||
| 1229 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1230 | if (!videodata || | ||
| 1231 | videodata->oOverlay == 0 || | ||
| 1232 | videodata->overlayID == 0) { | ||
| 1233 | return; | ||
| 1234 | } | ||
| 1235 | EGamepadTextInputMode input_mode; | ||
| 1236 | switch (SDL_GetTextInputType(props)) { | ||
| 1237 | case SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN: | ||
| 1238 | case SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN: | ||
| 1239 | input_mode = EGamepadTextInputMode_k_EGamepadTextInputModePassword; | ||
| 1240 | break; | ||
| 1241 | default: | ||
| 1242 | input_mode = EGamepadTextInputMode_k_EGamepadTextInputModeNormal; | ||
| 1243 | break; | ||
| 1244 | } | ||
| 1245 | EGamepadTextInputLineMode line_mode; | ||
| 1246 | if (SDL_GetTextInputMultiline(props)) { | ||
| 1247 | line_mode = EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines; | ||
| 1248 | } else { | ||
| 1249 | line_mode = EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine; | ||
| 1250 | } | ||
| 1251 | videodata->oOverlay->ShowKeyboardForOverlay(videodata->overlayID, | ||
| 1252 | input_mode, line_mode, | ||
| 1253 | EKeyboardFlags_KeyboardFlag_Minimal, "Virtual Keyboard", 128, "", 0); | ||
| 1254 | videodata->bKeyboardShown = true; | ||
| 1255 | } | ||
| 1256 | |||
| 1257 | static void OPENVR_HideScreenKeyboard(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1258 | { | ||
| 1259 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1260 | videodata->oOverlay->HideKeyboard(); | ||
| 1261 | videodata->bKeyboardShown = false; | ||
| 1262 | } | ||
| 1263 | |||
| 1264 | static bool OPENVR_IsScreenKeyboardShown(SDL_VideoDevice *_this, SDL_Window *window) | ||
| 1265 | { | ||
| 1266 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1267 | return videodata->bKeyboardShown; | ||
| 1268 | } | ||
| 1269 | |||
| 1270 | static SDL_Cursor *OPENVR_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) | ||
| 1271 | { | ||
| 1272 | SDL_Cursor *result = SDL_calloc(1, sizeof(SDL_Cursor)); | ||
| 1273 | if (!result) { | ||
| 1274 | return NULL; | ||
| 1275 | } | ||
| 1276 | |||
| 1277 | uint32_t * pixels = ImageSDLToOpenVRGL(surface, false); | ||
| 1278 | SDL_CursorData *ovrc = (SDL_CursorData *)SDL_calloc(1, sizeof(*ovrc)); | ||
| 1279 | if (!ovrc) { | ||
| 1280 | SDL_free(result); | ||
| 1281 | return NULL; | ||
| 1282 | } | ||
| 1283 | result->internal = ovrc; | ||
| 1284 | |||
| 1285 | ov_glGenTextures(1, &ovrc->texture_id_handle); | ||
| 1286 | ov_glBindTexture(GL_TEXTURE_2D, ovrc->texture_id_handle); | ||
| 1287 | ov_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, surface->w, surface->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels); | ||
| 1288 | SDL_free(pixels); | ||
| 1289 | ov_glBindTexture(GL_TEXTURE_2D, 0); | ||
| 1290 | |||
| 1291 | ovrc->hot_x = hot_x; | ||
| 1292 | ovrc->hot_y = hot_y; | ||
| 1293 | ovrc->w = surface->w; | ||
| 1294 | ovrc->h = surface->h; | ||
| 1295 | |||
| 1296 | return result; | ||
| 1297 | } | ||
| 1298 | |||
| 1299 | static bool OPENVR_ShowCursor(SDL_Cursor * cursor) | ||
| 1300 | { | ||
| 1301 | SDL_CursorData * ovrc; | ||
| 1302 | EVROverlayError e; | ||
| 1303 | Texture_t texture; | ||
| 1304 | HmdVector2_t hotspot; | ||
| 1305 | VRTextureBounds_t tb; | ||
| 1306 | |||
| 1307 | if (!cursor) { | ||
| 1308 | global_openvr_driver->oOverlay->SetOverlayFlag(global_openvr_driver->overlayID, VROverlayFlags_HideLaserIntersection, true); | ||
| 1309 | e = global_openvr_driver->oOverlay->SetOverlayCursor(global_openvr_driver->overlayID, k_ulOverlayHandleInvalid); | ||
| 1310 | if (e != EVROverlayError_VROverlayError_None) { | ||
| 1311 | return OPENVR_SetOverlayError(e); | ||
| 1312 | } | ||
| 1313 | return true; | ||
| 1314 | } | ||
| 1315 | |||
| 1316 | global_openvr_driver->oOverlay->SetOverlayFlag(global_openvr_driver->overlayID, VROverlayFlags_HideLaserIntersection, false); | ||
| 1317 | |||
| 1318 | ovrc = cursor->internal; | ||
| 1319 | |||
| 1320 | if (!ovrc) { | ||
| 1321 | // Sometimes at boot there is a race condition where this is not ready. | ||
| 1322 | return true; | ||
| 1323 | } | ||
| 1324 | |||
| 1325 | hotspot.v[0] = (float)ovrc->hot_x / (float)ovrc->w; | ||
| 1326 | hotspot.v[1] = (float)ovrc->hot_y / (float)ovrc->h; | ||
| 1327 | |||
| 1328 | texture.handle = (void*)(intptr_t)(ovrc->texture_id_handle); | ||
| 1329 | texture.eType = ETextureType_TextureType_OpenGL; | ||
| 1330 | texture.eColorSpace = EColorSpace_ColorSpace_Auto; | ||
| 1331 | |||
| 1332 | tb.uMin = 0; | ||
| 1333 | tb.uMax = 1; | ||
| 1334 | tb.vMin = 1; | ||
| 1335 | tb.vMax = 0; | ||
| 1336 | |||
| 1337 | e = global_openvr_driver->oOverlay->SetOverlayTextureBounds(global_openvr_driver->cursorID, &tb); | ||
| 1338 | if (e != EVROverlayError_VROverlayError_None) { | ||
| 1339 | return OPENVR_SetOverlayError(e); | ||
| 1340 | } | ||
| 1341 | |||
| 1342 | e = global_openvr_driver->oOverlay->SetOverlayTransformCursor(global_openvr_driver->cursorID, &hotspot); | ||
| 1343 | if (e != EVROverlayError_VROverlayError_None) { | ||
| 1344 | return OPENVR_SetOverlayError(e); | ||
| 1345 | } | ||
| 1346 | |||
| 1347 | e = global_openvr_driver->oOverlay->SetOverlayTexture(global_openvr_driver->cursorID, &texture); | ||
| 1348 | if (e != EVROverlayError_VROverlayError_None) { | ||
| 1349 | return OPENVR_SetOverlayError(e); | ||
| 1350 | } | ||
| 1351 | |||
| 1352 | e = global_openvr_driver->oOverlay->SetOverlayCursor(global_openvr_driver->overlayID, global_openvr_driver->cursorID); | ||
| 1353 | if (e != EVROverlayError_VROverlayError_None) { | ||
| 1354 | return OPENVR_SetOverlayError(e); | ||
| 1355 | } | ||
| 1356 | |||
| 1357 | return true; | ||
| 1358 | } | ||
| 1359 | |||
| 1360 | static void OPENVR_FreeCursor(SDL_Cursor * cursor) | ||
| 1361 | { | ||
| 1362 | if (cursor) { | ||
| 1363 | SDL_CursorData *ovrc = cursor->internal; | ||
| 1364 | if (ovrc) { | ||
| 1365 | ov_glDeleteTextures(1, &ovrc->texture_id_handle); | ||
| 1366 | SDL_free(ovrc); | ||
| 1367 | } | ||
| 1368 | SDL_free(cursor); | ||
| 1369 | } | ||
| 1370 | } | ||
| 1371 | |||
| 1372 | |||
| 1373 | static bool OPENVR_SetWindowIcon(SDL_VideoDevice *_this, SDL_Window * window, SDL_Surface * icon) | ||
| 1374 | { | ||
| 1375 | if (!global_openvr_driver) { | ||
| 1376 | return SDL_SetError("OpenVR Overlay not initialized"); | ||
| 1377 | } | ||
| 1378 | |||
| 1379 | unsigned texture_id_handle; | ||
| 1380 | EVROverlayError e; | ||
| 1381 | Texture_t texture; | ||
| 1382 | uint32_t * pixels; | ||
| 1383 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1384 | if (videodata->bIconOverridden) { | ||
| 1385 | return SDL_SetError("OpenVR Icon is overridden."); | ||
| 1386 | } | ||
| 1387 | |||
| 1388 | pixels = ImageSDLToOpenVRGL(icon, true); | ||
| 1389 | |||
| 1390 | ov_glGenTextures(1, &texture_id_handle); | ||
| 1391 | ov_glBindTexture(GL_TEXTURE_2D, texture_id_handle); | ||
| 1392 | ov_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, icon->w, icon->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels); | ||
| 1393 | SDL_free(pixels); | ||
| 1394 | ov_glBindTexture(GL_TEXTURE_2D, 0); | ||
| 1395 | |||
| 1396 | texture.handle = (void*)(intptr_t)(texture_id_handle); | ||
| 1397 | texture.eType = ETextureType_TextureType_OpenGL; | ||
| 1398 | texture.eColorSpace = EColorSpace_ColorSpace_Auto; | ||
| 1399 | |||
| 1400 | e = global_openvr_driver->oOverlay->SetOverlayTexture(videodata->thumbID, &texture); | ||
| 1401 | if (e != EVROverlayError_VROverlayError_None) { | ||
| 1402 | return OPENVR_SetOverlayError(e); | ||
| 1403 | } | ||
| 1404 | return true; | ||
| 1405 | } | ||
| 1406 | |||
| 1407 | static bool OPENVR_ShowMessageBox(SDL_VideoDevice *_this,const SDL_MessageBoxData *messageboxdata, int *buttonid) | ||
| 1408 | { | ||
| 1409 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1410 | char empty = 0; | ||
| 1411 | char * message = SDL_strdup(messageboxdata->message?messageboxdata->message:""); | ||
| 1412 | char * title = SDL_strdup(messageboxdata->message?messageboxdata->message:""); | ||
| 1413 | char * ok = SDL_strdup("Ok"); | ||
| 1414 | videodata->oOverlay->ShowMessageOverlay(message, title, ok, &empty, &empty, &empty); | ||
| 1415 | SDL_free(ok); | ||
| 1416 | SDL_free(title); | ||
| 1417 | SDL_free(message); | ||
| 1418 | return true; | ||
| 1419 | } | ||
| 1420 | |||
| 1421 | static void InitializeMouseFunctions() | ||
| 1422 | { | ||
| 1423 | SDL_Mouse *mouse = SDL_GetMouse(); | ||
| 1424 | mouse->CreateCursor = OPENVR_CreateCursor; | ||
| 1425 | mouse->ShowCursor = OPENVR_ShowCursor; | ||
| 1426 | mouse->FreeCursor = OPENVR_FreeCursor; | ||
| 1427 | } | ||
| 1428 | |||
| 1429 | static void OPENVR_PumpEvents(SDL_VideoDevice *_this) | ||
| 1430 | { | ||
| 1431 | SDL_VideoData *videodata = (SDL_VideoData *)_this->internal; | ||
| 1432 | struct VREvent_t nEvent; | ||
| 1433 | if (videodata->overlayID) { | ||
| 1434 | while (videodata->oOverlay->PollNextOverlayEvent(videodata->overlayID, &nEvent, sizeof(nEvent))) { | ||
| 1435 | switch (nEvent.eventType) { | ||
| 1436 | case EVREventType_VREvent_ButtonPress: | ||
| 1437 | case EVREventType_VREvent_ButtonUnpress: | ||
| 1438 | break; | ||
| 1439 | case EVREventType_VREvent_MouseMove: | ||
| 1440 | OPENVR_HandleMouse(nEvent.data.mouse.x, videodata->targh - nEvent.data.mouse.y, nEvent.data.mouse.button, 2); | ||
| 1441 | break; | ||
| 1442 | case EVREventType_VREvent_MouseButtonDown: | ||
| 1443 | OPENVR_HandleMouse(nEvent.data.mouse.x, videodata->targh - nEvent.data.mouse.y, 0, 1); | ||
| 1444 | break; | ||
| 1445 | case EVREventType_VREvent_MouseButtonUp: | ||
| 1446 | OPENVR_HandleMouse(nEvent.data.mouse.x, videodata->targh - nEvent.data.mouse.y, 0, 0); | ||
| 1447 | break; | ||
| 1448 | case EVREventType_VREvent_KeyboardCharInput: | ||
| 1449 | SDL_SendKeyboardUnicodeKey(SDL_GetTicksNS(), nEvent.data.keyboard.cNewInput[0]); | ||
| 1450 | break; | ||
| 1451 | case EVREventType_VREvent_OverlayShown: | ||
| 1452 | SDL_SetKeyboardFocus(videodata->window); | ||
| 1453 | SDL_SendWindowEvent(videodata->window, SDL_EVENT_WINDOW_RESTORED, 0, 0); | ||
| 1454 | SDL_SendWindowEvent(videodata->window, SDL_EVENT_WINDOW_SHOWN, 0, 0); | ||
| 1455 | break; | ||
| 1456 | case EVREventType_VREvent_OverlayHidden: | ||
| 1457 | SDL_SendWindowEvent(videodata->window, SDL_EVENT_WINDOW_HIDDEN, 0, 0); | ||
| 1458 | SDL_SendWindowEvent(videodata->window, SDL_EVENT_WINDOW_MINIMIZED, 0, 0); | ||
| 1459 | SDL_SetKeyboardFocus(NULL); | ||
| 1460 | break; | ||
| 1461 | case EVREventType_VREvent_OverlayClosed: | ||
| 1462 | case EVREventType_VREvent_Quit: | ||
| 1463 | SDL_Quit(); | ||
| 1464 | break; | ||
| 1465 | } | ||
| 1466 | } | ||
| 1467 | } | ||
| 1468 | } | ||
| 1469 | |||
| 1470 | |||
| 1471 | static SDL_VideoDevice *OPENVR_CreateDevice(void) | ||
| 1472 | { | ||
| 1473 | SDL_VideoDevice *device; | ||
| 1474 | SDL_VideoData *data; | ||
| 1475 | |||
| 1476 | #ifdef SDL_PLATFORM_WINDOWS | ||
| 1477 | SDL_RegisterApp(NULL, 0, NULL); | ||
| 1478 | #endif | ||
| 1479 | |||
| 1480 | // Initialize all variables that we clean on shutdown | ||
| 1481 | device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); | ||
| 1482 | if (device) { | ||
| 1483 | data = (struct SDL_VideoData *)SDL_calloc(1, sizeof(SDL_VideoData)); | ||
| 1484 | } else { | ||
| 1485 | data = NULL; | ||
| 1486 | } | ||
| 1487 | if (!data) { | ||
| 1488 | #ifdef SDL_PLATFORM_WINDOWS | ||
| 1489 | SDL_UnregisterApp(); | ||
| 1490 | #endif | ||
| 1491 | SDL_free(device); | ||
| 1492 | return NULL; | ||
| 1493 | } | ||
| 1494 | device->internal = data; | ||
| 1495 | |||
| 1496 | { | ||
| 1497 | const char * hint = SDL_GetHint(SDL_HINT_OPENVR_LIBRARY); | ||
| 1498 | if (hint) | ||
| 1499 | data->openVRLIB = SDL_LoadObject(hint); | ||
| 1500 | #ifdef SDL_PLATFORM_WINDOWS | ||
| 1501 | if (!data->openVRLIB) | ||
| 1502 | data->openVRLIB = SDL_LoadObject("openvr_api.dll"); | ||
| 1503 | #else | ||
| 1504 | if (!data->openVRLIB) | ||
| 1505 | data->openVRLIB = SDL_LoadObject("openvr_api.so"); | ||
| 1506 | #endif | ||
| 1507 | } | ||
| 1508 | |||
| 1509 | if (!data->openVRLIB) { | ||
| 1510 | SDL_SetError("Could not open OpenVR API Library"); | ||
| 1511 | goto error; | ||
| 1512 | } | ||
| 1513 | |||
| 1514 | data->FN_VR_InitInternal = (intptr_t(*)(EVRInitError * peError, EVRApplicationType eType))SDL_LoadFunction(data->openVRLIB, "VR_InitInternal"); | ||
| 1515 | data->FN_VR_GetVRInitErrorAsEnglishDescription = (const char *(*)(EVRInitError error))SDL_LoadFunction(data->openVRLIB, "VR_GetVRInitErrorAsEnglishDescription"); | ||
| 1516 | data->FN_VR_GetGenericInterface = (intptr_t (*)(const char *pchInterfaceVersion, EVRInitError * peError))SDL_LoadFunction(data->openVRLIB, "VR_GetGenericInterface"); | ||
| 1517 | if (!data->FN_VR_InitInternal || !data->FN_VR_GetVRInitErrorAsEnglishDescription || !data->FN_VR_GetGenericInterface) { | ||
| 1518 | goto error; | ||
| 1519 | } | ||
| 1520 | |||
| 1521 | char fnname[128]; | ||
| 1522 | EVRInitError e; | ||
| 1523 | data->vrtoken = data->FN_VR_InitInternal(&e, EVRApplicationType_VRApplication_Overlay); | ||
| 1524 | if (!data->vrtoken) { | ||
| 1525 | const char *err = "Can't get english description"; | ||
| 1526 | if (data->FN_VR_GetVRInitErrorAsEnglishDescription != NULL) | ||
| 1527 | err = data->FN_VR_GetVRInitErrorAsEnglishDescription(e); | ||
| 1528 | SDL_SetError("Could not generate OpenVR Context (%s)", err); | ||
| 1529 | goto error; | ||
| 1530 | } | ||
| 1531 | |||
| 1532 | SDL_snprintf(fnname, 127, "FnTable:%s", IVRSystem_Version); | ||
| 1533 | data->oSystem = (struct VR_IVRSystem_FnTable *)data->FN_VR_GetGenericInterface(fnname, &e); | ||
| 1534 | SDL_snprintf(fnname, 127, "FnTable:%s", IVROverlay_Version); | ||
| 1535 | data->oOverlay = (struct VR_IVROverlay_FnTable *)data->FN_VR_GetGenericInterface(fnname, &e); | ||
| 1536 | SDL_snprintf(fnname, 127, "FnTable:%s", IVRInput_Version); | ||
| 1537 | data->oInput = (struct VR_IVRInput_FnTable *)data->FN_VR_GetGenericInterface(fnname, &e); | ||
| 1538 | |||
| 1539 | if (!data->oOverlay || !data->oSystem || !data->oInput) { | ||
| 1540 | SDL_SetError("Could not get interfaces for the OpenVR System (%s), Overlay (%s) and Input (%s) versions", IVRSystem_Version, IVROverlay_Version, IVRInput_Version); | ||
| 1541 | } | ||
| 1542 | |||
| 1543 | const char *hint = SDL_GetHint("SDL_OPENVR_INPUT_PROFILE"); | ||
| 1544 | char *loadpath = 0; | ||
| 1545 | EVRInputError err; | ||
| 1546 | |||
| 1547 | if (hint) { | ||
| 1548 | SDL_asprintf(&loadpath, "%s", hint); | ||
| 1549 | } else { | ||
| 1550 | const char *basepath = SDL_GetBasePath(); | ||
| 1551 | SDL_asprintf(&loadpath, "%ssdloverlay_actions.json", basepath); | ||
| 1552 | } | ||
| 1553 | if (!loadpath) { | ||
| 1554 | goto error; | ||
| 1555 | } | ||
| 1556 | |||
| 1557 | err = data->oInput->SetActionManifestPath(loadpath); | ||
| 1558 | #ifdef DEBUG_OPENVR | ||
| 1559 | SDL_Log("Loaded action manifest at %s (%d)", loadpath, err); | ||
| 1560 | #endif | ||
| 1561 | SDL_free(loadpath); | ||
| 1562 | if (err != EVRInputError_VRInputError_None) { | ||
| 1563 | // I know we don't normally log, but this _really_ should be percolated | ||
| 1564 | // up as far as we can. | ||
| 1565 | SDL_Log("Could not load action manifest path"); | ||
| 1566 | // If we didn't have a hint, this is a soft fail. | ||
| 1567 | // If we did have the hint, then it's a hard fail. | ||
| 1568 | if (hint) { | ||
| 1569 | goto error; | ||
| 1570 | } | ||
| 1571 | } else { | ||
| 1572 | if(!OPENVR_SetupJoystickBasedOnLoadedActionManifest(data)) { | ||
| 1573 | goto error; | ||
| 1574 | } | ||
| 1575 | } | ||
| 1576 | |||
| 1577 | // Setup amount of available displays | ||
| 1578 | device->num_displays = 0; | ||
| 1579 | |||
| 1580 | // Set device free function | ||
| 1581 | device->free = OPENVR_Destroy; | ||
| 1582 | |||
| 1583 | // Setup all functions which we can handle | ||
| 1584 | device->VideoInit = OPENVR_VideoInit; | ||
| 1585 | device->VideoQuit = OPENVR_VideoQuit; | ||
| 1586 | device->SetDisplayMode = OPENVR_SetDisplayMode; | ||
| 1587 | device->CreateSDLWindow = OPENVR_CreateWindow; | ||
| 1588 | device->SetWindowTitle = OPENVR_SetWindowTitle; | ||
| 1589 | device->SetWindowSize = OPENVR_SetWindowSize; | ||
| 1590 | device->GetWindowSizeInPixels = OPENVR_GetWindowSizeInPixels; | ||
| 1591 | device->ShowWindow = OPENVR_ShowWindow; | ||
| 1592 | device->HideWindow = OPENVR_HideWindow; | ||
| 1593 | device->DestroyWindow = OPENVR_DestroyWindow; | ||
| 1594 | device->ShowMessageBox = OPENVR_ShowMessageBox; | ||
| 1595 | |||
| 1596 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 1597 | #ifdef SDL_VIDEO_OPENGL_WGL | ||
| 1598 | device->GL_LoadLibrary = OPENVR_GL_LoadLibrary; | ||
| 1599 | device->GL_GetProcAddress = OPENVR_GL_GetProcAddress; | ||
| 1600 | device->GL_UnloadLibrary = OPENVR_GL_UnloadLibrary; | ||
| 1601 | device->GL_CreateContext = OPENVR_GL_CreateContext; | ||
| 1602 | device->GL_MakeCurrent = OPENVR_GL_MakeCurrent; | ||
| 1603 | device->GL_SetSwapInterval = OPENVR_GL_SetSwapInterval; | ||
| 1604 | device->GL_GetSwapInterval = OPENVR_GL_GetSwapInterval; | ||
| 1605 | device->GL_SwapWindow = OPENVR_GL_SwapWindow; | ||
| 1606 | device->GL_DestroyContext = OPENVR_GL_DestroyContext; | ||
| 1607 | #elif SDL_VIDEO_OPENGL_EGL | ||
| 1608 | device->GL_LoadLibrary = WIN_GLES_LoadLibrary; | ||
| 1609 | device->GL_GetProcAddress = WIN_GLES_GetProcAddress; | ||
| 1610 | device->GL_UnloadLibrary = WIN_GLES_UnloadLibrary; | ||
| 1611 | device->GL_CreateContext = WIN_GLES_CreateContext; | ||
| 1612 | device->GL_MakeCurrent = WIN_GLES_MakeCurrent; | ||
| 1613 | device->GL_SetSwapInterval = WIN_GLES_SetSwapInterval; | ||
| 1614 | device->GL_GetSwapInterval = WIN_GLES_GetSwapInterval; | ||
| 1615 | device->GL_SwapWindow = WIN_GLES_SwapWindow; | ||
| 1616 | device->GL_DestroyContext = WIN_GLES_DestroyContext; | ||
| 1617 | #endif | ||
| 1618 | #else | ||
| 1619 | device->GL_LoadLibrary = OVR_EGL_LoadLibrary; | ||
| 1620 | device->GL_GetProcAddress = OVR_EGL_GetProcAddress; | ||
| 1621 | device->GL_UnloadLibrary = OVR_EGL_UnloadLibrary; | ||
| 1622 | device->GL_CreateContext = OVR_EGL_CreateContext; | ||
| 1623 | device->GL_MakeCurrent = OVR_EGL_MakeCurrent; | ||
| 1624 | device->GL_SetSwapInterval = OVR_EGL_SetSwapInterval; | ||
| 1625 | device->GL_GetSwapInterval = OVR_EGL_GetSwapInterval; | ||
| 1626 | device->GL_DestroyContext = OVR_EGL_DestroyContext; | ||
| 1627 | device->GL_SwapWindow = OPENVR_GL_SwapWindow; | ||
| 1628 | #endif | ||
| 1629 | |||
| 1630 | #if defined(SDL_VIDEO_VULKAN) && defined(SDL_VIDEO_DRIVER_WINDOWS) | ||
| 1631 | device->Vulkan_LoadLibrary = WIN_Vulkan_LoadLibrary; | ||
| 1632 | device->Vulkan_UnloadLibrary = WIN_Vulkan_UnloadLibrary; | ||
| 1633 | device->Vulkan_GetInstanceExtensions = WIN_Vulkan_GetInstanceExtensions; | ||
| 1634 | device->Vulkan_CreateSurface = WIN_Vulkan_CreateSurface; | ||
| 1635 | #else | ||
| 1636 | device->Vulkan_LoadLibrary = 0; | ||
| 1637 | device->Vulkan_UnloadLibrary = 0; | ||
| 1638 | device->Vulkan_GetInstanceExtensions = 0; | ||
| 1639 | device->Vulkan_CreateSurface = 0; | ||
| 1640 | #endif | ||
| 1641 | |||
| 1642 | device->PumpEvents = OPENVR_PumpEvents; | ||
| 1643 | device->VideoInit = OPENVR_VideoInit; | ||
| 1644 | device->VideoQuit = OPENVR_VideoQuit; | ||
| 1645 | |||
| 1646 | device->HasScreenKeyboardSupport = OPENVR_HasScreenKeyboardSupport; | ||
| 1647 | device->ShowScreenKeyboard = OPENVR_ShowScreenKeyboard; | ||
| 1648 | device->HideScreenKeyboard = OPENVR_HideScreenKeyboard; | ||
| 1649 | device->IsScreenKeyboardShown = OPENVR_IsScreenKeyboardShown; | ||
| 1650 | device->SetWindowIcon = OPENVR_SetWindowIcon; | ||
| 1651 | |||
| 1652 | return device; | ||
| 1653 | |||
| 1654 | error: | ||
| 1655 | OPENVR_Destroy(device); | ||
| 1656 | return NULL; | ||
| 1657 | } | ||
| 1658 | |||
| 1659 | VideoBootStrap OPENVR_bootstrap = { | ||
| 1660 | "openvr", "SDL OpenVR video driver", OPENVR_CreateDevice, NULL, false | ||
| 1661 | }; | ||
| 1662 | |||
| 1663 | #endif // SDL_VIDEO_DRIVER_WINDOWS | ||
| 1664 | |||
diff --git a/contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.h b/contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.h new file mode 100644 index 0000000..6eade3e --- /dev/null +++ b/contrib/SDL-3.2.8/src/video/openvr/SDL_openvrvideo.h | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | #ifndef _SDL_OPENVRVIDEO_H | ||
| 2 | #define _SDL_OPENVRVIDEO_H | ||
| 3 | |||
| 4 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 5 | #ifdef EXTERN_C | ||
| 6 | #undef EXTERN_C | ||
| 7 | #endif | ||
| 8 | #endif | ||
| 9 | |||
| 10 | // OpenVR has a LOT of unused variables that GCC will freak out on. | ||
| 11 | #ifdef __GNUC__ | ||
| 12 | #pragma GCC diagnostic push | ||
| 13 | #pragma GCC diagnostic ignored "-Wunused-variable" | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #define USE_SDL | ||
| 17 | #include "openvr_capi.h" | ||
| 18 | |||
| 19 | #ifdef __GNUC__ | ||
| 20 | #pragma GCC diagnostic pop | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #include <stdint.h> | ||
| 24 | |||
| 25 | #ifndef SDL_VIDEO_DRIVER_WINDOWS | ||
| 26 | |||
| 27 | #include <GLES3/gl3.h> | ||
| 28 | #include <GLES3/gl32.h> | ||
| 29 | #include <EGL/egl.h> | ||
| 30 | #include <GLES2/gl2.h> | ||
| 31 | #include <GLES2/gl2ext.h> | ||
| 32 | #include <GLES2/gl2ext.h> | ||
| 33 | |||
| 34 | #endif | ||
| 35 | |||
| 36 | |||
| 37 | struct SDL_WindowData | ||
| 38 | { | ||
| 39 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 40 | SDL_Window *window; | ||
| 41 | HWND hwnd; | ||
| 42 | HWND parent; | ||
| 43 | HDC hdc; | ||
| 44 | HDC mdc; | ||
| 45 | #else | ||
| 46 | int dummy; | ||
| 47 | #endif | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct SDL_VideoData { | ||
| 51 | void * openVRLIB; | ||
| 52 | intptr_t vrtoken; | ||
| 53 | intptr_t (*FN_VR_InitInternal)( EVRInitError *peError, EVRApplicationType eType ); | ||
| 54 | const char *(*FN_VR_GetVRInitErrorAsEnglishDescription)( EVRInitError error ); | ||
| 55 | intptr_t (*FN_VR_GetGenericInterface)( const char *pchInterfaceVersion, EVRInitError *peError ); | ||
| 56 | |||
| 57 | int is_buffer_rendering; | ||
| 58 | |||
| 59 | unsigned int overlaytexture; | ||
| 60 | |||
| 61 | unsigned int fbo, rbo; | ||
| 62 | |||
| 63 | int saved_texture_state; | ||
| 64 | |||
| 65 | struct VR_IVRSystem_FnTable *oSystem; | ||
| 66 | struct VR_IVROverlay_FnTable *oOverlay; | ||
| 67 | struct VR_IVRInput_FnTable * oInput; | ||
| 68 | VROverlayHandle_t overlayID, thumbID, cursorID; | ||
| 69 | |||
| 70 | char * sOverlayName; | ||
| 71 | |||
| 72 | VRActionSetHandle_t input_action_set; | ||
| 73 | VRActionHandle_t * input_action_handles_buttons; | ||
| 74 | int input_action_handles_buttons_count; | ||
| 75 | VRActionHandle_t * input_action_handles_axes; | ||
| 76 | int input_action_handles_axes_count; | ||
| 77 | VRActionHandle_t input_action_handles_haptics[2]; | ||
| 78 | |||
| 79 | bool bKeyboardShown; | ||
| 80 | bool bHasShownOverlay; | ||
| 81 | int targw, targh; | ||
| 82 | int last_targw, last_targh; | ||
| 83 | int swap_interval; | ||
| 84 | |||
| 85 | bool bDidCreateOverlay; | ||
| 86 | bool renderdoc_debugmarker_frame_end; | ||
| 87 | bool bIconOverridden; | ||
| 88 | |||
| 89 | SDL_Window * window; | ||
| 90 | |||
| 91 | SDL_Joystick *virtual_joystick; | ||
| 92 | #ifdef SDL_VIDEO_DRIVER_WINDOWS | ||
| 93 | HDC hdc; | ||
| 94 | HGLRC hglrc; | ||
| 95 | #else | ||
| 96 | EGLDisplay eglDpy; | ||
| 97 | EGLContext eglCtx; | ||
| 98 | #endif | ||
| 99 | }; | ||
| 100 | |||
| 101 | struct SDL_DisplayData | ||
| 102 | { | ||
| 103 | int dummy; | ||
| 104 | }; | ||
| 105 | |||
| 106 | #endif | ||
diff --git a/contrib/SDL-3.2.8/src/video/openvr/openvr_capi.h b/contrib/SDL-3.2.8/src/video/openvr/openvr_capi.h new file mode 100644 index 0000000..a772626 --- /dev/null +++ b/contrib/SDL-3.2.8/src/video/openvr/openvr_capi.h | |||
| @@ -0,0 +1,3200 @@ | |||
| 1 | /* | ||
| 2 | Copyright (c) 2015, Valve Corporation | ||
| 3 | All rights reserved. | ||
| 4 | |||
| 5 | Redistribution and use in source and binary forms, with or without modification, | ||
| 6 | are permitted provided that the following conditions are met: | ||
| 7 | |||
| 8 | 1. Redistributions of source code must retain the above copyright notice, this | ||
| 9 | list of conditions and the following disclaimer. | ||
| 10 | |||
| 11 | 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| 12 | this list of conditions and the following disclaimer in the documentation and/or | ||
| 13 | other materials provided with the distribution. | ||
| 14 | |||
| 15 | 3. Neither the name of the copyright holder nor the names of its contributors | ||
| 16 | may be used to endorse or promote products derived from this software without | ||
| 17 | specific prior written permission. | ||
| 18 | |||
| 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
| 23 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| 24 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| 26 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 29 | */ | ||
| 30 | //============================================================================= | ||
| 31 | // | ||
| 32 | // Purpose: Header for flatted SteamAPI. Use this for binding to other languages. | ||
| 33 | // This file is auto-generated, do not edit it. | ||
| 34 | // | ||
| 35 | //============================================================================= | ||
| 36 | |||
| 37 | #ifndef __OPENVR_API_FLAT_H__ | ||
| 38 | #define __OPENVR_API_FLAT_H__ | ||
| 39 | #if defined( _WIN32 ) || defined( __clang__ ) | ||
| 40 | #pragma once | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #ifdef __cplusplus | ||
| 44 | #define EXTERN_C extern "C" | ||
| 45 | #else | ||
| 46 | #define EXTERN_C | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #if defined( _WIN32 ) | ||
| 50 | #define OPENVR_FNTABLE_CALLTYPE __stdcall | ||
| 51 | #else | ||
| 52 | #define OPENVR_FNTABLE_CALLTYPE | ||
| 53 | #endif | ||
| 54 | |||
| 55 | // OPENVR API export macro | ||
| 56 | #if defined( _WIN32 ) && !defined( _X360 ) | ||
| 57 | #if defined( OPENVR_API_EXPORTS ) | ||
| 58 | #define S_API EXTERN_C __declspec( dllexport ) | ||
| 59 | #elif defined( OPENVR_API_NODLL ) | ||
| 60 | #define S_API EXTERN_C | ||
| 61 | #else | ||
| 62 | #define S_API extern "C" __declspec( dllimport ) | ||
| 63 | #endif // OPENVR_API_EXPORTS | ||
| 64 | #elif defined( __GNUC__ ) | ||
| 65 | #if defined( OPENVR_API_EXPORTS ) | ||
| 66 | #define S_API EXTERN_C __attribute__ ((visibility("default"))) | ||
| 67 | #else | ||
| 68 | #define S_API EXTERN_C | ||
| 69 | #endif // OPENVR_API_EXPORTS | ||
| 70 | #else // !WIN32 | ||
| 71 | #if defined( OPENVR_API_EXPORTS ) | ||
| 72 | #define S_API EXTERN_C | ||
| 73 | #else | ||
| 74 | #define S_API EXTERN_C | ||
| 75 | #endif // OPENVR_API_EXPORTS | ||
| 76 | #endif | ||
| 77 | |||
| 78 | #ifndef USE_SDL | ||
| 79 | #include <stdint.h> | ||
| 80 | |||
| 81 | #if defined( __WIN32 ) | ||
| 82 | typedef char bool; | ||
| 83 | #else | ||
| 84 | #include <stdbool.h> | ||
| 85 | #endif | ||
| 86 | #endif // USE_SDL | ||
| 87 | |||
| 88 | // OpenVR Constants | ||
| 89 | |||
| 90 | static const unsigned long k_nDriverNone = 4294967295; | ||
| 91 | static const unsigned long k_unMaxDriverDebugResponseSize = 32768; | ||
| 92 | static const unsigned long k_unTrackedDeviceIndex_Hmd = 0; | ||
| 93 | static const unsigned long k_unMaxTrackedDeviceCount = 64; | ||
| 94 | static const unsigned long k_unTrackedDeviceIndexOther = 4294967294; | ||
| 95 | static const unsigned long k_unTrackedDeviceIndexInvalid = 4294967295; | ||
| 96 | static const unsigned long long k_ulInvalidPropertyContainer = 0; | ||
| 97 | static const unsigned long k_unInvalidPropertyTag = 0; | ||
| 98 | static const unsigned long long k_ulInvalidDriverHandle = 0; | ||
| 99 | static const unsigned long k_unFloatPropertyTag = 1; | ||
| 100 | static const unsigned long k_unInt32PropertyTag = 2; | ||
| 101 | static const unsigned long k_unUint64PropertyTag = 3; | ||
| 102 | static const unsigned long k_unBoolPropertyTag = 4; | ||
| 103 | static const unsigned long k_unStringPropertyTag = 5; | ||
| 104 | static const unsigned long k_unErrorPropertyTag = 6; | ||
| 105 | static const unsigned long k_unDoublePropertyTag = 7; | ||
| 106 | static const unsigned long k_unHmdMatrix34PropertyTag = 20; | ||
| 107 | static const unsigned long k_unHmdMatrix44PropertyTag = 21; | ||
| 108 | static const unsigned long k_unHmdVector3PropertyTag = 22; | ||
| 109 | static const unsigned long k_unHmdVector4PropertyTag = 23; | ||
| 110 | static const unsigned long k_unHmdVector2PropertyTag = 24; | ||
| 111 | static const unsigned long k_unHmdQuadPropertyTag = 25; | ||
| 112 | static const unsigned long k_unHiddenAreaPropertyTag = 30; | ||
| 113 | static const unsigned long k_unPathHandleInfoTag = 31; | ||
| 114 | static const unsigned long k_unActionPropertyTag = 32; | ||
| 115 | static const unsigned long k_unInputValuePropertyTag = 33; | ||
| 116 | static const unsigned long k_unWildcardPropertyTag = 34; | ||
| 117 | static const unsigned long k_unHapticVibrationPropertyTag = 35; | ||
| 118 | static const unsigned long k_unSkeletonPropertyTag = 36; | ||
| 119 | static const unsigned long k_unSpatialAnchorPosePropertyTag = 40; | ||
| 120 | static const unsigned long k_unJsonPropertyTag = 41; | ||
| 121 | static const unsigned long k_unActiveActionSetPropertyTag = 42; | ||
| 122 | static const unsigned long k_unOpenVRInternalReserved_Start = 1000; | ||
| 123 | static const unsigned long k_unOpenVRInternalReserved_End = 10000; | ||
| 124 | static const unsigned long k_unMaxPropertyStringSize = 32768; | ||
| 125 | static const unsigned long long k_ulInvalidActionHandle = 0; | ||
| 126 | static const unsigned long long k_ulInvalidActionSetHandle = 0; | ||
| 127 | static const unsigned long long k_ulInvalidInputValueHandle = 0; | ||
| 128 | static const unsigned long k_unControllerStateAxisCount = 5; | ||
| 129 | static const unsigned long long k_ulOverlayHandleInvalid = 0; | ||
| 130 | static const unsigned long k_unMaxDistortionFunctionParameters = 8; | ||
| 131 | static const unsigned long k_unScreenshotHandleInvalid = 0; | ||
| 132 | static const char * IVRSystem_Version = "IVRSystem_022"; | ||
| 133 | static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; | ||
| 134 | static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_006"; | ||
| 135 | static const unsigned long k_unMaxApplicationKeyLength = 128; | ||
| 136 | static const char * k_pch_MimeType_HomeApp = "vr/home"; | ||
| 137 | static const char * k_pch_MimeType_GameTheater = "vr/game_theater"; | ||
| 138 | static const char * IVRApplications_Version = "IVRApplications_007"; | ||
| 139 | static const char * IVRChaperone_Version = "IVRChaperone_004"; | ||
| 140 | static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; | ||
| 141 | static const char * IVRCompositor_Version = "IVRCompositor_027"; | ||
| 142 | static const unsigned long k_unVROverlayMaxKeyLength = 128; | ||
| 143 | static const unsigned long k_unVROverlayMaxNameLength = 128; | ||
| 144 | static const unsigned long k_unMaxOverlayCount = 128; | ||
| 145 | static const unsigned long k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; | ||
| 146 | static const char * IVROverlay_Version = "IVROverlay_026"; | ||
| 147 | static const char * IVROverlayView_Version = "IVROverlayView_003"; | ||
| 148 | static const unsigned long k_unHeadsetViewMaxWidth = 3840; | ||
| 149 | static const unsigned long k_unHeadsetViewMaxHeight = 2160; | ||
| 150 | static const char * k_pchHeadsetViewOverlayKey = "system.HeadsetView"; | ||
| 151 | static const char * IVRHeadsetView_Version = "IVRHeadsetView_001"; | ||
| 152 | static const char * k_pch_Controller_Component_GDC2015 = "gdc2015"; | ||
| 153 | static const char * k_pch_Controller_Component_Base = "base"; | ||
| 154 | static const char * k_pch_Controller_Component_Tip = "tip"; | ||
| 155 | static const char * k_pch_Controller_Component_OpenXR_Aim = "openxr_aim"; | ||
| 156 | static const char * k_pch_Controller_Component_HandGrip = "handgrip"; | ||
| 157 | static const char * k_pch_Controller_Component_OpenXR_Grip = "openxr_grip"; | ||
| 158 | static const char * k_pch_Controller_Component_OpenXR_HandModel = "openxr_handmodel"; | ||
| 159 | static const char * k_pch_Controller_Component_Status = "status"; | ||
| 160 | static const char * IVRRenderModels_Version = "IVRRenderModels_006"; | ||
| 161 | static const unsigned long k_unNotificationTextMaxSize = 256; | ||
| 162 | static const char * IVRNotifications_Version = "IVRNotifications_002"; | ||
| 163 | static const unsigned long k_unMaxSettingsKeyLength = 128; | ||
| 164 | static const char * IVRSettings_Version = "IVRSettings_003"; | ||
| 165 | static const char * k_pch_SteamVR_Section = "steamvr"; | ||
| 166 | static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd"; | ||
| 167 | static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; | ||
| 168 | static const char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; | ||
| 169 | static const char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; | ||
| 170 | static const char * k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; | ||
| 171 | static const char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; | ||
| 172 | static const char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; | ||
| 173 | static const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps"; | ||
| 174 | static const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel"; | ||
| 175 | static const char * k_pch_SteamVR_IPD_Float = "ipd"; | ||
| 176 | static const char * k_pch_SteamVR_Background_String = "background"; | ||
| 177 | static const char * k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; | ||
| 178 | static const char * k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; | ||
| 179 | static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; | ||
| 180 | static const char * k_pch_SteamVR_GridColor_String = "gridColor"; | ||
| 181 | static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; | ||
| 182 | static const char * k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; | ||
| 183 | static const char * k_pch_SteamVR_ShowStage_Bool = "showStage"; | ||
| 184 | static const char * k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences"; | ||
| 185 | static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; | ||
| 186 | static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; | ||
| 187 | static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; | ||
| 188 | static const char * k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; | ||
| 189 | static const char * k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; | ||
| 190 | static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; | ||
| 191 | static const char * k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; | ||
| 192 | static const char * k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; | ||
| 193 | static const char * k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; | ||
| 194 | static const char * k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; | ||
| 195 | static const char * k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle"; | ||
| 196 | static const char * k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict"; | ||
| 197 | static const char * k_pch_SteamVR_WorldScale_Float = "worldScale"; | ||
| 198 | static const char * k_pch_SteamVR_FovScale_Int32 = "fovScale"; | ||
| 199 | static const char * k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; | ||
| 200 | static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; | ||
| 201 | static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; | ||
| 202 | static const char * k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; | ||
| 203 | static const char * k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; | ||
| 204 | static const char * k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; | ||
| 205 | static const char * k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye"; | ||
| 206 | static const char * k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; | ||
| 207 | static const char * k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; | ||
| 208 | static const char * k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph"; | ||
| 209 | static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; | ||
| 210 | static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; | ||
| 211 | static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; | ||
| 212 | static const char * k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; | ||
| 213 | static const char * k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; | ||
| 214 | static const char * k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; | ||
| 215 | static const char * k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; | ||
| 216 | static const char * k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; | ||
| 217 | static const char * k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; | ||
| 218 | static const char * k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; | ||
| 219 | static const char * k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; | ||
| 220 | static const char * k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; | ||
| 221 | static const char * k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; | ||
| 222 | static const char * k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; | ||
| 223 | static const char * k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; | ||
| 224 | static const char * k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; | ||
| 225 | static const char * k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; | ||
| 226 | static const char * k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; | ||
| 227 | static const char * k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; | ||
| 228 | static const char * k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; | ||
| 229 | static const char * k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; | ||
| 230 | static const char * k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; | ||
| 231 | static const char * k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; | ||
| 232 | static const char * k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; | ||
| 233 | static const char * k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; | ||
| 234 | static const char * k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; | ||
| 235 | static const char * k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; | ||
| 236 | static const char * k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; | ||
| 237 | static const char * k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority"; | ||
| 238 | static const char * k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2"; | ||
| 239 | static const char * k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption"; | ||
| 240 | static const char * k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches"; | ||
| 241 | static const char * k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility"; | ||
| 242 | static const char * k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode"; | ||
| 243 | static const char * k_pch_SteamVR_UsePrism_Bool = "usePrism"; | ||
| 244 | static const char * k_pch_DirectMode_Section = "direct_mode"; | ||
| 245 | static const char * k_pch_DirectMode_Enable_Bool = "enable"; | ||
| 246 | static const char * k_pch_DirectMode_Count_Int32 = "count"; | ||
| 247 | static const char * k_pch_DirectMode_EdidVid_Int32 = "edidVid"; | ||
| 248 | static const char * k_pch_DirectMode_EdidPid_Int32 = "edidPid"; | ||
| 249 | static const char * k_pch_Lighthouse_Section = "driver_lighthouse"; | ||
| 250 | static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; | ||
| 251 | static const char * k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; | ||
| 252 | static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; | ||
| 253 | static const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; | ||
| 254 | static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; | ||
| 255 | static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; | ||
| 256 | static const char * k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; | ||
| 257 | static const char * k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; | ||
| 258 | static const char * k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; | ||
| 259 | static const char * k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; | ||
| 260 | static const char * k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; | ||
| 261 | static const char * k_pch_Null_Section = "driver_null"; | ||
| 262 | static const char * k_pch_Null_SerialNumber_String = "serialNumber"; | ||
| 263 | static const char * k_pch_Null_ModelNumber_String = "modelNumber"; | ||
| 264 | static const char * k_pch_Null_WindowX_Int32 = "windowX"; | ||
| 265 | static const char * k_pch_Null_WindowY_Int32 = "windowY"; | ||
| 266 | static const char * k_pch_Null_WindowWidth_Int32 = "windowWidth"; | ||
| 267 | static const char * k_pch_Null_WindowHeight_Int32 = "windowHeight"; | ||
| 268 | static const char * k_pch_Null_RenderWidth_Int32 = "renderWidth"; | ||
| 269 | static const char * k_pch_Null_RenderHeight_Int32 = "renderHeight"; | ||
| 270 | static const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; | ||
| 271 | static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency"; | ||
| 272 | static const char * k_pch_WindowsMR_Section = "driver_holographic"; | ||
| 273 | static const char * k_pch_UserInterface_Section = "userinterface"; | ||
| 274 | static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; | ||
| 275 | static const char * k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; | ||
| 276 | static const char * k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; | ||
| 277 | static const char * k_pch_UserInterface_Screenshots_Bool = "screenshots"; | ||
| 278 | static const char * k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; | ||
| 279 | static const char * k_pch_Notifications_Section = "notifications"; | ||
| 280 | static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; | ||
| 281 | static const char * k_pch_Keyboard_Section = "keyboard"; | ||
| 282 | static const char * k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; | ||
| 283 | static const char * k_pch_Keyboard_ScaleX = "ScaleX"; | ||
| 284 | static const char * k_pch_Keyboard_ScaleY = "ScaleY"; | ||
| 285 | static const char * k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; | ||
| 286 | static const char * k_pch_Keyboard_OffsetRightX = "OffsetRightX"; | ||
| 287 | static const char * k_pch_Keyboard_OffsetY = "OffsetY"; | ||
| 288 | static const char * k_pch_Keyboard_Smoothing = "Smoothing"; | ||
| 289 | static const char * k_pch_Perf_Section = "perfcheck"; | ||
| 290 | static const char * k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; | ||
| 291 | static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; | ||
| 292 | static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; | ||
| 293 | static const char * k_pch_Perf_TestData_Float = "perfTestData"; | ||
| 294 | static const char * k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; | ||
| 295 | static const char * k_pch_CollisionBounds_Section = "collisionBounds"; | ||
| 296 | static const char * k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; | ||
| 297 | static const char * k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; | ||
| 298 | static const char * k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; | ||
| 299 | static const char * k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; | ||
| 300 | static const char * k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; | ||
| 301 | static const char * k_pch_CollisionBounds_WallHeight_Float = "CollisionBoundsWallHeight"; | ||
| 302 | static const char * k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; | ||
| 303 | static const char * k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; | ||
| 304 | static const char * k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; | ||
| 305 | static const char * k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; | ||
| 306 | static const char * k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; | ||
| 307 | static const char * k_pch_Camera_Section = "camera"; | ||
| 308 | static const char * k_pch_Camera_EnableCamera_Bool = "enableCamera"; | ||
| 309 | static const char * k_pch_Camera_ShowOnController_Bool = "showOnController"; | ||
| 310 | static const char * k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; | ||
| 311 | static const char * k_pch_Camera_RoomView_Int32 = "roomView"; | ||
| 312 | static const char * k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; | ||
| 313 | static const char * k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; | ||
| 314 | static const char * k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; | ||
| 315 | static const char * k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; | ||
| 316 | static const char * k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; | ||
| 317 | static const char * k_pch_Camera_RoomViewStyle_Int32 = "roomViewStyle"; | ||
| 318 | static const char * k_pch_audio_Section = "audio"; | ||
| 319 | static const char * k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; | ||
| 320 | static const char * k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; | ||
| 321 | static const char * k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; | ||
| 322 | static const char * k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; | ||
| 323 | static const char * k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; | ||
| 324 | static const char * k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; | ||
| 325 | static const char * k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; | ||
| 326 | static const char * k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; | ||
| 327 | static const char * k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; | ||
| 328 | static const char * k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; | ||
| 329 | static const char * k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; | ||
| 330 | static const char * k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; | ||
| 331 | static const char * k_pch_audio_ActiveMirrorDevice_String = "activePlaybackMirrorDevice"; | ||
| 332 | static const char * k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume"; | ||
| 333 | static const char * k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; | ||
| 334 | static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; | ||
| 335 | static const char * k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput"; | ||
| 336 | static const char * k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor"; | ||
| 337 | static const char * k_pch_Power_Section = "power"; | ||
| 338 | static const char * k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; | ||
| 339 | static const char * k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; | ||
| 340 | static const char * k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; | ||
| 341 | static const char * k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; | ||
| 342 | static const char * k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; | ||
| 343 | static const char * k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; | ||
| 344 | static const char * k_pch_Dashboard_Section = "dashboard"; | ||
| 345 | static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; | ||
| 346 | static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; | ||
| 347 | static const char * k_pch_Dashboard_Position = "position"; | ||
| 348 | static const char * k_pch_Dashboard_DesktopScale = "desktopScale"; | ||
| 349 | static const char * k_pch_Dashboard_DashboardScale = "dashboardScale"; | ||
| 350 | static const char * k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer"; | ||
| 351 | static const char * k_pch_Dashboard_StickyDashboard = "stickyDashboard"; | ||
| 352 | static const char * k_pch_modelskin_Section = "modelskins"; | ||
| 353 | static const char * k_pch_Driver_Enable_Bool = "enable"; | ||
| 354 | static const char * k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; | ||
| 355 | static const char * k_pch_Driver_LoadPriority_Int32 = "loadPriority"; | ||
| 356 | static const char * k_pch_WebInterface_Section = "WebInterface"; | ||
| 357 | static const char * k_pch_VRWebHelper_Section = "VRWebHelper"; | ||
| 358 | static const char * k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; | ||
| 359 | static const char * k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; | ||
| 360 | static const char * k_pch_TrackingOverride_Section = "TrackingOverrides"; | ||
| 361 | static const char * k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; | ||
| 362 | static const char * k_pch_App_BindingLegacyAPISuffix_String = "_legacy"; | ||
| 363 | static const char * k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput"; | ||
| 364 | static const char * k_pch_App_BindingOpenXRAPISuffix_String = "_openxr"; | ||
| 365 | static const char * k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; | ||
| 366 | static const char * k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL"; | ||
| 367 | static const char * k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; | ||
| 368 | static const char * k_pch_App_DominantHand_Int32 = "DominantHand"; | ||
| 369 | static const char * k_pch_App_BlockOculusSDK_Bool = "blockOculusSDK"; | ||
| 370 | static const char * k_pch_Trackers_Section = "trackers"; | ||
| 371 | static const char * k_pch_DesktopUI_Section = "DesktopUI"; | ||
| 372 | static const char * k_pch_LastKnown_Section = "LastKnown"; | ||
| 373 | static const char * k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; | ||
| 374 | static const char * k_pch_LastKnown_HMDModel_String = "HMDModel"; | ||
| 375 | static const char * k_pch_DismissedWarnings_Section = "DismissedWarnings"; | ||
| 376 | static const char * k_pch_Input_Section = "input"; | ||
| 377 | static const char * k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; | ||
| 378 | static const char * k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; | ||
| 379 | static const char * k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; | ||
| 380 | static const char * k_pch_GpuSpeed_Section = "GpuSpeed"; | ||
| 381 | static const char * IVRScreenshots_Version = "IVRScreenshots_001"; | ||
| 382 | static const char * IVRResources_Version = "IVRResources_001"; | ||
| 383 | static const char * IVRDriverManager_Version = "IVRDriverManager_001"; | ||
| 384 | static const unsigned long k_unMaxActionNameLength = 64; | ||
| 385 | static const unsigned long k_unMaxActionSetNameLength = 64; | ||
| 386 | static const unsigned long k_unMaxActionOriginCount = 16; | ||
| 387 | static const unsigned long k_unMaxBoneNameLength = 32; | ||
| 388 | static const int k_nActionSetOverlayGlobalPriorityMin = 16777216; | ||
| 389 | static const int k_nActionSetOverlayGlobalPriorityMax = 33554431; | ||
| 390 | static const int k_nActionSetPriorityReservedMin = 33554432; | ||
| 391 | static const char * IVRInput_Version = "IVRInput_010"; | ||
| 392 | static const unsigned long long k_ulInvalidIOBufferHandle = 0; | ||
| 393 | static const char * IVRIOBuffer_Version = "IVRIOBuffer_002"; | ||
| 394 | static const unsigned long k_ulInvalidSpatialAnchorHandle = 0; | ||
| 395 | static const char * IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; | ||
| 396 | static const char * IVRDebug_Version = "IVRDebug_001"; | ||
| 397 | static const unsigned long long k_ulDisplayRedirectContainer = 25769803779; | ||
| 398 | static const char * IVRProperties_Version = "IVRProperties_001"; | ||
| 399 | static const char * k_pchPathUserHandRight = "/user/hand/right"; | ||
| 400 | static const char * k_pchPathUserHandLeft = "/user/hand/left"; | ||
| 401 | static const char * k_pchPathUserHandPrimary = "/user/hand/primary"; | ||
| 402 | static const char * k_pchPathUserHandSecondary = "/user/hand/secondary"; | ||
| 403 | static const char * k_pchPathUserHead = "/user/head"; | ||
| 404 | static const char * k_pchPathUserGamepad = "/user/gamepad"; | ||
| 405 | static const char * k_pchPathUserTreadmill = "/user/treadmill"; | ||
| 406 | static const char * k_pchPathUserStylus = "/user/stylus"; | ||
| 407 | static const char * k_pchPathDevices = "/devices"; | ||
| 408 | static const char * k_pchPathDevicePath = "/device_path"; | ||
| 409 | static const char * k_pchPathBestAliasPath = "/best_alias_path"; | ||
| 410 | static const char * k_pchPathBoundTrackerAliasPath = "/bound_tracker_path"; | ||
| 411 | static const char * k_pchPathBoundTrackerRole = "/bound_tracker_role"; | ||
| 412 | static const char * k_pchPathPoseRaw = "/pose/raw"; | ||
| 413 | static const char * k_pchPathPoseTip = "/pose/tip"; | ||
| 414 | static const char * k_pchPathPoseGrip = "/pose/grip"; | ||
| 415 | static const char * k_pchPathSystemButtonClick = "/input/system/click"; | ||
| 416 | static const char * k_pchPathProximity = "/proximity"; | ||
| 417 | static const char * k_pchPathControllerTypePrefix = "/controller_type/"; | ||
| 418 | static const char * k_pchPathInputProfileSuffix = "/input_profile"; | ||
| 419 | static const char * k_pchPathBindingNameSuffix = "/binding_name"; | ||
| 420 | static const char * k_pchPathBindingUrlSuffix = "/binding_url"; | ||
| 421 | static const char * k_pchPathBindingErrorSuffix = "/binding_error"; | ||
| 422 | static const char * k_pchPathActiveActionSets = "/active_action_sets"; | ||
| 423 | static const char * k_pchPathComponentUpdates = "/total_component_updates"; | ||
| 424 | static const char * k_pchPathUserFootLeft = "/user/foot/left"; | ||
| 425 | static const char * k_pchPathUserFootRight = "/user/foot/right"; | ||
| 426 | static const char * k_pchPathUserShoulderLeft = "/user/shoulder/left"; | ||
| 427 | static const char * k_pchPathUserShoulderRight = "/user/shoulder/right"; | ||
| 428 | static const char * k_pchPathUserElbowLeft = "/user/elbow/left"; | ||
| 429 | static const char * k_pchPathUserElbowRight = "/user/elbow/right"; | ||
| 430 | static const char * k_pchPathUserKneeLeft = "/user/knee/left"; | ||
| 431 | static const char * k_pchPathUserKneeRight = "/user/knee/right"; | ||
| 432 | static const char * k_pchPathUserWaist = "/user/waist"; | ||
| 433 | static const char * k_pchPathUserChest = "/user/chest"; | ||
| 434 | static const char * k_pchPathUserCamera = "/user/camera"; | ||
| 435 | static const char * k_pchPathUserKeyboard = "/user/keyboard"; | ||
| 436 | static const char * k_pchPathClientAppKey = "/client_info/app_key"; | ||
| 437 | static const unsigned long long k_ulInvalidPathHandle = 0; | ||
| 438 | static const char * IVRPaths_Version = "IVRPaths_001"; | ||
| 439 | static const char * IVRBlockQueue_Version = "IVRBlockQueue_005"; | ||
| 440 | |||
| 441 | // OpenVR Enums | ||
| 442 | |||
| 443 | typedef enum EVREye | ||
| 444 | { | ||
| 445 | EVREye_Eye_Left = 0, | ||
| 446 | EVREye_Eye_Right = 1, | ||
| 447 | } EVREye; | ||
| 448 | |||
| 449 | typedef enum ETextureType | ||
| 450 | { | ||
| 451 | ETextureType_TextureType_Invalid = -1, | ||
| 452 | ETextureType_TextureType_DirectX = 0, | ||
| 453 | ETextureType_TextureType_OpenGL = 1, | ||
| 454 | ETextureType_TextureType_Vulkan = 2, | ||
| 455 | ETextureType_TextureType_IOSurface = 3, | ||
| 456 | ETextureType_TextureType_DirectX12 = 4, | ||
| 457 | ETextureType_TextureType_DXGISharedHandle = 5, | ||
| 458 | ETextureType_TextureType_Metal = 6, | ||
| 459 | } ETextureType; | ||
| 460 | |||
| 461 | typedef enum EColorSpace | ||
| 462 | { | ||
| 463 | EColorSpace_ColorSpace_Auto = 0, | ||
| 464 | EColorSpace_ColorSpace_Gamma = 1, | ||
| 465 | EColorSpace_ColorSpace_Linear = 2, | ||
| 466 | } EColorSpace; | ||
| 467 | |||
| 468 | typedef enum ETrackingResult | ||
| 469 | { | ||
| 470 | ETrackingResult_TrackingResult_Uninitialized = 1, | ||
| 471 | ETrackingResult_TrackingResult_Calibrating_InProgress = 100, | ||
| 472 | ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101, | ||
| 473 | ETrackingResult_TrackingResult_Running_OK = 200, | ||
| 474 | ETrackingResult_TrackingResult_Running_OutOfRange = 201, | ||
| 475 | ETrackingResult_TrackingResult_Fallback_RotationOnly = 300, | ||
| 476 | } ETrackingResult; | ||
| 477 | |||
| 478 | typedef enum ETrackedDeviceClass | ||
| 479 | { | ||
| 480 | ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0, | ||
| 481 | ETrackedDeviceClass_TrackedDeviceClass_HMD = 1, | ||
| 482 | ETrackedDeviceClass_TrackedDeviceClass_Controller = 2, | ||
| 483 | ETrackedDeviceClass_TrackedDeviceClass_GenericTracker = 3, | ||
| 484 | ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4, | ||
| 485 | ETrackedDeviceClass_TrackedDeviceClass_DisplayRedirect = 5, | ||
| 486 | ETrackedDeviceClass_TrackedDeviceClass_Max = 6, | ||
| 487 | } ETrackedDeviceClass; | ||
| 488 | |||
| 489 | typedef enum ETrackedControllerRole | ||
| 490 | { | ||
| 491 | ETrackedControllerRole_TrackedControllerRole_Invalid = 0, | ||
| 492 | ETrackedControllerRole_TrackedControllerRole_LeftHand = 1, | ||
| 493 | ETrackedControllerRole_TrackedControllerRole_RightHand = 2, | ||
| 494 | ETrackedControllerRole_TrackedControllerRole_OptOut = 3, | ||
| 495 | ETrackedControllerRole_TrackedControllerRole_Treadmill = 4, | ||
| 496 | ETrackedControllerRole_TrackedControllerRole_Stylus = 5, | ||
| 497 | ETrackedControllerRole_TrackedControllerRole_Max = 5, | ||
| 498 | } ETrackedControllerRole; | ||
| 499 | |||
| 500 | typedef enum ETrackingUniverseOrigin | ||
| 501 | { | ||
| 502 | ETrackingUniverseOrigin_TrackingUniverseSeated = 0, | ||
| 503 | ETrackingUniverseOrigin_TrackingUniverseStanding = 1, | ||
| 504 | ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2, | ||
| 505 | } ETrackingUniverseOrigin; | ||
| 506 | |||
| 507 | typedef enum EAdditionalRadioFeatures | ||
| 508 | { | ||
| 509 | EAdditionalRadioFeatures_AdditionalRadioFeatures_None = 0, | ||
| 510 | EAdditionalRadioFeatures_AdditionalRadioFeatures_HTCLinkBox = 1, | ||
| 511 | EAdditionalRadioFeatures_AdditionalRadioFeatures_InternalDongle = 2, | ||
| 512 | EAdditionalRadioFeatures_AdditionalRadioFeatures_ExternalDongle = 4, | ||
| 513 | } EAdditionalRadioFeatures; | ||
| 514 | |||
| 515 | typedef enum ETrackedDeviceProperty | ||
| 516 | { | ||
| 517 | ETrackedDeviceProperty_Prop_Invalid = 0, | ||
| 518 | ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000, | ||
| 519 | ETrackedDeviceProperty_Prop_ModelNumber_String = 1001, | ||
| 520 | ETrackedDeviceProperty_Prop_SerialNumber_String = 1002, | ||
| 521 | ETrackedDeviceProperty_Prop_RenderModelName_String = 1003, | ||
| 522 | ETrackedDeviceProperty_Prop_WillDriftInYaw_Bool = 1004, | ||
| 523 | ETrackedDeviceProperty_Prop_ManufacturerName_String = 1005, | ||
| 524 | ETrackedDeviceProperty_Prop_TrackingFirmwareVersion_String = 1006, | ||
| 525 | ETrackedDeviceProperty_Prop_HardwareRevision_String = 1007, | ||
| 526 | ETrackedDeviceProperty_Prop_AllWirelessDongleDescriptions_String = 1008, | ||
| 527 | ETrackedDeviceProperty_Prop_ConnectedWirelessDongle_String = 1009, | ||
| 528 | ETrackedDeviceProperty_Prop_DeviceIsWireless_Bool = 1010, | ||
| 529 | ETrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011, | ||
| 530 | ETrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012, | ||
| 531 | ETrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013, | ||
| 532 | ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014, | ||
| 533 | ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015, | ||
| 534 | ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016, | ||
| 535 | ETrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017, | ||
| 536 | ETrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018, | ||
| 537 | ETrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019, | ||
| 538 | ETrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020, | ||
| 539 | ETrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021, | ||
| 540 | ETrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022, | ||
| 541 | ETrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023, | ||
| 542 | ETrackedDeviceProperty_Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, | ||
| 543 | ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025, | ||
| 544 | ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026, | ||
| 545 | ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027, | ||
| 546 | ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028, | ||
| 547 | ETrackedDeviceProperty_Prop_DeviceClass_Int32 = 1029, | ||
| 548 | ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030, | ||
| 549 | ETrackedDeviceProperty_Prop_DriverVersion_String = 1031, | ||
| 550 | ETrackedDeviceProperty_Prop_Firmware_ForceUpdateRequired_Bool = 1032, | ||
| 551 | ETrackedDeviceProperty_Prop_ViveSystemButtonFixRequired_Bool = 1033, | ||
| 552 | ETrackedDeviceProperty_Prop_ParentDriver_Uint64 = 1034, | ||
| 553 | ETrackedDeviceProperty_Prop_ResourceRoot_String = 1035, | ||
| 554 | ETrackedDeviceProperty_Prop_RegisteredDeviceType_String = 1036, | ||
| 555 | ETrackedDeviceProperty_Prop_InputProfilePath_String = 1037, | ||
| 556 | ETrackedDeviceProperty_Prop_NeverTracked_Bool = 1038, | ||
| 557 | ETrackedDeviceProperty_Prop_NumCameras_Int32 = 1039, | ||
| 558 | ETrackedDeviceProperty_Prop_CameraFrameLayout_Int32 = 1040, | ||
| 559 | ETrackedDeviceProperty_Prop_CameraStreamFormat_Int32 = 1041, | ||
| 560 | ETrackedDeviceProperty_Prop_AdditionalDeviceSettingsPath_String = 1042, | ||
| 561 | ETrackedDeviceProperty_Prop_Identifiable_Bool = 1043, | ||
| 562 | ETrackedDeviceProperty_Prop_BootloaderVersion_Uint64 = 1044, | ||
| 563 | ETrackedDeviceProperty_Prop_AdditionalSystemReportData_String = 1045, | ||
| 564 | ETrackedDeviceProperty_Prop_CompositeFirmwareVersion_String = 1046, | ||
| 565 | ETrackedDeviceProperty_Prop_Firmware_RemindUpdate_Bool = 1047, | ||
| 566 | ETrackedDeviceProperty_Prop_PeripheralApplicationVersion_Uint64 = 1048, | ||
| 567 | ETrackedDeviceProperty_Prop_ManufacturerSerialNumber_String = 1049, | ||
| 568 | ETrackedDeviceProperty_Prop_ComputedSerialNumber_String = 1050, | ||
| 569 | ETrackedDeviceProperty_Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, | ||
| 570 | ETrackedDeviceProperty_Prop_DevicePowerUsage_Float = 1052, | ||
| 571 | ETrackedDeviceProperty_Prop_IgnoreMotionForStandby_Bool = 1053, | ||
| 572 | ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000, | ||
| 573 | ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001, | ||
| 574 | ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002, | ||
| 575 | ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003, | ||
| 576 | ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004, | ||
| 577 | ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005, | ||
| 578 | ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006, | ||
| 579 | ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007, | ||
| 580 | ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008, | ||
| 581 | ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009, | ||
| 582 | ETrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010, | ||
| 583 | ETrackedDeviceProperty_Prop_EdidVendorID_Int32 = 2011, | ||
| 584 | ETrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012, | ||
| 585 | ETrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013, | ||
| 586 | ETrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014, | ||
| 587 | ETrackedDeviceProperty_Prop_EdidProductID_Int32 = 2015, | ||
| 588 | ETrackedDeviceProperty_Prop_CameraToHeadTransform_Matrix34 = 2016, | ||
| 589 | ETrackedDeviceProperty_Prop_DisplayGCType_Int32 = 2017, | ||
| 590 | ETrackedDeviceProperty_Prop_DisplayGCOffset_Float = 2018, | ||
| 591 | ETrackedDeviceProperty_Prop_DisplayGCScale_Float = 2019, | ||
| 592 | ETrackedDeviceProperty_Prop_DisplayGCPrescale_Float = 2020, | ||
| 593 | ETrackedDeviceProperty_Prop_DisplayGCImage_String = 2021, | ||
| 594 | ETrackedDeviceProperty_Prop_LensCenterLeftU_Float = 2022, | ||
| 595 | ETrackedDeviceProperty_Prop_LensCenterLeftV_Float = 2023, | ||
| 596 | ETrackedDeviceProperty_Prop_LensCenterRightU_Float = 2024, | ||
| 597 | ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025, | ||
| 598 | ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026, | ||
| 599 | ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027, | ||
| 600 | ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028, | ||
| 601 | ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029, | ||
| 602 | ETrackedDeviceProperty_Prop_DisplayBootloaderVersion_Uint64 = 2030, | ||
| 603 | ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031, | ||
| 604 | ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032, | ||
| 605 | ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033, | ||
| 606 | ETrackedDeviceProperty_Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, | ||
| 607 | ETrackedDeviceProperty_Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, | ||
| 608 | ETrackedDeviceProperty_Prop_DisplaySuppressed_Bool = 2036, | ||
| 609 | ETrackedDeviceProperty_Prop_DisplayAllowNightMode_Bool = 2037, | ||
| 610 | ETrackedDeviceProperty_Prop_DisplayMCImageWidth_Int32 = 2038, | ||
| 611 | ETrackedDeviceProperty_Prop_DisplayMCImageHeight_Int32 = 2039, | ||
| 612 | ETrackedDeviceProperty_Prop_DisplayMCImageNumChannels_Int32 = 2040, | ||
| 613 | ETrackedDeviceProperty_Prop_DisplayMCImageData_Binary = 2041, | ||
| 614 | ETrackedDeviceProperty_Prop_SecondsFromPhotonsToVblank_Float = 2042, | ||
| 615 | ETrackedDeviceProperty_Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043, | ||
| 616 | ETrackedDeviceProperty_Prop_DisplayDebugMode_Bool = 2044, | ||
| 617 | ETrackedDeviceProperty_Prop_GraphicsAdapterLuid_Uint64 = 2045, | ||
| 618 | ETrackedDeviceProperty_Prop_DriverProvidedChaperonePath_String = 2048, | ||
| 619 | ETrackedDeviceProperty_Prop_ExpectedTrackingReferenceCount_Int32 = 2049, | ||
| 620 | ETrackedDeviceProperty_Prop_ExpectedControllerCount_Int32 = 2050, | ||
| 621 | ETrackedDeviceProperty_Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, | ||
| 622 | ETrackedDeviceProperty_Prop_NamedIconPathControllerRightDeviceOff_String = 2052, | ||
| 623 | ETrackedDeviceProperty_Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, | ||
| 624 | ETrackedDeviceProperty_Prop_DoNotApplyPrediction_Bool = 2054, | ||
| 625 | ETrackedDeviceProperty_Prop_CameraToHeadTransforms_Matrix34_Array = 2055, | ||
| 626 | ETrackedDeviceProperty_Prop_DistortionMeshResolution_Int32 = 2056, | ||
| 627 | ETrackedDeviceProperty_Prop_DriverIsDrawingControllers_Bool = 2057, | ||
| 628 | ETrackedDeviceProperty_Prop_DriverRequestsApplicationPause_Bool = 2058, | ||
| 629 | ETrackedDeviceProperty_Prop_DriverRequestsReducedRendering_Bool = 2059, | ||
| 630 | ETrackedDeviceProperty_Prop_MinimumIpdStepMeters_Float = 2060, | ||
| 631 | ETrackedDeviceProperty_Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, | ||
| 632 | ETrackedDeviceProperty_Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, | ||
| 633 | ETrackedDeviceProperty_Prop_ImuToHeadTransform_Matrix34 = 2063, | ||
| 634 | ETrackedDeviceProperty_Prop_ImuFactoryGyroBias_Vector3 = 2064, | ||
| 635 | ETrackedDeviceProperty_Prop_ImuFactoryGyroScale_Vector3 = 2065, | ||
| 636 | ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, | ||
| 637 | ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, | ||
| 638 | ETrackedDeviceProperty_Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, | ||
| 639 | ETrackedDeviceProperty_Prop_AdditionalRadioFeatures_Uint64 = 2070, | ||
| 640 | ETrackedDeviceProperty_Prop_CameraWhiteBalance_Vector4_Array = 2071, | ||
| 641 | ETrackedDeviceProperty_Prop_CameraDistortionFunction_Int32_Array = 2072, | ||
| 642 | ETrackedDeviceProperty_Prop_CameraDistortionCoefficients_Float_Array = 2073, | ||
| 643 | ETrackedDeviceProperty_Prop_ExpectedControllerType_String = 2074, | ||
| 644 | ETrackedDeviceProperty_Prop_HmdTrackingStyle_Int32 = 2075, | ||
| 645 | ETrackedDeviceProperty_Prop_DriverProvidedChaperoneVisibility_Bool = 2076, | ||
| 646 | ETrackedDeviceProperty_Prop_HmdColumnCorrectionSettingPrefix_String = 2077, | ||
| 647 | ETrackedDeviceProperty_Prop_CameraSupportsCompatibilityModes_Bool = 2078, | ||
| 648 | ETrackedDeviceProperty_Prop_SupportsRoomViewDepthProjection_Bool = 2079, | ||
| 649 | ETrackedDeviceProperty_Prop_DisplayAvailableFrameRates_Float_Array = 2080, | ||
| 650 | ETrackedDeviceProperty_Prop_DisplaySupportsMultipleFramerates_Bool = 2081, | ||
| 651 | ETrackedDeviceProperty_Prop_DisplayColorMultLeft_Vector3 = 2082, | ||
| 652 | ETrackedDeviceProperty_Prop_DisplayColorMultRight_Vector3 = 2083, | ||
| 653 | ETrackedDeviceProperty_Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084, | ||
| 654 | ETrackedDeviceProperty_Prop_DisplaySupportsAnalogGain_Bool = 2085, | ||
| 655 | ETrackedDeviceProperty_Prop_DisplayMinAnalogGain_Float = 2086, | ||
| 656 | ETrackedDeviceProperty_Prop_DisplayMaxAnalogGain_Float = 2087, | ||
| 657 | ETrackedDeviceProperty_Prop_CameraExposureTime_Float = 2088, | ||
| 658 | ETrackedDeviceProperty_Prop_CameraGlobalGain_Float = 2089, | ||
| 659 | ETrackedDeviceProperty_Prop_DashboardScale_Float = 2091, | ||
| 660 | ETrackedDeviceProperty_Prop_PeerButtonInfo_String = 2092, | ||
| 661 | ETrackedDeviceProperty_Prop_Hmd_SupportsHDR10_Bool = 2093, | ||
| 662 | ETrackedDeviceProperty_Prop_IpdUIRangeMinMeters_Float = 2100, | ||
| 663 | ETrackedDeviceProperty_Prop_IpdUIRangeMaxMeters_Float = 2101, | ||
| 664 | ETrackedDeviceProperty_Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102, | ||
| 665 | ETrackedDeviceProperty_Prop_Hmd_SupportsMicMonitoring_Bool = 2103, | ||
| 666 | ETrackedDeviceProperty_Prop_Hmd_SupportsDisplayPortTrainingMode_Bool = 2104, | ||
| 667 | ETrackedDeviceProperty_Prop_SupportsRoomViewDirect_Bool = 2105, | ||
| 668 | ETrackedDeviceProperty_Prop_SupportsAppThrottling_Bool = 2106, | ||
| 669 | ETrackedDeviceProperty_Prop_DSCVersion_Int32 = 2110, | ||
| 670 | ETrackedDeviceProperty_Prop_DSCSliceCount_Int32 = 2111, | ||
| 671 | ETrackedDeviceProperty_Prop_DSCBPPx16_Int32 = 2112, | ||
| 672 | ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, | ||
| 673 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, | ||
| 674 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, | ||
| 675 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, | ||
| 676 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, | ||
| 677 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, | ||
| 678 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, | ||
| 679 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, | ||
| 680 | ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, | ||
| 681 | ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceId_String = 2300, | ||
| 682 | ETrackedDeviceProperty_Prop_Audio_DefaultRecordingDeviceId_String = 2301, | ||
| 683 | ETrackedDeviceProperty_Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, | ||
| 684 | ETrackedDeviceProperty_Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303, | ||
| 685 | ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000, | ||
| 686 | ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001, | ||
| 687 | ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002, | ||
| 688 | ETrackedDeviceProperty_Prop_Axis1Type_Int32 = 3003, | ||
| 689 | ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004, | ||
| 690 | ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005, | ||
| 691 | ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006, | ||
| 692 | ETrackedDeviceProperty_Prop_ControllerRoleHint_Int32 = 3007, | ||
| 693 | ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000, | ||
| 694 | ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001, | ||
| 695 | ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002, | ||
| 696 | ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003, | ||
| 697 | ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004, | ||
| 698 | ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005, | ||
| 699 | ETrackedDeviceProperty_Prop_ModeLabel_String = 4006, | ||
| 700 | ETrackedDeviceProperty_Prop_CanWirelessIdentify_Bool = 4007, | ||
| 701 | ETrackedDeviceProperty_Prop_Nonce_Int32 = 4008, | ||
| 702 | ETrackedDeviceProperty_Prop_IconPathName_String = 5000, | ||
| 703 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceOff_String = 5001, | ||
| 704 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearching_String = 5002, | ||
| 705 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearchingAlert_String = 5003, | ||
| 706 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceReady_String = 5004, | ||
| 707 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceReadyAlert_String = 5005, | ||
| 708 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceNotReady_String = 5006, | ||
| 709 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandby_String = 5007, | ||
| 710 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceAlertLow_String = 5008, | ||
| 711 | ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandbyAlert_String = 5009, | ||
| 712 | ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_Start = 5100, | ||
| 713 | ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_End = 5150, | ||
| 714 | ETrackedDeviceProperty_Prop_ParentContainer = 5151, | ||
| 715 | ETrackedDeviceProperty_Prop_OverrideContainer_Uint64 = 5152, | ||
| 716 | ETrackedDeviceProperty_Prop_UserConfigPath_String = 6000, | ||
| 717 | ETrackedDeviceProperty_Prop_InstallPath_String = 6001, | ||
| 718 | ETrackedDeviceProperty_Prop_HasDisplayComponent_Bool = 6002, | ||
| 719 | ETrackedDeviceProperty_Prop_HasControllerComponent_Bool = 6003, | ||
| 720 | ETrackedDeviceProperty_Prop_HasCameraComponent_Bool = 6004, | ||
| 721 | ETrackedDeviceProperty_Prop_HasDriverDirectModeComponent_Bool = 6005, | ||
| 722 | ETrackedDeviceProperty_Prop_HasVirtualDisplayComponent_Bool = 6006, | ||
| 723 | ETrackedDeviceProperty_Prop_HasSpatialAnchorsSupport_Bool = 6007, | ||
| 724 | ETrackedDeviceProperty_Prop_ControllerType_String = 7000, | ||
| 725 | ETrackedDeviceProperty_Prop_ControllerHandSelectionPriority_Int32 = 7002, | ||
| 726 | ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000, | ||
| 727 | ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999, | ||
| 728 | ETrackedDeviceProperty_Prop_TrackedDeviceProperty_Max = 1000000, | ||
| 729 | } ETrackedDeviceProperty; | ||
| 730 | |||
| 731 | typedef enum ETrackedPropertyError | ||
| 732 | { | ||
| 733 | ETrackedPropertyError_TrackedProp_Success = 0, | ||
| 734 | ETrackedPropertyError_TrackedProp_WrongDataType = 1, | ||
| 735 | ETrackedPropertyError_TrackedProp_WrongDeviceClass = 2, | ||
| 736 | ETrackedPropertyError_TrackedProp_BufferTooSmall = 3, | ||
| 737 | ETrackedPropertyError_TrackedProp_UnknownProperty = 4, | ||
| 738 | ETrackedPropertyError_TrackedProp_InvalidDevice = 5, | ||
| 739 | ETrackedPropertyError_TrackedProp_CouldNotContactServer = 6, | ||
| 740 | ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7, | ||
| 741 | ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8, | ||
| 742 | ETrackedPropertyError_TrackedProp_NotYetAvailable = 9, | ||
| 743 | ETrackedPropertyError_TrackedProp_PermissionDenied = 10, | ||
| 744 | ETrackedPropertyError_TrackedProp_InvalidOperation = 11, | ||
| 745 | ETrackedPropertyError_TrackedProp_CannotWriteToWildcards = 12, | ||
| 746 | ETrackedPropertyError_TrackedProp_IPCReadFailure = 13, | ||
| 747 | ETrackedPropertyError_TrackedProp_OutOfMemory = 14, | ||
| 748 | ETrackedPropertyError_TrackedProp_InvalidContainer = 15, | ||
| 749 | } ETrackedPropertyError; | ||
| 750 | |||
| 751 | typedef enum EHmdTrackingStyle | ||
| 752 | { | ||
| 753 | EHmdTrackingStyle_HmdTrackingStyle_Unknown = 0, | ||
| 754 | EHmdTrackingStyle_HmdTrackingStyle_Lighthouse = 1, | ||
| 755 | EHmdTrackingStyle_HmdTrackingStyle_OutsideInCameras = 2, | ||
| 756 | EHmdTrackingStyle_HmdTrackingStyle_InsideOutCameras = 3, | ||
| 757 | } EHmdTrackingStyle; | ||
| 758 | |||
| 759 | typedef enum EVRSubmitFlags | ||
| 760 | { | ||
| 761 | EVRSubmitFlags_Submit_Default = 0, | ||
| 762 | EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1, | ||
| 763 | EVRSubmitFlags_Submit_GlRenderBuffer = 2, | ||
| 764 | EVRSubmitFlags_Submit_Reserved = 4, | ||
| 765 | EVRSubmitFlags_Submit_TextureWithPose = 8, | ||
| 766 | EVRSubmitFlags_Submit_TextureWithDepth = 16, | ||
| 767 | EVRSubmitFlags_Submit_FrameDiscontinuty = 32, | ||
| 768 | EVRSubmitFlags_Submit_VulkanTextureWithArrayData = 64, | ||
| 769 | EVRSubmitFlags_Submit_GlArrayTexture = 128, | ||
| 770 | EVRSubmitFlags_Submit_Reserved2 = 32768, | ||
| 771 | EVRSubmitFlags_Submit_Reserved3 = 65536, | ||
| 772 | } EVRSubmitFlags; | ||
| 773 | |||
| 774 | typedef enum EVRState | ||
| 775 | { | ||
| 776 | EVRState_VRState_Undefined = -1, | ||
| 777 | EVRState_VRState_Off = 0, | ||
| 778 | EVRState_VRState_Searching = 1, | ||
| 779 | EVRState_VRState_Searching_Alert = 2, | ||
| 780 | EVRState_VRState_Ready = 3, | ||
| 781 | EVRState_VRState_Ready_Alert = 4, | ||
| 782 | EVRState_VRState_NotReady = 5, | ||
| 783 | EVRState_VRState_Standby = 6, | ||
| 784 | EVRState_VRState_Ready_Alert_Low = 7, | ||
| 785 | } EVRState; | ||
| 786 | |||
| 787 | typedef enum EVREventType | ||
| 788 | { | ||
| 789 | EVREventType_VREvent_None = 0, | ||
| 790 | EVREventType_VREvent_TrackedDeviceActivated = 100, | ||
| 791 | EVREventType_VREvent_TrackedDeviceDeactivated = 101, | ||
| 792 | EVREventType_VREvent_TrackedDeviceUpdated = 102, | ||
| 793 | EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103, | ||
| 794 | EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104, | ||
| 795 | EVREventType_VREvent_IpdChanged = 105, | ||
| 796 | EVREventType_VREvent_EnterStandbyMode = 106, | ||
| 797 | EVREventType_VREvent_LeaveStandbyMode = 107, | ||
| 798 | EVREventType_VREvent_TrackedDeviceRoleChanged = 108, | ||
| 799 | EVREventType_VREvent_WatchdogWakeUpRequested = 109, | ||
| 800 | EVREventType_VREvent_LensDistortionChanged = 110, | ||
| 801 | EVREventType_VREvent_PropertyChanged = 111, | ||
| 802 | EVREventType_VREvent_WirelessDisconnect = 112, | ||
| 803 | EVREventType_VREvent_WirelessReconnect = 113, | ||
| 804 | EVREventType_VREvent_ButtonPress = 200, | ||
| 805 | EVREventType_VREvent_ButtonUnpress = 201, | ||
| 806 | EVREventType_VREvent_ButtonTouch = 202, | ||
| 807 | EVREventType_VREvent_ButtonUntouch = 203, | ||
| 808 | EVREventType_VREvent_Modal_Cancel = 257, | ||
| 809 | EVREventType_VREvent_MouseMove = 300, | ||
| 810 | EVREventType_VREvent_MouseButtonDown = 301, | ||
| 811 | EVREventType_VREvent_MouseButtonUp = 302, | ||
| 812 | EVREventType_VREvent_FocusEnter = 303, | ||
| 813 | EVREventType_VREvent_FocusLeave = 304, | ||
| 814 | EVREventType_VREvent_ScrollDiscrete = 305, | ||
| 815 | EVREventType_VREvent_TouchPadMove = 306, | ||
| 816 | EVREventType_VREvent_OverlayFocusChanged = 307, | ||
| 817 | EVREventType_VREvent_ReloadOverlays = 308, | ||
| 818 | EVREventType_VREvent_ScrollSmooth = 309, | ||
| 819 | EVREventType_VREvent_LockMousePosition = 310, | ||
| 820 | EVREventType_VREvent_UnlockMousePosition = 311, | ||
| 821 | EVREventType_VREvent_InputFocusCaptured = 400, | ||
| 822 | EVREventType_VREvent_InputFocusReleased = 401, | ||
| 823 | EVREventType_VREvent_SceneApplicationChanged = 404, | ||
| 824 | EVREventType_VREvent_InputFocusChanged = 406, | ||
| 825 | EVREventType_VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, | ||
| 826 | EVREventType_VREvent_ActionBindingReloaded = 409, | ||
| 827 | EVREventType_VREvent_HideRenderModels = 410, | ||
| 828 | EVREventType_VREvent_ShowRenderModels = 411, | ||
| 829 | EVREventType_VREvent_SceneApplicationStateChanged = 412, | ||
| 830 | EVREventType_VREvent_SceneAppPipeDisconnected = 413, | ||
| 831 | EVREventType_VREvent_ConsoleOpened = 420, | ||
| 832 | EVREventType_VREvent_ConsoleClosed = 421, | ||
| 833 | EVREventType_VREvent_OverlayShown = 500, | ||
| 834 | EVREventType_VREvent_OverlayHidden = 501, | ||
| 835 | EVREventType_VREvent_DashboardActivated = 502, | ||
| 836 | EVREventType_VREvent_DashboardDeactivated = 503, | ||
| 837 | EVREventType_VREvent_DashboardRequested = 505, | ||
| 838 | EVREventType_VREvent_ResetDashboard = 506, | ||
| 839 | EVREventType_VREvent_ImageLoaded = 508, | ||
| 840 | EVREventType_VREvent_ShowKeyboard = 509, | ||
| 841 | EVREventType_VREvent_HideKeyboard = 510, | ||
| 842 | EVREventType_VREvent_OverlayGamepadFocusGained = 511, | ||
| 843 | EVREventType_VREvent_OverlayGamepadFocusLost = 512, | ||
| 844 | EVREventType_VREvent_OverlaySharedTextureChanged = 513, | ||
| 845 | EVREventType_VREvent_ScreenshotTriggered = 516, | ||
| 846 | EVREventType_VREvent_ImageFailed = 517, | ||
| 847 | EVREventType_VREvent_DashboardOverlayCreated = 518, | ||
| 848 | EVREventType_VREvent_SwitchGamepadFocus = 519, | ||
| 849 | EVREventType_VREvent_RequestScreenshot = 520, | ||
| 850 | EVREventType_VREvent_ScreenshotTaken = 521, | ||
| 851 | EVREventType_VREvent_ScreenshotFailed = 522, | ||
| 852 | EVREventType_VREvent_SubmitScreenshotToDashboard = 523, | ||
| 853 | EVREventType_VREvent_ScreenshotProgressToDashboard = 524, | ||
| 854 | EVREventType_VREvent_PrimaryDashboardDeviceChanged = 525, | ||
| 855 | EVREventType_VREvent_RoomViewShown = 526, | ||
| 856 | EVREventType_VREvent_RoomViewHidden = 527, | ||
| 857 | EVREventType_VREvent_ShowUI = 528, | ||
| 858 | EVREventType_VREvent_ShowDevTools = 529, | ||
| 859 | EVREventType_VREvent_DesktopViewUpdating = 530, | ||
| 860 | EVREventType_VREvent_DesktopViewReady = 531, | ||
| 861 | EVREventType_VREvent_StartDashboard = 532, | ||
| 862 | EVREventType_VREvent_ElevatePrism = 533, | ||
| 863 | EVREventType_VREvent_OverlayClosed = 534, | ||
| 864 | EVREventType_VREvent_Notification_Shown = 600, | ||
| 865 | EVREventType_VREvent_Notification_Hidden = 601, | ||
| 866 | EVREventType_VREvent_Notification_BeginInteraction = 602, | ||
| 867 | EVREventType_VREvent_Notification_Destroyed = 603, | ||
| 868 | EVREventType_VREvent_Quit = 700, | ||
| 869 | EVREventType_VREvent_ProcessQuit = 701, | ||
| 870 | EVREventType_VREvent_QuitAcknowledged = 703, | ||
| 871 | EVREventType_VREvent_DriverRequestedQuit = 704, | ||
| 872 | EVREventType_VREvent_RestartRequested = 705, | ||
| 873 | EVREventType_VREvent_InvalidateSwapTextureSets = 706, | ||
| 874 | EVREventType_VREvent_ChaperoneDataHasChanged = 800, | ||
| 875 | EVREventType_VREvent_ChaperoneUniverseHasChanged = 801, | ||
| 876 | EVREventType_VREvent_ChaperoneTempDataHasChanged = 802, | ||
| 877 | EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803, | ||
| 878 | EVREventType_VREvent_SeatedZeroPoseReset = 804, | ||
| 879 | EVREventType_VREvent_ChaperoneFlushCache = 805, | ||
| 880 | EVREventType_VREvent_ChaperoneRoomSetupStarting = 806, | ||
| 881 | EVREventType_VREvent_ChaperoneRoomSetupFinished = 807, | ||
| 882 | EVREventType_VREvent_StandingZeroPoseReset = 808, | ||
| 883 | EVREventType_VREvent_AudioSettingsHaveChanged = 820, | ||
| 884 | EVREventType_VREvent_BackgroundSettingHasChanged = 850, | ||
| 885 | EVREventType_VREvent_CameraSettingsHaveChanged = 851, | ||
| 886 | EVREventType_VREvent_ReprojectionSettingHasChanged = 852, | ||
| 887 | EVREventType_VREvent_ModelSkinSettingsHaveChanged = 853, | ||
| 888 | EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854, | ||
| 889 | EVREventType_VREvent_PowerSettingsHaveChanged = 855, | ||
| 890 | EVREventType_VREvent_EnableHomeAppSettingsHaveChanged = 856, | ||
| 891 | EVREventType_VREvent_SteamVRSectionSettingChanged = 857, | ||
| 892 | EVREventType_VREvent_LighthouseSectionSettingChanged = 858, | ||
| 893 | EVREventType_VREvent_NullSectionSettingChanged = 859, | ||
| 894 | EVREventType_VREvent_UserInterfaceSectionSettingChanged = 860, | ||
| 895 | EVREventType_VREvent_NotificationsSectionSettingChanged = 861, | ||
| 896 | EVREventType_VREvent_KeyboardSectionSettingChanged = 862, | ||
| 897 | EVREventType_VREvent_PerfSectionSettingChanged = 863, | ||
| 898 | EVREventType_VREvent_DashboardSectionSettingChanged = 864, | ||
| 899 | EVREventType_VREvent_WebInterfaceSectionSettingChanged = 865, | ||
| 900 | EVREventType_VREvent_TrackersSectionSettingChanged = 866, | ||
| 901 | EVREventType_VREvent_LastKnownSectionSettingChanged = 867, | ||
| 902 | EVREventType_VREvent_DismissedWarningsSectionSettingChanged = 868, | ||
| 903 | EVREventType_VREvent_GpuSpeedSectionSettingChanged = 869, | ||
| 904 | EVREventType_VREvent_WindowsMRSectionSettingChanged = 870, | ||
| 905 | EVREventType_VREvent_OtherSectionSettingChanged = 871, | ||
| 906 | EVREventType_VREvent_StatusUpdate = 900, | ||
| 907 | EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950, | ||
| 908 | EVREventType_VREvent_MCImageUpdated = 1000, | ||
| 909 | EVREventType_VREvent_FirmwareUpdateStarted = 1100, | ||
| 910 | EVREventType_VREvent_FirmwareUpdateFinished = 1101, | ||
| 911 | EVREventType_VREvent_KeyboardClosed = 1200, | ||
| 912 | EVREventType_VREvent_KeyboardCharInput = 1201, | ||
| 913 | EVREventType_VREvent_KeyboardDone = 1202, | ||
| 914 | EVREventType_VREvent_ApplicationListUpdated = 1303, | ||
| 915 | EVREventType_VREvent_ApplicationMimeTypeLoad = 1304, | ||
| 916 | EVREventType_VREvent_ProcessConnected = 1306, | ||
| 917 | EVREventType_VREvent_ProcessDisconnected = 1307, | ||
| 918 | EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410, | ||
| 919 | EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411, | ||
| 920 | EVREventType_VREvent_Compositor_DisplayDisconnected = 1412, | ||
| 921 | EVREventType_VREvent_Compositor_DisplayReconnected = 1413, | ||
| 922 | EVREventType_VREvent_Compositor_HDCPError = 1414, | ||
| 923 | EVREventType_VREvent_Compositor_ApplicationNotResponding = 1415, | ||
| 924 | EVREventType_VREvent_Compositor_ApplicationResumed = 1416, | ||
| 925 | EVREventType_VREvent_Compositor_OutOfVideoMemory = 1417, | ||
| 926 | EVREventType_VREvent_Compositor_DisplayModeNotSupported = 1418, | ||
| 927 | EVREventType_VREvent_Compositor_StageOverrideReady = 1419, | ||
| 928 | EVREventType_VREvent_Compositor_RequestDisconnectReconnect = 1420, | ||
| 929 | EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500, | ||
| 930 | EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501, | ||
| 931 | EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502, | ||
| 932 | EVREventType_VREvent_TrackedCamera_ResumeVideoStream = 1503, | ||
| 933 | EVREventType_VREvent_TrackedCamera_EditingSurface = 1550, | ||
| 934 | EVREventType_VREvent_PerformanceTest_EnableCapture = 1600, | ||
| 935 | EVREventType_VREvent_PerformanceTest_DisableCapture = 1601, | ||
| 936 | EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602, | ||
| 937 | EVREventType_VREvent_MessageOverlay_Closed = 1650, | ||
| 938 | EVREventType_VREvent_MessageOverlayCloseRequested = 1651, | ||
| 939 | EVREventType_VREvent_Input_HapticVibration = 1700, | ||
| 940 | EVREventType_VREvent_Input_BindingLoadFailed = 1701, | ||
| 941 | EVREventType_VREvent_Input_BindingLoadSuccessful = 1702, | ||
| 942 | EVREventType_VREvent_Input_ActionManifestReloaded = 1703, | ||
| 943 | EVREventType_VREvent_Input_ActionManifestLoadFailed = 1704, | ||
| 944 | EVREventType_VREvent_Input_ProgressUpdate = 1705, | ||
| 945 | EVREventType_VREvent_Input_TrackerActivated = 1706, | ||
| 946 | EVREventType_VREvent_Input_BindingsUpdated = 1707, | ||
| 947 | EVREventType_VREvent_Input_BindingSubscriptionChanged = 1708, | ||
| 948 | EVREventType_VREvent_SpatialAnchors_PoseUpdated = 1800, | ||
| 949 | EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801, | ||
| 950 | EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802, | ||
| 951 | EVREventType_VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, | ||
| 952 | EVREventType_VREvent_SystemReport_Started = 1900, | ||
| 953 | EVREventType_VREvent_Monitor_ShowHeadsetView = 2000, | ||
| 954 | EVREventType_VREvent_Monitor_HideHeadsetView = 2001, | ||
| 955 | EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000, | ||
| 956 | EVREventType_VREvent_VendorSpecific_Reserved_End = 19999, | ||
| 957 | } EVREventType; | ||
| 958 | |||
| 959 | typedef enum EDeviceActivityLevel | ||
| 960 | { | ||
| 961 | EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1, | ||
| 962 | EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0, | ||
| 963 | EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1, | ||
| 964 | EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2, | ||
| 965 | EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3, | ||
| 966 | EDeviceActivityLevel_k_EDeviceActivityLevel_Idle_Timeout = 4, | ||
| 967 | } EDeviceActivityLevel; | ||
| 968 | |||
| 969 | typedef enum EVRButtonId | ||
| 970 | { | ||
| 971 | EVRButtonId_k_EButton_System = 0, | ||
| 972 | EVRButtonId_k_EButton_ApplicationMenu = 1, | ||
| 973 | EVRButtonId_k_EButton_Grip = 2, | ||
| 974 | EVRButtonId_k_EButton_DPad_Left = 3, | ||
| 975 | EVRButtonId_k_EButton_DPad_Up = 4, | ||
| 976 | EVRButtonId_k_EButton_DPad_Right = 5, | ||
| 977 | EVRButtonId_k_EButton_DPad_Down = 6, | ||
| 978 | EVRButtonId_k_EButton_A = 7, | ||
| 979 | EVRButtonId_k_EButton_ProximitySensor = 31, | ||
| 980 | EVRButtonId_k_EButton_Axis0 = 32, | ||
| 981 | EVRButtonId_k_EButton_Axis1 = 33, | ||
| 982 | EVRButtonId_k_EButton_Axis2 = 34, | ||
| 983 | EVRButtonId_k_EButton_Axis3 = 35, | ||
| 984 | EVRButtonId_k_EButton_Axis4 = 36, | ||
| 985 | EVRButtonId_k_EButton_SteamVR_Touchpad = 32, | ||
| 986 | EVRButtonId_k_EButton_SteamVR_Trigger = 33, | ||
| 987 | EVRButtonId_k_EButton_Dashboard_Back = 2, | ||
| 988 | EVRButtonId_k_EButton_IndexController_A = 2, | ||
| 989 | EVRButtonId_k_EButton_IndexController_B = 1, | ||
| 990 | EVRButtonId_k_EButton_IndexController_JoyStick = 35, | ||
| 991 | EVRButtonId_k_EButton_Max = 64, | ||
| 992 | } EVRButtonId; | ||
| 993 | |||
| 994 | typedef enum EVRMouseButton | ||
| 995 | { | ||
| 996 | EVRMouseButton_VRMouseButton_Left = 1, | ||
| 997 | EVRMouseButton_VRMouseButton_Right = 2, | ||
| 998 | EVRMouseButton_VRMouseButton_Middle = 4, | ||
| 999 | } EVRMouseButton; | ||
| 1000 | |||
| 1001 | typedef enum EShowUIType | ||
| 1002 | { | ||
| 1003 | EShowUIType_ShowUI_ControllerBinding = 0, | ||
| 1004 | EShowUIType_ShowUI_ManageTrackers = 1, | ||
| 1005 | EShowUIType_ShowUI_Pairing = 3, | ||
| 1006 | EShowUIType_ShowUI_Settings = 4, | ||
| 1007 | EShowUIType_ShowUI_DebugCommands = 5, | ||
| 1008 | EShowUIType_ShowUI_FullControllerBinding = 6, | ||
| 1009 | EShowUIType_ShowUI_ManageDrivers = 7, | ||
| 1010 | } EShowUIType; | ||
| 1011 | |||
| 1012 | typedef enum EHDCPError | ||
| 1013 | { | ||
| 1014 | EHDCPError_HDCPError_None = 0, | ||
| 1015 | EHDCPError_HDCPError_LinkLost = 1, | ||
| 1016 | EHDCPError_HDCPError_Tampered = 2, | ||
| 1017 | EHDCPError_HDCPError_DeviceRevoked = 3, | ||
| 1018 | EHDCPError_HDCPError_Unknown = 4, | ||
| 1019 | } EHDCPError; | ||
| 1020 | |||
| 1021 | typedef enum EVRComponentProperty | ||
| 1022 | { | ||
| 1023 | EVRComponentProperty_VRComponentProperty_IsStatic = 1, | ||
| 1024 | EVRComponentProperty_VRComponentProperty_IsVisible = 2, | ||
| 1025 | EVRComponentProperty_VRComponentProperty_IsTouched = 4, | ||
| 1026 | EVRComponentProperty_VRComponentProperty_IsPressed = 8, | ||
| 1027 | EVRComponentProperty_VRComponentProperty_IsScrolled = 16, | ||
| 1028 | EVRComponentProperty_VRComponentProperty_IsHighlighted = 32, | ||
| 1029 | } EVRComponentProperty; | ||
| 1030 | |||
| 1031 | typedef enum EVRInputError | ||
| 1032 | { | ||
| 1033 | EVRInputError_VRInputError_None = 0, | ||
| 1034 | EVRInputError_VRInputError_NameNotFound = 1, | ||
| 1035 | EVRInputError_VRInputError_WrongType = 2, | ||
| 1036 | EVRInputError_VRInputError_InvalidHandle = 3, | ||
| 1037 | EVRInputError_VRInputError_InvalidParam = 4, | ||
| 1038 | EVRInputError_VRInputError_NoSteam = 5, | ||
| 1039 | EVRInputError_VRInputError_MaxCapacityReached = 6, | ||
| 1040 | EVRInputError_VRInputError_IPCError = 7, | ||
| 1041 | EVRInputError_VRInputError_NoActiveActionSet = 8, | ||
| 1042 | EVRInputError_VRInputError_InvalidDevice = 9, | ||
| 1043 | EVRInputError_VRInputError_InvalidSkeleton = 10, | ||
| 1044 | EVRInputError_VRInputError_InvalidBoneCount = 11, | ||
| 1045 | EVRInputError_VRInputError_InvalidCompressedData = 12, | ||
| 1046 | EVRInputError_VRInputError_NoData = 13, | ||
| 1047 | EVRInputError_VRInputError_BufferTooSmall = 14, | ||
| 1048 | EVRInputError_VRInputError_MismatchedActionManifest = 15, | ||
| 1049 | EVRInputError_VRInputError_MissingSkeletonData = 16, | ||
| 1050 | EVRInputError_VRInputError_InvalidBoneIndex = 17, | ||
| 1051 | EVRInputError_VRInputError_InvalidPriority = 18, | ||
| 1052 | EVRInputError_VRInputError_PermissionDenied = 19, | ||
| 1053 | EVRInputError_VRInputError_InvalidRenderModel = 20, | ||
| 1054 | } EVRInputError; | ||
| 1055 | |||
| 1056 | typedef enum EVRSpatialAnchorError | ||
| 1057 | { | ||
| 1058 | EVRSpatialAnchorError_VRSpatialAnchorError_Success = 0, | ||
| 1059 | EVRSpatialAnchorError_VRSpatialAnchorError_Internal = 1, | ||
| 1060 | EVRSpatialAnchorError_VRSpatialAnchorError_UnknownHandle = 2, | ||
| 1061 | EVRSpatialAnchorError_VRSpatialAnchorError_ArrayTooSmall = 3, | ||
| 1062 | EVRSpatialAnchorError_VRSpatialAnchorError_InvalidDescriptorChar = 4, | ||
| 1063 | EVRSpatialAnchorError_VRSpatialAnchorError_NotYetAvailable = 5, | ||
| 1064 | EVRSpatialAnchorError_VRSpatialAnchorError_NotAvailableInThisUniverse = 6, | ||
| 1065 | EVRSpatialAnchorError_VRSpatialAnchorError_PermanentlyUnavailable = 7, | ||
| 1066 | EVRSpatialAnchorError_VRSpatialAnchorError_WrongDriver = 8, | ||
| 1067 | EVRSpatialAnchorError_VRSpatialAnchorError_DescriptorTooLong = 9, | ||
| 1068 | EVRSpatialAnchorError_VRSpatialAnchorError_Unknown = 10, | ||
| 1069 | EVRSpatialAnchorError_VRSpatialAnchorError_NoRoomCalibration = 11, | ||
| 1070 | EVRSpatialAnchorError_VRSpatialAnchorError_InvalidArgument = 12, | ||
| 1071 | EVRSpatialAnchorError_VRSpatialAnchorError_UnknownDriver = 13, | ||
| 1072 | } EVRSpatialAnchorError; | ||
| 1073 | |||
| 1074 | typedef enum EHiddenAreaMeshType | ||
| 1075 | { | ||
| 1076 | EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0, | ||
| 1077 | EHiddenAreaMeshType_k_eHiddenAreaMesh_Inverse = 1, | ||
| 1078 | EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoop = 2, | ||
| 1079 | EHiddenAreaMeshType_k_eHiddenAreaMesh_Max = 3, | ||
| 1080 | } EHiddenAreaMeshType; | ||
| 1081 | |||
| 1082 | typedef enum EVRControllerAxisType | ||
| 1083 | { | ||
| 1084 | EVRControllerAxisType_k_eControllerAxis_None = 0, | ||
| 1085 | EVRControllerAxisType_k_eControllerAxis_TrackPad = 1, | ||
| 1086 | EVRControllerAxisType_k_eControllerAxis_Joystick = 2, | ||
| 1087 | EVRControllerAxisType_k_eControllerAxis_Trigger = 3, | ||
| 1088 | } EVRControllerAxisType; | ||
| 1089 | |||
| 1090 | typedef enum EVRControllerEventOutputType | ||
| 1091 | { | ||
| 1092 | EVRControllerEventOutputType_ControllerEventOutput_OSEvents = 0, | ||
| 1093 | EVRControllerEventOutputType_ControllerEventOutput_VREvents = 1, | ||
| 1094 | } EVRControllerEventOutputType; | ||
| 1095 | |||
| 1096 | typedef enum ECollisionBoundsStyle | ||
| 1097 | { | ||
| 1098 | ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_BEGINNER = 0, | ||
| 1099 | ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1, | ||
| 1100 | ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_SQUARES = 2, | ||
| 1101 | ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_ADVANCED = 3, | ||
| 1102 | ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_NONE = 4, | ||
| 1103 | ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_COUNT = 5, | ||
| 1104 | } ECollisionBoundsStyle; | ||
| 1105 | |||
| 1106 | typedef enum EVROverlayError | ||
| 1107 | { | ||
| 1108 | EVROverlayError_VROverlayError_None = 0, | ||
| 1109 | EVROverlayError_VROverlayError_UnknownOverlay = 10, | ||
| 1110 | EVROverlayError_VROverlayError_InvalidHandle = 11, | ||
| 1111 | EVROverlayError_VROverlayError_PermissionDenied = 12, | ||
| 1112 | EVROverlayError_VROverlayError_OverlayLimitExceeded = 13, | ||
| 1113 | EVROverlayError_VROverlayError_WrongVisibilityType = 14, | ||
| 1114 | EVROverlayError_VROverlayError_KeyTooLong = 15, | ||
| 1115 | EVROverlayError_VROverlayError_NameTooLong = 16, | ||
| 1116 | EVROverlayError_VROverlayError_KeyInUse = 17, | ||
| 1117 | EVROverlayError_VROverlayError_WrongTransformType = 18, | ||
| 1118 | EVROverlayError_VROverlayError_InvalidTrackedDevice = 19, | ||
| 1119 | EVROverlayError_VROverlayError_InvalidParameter = 20, | ||
| 1120 | EVROverlayError_VROverlayError_ThumbnailCantBeDestroyed = 21, | ||
| 1121 | EVROverlayError_VROverlayError_ArrayTooSmall = 22, | ||
| 1122 | EVROverlayError_VROverlayError_RequestFailed = 23, | ||
| 1123 | EVROverlayError_VROverlayError_InvalidTexture = 24, | ||
| 1124 | EVROverlayError_VROverlayError_UnableToLoadFile = 25, | ||
| 1125 | EVROverlayError_VROverlayError_KeyboardAlreadyInUse = 26, | ||
| 1126 | EVROverlayError_VROverlayError_NoNeighbor = 27, | ||
| 1127 | EVROverlayError_VROverlayError_TooManyMaskPrimitives = 29, | ||
| 1128 | EVROverlayError_VROverlayError_BadMaskPrimitive = 30, | ||
| 1129 | EVROverlayError_VROverlayError_TextureAlreadyLocked = 31, | ||
| 1130 | EVROverlayError_VROverlayError_TextureLockCapacityReached = 32, | ||
| 1131 | EVROverlayError_VROverlayError_TextureNotLocked = 33, | ||
| 1132 | EVROverlayError_VROverlayError_TimedOut = 34, | ||
| 1133 | } EVROverlayError; | ||
| 1134 | |||
| 1135 | typedef enum EVRApplicationType | ||
| 1136 | { | ||
| 1137 | EVRApplicationType_VRApplication_Other = 0, | ||
| 1138 | EVRApplicationType_VRApplication_Scene = 1, | ||
| 1139 | EVRApplicationType_VRApplication_Overlay = 2, | ||
| 1140 | EVRApplicationType_VRApplication_Background = 3, | ||
| 1141 | EVRApplicationType_VRApplication_Utility = 4, | ||
| 1142 | EVRApplicationType_VRApplication_VRMonitor = 5, | ||
| 1143 | EVRApplicationType_VRApplication_SteamWatchdog = 6, | ||
| 1144 | EVRApplicationType_VRApplication_Bootstrapper = 7, | ||
| 1145 | EVRApplicationType_VRApplication_WebHelper = 8, | ||
| 1146 | EVRApplicationType_VRApplication_OpenXRInstance = 9, | ||
| 1147 | EVRApplicationType_VRApplication_OpenXRScene = 10, | ||
| 1148 | EVRApplicationType_VRApplication_OpenXROverlay = 11, | ||
| 1149 | EVRApplicationType_VRApplication_Prism = 12, | ||
| 1150 | EVRApplicationType_VRApplication_RoomView = 13, | ||
| 1151 | EVRApplicationType_VRApplication_Max = 14, | ||
| 1152 | } EVRApplicationType; | ||
| 1153 | |||
| 1154 | typedef enum EVRFirmwareError | ||
| 1155 | { | ||
| 1156 | EVRFirmwareError_VRFirmwareError_None = 0, | ||
| 1157 | EVRFirmwareError_VRFirmwareError_Success = 1, | ||
| 1158 | EVRFirmwareError_VRFirmwareError_Fail = 2, | ||
| 1159 | } EVRFirmwareError; | ||
| 1160 | |||
| 1161 | typedef enum EVRNotificationError | ||
| 1162 | { | ||
| 1163 | EVRNotificationError_VRNotificationError_OK = 0, | ||
| 1164 | EVRNotificationError_VRNotificationError_InvalidNotificationId = 100, | ||
| 1165 | EVRNotificationError_VRNotificationError_NotificationQueueFull = 101, | ||
| 1166 | EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102, | ||
| 1167 | EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103, | ||
| 1168 | } EVRNotificationError; | ||
| 1169 | |||
| 1170 | typedef enum EVRSkeletalMotionRange | ||
| 1171 | { | ||
| 1172 | EVRSkeletalMotionRange_VRSkeletalMotionRange_WithController = 0, | ||
| 1173 | EVRSkeletalMotionRange_VRSkeletalMotionRange_WithoutController = 1, | ||
| 1174 | } EVRSkeletalMotionRange; | ||
| 1175 | |||
| 1176 | typedef enum EVRSkeletalTrackingLevel | ||
| 1177 | { | ||
| 1178 | EVRSkeletalTrackingLevel_VRSkeletalTracking_Estimated = 0, | ||
| 1179 | EVRSkeletalTrackingLevel_VRSkeletalTracking_Partial = 1, | ||
| 1180 | EVRSkeletalTrackingLevel_VRSkeletalTracking_Full = 2, | ||
| 1181 | EVRSkeletalTrackingLevel_VRSkeletalTrackingLevel_Count = 3, | ||
| 1182 | EVRSkeletalTrackingLevel_VRSkeletalTrackingLevel_Max = 2, | ||
| 1183 | } EVRSkeletalTrackingLevel; | ||
| 1184 | |||
| 1185 | typedef enum EVRInitError | ||
| 1186 | { | ||
| 1187 | EVRInitError_VRInitError_None = 0, | ||
| 1188 | EVRInitError_VRInitError_Unknown = 1, | ||
| 1189 | EVRInitError_VRInitError_Init_InstallationNotFound = 100, | ||
| 1190 | EVRInitError_VRInitError_Init_InstallationCorrupt = 101, | ||
| 1191 | EVRInitError_VRInitError_Init_VRClientDLLNotFound = 102, | ||
| 1192 | EVRInitError_VRInitError_Init_FileNotFound = 103, | ||
| 1193 | EVRInitError_VRInitError_Init_FactoryNotFound = 104, | ||
| 1194 | EVRInitError_VRInitError_Init_InterfaceNotFound = 105, | ||
| 1195 | EVRInitError_VRInitError_Init_InvalidInterface = 106, | ||
| 1196 | EVRInitError_VRInitError_Init_UserConfigDirectoryInvalid = 107, | ||
| 1197 | EVRInitError_VRInitError_Init_HmdNotFound = 108, | ||
| 1198 | EVRInitError_VRInitError_Init_NotInitialized = 109, | ||
| 1199 | EVRInitError_VRInitError_Init_PathRegistryNotFound = 110, | ||
| 1200 | EVRInitError_VRInitError_Init_NoConfigPath = 111, | ||
| 1201 | EVRInitError_VRInitError_Init_NoLogPath = 112, | ||
| 1202 | EVRInitError_VRInitError_Init_PathRegistryNotWritable = 113, | ||
| 1203 | EVRInitError_VRInitError_Init_AppInfoInitFailed = 114, | ||
| 1204 | EVRInitError_VRInitError_Init_Retry = 115, | ||
| 1205 | EVRInitError_VRInitError_Init_InitCanceledByUser = 116, | ||
| 1206 | EVRInitError_VRInitError_Init_AnotherAppLaunching = 117, | ||
| 1207 | EVRInitError_VRInitError_Init_SettingsInitFailed = 118, | ||
| 1208 | EVRInitError_VRInitError_Init_ShuttingDown = 119, | ||
| 1209 | EVRInitError_VRInitError_Init_TooManyObjects = 120, | ||
| 1210 | EVRInitError_VRInitError_Init_NoServerForBackgroundApp = 121, | ||
| 1211 | EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122, | ||
| 1212 | EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123, | ||
| 1213 | EVRInitError_VRInitError_Init_Internal = 124, | ||
| 1214 | EVRInitError_VRInitError_Init_HmdDriverIdIsNone = 125, | ||
| 1215 | EVRInitError_VRInitError_Init_HmdNotFoundPresenceFailed = 126, | ||
| 1216 | EVRInitError_VRInitError_Init_VRMonitorNotFound = 127, | ||
| 1217 | EVRInitError_VRInitError_Init_VRMonitorStartupFailed = 128, | ||
| 1218 | EVRInitError_VRInitError_Init_LowPowerWatchdogNotSupported = 129, | ||
| 1219 | EVRInitError_VRInitError_Init_InvalidApplicationType = 130, | ||
| 1220 | EVRInitError_VRInitError_Init_NotAvailableToWatchdogApps = 131, | ||
| 1221 | EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132, | ||
| 1222 | EVRInitError_VRInitError_Init_VRDashboardNotFound = 133, | ||
| 1223 | EVRInitError_VRInitError_Init_VRDashboardStartupFailed = 134, | ||
| 1224 | EVRInitError_VRInitError_Init_VRHomeNotFound = 135, | ||
| 1225 | EVRInitError_VRInitError_Init_VRHomeStartupFailed = 136, | ||
| 1226 | EVRInitError_VRInitError_Init_RebootingBusy = 137, | ||
| 1227 | EVRInitError_VRInitError_Init_FirmwareUpdateBusy = 138, | ||
| 1228 | EVRInitError_VRInitError_Init_FirmwareRecoveryBusy = 139, | ||
| 1229 | EVRInitError_VRInitError_Init_USBServiceBusy = 140, | ||
| 1230 | EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141, | ||
| 1231 | EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142, | ||
| 1232 | EVRInitError_VRInitError_Init_AlreadyRunning = 143, | ||
| 1233 | EVRInitError_VRInitError_Init_FailedForVrMonitor = 144, | ||
| 1234 | EVRInitError_VRInitError_Init_PropertyManagerInitFailed = 145, | ||
| 1235 | EVRInitError_VRInitError_Init_WebServerFailed = 146, | ||
| 1236 | EVRInitError_VRInitError_Init_IllegalTypeTransition = 147, | ||
| 1237 | EVRInitError_VRInitError_Init_MismatchedRuntimes = 148, | ||
| 1238 | EVRInitError_VRInitError_Init_InvalidProcessId = 149, | ||
| 1239 | EVRInitError_VRInitError_Init_VRServiceStartupFailed = 150, | ||
| 1240 | EVRInitError_VRInitError_Init_PrismNeedsNewDrivers = 151, | ||
| 1241 | EVRInitError_VRInitError_Init_PrismStartupTimedOut = 152, | ||
| 1242 | EVRInitError_VRInitError_Init_CouldNotStartPrism = 153, | ||
| 1243 | EVRInitError_VRInitError_Init_PrismClientInitFailed = 154, | ||
| 1244 | EVRInitError_VRInitError_Init_PrismClientStartFailed = 155, | ||
| 1245 | EVRInitError_VRInitError_Init_PrismExitedUnexpectedly = 156, | ||
| 1246 | EVRInitError_VRInitError_Init_BadLuid = 157, | ||
| 1247 | EVRInitError_VRInitError_Init_NoServerForAppContainer = 158, | ||
| 1248 | EVRInitError_VRInitError_Init_DuplicateBootstrapper = 159, | ||
| 1249 | EVRInitError_VRInitError_Init_VRDashboardServicePending = 160, | ||
| 1250 | EVRInitError_VRInitError_Init_VRDashboardServiceTimeout = 161, | ||
| 1251 | EVRInitError_VRInitError_Init_VRDashboardServiceStopped = 162, | ||
| 1252 | EVRInitError_VRInitError_Init_VRDashboardAlreadyStarted = 163, | ||
| 1253 | EVRInitError_VRInitError_Init_VRDashboardCopyFailed = 164, | ||
| 1254 | EVRInitError_VRInitError_Init_VRDashboardTokenFailure = 165, | ||
| 1255 | EVRInitError_VRInitError_Init_VRDashboardEnvironmentFailure = 166, | ||
| 1256 | EVRInitError_VRInitError_Init_VRDashboardPathFailure = 167, | ||
| 1257 | EVRInitError_VRInitError_Driver_Failed = 200, | ||
| 1258 | EVRInitError_VRInitError_Driver_Unknown = 201, | ||
| 1259 | EVRInitError_VRInitError_Driver_HmdUnknown = 202, | ||
| 1260 | EVRInitError_VRInitError_Driver_NotLoaded = 203, | ||
| 1261 | EVRInitError_VRInitError_Driver_RuntimeOutOfDate = 204, | ||
| 1262 | EVRInitError_VRInitError_Driver_HmdInUse = 205, | ||
| 1263 | EVRInitError_VRInitError_Driver_NotCalibrated = 206, | ||
| 1264 | EVRInitError_VRInitError_Driver_CalibrationInvalid = 207, | ||
| 1265 | EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208, | ||
| 1266 | EVRInitError_VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, | ||
| 1267 | EVRInitError_VRInitError_Driver_HmdDriverIdOutOfBounds = 211, | ||
| 1268 | EVRInitError_VRInitError_Driver_HmdDisplayMirrored = 212, | ||
| 1269 | EVRInitError_VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, | ||
| 1270 | EVRInitError_VRInitError_Driver_PeerDriverNotInstalled = 214, | ||
| 1271 | EVRInitError_VRInitError_Driver_WirelessHmdNotConnected = 215, | ||
| 1272 | EVRInitError_VRInitError_IPC_ServerInitFailed = 300, | ||
| 1273 | EVRInitError_VRInitError_IPC_ConnectFailed = 301, | ||
| 1274 | EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302, | ||
| 1275 | EVRInitError_VRInitError_IPC_CompositorInitFailed = 303, | ||
| 1276 | EVRInitError_VRInitError_IPC_MutexInitFailed = 304, | ||
| 1277 | EVRInitError_VRInitError_IPC_Failed = 305, | ||
| 1278 | EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306, | ||
| 1279 | EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307, | ||
| 1280 | EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, | ||
| 1281 | EVRInitError_VRInitError_IPC_ConnectFailedAfterTargetExited = 309, | ||
| 1282 | EVRInitError_VRInitError_IPC_NamespaceUnavailable = 310, | ||
| 1283 | EVRInitError_VRInitError_Compositor_Failed = 400, | ||
| 1284 | EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401, | ||
| 1285 | EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402, | ||
| 1286 | EVRInitError_VRInitError_Compositor_OverlayInitFailed = 403, | ||
| 1287 | EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404, | ||
| 1288 | EVRInitError_VRInitError_Compositor_UnableToCreateDevice = 405, | ||
| 1289 | EVRInitError_VRInitError_Compositor_SharedStateIsNull = 406, | ||
| 1290 | EVRInitError_VRInitError_Compositor_NotificationManagerIsNull = 407, | ||
| 1291 | EVRInitError_VRInitError_Compositor_ResourceManagerClientIsNull = 408, | ||
| 1292 | EVRInitError_VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, | ||
| 1293 | EVRInitError_VRInitError_Compositor_PropertiesInterfaceIsNull = 410, | ||
| 1294 | EVRInitError_VRInitError_Compositor_CreateFullscreenWindowFailed = 411, | ||
| 1295 | EVRInitError_VRInitError_Compositor_SettingsInterfaceIsNull = 412, | ||
| 1296 | EVRInitError_VRInitError_Compositor_FailedToShowWindow = 413, | ||
| 1297 | EVRInitError_VRInitError_Compositor_DistortInterfaceIsNull = 414, | ||
| 1298 | EVRInitError_VRInitError_Compositor_DisplayFrequencyFailure = 415, | ||
| 1299 | EVRInitError_VRInitError_Compositor_RendererInitializationFailed = 416, | ||
| 1300 | EVRInitError_VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, | ||
| 1301 | EVRInitError_VRInitError_Compositor_DXGIFactoryCreateFailed = 418, | ||
| 1302 | EVRInitError_VRInitError_Compositor_DXGIFactoryQueryFailed = 419, | ||
| 1303 | EVRInitError_VRInitError_Compositor_InvalidAdapterDesktop = 420, | ||
| 1304 | EVRInitError_VRInitError_Compositor_InvalidHmdAttachment = 421, | ||
| 1305 | EVRInitError_VRInitError_Compositor_InvalidOutputDesktop = 422, | ||
| 1306 | EVRInitError_VRInitError_Compositor_InvalidDeviceProvided = 423, | ||
| 1307 | EVRInitError_VRInitError_Compositor_D3D11RendererInitializationFailed = 424, | ||
| 1308 | EVRInitError_VRInitError_Compositor_FailedToFindDisplayMode = 425, | ||
| 1309 | EVRInitError_VRInitError_Compositor_FailedToCreateSwapChain = 426, | ||
| 1310 | EVRInitError_VRInitError_Compositor_FailedToGetBackBuffer = 427, | ||
| 1311 | EVRInitError_VRInitError_Compositor_FailedToCreateRenderTarget = 428, | ||
| 1312 | EVRInitError_VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, | ||
| 1313 | EVRInitError_VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, | ||
| 1314 | EVRInitError_VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, | ||
| 1315 | EVRInitError_VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, | ||
| 1316 | EVRInitError_VRInitError_Compositor_SelectDisplayMode = 433, | ||
| 1317 | EVRInitError_VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, | ||
| 1318 | EVRInitError_VRInitError_Compositor_NvAPISetDisplayMode = 435, | ||
| 1319 | EVRInitError_VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, | ||
| 1320 | EVRInitError_VRInitError_Compositor_InvalidHmdPropertyContainer = 437, | ||
| 1321 | EVRInitError_VRInitError_Compositor_UpdateDisplayFrequency = 438, | ||
| 1322 | EVRInitError_VRInitError_Compositor_CreateRasterizerState = 439, | ||
| 1323 | EVRInitError_VRInitError_Compositor_CreateWireframeRasterizerState = 440, | ||
| 1324 | EVRInitError_VRInitError_Compositor_CreateSamplerState = 441, | ||
| 1325 | EVRInitError_VRInitError_Compositor_CreateClampToBorderSamplerState = 442, | ||
| 1326 | EVRInitError_VRInitError_Compositor_CreateAnisoSamplerState = 443, | ||
| 1327 | EVRInitError_VRInitError_Compositor_CreateOverlaySamplerState = 444, | ||
| 1328 | EVRInitError_VRInitError_Compositor_CreatePanoramaSamplerState = 445, | ||
| 1329 | EVRInitError_VRInitError_Compositor_CreateFontSamplerState = 446, | ||
| 1330 | EVRInitError_VRInitError_Compositor_CreateNoBlendState = 447, | ||
| 1331 | EVRInitError_VRInitError_Compositor_CreateBlendState = 448, | ||
| 1332 | EVRInitError_VRInitError_Compositor_CreateAlphaBlendState = 449, | ||
| 1333 | EVRInitError_VRInitError_Compositor_CreateBlendStateMaskR = 450, | ||
| 1334 | EVRInitError_VRInitError_Compositor_CreateBlendStateMaskG = 451, | ||
| 1335 | EVRInitError_VRInitError_Compositor_CreateBlendStateMaskB = 452, | ||
| 1336 | EVRInitError_VRInitError_Compositor_CreateDepthStencilState = 453, | ||
| 1337 | EVRInitError_VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, | ||
| 1338 | EVRInitError_VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, | ||
| 1339 | EVRInitError_VRInitError_Compositor_CreateFlushTexture = 456, | ||
| 1340 | EVRInitError_VRInitError_Compositor_CreateDistortionSurfaces = 457, | ||
| 1341 | EVRInitError_VRInitError_Compositor_CreateConstantBuffer = 458, | ||
| 1342 | EVRInitError_VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, | ||
| 1343 | EVRInitError_VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, | ||
| 1344 | EVRInitError_VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, | ||
| 1345 | EVRInitError_VRInitError_Compositor_CreateOverlayConstantBuffer = 462, | ||
| 1346 | EVRInitError_VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, | ||
| 1347 | EVRInitError_VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, | ||
| 1348 | EVRInitError_VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, | ||
| 1349 | EVRInitError_VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, | ||
| 1350 | EVRInitError_VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, | ||
| 1351 | EVRInitError_VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, | ||
| 1352 | EVRInitError_VRInitError_Compositor_CreateGeomConstantBuffer = 469, | ||
| 1353 | EVRInitError_VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, | ||
| 1354 | EVRInitError_VRInitError_Compositor_CreatePixelSimUBO = 471, | ||
| 1355 | EVRInitError_VRInitError_Compositor_CreateMSAARenderTextures = 472, | ||
| 1356 | EVRInitError_VRInitError_Compositor_CreateResolveRenderTextures = 473, | ||
| 1357 | EVRInitError_VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, | ||
| 1358 | EVRInitError_VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, | ||
| 1359 | EVRInitError_VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, | ||
| 1360 | EVRInitError_VRInitError_Compositor_CreateFallbackSyncTexture = 477, | ||
| 1361 | EVRInitError_VRInitError_Compositor_ShareFallbackSyncTexture = 478, | ||
| 1362 | EVRInitError_VRInitError_Compositor_CreateOverlayIndexBuffer = 479, | ||
| 1363 | EVRInitError_VRInitError_Compositor_CreateOverlayVertexBuffer = 480, | ||
| 1364 | EVRInitError_VRInitError_Compositor_CreateTextVertexBuffer = 481, | ||
| 1365 | EVRInitError_VRInitError_Compositor_CreateTextIndexBuffer = 482, | ||
| 1366 | EVRInitError_VRInitError_Compositor_CreateMirrorTextures = 483, | ||
| 1367 | EVRInitError_VRInitError_Compositor_CreateLastFrameRenderTexture = 484, | ||
| 1368 | EVRInitError_VRInitError_Compositor_CreateMirrorOverlay = 485, | ||
| 1369 | EVRInitError_VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, | ||
| 1370 | EVRInitError_VRInitError_Compositor_DisplayModeNotSupported = 487, | ||
| 1371 | EVRInitError_VRInitError_Compositor_CreateOverlayInvalidCall = 488, | ||
| 1372 | EVRInitError_VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489, | ||
| 1373 | EVRInitError_VRInitError_Compositor_FailedToCreateMailbox = 490, | ||
| 1374 | EVRInitError_VRInitError_Compositor_WindowInterfaceIsNull = 491, | ||
| 1375 | EVRInitError_VRInitError_Compositor_SystemLayerCreateInstance = 492, | ||
| 1376 | EVRInitError_VRInitError_Compositor_SystemLayerCreateSession = 493, | ||
| 1377 | EVRInitError_VRInitError_Compoistor_CreateInverseDistortUVs = 494, | ||
| 1378 | EVRInitError_VRInitError_Compoistor_CreateBackbufferDepth = 495, | ||
| 1379 | EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, | ||
| 1380 | EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, | ||
| 1381 | EVRInitError_VRInitError_VendorSpecific_OculusLinkNotEnabled = 1002, | ||
| 1382 | EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, | ||
| 1383 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, | ||
| 1384 | EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, | ||
| 1385 | EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, | ||
| 1386 | EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, | ||
| 1387 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, | ||
| 1388 | EVRInitError_VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, | ||
| 1389 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, | ||
| 1390 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, | ||
| 1391 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, | ||
| 1392 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, | ||
| 1393 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, | ||
| 1394 | EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, | ||
| 1395 | EVRInitError_VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, | ||
| 1396 | EVRInitError_VRInitError_VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115, | ||
| 1397 | EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000, | ||
| 1398 | EVRInitError_VRInitError_LastError = 2001, | ||
| 1399 | } EVRInitError; | ||
| 1400 | |||
| 1401 | typedef enum EVRScreenshotType | ||
| 1402 | { | ||
| 1403 | EVRScreenshotType_VRScreenshotType_None = 0, | ||
| 1404 | EVRScreenshotType_VRScreenshotType_Mono = 1, | ||
| 1405 | EVRScreenshotType_VRScreenshotType_Stereo = 2, | ||
| 1406 | EVRScreenshotType_VRScreenshotType_Cubemap = 3, | ||
| 1407 | EVRScreenshotType_VRScreenshotType_MonoPanorama = 4, | ||
| 1408 | EVRScreenshotType_VRScreenshotType_StereoPanorama = 5, | ||
| 1409 | } EVRScreenshotType; | ||
| 1410 | |||
| 1411 | typedef enum EVRScreenshotPropertyFilenames | ||
| 1412 | { | ||
| 1413 | EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview = 0, | ||
| 1414 | EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR = 1, | ||
| 1415 | } EVRScreenshotPropertyFilenames; | ||
| 1416 | |||
| 1417 | typedef enum EVRTrackedCameraError | ||
| 1418 | { | ||
| 1419 | EVRTrackedCameraError_VRTrackedCameraError_None = 0, | ||
| 1420 | EVRTrackedCameraError_VRTrackedCameraError_OperationFailed = 100, | ||
| 1421 | EVRTrackedCameraError_VRTrackedCameraError_InvalidHandle = 101, | ||
| 1422 | EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameHeaderVersion = 102, | ||
| 1423 | EVRTrackedCameraError_VRTrackedCameraError_OutOfHandles = 103, | ||
| 1424 | EVRTrackedCameraError_VRTrackedCameraError_IPCFailure = 104, | ||
| 1425 | EVRTrackedCameraError_VRTrackedCameraError_NotSupportedForThisDevice = 105, | ||
| 1426 | EVRTrackedCameraError_VRTrackedCameraError_SharedMemoryFailure = 106, | ||
| 1427 | EVRTrackedCameraError_VRTrackedCameraError_FrameBufferingFailure = 107, | ||
| 1428 | EVRTrackedCameraError_VRTrackedCameraError_StreamSetupFailure = 108, | ||
| 1429 | EVRTrackedCameraError_VRTrackedCameraError_InvalidGLTextureId = 109, | ||
| 1430 | EVRTrackedCameraError_VRTrackedCameraError_InvalidSharedTextureHandle = 110, | ||
| 1431 | EVRTrackedCameraError_VRTrackedCameraError_FailedToGetGLTextureId = 111, | ||
| 1432 | EVRTrackedCameraError_VRTrackedCameraError_SharedTextureFailure = 112, | ||
| 1433 | EVRTrackedCameraError_VRTrackedCameraError_NoFrameAvailable = 113, | ||
| 1434 | EVRTrackedCameraError_VRTrackedCameraError_InvalidArgument = 114, | ||
| 1435 | EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameBufferSize = 115, | ||
| 1436 | } EVRTrackedCameraError; | ||
| 1437 | |||
| 1438 | typedef enum EVRTrackedCameraFrameLayout | ||
| 1439 | { | ||
| 1440 | EVRTrackedCameraFrameLayout_Mono = 1, | ||
| 1441 | EVRTrackedCameraFrameLayout_Stereo = 2, | ||
| 1442 | EVRTrackedCameraFrameLayout_VerticalLayout = 16, | ||
| 1443 | EVRTrackedCameraFrameLayout_HorizontalLayout = 32, | ||
| 1444 | } EVRTrackedCameraFrameLayout; | ||
| 1445 | |||
| 1446 | typedef enum EVRTrackedCameraFrameType | ||
| 1447 | { | ||
| 1448 | EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Distorted = 0, | ||
| 1449 | EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Undistorted = 1, | ||
| 1450 | EVRTrackedCameraFrameType_VRTrackedCameraFrameType_MaximumUndistorted = 2, | ||
| 1451 | EVRTrackedCameraFrameType_MAX_CAMERA_FRAME_TYPES = 3, | ||
| 1452 | } EVRTrackedCameraFrameType; | ||
| 1453 | |||
| 1454 | typedef enum EVRDistortionFunctionType | ||
| 1455 | { | ||
| 1456 | EVRDistortionFunctionType_VRDistortionFunctionType_None = 0, | ||
| 1457 | EVRDistortionFunctionType_VRDistortionFunctionType_FTheta = 1, | ||
| 1458 | EVRDistortionFunctionType_VRDistortionFunctionType_Extended_FTheta = 2, | ||
| 1459 | EVRDistortionFunctionType_MAX_DISTORTION_FUNCTION_TYPES = 3, | ||
| 1460 | } EVRDistortionFunctionType; | ||
| 1461 | |||
| 1462 | typedef enum EVSync | ||
| 1463 | { | ||
| 1464 | EVSync_VSync_None = 0, | ||
| 1465 | EVSync_VSync_WaitRender = 1, | ||
| 1466 | EVSync_VSync_NoWaitRender = 2, | ||
| 1467 | } EVSync; | ||
| 1468 | |||
| 1469 | typedef enum EVRMuraCorrectionMode | ||
| 1470 | { | ||
| 1471 | EVRMuraCorrectionMode_Default = 0, | ||
| 1472 | EVRMuraCorrectionMode_NoCorrection = 1, | ||
| 1473 | } EVRMuraCorrectionMode; | ||
| 1474 | |||
| 1475 | typedef enum Imu_OffScaleFlags | ||
| 1476 | { | ||
| 1477 | Imu_OffScaleFlags_OffScale_AccelX = 1, | ||
| 1478 | Imu_OffScaleFlags_OffScale_AccelY = 2, | ||
| 1479 | Imu_OffScaleFlags_OffScale_AccelZ = 4, | ||
| 1480 | Imu_OffScaleFlags_OffScale_GyroX = 8, | ||
| 1481 | Imu_OffScaleFlags_OffScale_GyroY = 16, | ||
| 1482 | Imu_OffScaleFlags_OffScale_GyroZ = 32, | ||
| 1483 | } Imu_OffScaleFlags; | ||
| 1484 | |||
| 1485 | typedef enum EVRApplicationError | ||
| 1486 | { | ||
| 1487 | EVRApplicationError_VRApplicationError_None = 0, | ||
| 1488 | EVRApplicationError_VRApplicationError_AppKeyAlreadyExists = 100, | ||
| 1489 | EVRApplicationError_VRApplicationError_NoManifest = 101, | ||
| 1490 | EVRApplicationError_VRApplicationError_NoApplication = 102, | ||
| 1491 | EVRApplicationError_VRApplicationError_InvalidIndex = 103, | ||
| 1492 | EVRApplicationError_VRApplicationError_UnknownApplication = 104, | ||
| 1493 | EVRApplicationError_VRApplicationError_IPCFailed = 105, | ||
| 1494 | EVRApplicationError_VRApplicationError_ApplicationAlreadyRunning = 106, | ||
| 1495 | EVRApplicationError_VRApplicationError_InvalidManifest = 107, | ||
| 1496 | EVRApplicationError_VRApplicationError_InvalidApplication = 108, | ||
| 1497 | EVRApplicationError_VRApplicationError_LaunchFailed = 109, | ||
| 1498 | EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110, | ||
| 1499 | EVRApplicationError_VRApplicationError_LaunchInProgress = 111, | ||
| 1500 | EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112, | ||
| 1501 | EVRApplicationError_VRApplicationError_TransitionAborted = 113, | ||
| 1502 | EVRApplicationError_VRApplicationError_IsTemplate = 114, | ||
| 1503 | EVRApplicationError_VRApplicationError_SteamVRIsExiting = 115, | ||
| 1504 | EVRApplicationError_VRApplicationError_BufferTooSmall = 200, | ||
| 1505 | EVRApplicationError_VRApplicationError_PropertyNotSet = 201, | ||
| 1506 | EVRApplicationError_VRApplicationError_UnknownProperty = 202, | ||
| 1507 | EVRApplicationError_VRApplicationError_InvalidParameter = 203, | ||
| 1508 | EVRApplicationError_VRApplicationError_NotImplemented = 300, | ||
| 1509 | } EVRApplicationError; | ||
| 1510 | |||
| 1511 | typedef enum EVRApplicationProperty | ||
| 1512 | { | ||
| 1513 | EVRApplicationProperty_VRApplicationProperty_Name_String = 0, | ||
| 1514 | EVRApplicationProperty_VRApplicationProperty_LaunchType_String = 11, | ||
| 1515 | EVRApplicationProperty_VRApplicationProperty_WorkingDirectory_String = 12, | ||
| 1516 | EVRApplicationProperty_VRApplicationProperty_BinaryPath_String = 13, | ||
| 1517 | EVRApplicationProperty_VRApplicationProperty_Arguments_String = 14, | ||
| 1518 | EVRApplicationProperty_VRApplicationProperty_URL_String = 15, | ||
| 1519 | EVRApplicationProperty_VRApplicationProperty_Description_String = 50, | ||
| 1520 | EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51, | ||
| 1521 | EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52, | ||
| 1522 | EVRApplicationProperty_VRApplicationProperty_Source_String = 53, | ||
| 1523 | EVRApplicationProperty_VRApplicationProperty_ActionManifestURL_String = 54, | ||
| 1524 | EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60, | ||
| 1525 | EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61, | ||
| 1526 | EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62, | ||
| 1527 | EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63, | ||
| 1528 | EVRApplicationProperty_VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, | ||
| 1529 | EVRApplicationProperty_VRApplicationProperty_IsHidden_Bool = 65, | ||
| 1530 | EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70, | ||
| 1531 | } EVRApplicationProperty; | ||
| 1532 | |||
| 1533 | typedef enum EVRSceneApplicationState | ||
| 1534 | { | ||
| 1535 | EVRSceneApplicationState_None = 0, | ||
| 1536 | EVRSceneApplicationState_Starting = 1, | ||
| 1537 | EVRSceneApplicationState_Quitting = 2, | ||
| 1538 | EVRSceneApplicationState_Running = 3, | ||
| 1539 | EVRSceneApplicationState_Waiting = 4, | ||
| 1540 | } EVRSceneApplicationState; | ||
| 1541 | |||
| 1542 | typedef enum ChaperoneCalibrationState | ||
| 1543 | { | ||
| 1544 | ChaperoneCalibrationState_OK = 1, | ||
| 1545 | ChaperoneCalibrationState_Warning = 100, | ||
| 1546 | ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, | ||
| 1547 | ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, | ||
| 1548 | ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, | ||
| 1549 | ChaperoneCalibrationState_Error = 200, | ||
| 1550 | ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, | ||
| 1551 | ChaperoneCalibrationState_Error_BaseStationConflict = 202, | ||
| 1552 | ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, | ||
| 1553 | ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, | ||
| 1554 | } ChaperoneCalibrationState; | ||
| 1555 | |||
| 1556 | typedef enum EChaperoneConfigFile | ||
| 1557 | { | ||
| 1558 | EChaperoneConfigFile_Live = 1, | ||
| 1559 | EChaperoneConfigFile_Temp = 2, | ||
| 1560 | } EChaperoneConfigFile; | ||
| 1561 | |||
| 1562 | typedef enum EChaperoneImportFlags | ||
| 1563 | { | ||
| 1564 | EChaperoneImportFlags_EChaperoneImport_BoundsOnly = 1, | ||
| 1565 | } EChaperoneImportFlags; | ||
| 1566 | |||
| 1567 | typedef enum EVRCompositorError | ||
| 1568 | { | ||
| 1569 | EVRCompositorError_VRCompositorError_None = 0, | ||
| 1570 | EVRCompositorError_VRCompositorError_RequestFailed = 1, | ||
| 1571 | EVRCompositorError_VRCompositorError_IncompatibleVersion = 100, | ||
| 1572 | EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101, | ||
| 1573 | EVRCompositorError_VRCompositorError_InvalidTexture = 102, | ||
| 1574 | EVRCompositorError_VRCompositorError_IsNotSceneApplication = 103, | ||
| 1575 | EVRCompositorError_VRCompositorError_TextureIsOnWrongDevice = 104, | ||
| 1576 | EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105, | ||
| 1577 | EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106, | ||
| 1578 | EVRCompositorError_VRCompositorError_IndexOutOfRange = 107, | ||
| 1579 | EVRCompositorError_VRCompositorError_AlreadySubmitted = 108, | ||
| 1580 | EVRCompositorError_VRCompositorError_InvalidBounds = 109, | ||
| 1581 | EVRCompositorError_VRCompositorError_AlreadySet = 110, | ||
| 1582 | } EVRCompositorError; | ||
| 1583 | |||
| 1584 | typedef enum EVRCompositorTimingMode | ||
| 1585 | { | ||
| 1586 | EVRCompositorTimingMode_VRCompositorTimingMode_Implicit = 0, | ||
| 1587 | EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1, | ||
| 1588 | EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, | ||
| 1589 | } EVRCompositorTimingMode; | ||
| 1590 | |||
| 1591 | typedef enum VROverlayInputMethod | ||
| 1592 | { | ||
| 1593 | VROverlayInputMethod_None = 0, | ||
| 1594 | VROverlayInputMethod_Mouse = 1, | ||
| 1595 | } VROverlayInputMethod; | ||
| 1596 | |||
| 1597 | typedef enum VROverlayTransformType | ||
| 1598 | { | ||
| 1599 | VROverlayTransformType_VROverlayTransform_Invalid = -1, | ||
| 1600 | VROverlayTransformType_VROverlayTransform_Absolute = 0, | ||
| 1601 | VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1, | ||
| 1602 | VROverlayTransformType_VROverlayTransform_SystemOverlay = 2, | ||
| 1603 | VROverlayTransformType_VROverlayTransform_TrackedComponent = 3, | ||
| 1604 | VROverlayTransformType_VROverlayTransform_Cursor = 4, | ||
| 1605 | VROverlayTransformType_VROverlayTransform_DashboardTab = 5, | ||
| 1606 | VROverlayTransformType_VROverlayTransform_DashboardThumb = 6, | ||
| 1607 | VROverlayTransformType_VROverlayTransform_Mountable = 7, | ||
| 1608 | VROverlayTransformType_VROverlayTransform_Projection = 8, | ||
| 1609 | } VROverlayTransformType; | ||
| 1610 | |||
| 1611 | typedef enum VROverlayFlags | ||
| 1612 | { | ||
| 1613 | VROverlayFlags_NoDashboardTab = 8, | ||
| 1614 | VROverlayFlags_SendVRDiscreteScrollEvents = 64, | ||
| 1615 | VROverlayFlags_SendVRTouchpadEvents = 128, | ||
| 1616 | VROverlayFlags_ShowTouchPadScrollWheel = 256, | ||
| 1617 | VROverlayFlags_TransferOwnershipToInternalProcess = 512, | ||
| 1618 | VROverlayFlags_SideBySide_Parallel = 1024, | ||
| 1619 | VROverlayFlags_SideBySide_Crossed = 2048, | ||
| 1620 | VROverlayFlags_Panorama = 4096, | ||
| 1621 | VROverlayFlags_StereoPanorama = 8192, | ||
| 1622 | VROverlayFlags_SortWithNonSceneOverlays = 16384, | ||
| 1623 | VROverlayFlags_VisibleInDashboard = 32768, | ||
| 1624 | VROverlayFlags_MakeOverlaysInteractiveIfVisible = 65536, | ||
| 1625 | VROverlayFlags_SendVRSmoothScrollEvents = 131072, | ||
| 1626 | VROverlayFlags_ProtectedContent = 262144, | ||
| 1627 | VROverlayFlags_HideLaserIntersection = 524288, | ||
| 1628 | VROverlayFlags_WantsModalBehavior = 1048576, | ||
| 1629 | VROverlayFlags_IsPremultiplied = 2097152, | ||
| 1630 | VROverlayFlags_IgnoreTextureAlpha = 4194304, | ||
| 1631 | VROverlayFlags_EnableControlBar = 8388608, | ||
| 1632 | VROverlayFlags_EnableControlBarKeyboard = 16777216, | ||
| 1633 | VROverlayFlags_EnableControlBarClose = 33554432, | ||
| 1634 | } VROverlayFlags; | ||
| 1635 | |||
| 1636 | typedef enum VRMessageOverlayResponse | ||
| 1637 | { | ||
| 1638 | VRMessageOverlayResponse_ButtonPress_0 = 0, | ||
| 1639 | VRMessageOverlayResponse_ButtonPress_1 = 1, | ||
| 1640 | VRMessageOverlayResponse_ButtonPress_2 = 2, | ||
| 1641 | VRMessageOverlayResponse_ButtonPress_3 = 3, | ||
| 1642 | VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, | ||
| 1643 | VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay = 5, | ||
| 1644 | VRMessageOverlayResponse_ApplicationQuit = 6, | ||
| 1645 | } VRMessageOverlayResponse; | ||
| 1646 | |||
| 1647 | typedef enum EGamepadTextInputMode | ||
| 1648 | { | ||
| 1649 | EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0, | ||
| 1650 | EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1, | ||
| 1651 | EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2, | ||
| 1652 | } EGamepadTextInputMode; | ||
| 1653 | |||
| 1654 | typedef enum EGamepadTextInputLineMode | ||
| 1655 | { | ||
| 1656 | EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0, | ||
| 1657 | EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1, | ||
| 1658 | } EGamepadTextInputLineMode; | ||
| 1659 | |||
| 1660 | typedef enum EVROverlayIntersectionMaskPrimitiveType | ||
| 1661 | { | ||
| 1662 | EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Rectangle = 0, | ||
| 1663 | EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Circle = 1, | ||
| 1664 | } EVROverlayIntersectionMaskPrimitiveType; | ||
| 1665 | |||
| 1666 | typedef enum EKeyboardFlags | ||
| 1667 | { | ||
| 1668 | EKeyboardFlags_KeyboardFlag_Minimal = 1, | ||
| 1669 | EKeyboardFlags_KeyboardFlag_Modal = 2, | ||
| 1670 | } EKeyboardFlags; | ||
| 1671 | |||
| 1672 | typedef enum EDeviceType | ||
| 1673 | { | ||
| 1674 | EDeviceType_DeviceType_Invalid = -1, | ||
| 1675 | EDeviceType_DeviceType_DirectX11 = 0, | ||
| 1676 | EDeviceType_DeviceType_Vulkan = 1, | ||
| 1677 | } EDeviceType; | ||
| 1678 | |||
| 1679 | typedef enum HeadsetViewMode_t | ||
| 1680 | { | ||
| 1681 | HeadsetViewMode_t_HeadsetViewMode_Left = 0, | ||
| 1682 | HeadsetViewMode_t_HeadsetViewMode_Right = 1, | ||
| 1683 | HeadsetViewMode_t_HeadsetViewMode_Both = 2, | ||
| 1684 | } HeadsetViewMode_t; | ||
| 1685 | |||
| 1686 | typedef enum EVRRenderModelError | ||
| 1687 | { | ||
| 1688 | EVRRenderModelError_VRRenderModelError_None = 0, | ||
| 1689 | EVRRenderModelError_VRRenderModelError_Loading = 100, | ||
| 1690 | EVRRenderModelError_VRRenderModelError_NotSupported = 200, | ||
| 1691 | EVRRenderModelError_VRRenderModelError_InvalidArg = 300, | ||
| 1692 | EVRRenderModelError_VRRenderModelError_InvalidModel = 301, | ||
| 1693 | EVRRenderModelError_VRRenderModelError_NoShapes = 302, | ||
| 1694 | EVRRenderModelError_VRRenderModelError_MultipleShapes = 303, | ||
| 1695 | EVRRenderModelError_VRRenderModelError_TooManyVertices = 304, | ||
| 1696 | EVRRenderModelError_VRRenderModelError_MultipleTextures = 305, | ||
| 1697 | EVRRenderModelError_VRRenderModelError_BufferTooSmall = 306, | ||
| 1698 | EVRRenderModelError_VRRenderModelError_NotEnoughNormals = 307, | ||
| 1699 | EVRRenderModelError_VRRenderModelError_NotEnoughTexCoords = 308, | ||
| 1700 | EVRRenderModelError_VRRenderModelError_InvalidTexture = 400, | ||
| 1701 | } EVRRenderModelError; | ||
| 1702 | |||
| 1703 | typedef enum EVRRenderModelTextureFormat | ||
| 1704 | { | ||
| 1705 | EVRRenderModelTextureFormat_VRRenderModelTextureFormat_RGBA8_SRGB = 0, | ||
| 1706 | EVRRenderModelTextureFormat_VRRenderModelTextureFormat_BC2 = 1, | ||
| 1707 | EVRRenderModelTextureFormat_VRRenderModelTextureFormat_BC4 = 2, | ||
| 1708 | EVRRenderModelTextureFormat_VRRenderModelTextureFormat_BC7 = 3, | ||
| 1709 | EVRRenderModelTextureFormat_VRRenderModelTextureFormat_BC7_SRGB = 4, | ||
| 1710 | EVRRenderModelTextureFormat_VRRenderModelTextureFormat_RGBA16_FLOAT = 5, | ||
| 1711 | } EVRRenderModelTextureFormat; | ||
| 1712 | |||
| 1713 | typedef enum EVRNotificationType | ||
| 1714 | { | ||
| 1715 | EVRNotificationType_Transient = 0, | ||
| 1716 | EVRNotificationType_Persistent = 1, | ||
| 1717 | EVRNotificationType_Transient_SystemWithUserValue = 2, | ||
| 1718 | } EVRNotificationType; | ||
| 1719 | |||
| 1720 | typedef enum EVRNotificationStyle | ||
| 1721 | { | ||
| 1722 | EVRNotificationStyle_None = 0, | ||
| 1723 | EVRNotificationStyle_Application = 100, | ||
| 1724 | EVRNotificationStyle_Contact_Disabled = 200, | ||
| 1725 | EVRNotificationStyle_Contact_Enabled = 201, | ||
| 1726 | EVRNotificationStyle_Contact_Active = 202, | ||
| 1727 | } EVRNotificationStyle; | ||
| 1728 | |||
| 1729 | typedef enum EVRSettingsError | ||
| 1730 | { | ||
| 1731 | EVRSettingsError_VRSettingsError_None = 0, | ||
| 1732 | EVRSettingsError_VRSettingsError_IPCFailed = 1, | ||
| 1733 | EVRSettingsError_VRSettingsError_WriteFailed = 2, | ||
| 1734 | EVRSettingsError_VRSettingsError_ReadFailed = 3, | ||
| 1735 | EVRSettingsError_VRSettingsError_JsonParseFailed = 4, | ||
| 1736 | EVRSettingsError_VRSettingsError_UnsetSettingHasNoDefault = 5, | ||
| 1737 | } EVRSettingsError; | ||
| 1738 | |||
| 1739 | typedef enum EVRScreenshotError | ||
| 1740 | { | ||
| 1741 | EVRScreenshotError_VRScreenshotError_None = 0, | ||
| 1742 | EVRScreenshotError_VRScreenshotError_RequestFailed = 1, | ||
| 1743 | EVRScreenshotError_VRScreenshotError_IncompatibleVersion = 100, | ||
| 1744 | EVRScreenshotError_VRScreenshotError_NotFound = 101, | ||
| 1745 | EVRScreenshotError_VRScreenshotError_BufferTooSmall = 102, | ||
| 1746 | EVRScreenshotError_VRScreenshotError_ScreenshotAlreadyInProgress = 108, | ||
| 1747 | } EVRScreenshotError; | ||
| 1748 | |||
| 1749 | typedef enum EVRSkeletalTransformSpace | ||
| 1750 | { | ||
| 1751 | EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model = 0, | ||
| 1752 | EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Parent = 1, | ||
| 1753 | } EVRSkeletalTransformSpace; | ||
| 1754 | |||
| 1755 | typedef enum EVRSkeletalReferencePose | ||
| 1756 | { | ||
| 1757 | EVRSkeletalReferencePose_VRSkeletalReferencePose_BindPose = 0, | ||
| 1758 | EVRSkeletalReferencePose_VRSkeletalReferencePose_OpenHand = 1, | ||
| 1759 | EVRSkeletalReferencePose_VRSkeletalReferencePose_Fist = 2, | ||
| 1760 | EVRSkeletalReferencePose_VRSkeletalReferencePose_GripLimit = 3, | ||
| 1761 | } EVRSkeletalReferencePose; | ||
| 1762 | |||
| 1763 | typedef enum EVRFinger | ||
| 1764 | { | ||
| 1765 | EVRFinger_VRFinger_Thumb = 0, | ||
| 1766 | EVRFinger_VRFinger_Index = 1, | ||
| 1767 | EVRFinger_VRFinger_Middle = 2, | ||
| 1768 | EVRFinger_VRFinger_Ring = 3, | ||
| 1769 | EVRFinger_VRFinger_Pinky = 4, | ||
| 1770 | EVRFinger_VRFinger_Count = 5, | ||
| 1771 | } EVRFinger; | ||
| 1772 | |||
| 1773 | typedef enum EVRFingerSplay | ||
| 1774 | { | ||
| 1775 | EVRFingerSplay_VRFingerSplay_Thumb_Index = 0, | ||
| 1776 | EVRFingerSplay_VRFingerSplay_Index_Middle = 1, | ||
| 1777 | EVRFingerSplay_VRFingerSplay_Middle_Ring = 2, | ||
| 1778 | EVRFingerSplay_VRFingerSplay_Ring_Pinky = 3, | ||
| 1779 | EVRFingerSplay_VRFingerSplay_Count = 4, | ||
| 1780 | } EVRFingerSplay; | ||
| 1781 | |||
| 1782 | typedef enum EVRSummaryType | ||
| 1783 | { | ||
| 1784 | EVRSummaryType_VRSummaryType_FromAnimation = 0, | ||
| 1785 | EVRSummaryType_VRSummaryType_FromDevice = 1, | ||
| 1786 | } EVRSummaryType; | ||
| 1787 | |||
| 1788 | typedef enum EVRInputFilterCancelType | ||
| 1789 | { | ||
| 1790 | EVRInputFilterCancelType_VRInputFilterCancel_Timers = 0, | ||
| 1791 | EVRInputFilterCancelType_VRInputFilterCancel_Momentum = 1, | ||
| 1792 | } EVRInputFilterCancelType; | ||
| 1793 | |||
| 1794 | typedef enum EVRInputStringBits | ||
| 1795 | { | ||
| 1796 | EVRInputStringBits_VRInputString_Hand = 1, | ||
| 1797 | EVRInputStringBits_VRInputString_ControllerType = 2, | ||
| 1798 | EVRInputStringBits_VRInputString_InputSource = 4, | ||
| 1799 | EVRInputStringBits_VRInputString_All = -1, | ||
| 1800 | } EVRInputStringBits; | ||
| 1801 | |||
| 1802 | typedef enum EIOBufferError | ||
| 1803 | { | ||
| 1804 | EIOBufferError_IOBuffer_Success = 0, | ||
| 1805 | EIOBufferError_IOBuffer_OperationFailed = 100, | ||
| 1806 | EIOBufferError_IOBuffer_InvalidHandle = 101, | ||
| 1807 | EIOBufferError_IOBuffer_InvalidArgument = 102, | ||
| 1808 | EIOBufferError_IOBuffer_PathExists = 103, | ||
| 1809 | EIOBufferError_IOBuffer_PathDoesNotExist = 104, | ||
| 1810 | EIOBufferError_IOBuffer_Permission = 105, | ||
| 1811 | } EIOBufferError; | ||
| 1812 | |||
| 1813 | typedef enum EIOBufferMode | ||
| 1814 | { | ||
| 1815 | EIOBufferMode_IOBufferMode_Read = 1, | ||
| 1816 | EIOBufferMode_IOBufferMode_Write = 2, | ||
| 1817 | EIOBufferMode_IOBufferMode_Create = 512, | ||
| 1818 | } EIOBufferMode; | ||
| 1819 | |||
| 1820 | typedef enum EVRDebugError | ||
| 1821 | { | ||
| 1822 | EVRDebugError_VRDebugError_Success = 0, | ||
| 1823 | EVRDebugError_VRDebugError_BadParameter = 1, | ||
| 1824 | } EVRDebugError; | ||
| 1825 | |||
| 1826 | typedef enum EPropertyWriteType | ||
| 1827 | { | ||
| 1828 | EPropertyWriteType_PropertyWrite_Set = 0, | ||
| 1829 | EPropertyWriteType_PropertyWrite_Erase = 1, | ||
| 1830 | EPropertyWriteType_PropertyWrite_SetError = 2, | ||
| 1831 | } EPropertyWriteType; | ||
| 1832 | |||
| 1833 | typedef enum EBlockQueueError | ||
| 1834 | { | ||
| 1835 | EBlockQueueError_BlockQueueError_None = 0, | ||
| 1836 | EBlockQueueError_BlockQueueError_QueueAlreadyExists = 1, | ||
| 1837 | EBlockQueueError_BlockQueueError_QueueNotFound = 2, | ||
| 1838 | EBlockQueueError_BlockQueueError_BlockNotAvailable = 3, | ||
| 1839 | EBlockQueueError_BlockQueueError_InvalidHandle = 4, | ||
| 1840 | EBlockQueueError_BlockQueueError_InvalidParam = 5, | ||
| 1841 | EBlockQueueError_BlockQueueError_ParamMismatch = 6, | ||
| 1842 | EBlockQueueError_BlockQueueError_InternalError = 7, | ||
| 1843 | EBlockQueueError_BlockQueueError_AlreadyInitialized = 8, | ||
| 1844 | EBlockQueueError_BlockQueueError_OperationIsServerOnly = 9, | ||
| 1845 | EBlockQueueError_BlockQueueError_TooManyConnections = 10, | ||
| 1846 | } EBlockQueueError; | ||
| 1847 | |||
| 1848 | typedef enum EBlockQueueReadType | ||
| 1849 | { | ||
| 1850 | EBlockQueueReadType_BlockQueueRead_Latest = 0, | ||
| 1851 | EBlockQueueReadType_BlockQueueRead_New = 1, | ||
| 1852 | EBlockQueueReadType_BlockQueueRead_Next = 2, | ||
| 1853 | } EBlockQueueReadType; | ||
| 1854 | |||
| 1855 | typedef enum EBlockQueueCreationFlag | ||
| 1856 | { | ||
| 1857 | EBlockQueueCreationFlag_BlockQueueFlag_OwnerIsReader = 1, | ||
| 1858 | } EBlockQueueCreationFlag; | ||
| 1859 | |||
| 1860 | |||
| 1861 | // OpenVR typedefs | ||
| 1862 | |||
| 1863 | typedef uint32_t PropertyTypeTag_t; | ||
| 1864 | typedef uint32_t SpatialAnchorHandle_t; | ||
| 1865 | typedef void * glSharedTextureHandle_t; | ||
| 1866 | typedef int32_t glInt_t; | ||
| 1867 | typedef uint32_t glUInt_t; | ||
| 1868 | typedef uint64_t SharedTextureHandle_t; | ||
| 1869 | typedef uint32_t DriverId_t; | ||
| 1870 | typedef uint32_t TrackedDeviceIndex_t; | ||
| 1871 | typedef uint64_t WebConsoleHandle_t; | ||
| 1872 | typedef uint64_t PropertyContainerHandle_t; | ||
| 1873 | typedef PropertyContainerHandle_t DriverHandle_t; | ||
| 1874 | typedef uint64_t VRActionHandle_t; | ||
| 1875 | typedef uint64_t VRActionSetHandle_t; | ||
| 1876 | typedef uint64_t VRInputValueHandle_t; | ||
| 1877 | typedef uint32_t VRComponentProperties; | ||
| 1878 | typedef uint64_t VROverlayHandle_t; | ||
| 1879 | typedef int32_t BoneIndex_t; | ||
| 1880 | typedef uint64_t TrackedCameraHandle_t; | ||
| 1881 | typedef uint32_t ScreenshotHandle_t; | ||
| 1882 | typedef int32_t TextureID_t; | ||
| 1883 | typedef uint32_t VRNotificationId; | ||
| 1884 | typedef uint64_t IOBufferHandle_t; | ||
| 1885 | typedef uint64_t VrProfilerEventHandle_t; | ||
| 1886 | typedef EVRInitError HmdError; | ||
| 1887 | typedef EVREye Hmd_Eye; | ||
| 1888 | typedef EColorSpace ColorSpace; | ||
| 1889 | typedef ETrackingResult HmdTrackingResult; | ||
| 1890 | typedef ETrackedDeviceClass TrackedDeviceClass; | ||
| 1891 | typedef ETrackingUniverseOrigin TrackingUniverseOrigin; | ||
| 1892 | typedef ETrackedDeviceProperty TrackedDeviceProperty; | ||
| 1893 | typedef ETrackedPropertyError TrackedPropertyError; | ||
| 1894 | typedef EVRSubmitFlags VRSubmitFlags_t; | ||
| 1895 | typedef EVRState VRState_t; | ||
| 1896 | typedef ECollisionBoundsStyle CollisionBoundsStyle_t; | ||
| 1897 | typedef EVROverlayError VROverlayError; | ||
| 1898 | typedef EVRFirmwareError VRFirmwareError; | ||
| 1899 | typedef EVRCompositorError VRCompositorError; | ||
| 1900 | typedef EVRScreenshotError VRScreenshotsError; | ||
| 1901 | typedef uint64_t PathHandle_t; | ||
| 1902 | |||
| 1903 | // OpenVR Structs | ||
| 1904 | |||
| 1905 | typedef struct HmdMatrix34_t | ||
| 1906 | { | ||
| 1907 | float m[3][4]; //float[3][4] | ||
| 1908 | } HmdMatrix34_t; | ||
| 1909 | |||
| 1910 | typedef struct HmdMatrix33_t | ||
| 1911 | { | ||
| 1912 | float m[3][3]; //float[3][3] | ||
| 1913 | } HmdMatrix33_t; | ||
| 1914 | |||
| 1915 | typedef struct HmdMatrix44_t | ||
| 1916 | { | ||
| 1917 | float m[4][4]; //float[4][4] | ||
| 1918 | } HmdMatrix44_t; | ||
| 1919 | |||
| 1920 | typedef struct HmdVector3_t | ||
| 1921 | { | ||
| 1922 | float v[3]; //float[3] | ||
| 1923 | } HmdVector3_t; | ||
| 1924 | |||
| 1925 | typedef struct HmdVector4_t | ||
| 1926 | { | ||
| 1927 | float v[4]; //float[4] | ||
| 1928 | } HmdVector4_t; | ||
| 1929 | |||
| 1930 | typedef struct HmdVector3d_t | ||
| 1931 | { | ||
| 1932 | double v[3]; //double[3] | ||
| 1933 | } HmdVector3d_t; | ||
| 1934 | |||
| 1935 | typedef struct HmdVector2_t | ||
| 1936 | { | ||
| 1937 | float v[2]; //float[2] | ||
| 1938 | } HmdVector2_t; | ||
| 1939 | |||
| 1940 | typedef struct HmdQuaternion_t | ||
| 1941 | { | ||
| 1942 | double w; | ||
| 1943 | double x; | ||
| 1944 | double y; | ||
| 1945 | double z; | ||
| 1946 | } HmdQuaternion_t; | ||
| 1947 | |||
| 1948 | typedef struct HmdQuaternionf_t | ||
| 1949 | { | ||
| 1950 | float w; | ||
| 1951 | float x; | ||
| 1952 | float y; | ||
| 1953 | float z; | ||
| 1954 | } HmdQuaternionf_t; | ||
| 1955 | |||
| 1956 | typedef struct HmdColor_t | ||
| 1957 | { | ||
| 1958 | float r; | ||
| 1959 | float g; | ||
| 1960 | float b; | ||
| 1961 | float a; | ||
| 1962 | } HmdColor_t; | ||
| 1963 | |||
| 1964 | typedef struct HmdQuad_t | ||
| 1965 | { | ||
| 1966 | struct HmdVector3_t vCorners[4]; //struct vr::HmdVector3_t[4] | ||
| 1967 | } HmdQuad_t; | ||
| 1968 | |||
| 1969 | typedef struct HmdRect2_t | ||
| 1970 | { | ||
| 1971 | struct HmdVector2_t vTopLeft; | ||
| 1972 | struct HmdVector2_t vBottomRight; | ||
| 1973 | } HmdRect2_t; | ||
| 1974 | |||
| 1975 | typedef struct VRBoneTransform_t | ||
| 1976 | { | ||
| 1977 | struct HmdVector4_t position; | ||
| 1978 | struct HmdQuaternionf_t orientation; | ||
| 1979 | } VRBoneTransform_t; | ||
| 1980 | |||
| 1981 | typedef struct DistortionCoordinates_t | ||
| 1982 | { | ||
| 1983 | float rfRed[2]; //float[2] | ||
| 1984 | float rfGreen[2]; //float[2] | ||
| 1985 | float rfBlue[2]; //float[2] | ||
| 1986 | } DistortionCoordinates_t; | ||
| 1987 | |||
| 1988 | typedef struct Texture_t | ||
| 1989 | { | ||
| 1990 | void * handle; // void * | ||
| 1991 | enum ETextureType eType; | ||
| 1992 | enum EColorSpace eColorSpace; | ||
| 1993 | } Texture_t; | ||
| 1994 | |||
| 1995 | typedef struct TrackedDevicePose_t | ||
| 1996 | { | ||
| 1997 | struct HmdMatrix34_t mDeviceToAbsoluteTracking; | ||
| 1998 | struct HmdVector3_t vVelocity; | ||
| 1999 | struct HmdVector3_t vAngularVelocity; | ||
| 2000 | enum ETrackingResult eTrackingResult; | ||
| 2001 | bool bPoseIsValid; | ||
| 2002 | bool bDeviceIsConnected; | ||
| 2003 | } TrackedDevicePose_t; | ||
| 2004 | |||
| 2005 | typedef struct VRTextureBounds_t | ||
| 2006 | { | ||
| 2007 | float uMin; | ||
| 2008 | float vMin; | ||
| 2009 | float uMax; | ||
| 2010 | float vMax; | ||
| 2011 | } VRTextureBounds_t; | ||
| 2012 | |||
| 2013 | typedef struct VRTextureWithPose_t | ||
| 2014 | { | ||
| 2015 | void * handle; // void * | ||
| 2016 | enum ETextureType eType; | ||
| 2017 | enum EColorSpace eColorSpace; | ||
| 2018 | struct HmdMatrix34_t mDeviceToAbsoluteTracking; | ||
| 2019 | } VRTextureWithPose_t; | ||
| 2020 | |||
| 2021 | typedef struct VRTextureDepthInfo_t | ||
| 2022 | { | ||
| 2023 | void * handle; // void * | ||
| 2024 | struct HmdMatrix44_t mProjection; | ||
| 2025 | struct HmdVector2_t vRange; | ||
| 2026 | } VRTextureDepthInfo_t; | ||
| 2027 | |||
| 2028 | typedef struct VRTextureWithDepth_t | ||
| 2029 | { | ||
| 2030 | void * handle; // void * | ||
| 2031 | enum ETextureType eType; | ||
| 2032 | enum EColorSpace eColorSpace; | ||
| 2033 | struct VRTextureDepthInfo_t depth; | ||
| 2034 | } VRTextureWithDepth_t; | ||
| 2035 | |||
| 2036 | typedef struct VRTextureWithPoseAndDepth_t | ||
| 2037 | { | ||
| 2038 | void * handle; // void * | ||
| 2039 | enum ETextureType eType; | ||
| 2040 | enum EColorSpace eColorSpace; | ||
| 2041 | struct HmdMatrix34_t mDeviceToAbsoluteTracking; | ||
| 2042 | struct VRTextureDepthInfo_t depth; | ||
| 2043 | } VRTextureWithPoseAndDepth_t; | ||
| 2044 | |||
| 2045 | typedef struct VRVulkanTextureData_t | ||
| 2046 | { | ||
| 2047 | uint64_t m_nImage; | ||
| 2048 | struct VkDevice_T * m_pDevice; // struct VkDevice_T * | ||
| 2049 | struct VkPhysicalDevice_T * m_pPhysicalDevice; // struct VkPhysicalDevice_T * | ||
| 2050 | struct VkInstance_T * m_pInstance; // struct VkInstance_T * | ||
| 2051 | struct VkQueue_T * m_pQueue; // struct VkQueue_T * | ||
| 2052 | uint32_t m_nQueueFamilyIndex; | ||
| 2053 | uint32_t m_nWidth; | ||
| 2054 | uint32_t m_nHeight; | ||
| 2055 | uint32_t m_nFormat; | ||
| 2056 | uint32_t m_nSampleCount; | ||
| 2057 | } VRVulkanTextureData_t; | ||
| 2058 | |||
| 2059 | typedef struct VRVulkanTextureArrayData_t | ||
| 2060 | { | ||
| 2061 | uint32_t m_unArrayIndex; | ||
| 2062 | uint32_t m_unArraySize; | ||
| 2063 | } VRVulkanTextureArrayData_t; | ||
| 2064 | |||
| 2065 | typedef struct D3D12TextureData_t | ||
| 2066 | { | ||
| 2067 | struct ID3D12Resource * m_pResource; // struct ID3D12Resource * | ||
| 2068 | struct ID3D12CommandQueue * m_pCommandQueue; // struct ID3D12CommandQueue * | ||
| 2069 | uint32_t m_nNodeMask; | ||
| 2070 | } D3D12TextureData_t; | ||
| 2071 | |||
| 2072 | typedef struct VREvent_Controller_t | ||
| 2073 | { | ||
| 2074 | uint32_t button; | ||
| 2075 | } VREvent_Controller_t; | ||
| 2076 | |||
| 2077 | typedef struct VREvent_Mouse_t | ||
| 2078 | { | ||
| 2079 | float x; | ||
| 2080 | float y; | ||
| 2081 | uint32_t button; | ||
| 2082 | } VREvent_Mouse_t; | ||
| 2083 | |||
| 2084 | typedef struct VREvent_Scroll_t | ||
| 2085 | { | ||
| 2086 | float xdelta; | ||
| 2087 | float ydelta; | ||
| 2088 | uint32_t unused; | ||
| 2089 | float viewportscale; | ||
| 2090 | } VREvent_Scroll_t; | ||
| 2091 | |||
| 2092 | typedef struct VREvent_TouchPadMove_t | ||
| 2093 | { | ||
| 2094 | bool bFingerDown; | ||
| 2095 | float flSecondsFingerDown; | ||
| 2096 | float fValueXFirst; | ||
| 2097 | float fValueYFirst; | ||
| 2098 | float fValueXRaw; | ||
| 2099 | float fValueYRaw; | ||
| 2100 | } VREvent_TouchPadMove_t; | ||
| 2101 | |||
| 2102 | typedef struct VREvent_Notification_t | ||
| 2103 | { | ||
| 2104 | uint64_t ulUserValue; | ||
| 2105 | uint32_t notificationId; | ||
| 2106 | } VREvent_Notification_t; | ||
| 2107 | |||
| 2108 | typedef struct VREvent_Process_t | ||
| 2109 | { | ||
| 2110 | uint32_t pid; | ||
| 2111 | uint32_t oldPid; | ||
| 2112 | bool bForced; | ||
| 2113 | bool bConnectionLost; | ||
| 2114 | } VREvent_Process_t; | ||
| 2115 | |||
| 2116 | typedef struct VREvent_Overlay_t | ||
| 2117 | { | ||
| 2118 | uint64_t overlayHandle; | ||
| 2119 | uint64_t devicePath; | ||
| 2120 | uint64_t memoryBlockId; | ||
| 2121 | } VREvent_Overlay_t; | ||
| 2122 | |||
| 2123 | typedef struct VREvent_Status_t | ||
| 2124 | { | ||
| 2125 | uint32_t statusState; | ||
| 2126 | } VREvent_Status_t; | ||
| 2127 | |||
| 2128 | typedef struct VREvent_Keyboard_t | ||
| 2129 | { | ||
| 2130 | char cNewInput[8]; //char[8] | ||
| 2131 | uint64_t uUserValue; | ||
| 2132 | } VREvent_Keyboard_t; | ||
| 2133 | |||
| 2134 | typedef struct VREvent_Ipd_t | ||
| 2135 | { | ||
| 2136 | float ipdMeters; | ||
| 2137 | } VREvent_Ipd_t; | ||
| 2138 | |||
| 2139 | typedef struct VREvent_Chaperone_t | ||
| 2140 | { | ||
| 2141 | uint64_t m_nPreviousUniverse; | ||
| 2142 | uint64_t m_nCurrentUniverse; | ||
| 2143 | } VREvent_Chaperone_t; | ||
| 2144 | |||
| 2145 | typedef struct VREvent_Reserved_t | ||
| 2146 | { | ||
| 2147 | uint64_t reserved0; | ||
| 2148 | uint64_t reserved1; | ||
| 2149 | uint64_t reserved2; | ||
| 2150 | uint64_t reserved3; | ||
| 2151 | uint64_t reserved4; | ||
| 2152 | uint64_t reserved5; | ||
| 2153 | } VREvent_Reserved_t; | ||
| 2154 | |||
| 2155 | typedef struct VREvent_PerformanceTest_t | ||
| 2156 | { | ||
| 2157 | uint32_t m_nFidelityLevel; | ||
| 2158 | } VREvent_PerformanceTest_t; | ||
| 2159 | |||
| 2160 | typedef struct VREvent_SeatedZeroPoseReset_t | ||
| 2161 | { | ||
| 2162 | bool bResetBySystemMenu; | ||
| 2163 | } VREvent_SeatedZeroPoseReset_t; | ||
| 2164 | |||
| 2165 | typedef struct VREvent_Screenshot_t | ||
| 2166 | { | ||
| 2167 | uint32_t handle; | ||
| 2168 | uint32_t type; | ||
| 2169 | } VREvent_Screenshot_t; | ||
| 2170 | |||
| 2171 | typedef struct VREvent_ScreenshotProgress_t | ||
| 2172 | { | ||
| 2173 | float progress; | ||
| 2174 | } VREvent_ScreenshotProgress_t; | ||
| 2175 | |||
| 2176 | typedef struct VREvent_ApplicationLaunch_t | ||
| 2177 | { | ||
| 2178 | uint32_t pid; | ||
| 2179 | uint32_t unArgsHandle; | ||
| 2180 | } VREvent_ApplicationLaunch_t; | ||
| 2181 | |||
| 2182 | typedef struct VREvent_EditingCameraSurface_t | ||
| 2183 | { | ||
| 2184 | uint64_t overlayHandle; | ||
| 2185 | uint32_t nVisualMode; | ||
| 2186 | } VREvent_EditingCameraSurface_t; | ||
| 2187 | |||
| 2188 | typedef struct VREvent_MessageOverlay_t | ||
| 2189 | { | ||
| 2190 | uint32_t unVRMessageOverlayResponse; | ||
| 2191 | } VREvent_MessageOverlay_t; | ||
| 2192 | |||
| 2193 | typedef struct VREvent_Property_t | ||
| 2194 | { | ||
| 2195 | PropertyContainerHandle_t container; | ||
| 2196 | enum ETrackedDeviceProperty prop; | ||
| 2197 | } VREvent_Property_t; | ||
| 2198 | |||
| 2199 | typedef struct VREvent_HapticVibration_t | ||
| 2200 | { | ||
| 2201 | uint64_t containerHandle; | ||
| 2202 | uint64_t componentHandle; | ||
| 2203 | float fDurationSeconds; | ||
| 2204 | float fFrequency; | ||
| 2205 | float fAmplitude; | ||
| 2206 | } VREvent_HapticVibration_t; | ||
| 2207 | |||
| 2208 | typedef struct VREvent_WebConsole_t | ||
| 2209 | { | ||
| 2210 | WebConsoleHandle_t webConsoleHandle; | ||
| 2211 | } VREvent_WebConsole_t; | ||
| 2212 | |||
| 2213 | typedef struct VREvent_InputBindingLoad_t | ||
| 2214 | { | ||
| 2215 | PropertyContainerHandle_t ulAppContainer; | ||
| 2216 | uint64_t pathMessage; | ||
| 2217 | uint64_t pathUrl; | ||
| 2218 | uint64_t pathControllerType; | ||
| 2219 | } VREvent_InputBindingLoad_t; | ||
| 2220 | |||
| 2221 | typedef struct VREvent_InputActionManifestLoad_t | ||
| 2222 | { | ||
| 2223 | uint64_t pathAppKey; | ||
| 2224 | uint64_t pathMessage; | ||
| 2225 | uint64_t pathMessageParam; | ||
| 2226 | uint64_t pathManifestPath; | ||
| 2227 | } VREvent_InputActionManifestLoad_t; | ||
| 2228 | |||
| 2229 | typedef struct VREvent_SpatialAnchor_t | ||
| 2230 | { | ||
| 2231 | SpatialAnchorHandle_t unHandle; | ||
| 2232 | } VREvent_SpatialAnchor_t; | ||
| 2233 | |||
| 2234 | typedef struct VREvent_ProgressUpdate_t | ||
| 2235 | { | ||
| 2236 | uint64_t ulApplicationPropertyContainer; | ||
| 2237 | uint64_t pathDevice; | ||
| 2238 | uint64_t pathInputSource; | ||
| 2239 | uint64_t pathProgressAction; | ||
| 2240 | uint64_t pathIcon; | ||
| 2241 | float fProgress; | ||
| 2242 | } VREvent_ProgressUpdate_t; | ||
| 2243 | |||
| 2244 | typedef struct VREvent_ShowUI_t | ||
| 2245 | { | ||
| 2246 | enum EShowUIType eType; | ||
| 2247 | } VREvent_ShowUI_t; | ||
| 2248 | |||
| 2249 | typedef struct VREvent_ShowDevTools_t | ||
| 2250 | { | ||
| 2251 | int32_t nBrowserIdentifier; | ||
| 2252 | } VREvent_ShowDevTools_t; | ||
| 2253 | |||
| 2254 | typedef struct VREvent_HDCPError_t | ||
| 2255 | { | ||
| 2256 | enum EHDCPError eCode; | ||
| 2257 | } VREvent_HDCPError_t; | ||
| 2258 | |||
| 2259 | typedef struct RenderModel_ComponentState_t | ||
| 2260 | { | ||
| 2261 | struct HmdMatrix34_t mTrackingToComponentRenderModel; | ||
| 2262 | struct HmdMatrix34_t mTrackingToComponentLocal; | ||
| 2263 | VRComponentProperties uProperties; | ||
| 2264 | } RenderModel_ComponentState_t; | ||
| 2265 | |||
| 2266 | typedef struct HiddenAreaMesh_t | ||
| 2267 | { | ||
| 2268 | struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t * | ||
| 2269 | uint32_t unTriangleCount; | ||
| 2270 | } HiddenAreaMesh_t; | ||
| 2271 | |||
| 2272 | typedef struct VRControllerAxis_t | ||
| 2273 | { | ||
| 2274 | float x; | ||
| 2275 | float y; | ||
| 2276 | } VRControllerAxis_t; | ||
| 2277 | |||
| 2278 | typedef struct VRControllerState_t | ||
| 2279 | { | ||
| 2280 | uint32_t unPacketNum; | ||
| 2281 | uint64_t ulButtonPressed; | ||
| 2282 | uint64_t ulButtonTouched; | ||
| 2283 | struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5] | ||
| 2284 | } VRControllerState_t; | ||
| 2285 | |||
| 2286 | typedef struct CameraVideoStreamFrameHeader_t | ||
| 2287 | { | ||
| 2288 | enum EVRTrackedCameraFrameType eFrameType; | ||
| 2289 | uint32_t nWidth; | ||
| 2290 | uint32_t nHeight; | ||
| 2291 | uint32_t nBytesPerPixel; | ||
| 2292 | uint32_t nFrameSequence; | ||
| 2293 | struct TrackedDevicePose_t trackedDevicePose; | ||
| 2294 | uint64_t ulFrameExposureTime; | ||
| 2295 | } CameraVideoStreamFrameHeader_t; | ||
| 2296 | |||
| 2297 | typedef struct Compositor_FrameTiming | ||
| 2298 | { | ||
| 2299 | uint32_t m_nSize; | ||
| 2300 | uint32_t m_nFrameIndex; | ||
| 2301 | uint32_t m_nNumFramePresents; | ||
| 2302 | uint32_t m_nNumMisPresented; | ||
| 2303 | uint32_t m_nNumDroppedFrames; | ||
| 2304 | uint32_t m_nReprojectionFlags; | ||
| 2305 | double m_flSystemTimeInSeconds; | ||
| 2306 | float m_flPreSubmitGpuMs; | ||
| 2307 | float m_flPostSubmitGpuMs; | ||
| 2308 | float m_flTotalRenderGpuMs; | ||
| 2309 | float m_flCompositorRenderGpuMs; | ||
| 2310 | float m_flCompositorRenderCpuMs; | ||
| 2311 | float m_flCompositorIdleCpuMs; | ||
| 2312 | float m_flClientFrameIntervalMs; | ||
| 2313 | float m_flPresentCallCpuMs; | ||
| 2314 | float m_flWaitForPresentCpuMs; | ||
| 2315 | float m_flSubmitFrameMs; | ||
| 2316 | float m_flWaitGetPosesCalledMs; | ||
| 2317 | float m_flNewPosesReadyMs; | ||
| 2318 | float m_flNewFrameReadyMs; | ||
| 2319 | float m_flCompositorUpdateStartMs; | ||
| 2320 | float m_flCompositorUpdateEndMs; | ||
| 2321 | float m_flCompositorRenderStartMs; | ||
| 2322 | TrackedDevicePose_t m_HmdPose; | ||
| 2323 | uint32_t m_nNumVSyncsReadyForUse; | ||
| 2324 | uint32_t m_nNumVSyncsToFirstView; | ||
| 2325 | } Compositor_FrameTiming; | ||
| 2326 | |||
| 2327 | typedef struct Compositor_BenchmarkResults | ||
| 2328 | { | ||
| 2329 | float m_flMegaPixelsPerSecond; | ||
| 2330 | float m_flHmdRecommendedMegaPixelsPerSecond; | ||
| 2331 | } Compositor_BenchmarkResults; | ||
| 2332 | |||
| 2333 | typedef struct DriverDirectMode_FrameTiming | ||
| 2334 | { | ||
| 2335 | uint32_t m_nSize; | ||
| 2336 | uint32_t m_nNumFramePresents; | ||
| 2337 | uint32_t m_nNumMisPresented; | ||
| 2338 | uint32_t m_nNumDroppedFrames; | ||
| 2339 | uint32_t m_nReprojectionFlags; | ||
| 2340 | } DriverDirectMode_FrameTiming; | ||
| 2341 | |||
| 2342 | typedef struct ImuSample_t | ||
| 2343 | { | ||
| 2344 | double fSampleTime; | ||
| 2345 | struct HmdVector3d_t vAccel; | ||
| 2346 | struct HmdVector3d_t vGyro; | ||
| 2347 | uint32_t unOffScaleFlags; | ||
| 2348 | } ImuSample_t; | ||
| 2349 | |||
| 2350 | typedef struct AppOverrideKeys_t | ||
| 2351 | { | ||
| 2352 | char * pchKey; // const char * | ||
| 2353 | char * pchValue; // const char * | ||
| 2354 | } AppOverrideKeys_t; | ||
| 2355 | |||
| 2356 | typedef struct Compositor_CumulativeStats | ||
| 2357 | { | ||
| 2358 | uint32_t m_nPid; | ||
| 2359 | uint32_t m_nNumFramePresents; | ||
| 2360 | uint32_t m_nNumDroppedFrames; | ||
| 2361 | uint32_t m_nNumReprojectedFrames; | ||
| 2362 | uint32_t m_nNumFramePresentsOnStartup; | ||
| 2363 | uint32_t m_nNumDroppedFramesOnStartup; | ||
| 2364 | uint32_t m_nNumReprojectedFramesOnStartup; | ||
| 2365 | uint32_t m_nNumLoading; | ||
| 2366 | uint32_t m_nNumFramePresentsLoading; | ||
| 2367 | uint32_t m_nNumDroppedFramesLoading; | ||
| 2368 | uint32_t m_nNumReprojectedFramesLoading; | ||
| 2369 | uint32_t m_nNumTimedOut; | ||
| 2370 | uint32_t m_nNumFramePresentsTimedOut; | ||
| 2371 | uint32_t m_nNumDroppedFramesTimedOut; | ||
| 2372 | uint32_t m_nNumReprojectedFramesTimedOut; | ||
| 2373 | uint32_t m_nNumFrameSubmits; | ||
| 2374 | double m_flSumCompositorCPUTimeMS; | ||
| 2375 | double m_flSumCompositorGPUTimeMS; | ||
| 2376 | double m_flSumTargetFrameTimes; | ||
| 2377 | double m_flSumApplicationCPUTimeMS; | ||
| 2378 | double m_flSumApplicationGPUTimeMS; | ||
| 2379 | } Compositor_CumulativeStats; | ||
| 2380 | |||
| 2381 | typedef struct Compositor_StageRenderSettings | ||
| 2382 | { | ||
| 2383 | struct HmdColor_t m_PrimaryColor; | ||
| 2384 | struct HmdColor_t m_SecondaryColor; | ||
| 2385 | float m_flVignetteInnerRadius; | ||
| 2386 | float m_flVignetteOuterRadius; | ||
| 2387 | float m_flFresnelStrength; | ||
| 2388 | bool m_bBackfaceCulling; | ||
| 2389 | bool m_bGreyscale; | ||
| 2390 | bool m_bWireframe; | ||
| 2391 | } Compositor_StageRenderSettings; | ||
| 2392 | |||
| 2393 | typedef struct VROverlayIntersectionParams_t | ||
| 2394 | { | ||
| 2395 | struct HmdVector3_t vSource; | ||
| 2396 | struct HmdVector3_t vDirection; | ||
| 2397 | enum ETrackingUniverseOrigin eOrigin; | ||
| 2398 | } VROverlayIntersectionParams_t; | ||
| 2399 | |||
| 2400 | typedef struct VROverlayIntersectionResults_t | ||
| 2401 | { | ||
| 2402 | struct HmdVector3_t vPoint; | ||
| 2403 | struct HmdVector3_t vNormal; | ||
| 2404 | struct HmdVector2_t vUVs; | ||
| 2405 | float fDistance; | ||
| 2406 | } VROverlayIntersectionResults_t; | ||
| 2407 | |||
| 2408 | typedef struct IntersectionMaskRectangle_t | ||
| 2409 | { | ||
| 2410 | float m_flTopLeftX; | ||
| 2411 | float m_flTopLeftY; | ||
| 2412 | float m_flWidth; | ||
| 2413 | float m_flHeight; | ||
| 2414 | } IntersectionMaskRectangle_t; | ||
| 2415 | |||
| 2416 | typedef struct IntersectionMaskCircle_t | ||
| 2417 | { | ||
| 2418 | float m_flCenterX; | ||
| 2419 | float m_flCenterY; | ||
| 2420 | float m_flRadius; | ||
| 2421 | } IntersectionMaskCircle_t; | ||
| 2422 | |||
| 2423 | typedef struct VROverlayProjection_t | ||
| 2424 | { | ||
| 2425 | float fLeft; | ||
| 2426 | float fRight; | ||
| 2427 | float fTop; | ||
| 2428 | float fBottom; | ||
| 2429 | } VROverlayProjection_t; | ||
| 2430 | |||
| 2431 | typedef struct VROverlayView_t | ||
| 2432 | { | ||
| 2433 | VROverlayHandle_t overlayHandle; | ||
| 2434 | struct Texture_t texture; | ||
| 2435 | struct VRTextureBounds_t textureBounds; | ||
| 2436 | } VROverlayView_t; | ||
| 2437 | |||
| 2438 | typedef struct VRVulkanDevice_t | ||
| 2439 | { | ||
| 2440 | struct VkInstance_T * m_pInstance; // struct VkInstance_T * | ||
| 2441 | struct VkDevice_T * m_pDevice; // struct VkDevice_T * | ||
| 2442 | struct VkPhysicalDevice_T * m_pPhysicalDevice; // struct VkPhysicalDevice_T * | ||
| 2443 | struct VkQueue_T * m_pQueue; // struct VkQueue_T * | ||
| 2444 | uint32_t m_uQueueFamilyIndex; | ||
| 2445 | } VRVulkanDevice_t; | ||
| 2446 | |||
| 2447 | typedef struct VRNativeDevice_t | ||
| 2448 | { | ||
| 2449 | void * handle; // void * | ||
| 2450 | enum EDeviceType eType; | ||
| 2451 | } VRNativeDevice_t; | ||
| 2452 | |||
| 2453 | typedef struct RenderModel_Vertex_t | ||
| 2454 | { | ||
| 2455 | struct HmdVector3_t vPosition; | ||
| 2456 | struct HmdVector3_t vNormal; | ||
| 2457 | float rfTextureCoord[2]; //float[2] | ||
| 2458 | } RenderModel_Vertex_t; | ||
| 2459 | |||
| 2460 | #if defined(__linux__) || defined(__APPLE__) | ||
| 2461 | #pragma pack( push, 4 ) | ||
| 2462 | #endif | ||
| 2463 | typedef struct RenderModel_TextureMap_t | ||
| 2464 | { | ||
| 2465 | uint16_t unWidth; | ||
| 2466 | uint16_t unHeight; | ||
| 2467 | uint8_t * rubTextureMapData; // const uint8_t * | ||
| 2468 | enum EVRRenderModelTextureFormat format; | ||
| 2469 | uint16_t unMipLevels; | ||
| 2470 | } RenderModel_TextureMap_t; | ||
| 2471 | |||
| 2472 | #if defined(__linux__) || defined(__APPLE__) | ||
| 2473 | #pragma pack( pop ) | ||
| 2474 | #endif | ||
| 2475 | #if defined(__linux__) || defined(__APPLE__) | ||
| 2476 | #pragma pack( push, 4 ) | ||
| 2477 | #endif | ||
| 2478 | typedef struct RenderModel_t | ||
| 2479 | { | ||
| 2480 | struct RenderModel_Vertex_t * rVertexData; // const struct vr::RenderModel_Vertex_t * | ||
| 2481 | uint32_t unVertexCount; | ||
| 2482 | uint16_t * rIndexData; // const uint16_t * | ||
| 2483 | uint32_t unTriangleCount; | ||
| 2484 | TextureID_t diffuseTextureId; | ||
| 2485 | } RenderModel_t; | ||
| 2486 | |||
| 2487 | #if defined(__linux__) || defined(__APPLE__) | ||
| 2488 | #pragma pack( pop ) | ||
| 2489 | #endif | ||
| 2490 | typedef struct RenderModel_ControllerMode_State_t | ||
| 2491 | { | ||
| 2492 | bool bScrollWheelVisible; | ||
| 2493 | } RenderModel_ControllerMode_State_t; | ||
| 2494 | |||
| 2495 | typedef struct NotificationBitmap_t | ||
| 2496 | { | ||
| 2497 | void * m_pImageData; // void * | ||
| 2498 | int32_t m_nWidth; | ||
| 2499 | int32_t m_nHeight; | ||
| 2500 | int32_t m_nBytesPerPixel; | ||
| 2501 | } NotificationBitmap_t; | ||
| 2502 | |||
| 2503 | typedef struct CVRSettingHelper | ||
| 2504 | { | ||
| 2505 | intptr_t m_pSettings; // class vr::IVRSettings * | ||
| 2506 | } CVRSettingHelper; | ||
| 2507 | |||
| 2508 | typedef struct InputAnalogActionData_t | ||
| 2509 | { | ||
| 2510 | bool bActive; | ||
| 2511 | VRInputValueHandle_t activeOrigin; | ||
| 2512 | float x; | ||
| 2513 | float y; | ||
| 2514 | float z; | ||
| 2515 | float deltaX; | ||
| 2516 | float deltaY; | ||
| 2517 | float deltaZ; | ||
| 2518 | float fUpdateTime; | ||
| 2519 | } InputAnalogActionData_t; | ||
| 2520 | |||
| 2521 | typedef struct InputDigitalActionData_t | ||
| 2522 | { | ||
| 2523 | bool bActive; | ||
| 2524 | VRInputValueHandle_t activeOrigin; | ||
| 2525 | bool bState; | ||
| 2526 | bool bChanged; | ||
| 2527 | float fUpdateTime; | ||
| 2528 | } InputDigitalActionData_t; | ||
| 2529 | |||
| 2530 | typedef struct InputPoseActionData_t | ||
| 2531 | { | ||
| 2532 | bool bActive; | ||
| 2533 | VRInputValueHandle_t activeOrigin; | ||
| 2534 | struct TrackedDevicePose_t pose; | ||
| 2535 | } InputPoseActionData_t; | ||
| 2536 | |||
| 2537 | typedef struct InputSkeletalActionData_t | ||
| 2538 | { | ||
| 2539 | bool bActive; | ||
| 2540 | VRInputValueHandle_t activeOrigin; | ||
| 2541 | } InputSkeletalActionData_t; | ||
| 2542 | |||
| 2543 | typedef struct InputOriginInfo_t | ||
| 2544 | { | ||
| 2545 | VRInputValueHandle_t devicePath; | ||
| 2546 | TrackedDeviceIndex_t trackedDeviceIndex; | ||
| 2547 | char rchRenderModelComponentName[128]; //char[128] | ||
| 2548 | } InputOriginInfo_t; | ||
| 2549 | |||
| 2550 | typedef struct InputBindingInfo_t | ||
| 2551 | { | ||
| 2552 | char rchDevicePathName[128]; //char[128] | ||
| 2553 | char rchInputPathName[128]; //char[128] | ||
| 2554 | char rchModeName[128]; //char[128] | ||
| 2555 | char rchSlotName[128]; //char[128] | ||
| 2556 | char rchInputSourceType[32]; //char[32] | ||
| 2557 | } InputBindingInfo_t; | ||
| 2558 | |||
| 2559 | typedef struct VRActiveActionSet_t | ||
| 2560 | { | ||
| 2561 | VRActionSetHandle_t ulActionSet; | ||
| 2562 | VRInputValueHandle_t ulRestrictedToDevice; | ||
| 2563 | VRActionSetHandle_t ulSecondaryActionSet; | ||
| 2564 | uint32_t unPadding; | ||
| 2565 | int32_t nPriority; | ||
| 2566 | } VRActiveActionSet_t; | ||
| 2567 | |||
| 2568 | typedef struct VRSkeletalSummaryData_t | ||
| 2569 | { | ||
| 2570 | float flFingerCurl[5]; //float[5] | ||
| 2571 | float flFingerSplay[4]; //float[4] | ||
| 2572 | } VRSkeletalSummaryData_t; | ||
| 2573 | |||
| 2574 | typedef struct SpatialAnchorPose_t | ||
| 2575 | { | ||
| 2576 | struct HmdMatrix34_t mAnchorToAbsoluteTracking; | ||
| 2577 | } SpatialAnchorPose_t; | ||
| 2578 | |||
| 2579 | typedef struct COpenVRContext | ||
| 2580 | { | ||
| 2581 | intptr_t m_pVRSystem; // class vr::IVRSystem * | ||
| 2582 | intptr_t m_pVRChaperone; // class vr::IVRChaperone * | ||
| 2583 | intptr_t m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup * | ||
| 2584 | intptr_t m_pVRCompositor; // class vr::IVRCompositor * | ||
| 2585 | intptr_t m_pVRHeadsetView; // class vr::IVRHeadsetView * | ||
| 2586 | intptr_t m_pVROverlay; // class vr::IVROverlay * | ||
| 2587 | intptr_t m_pVROverlayView; // class vr::IVROverlayView * | ||
| 2588 | intptr_t m_pVRResources; // class vr::IVRResources * | ||
| 2589 | intptr_t m_pVRRenderModels; // class vr::IVRRenderModels * | ||
| 2590 | intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay * | ||
| 2591 | intptr_t m_pVRSettings; // class vr::IVRSettings * | ||
| 2592 | intptr_t m_pVRApplications; // class vr::IVRApplications * | ||
| 2593 | intptr_t m_pVRTrackedCamera; // class vr::IVRTrackedCamera * | ||
| 2594 | intptr_t m_pVRScreenshots; // class vr::IVRScreenshots * | ||
| 2595 | intptr_t m_pVRDriverManager; // class vr::IVRDriverManager * | ||
| 2596 | intptr_t m_pVRInput; // class vr::IVRInput * | ||
| 2597 | intptr_t m_pVRIOBuffer; // class vr::IVRIOBuffer * | ||
| 2598 | intptr_t m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors * | ||
| 2599 | intptr_t m_pVRDebug; // class vr::IVRDebug * | ||
| 2600 | intptr_t m_pVRNotifications; // class vr::IVRNotifications * | ||
| 2601 | } COpenVRContext; | ||
| 2602 | |||
| 2603 | typedef struct PropertyWrite_t | ||
| 2604 | { | ||
| 2605 | enum ETrackedDeviceProperty prop; | ||
| 2606 | enum EPropertyWriteType writeType; | ||
| 2607 | enum ETrackedPropertyError eSetError; | ||
| 2608 | void * pvBuffer; // void * | ||
| 2609 | uint32_t unBufferSize; | ||
| 2610 | PropertyTypeTag_t unTag; | ||
| 2611 | enum ETrackedPropertyError eError; | ||
| 2612 | } PropertyWrite_t; | ||
| 2613 | |||
| 2614 | typedef struct PropertyRead_t | ||
| 2615 | { | ||
| 2616 | enum ETrackedDeviceProperty prop; | ||
| 2617 | void * pvBuffer; // void * | ||
| 2618 | uint32_t unBufferSize; | ||
| 2619 | PropertyTypeTag_t unTag; | ||
| 2620 | uint32_t unRequiredBufferSize; | ||
| 2621 | enum ETrackedPropertyError eError; | ||
| 2622 | } PropertyRead_t; | ||
| 2623 | |||
| 2624 | typedef struct CVRPropertyHelpers | ||
| 2625 | { | ||
| 2626 | intptr_t m_pProperties; // class vr::IVRProperties * | ||
| 2627 | } CVRPropertyHelpers; | ||
| 2628 | |||
| 2629 | typedef struct PathWrite_t | ||
| 2630 | { | ||
| 2631 | PathHandle_t ulPath; | ||
| 2632 | enum EPropertyWriteType writeType; | ||
| 2633 | enum ETrackedPropertyError eSetError; | ||
| 2634 | void * pvBuffer; // void * | ||
| 2635 | uint32_t unBufferSize; | ||
| 2636 | PropertyTypeTag_t unTag; | ||
| 2637 | enum ETrackedPropertyError eError; | ||
| 2638 | char * pszPath; // const char * | ||
| 2639 | } PathWrite_t; | ||
| 2640 | |||
| 2641 | typedef struct PathRead_t | ||
| 2642 | { | ||
| 2643 | PathHandle_t ulPath; | ||
| 2644 | void * pvBuffer; // void * | ||
| 2645 | uint32_t unBufferSize; | ||
| 2646 | PropertyTypeTag_t unTag; | ||
| 2647 | uint32_t unRequiredBufferSize; | ||
| 2648 | enum ETrackedPropertyError eError; | ||
| 2649 | char * pszPath; // const char * | ||
| 2650 | } PathRead_t; | ||
| 2651 | |||
| 2652 | |||
| 2653 | typedef union | ||
| 2654 | { | ||
| 2655 | VREvent_Reserved_t reserved; | ||
| 2656 | VREvent_Controller_t controller; | ||
| 2657 | VREvent_Mouse_t mouse; | ||
| 2658 | VREvent_Scroll_t scroll; | ||
| 2659 | VREvent_Process_t process; | ||
| 2660 | VREvent_Notification_t notification; | ||
| 2661 | VREvent_Overlay_t overlay; | ||
| 2662 | VREvent_Status_t status; | ||
| 2663 | VREvent_Keyboard_t keyboard; | ||
| 2664 | VREvent_Ipd_t ipd; | ||
| 2665 | VREvent_Chaperone_t chaperone; | ||
| 2666 | VREvent_PerformanceTest_t performanceTest; | ||
| 2667 | VREvent_TouchPadMove_t touchPadMove; | ||
| 2668 | VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; | ||
| 2669 | VREvent_Screenshot_t screenshot; | ||
| 2670 | VREvent_ScreenshotProgress_t screenshotProgress; | ||
| 2671 | VREvent_ApplicationLaunch_t applicationLaunch; | ||
| 2672 | VREvent_EditingCameraSurface_t cameraSurface; | ||
| 2673 | VREvent_MessageOverlay_t messageOverlay; | ||
| 2674 | VREvent_Property_t property; | ||
| 2675 | VREvent_HapticVibration_t hapticVibration; | ||
| 2676 | VREvent_WebConsole_t webConsole; | ||
| 2677 | VREvent_InputBindingLoad_t inputBinding; | ||
| 2678 | VREvent_InputActionManifestLoad_t actionManifest; | ||
| 2679 | VREvent_SpatialAnchor_t spatialAnchor; | ||
| 2680 | } VREvent_Data_t; | ||
| 2681 | |||
| 2682 | #if defined(__linux__) || defined(__APPLE__) | ||
| 2683 | // This structure was originally defined mis-packed on Linux, preserved for | ||
| 2684 | // compatibility. | ||
| 2685 | #pragma pack( push, 4 ) | ||
| 2686 | #endif | ||
| 2687 | |||
| 2688 | /** An event posted by the server to all running applications */ | ||
| 2689 | struct VREvent_t | ||
| 2690 | { | ||
| 2691 | uint32_t eventType; // EVREventType enum | ||
| 2692 | TrackedDeviceIndex_t trackedDeviceIndex; | ||
| 2693 | float eventAgeSeconds; | ||
| 2694 | // event data must be the end of the struct as its size is variable | ||
| 2695 | VREvent_Data_t data; | ||
| 2696 | }; | ||
| 2697 | |||
| 2698 | #if defined(__linux__) || defined(__APPLE__) | ||
| 2699 | #pragma pack( pop ) | ||
| 2700 | #endif | ||
| 2701 | |||
| 2702 | |||
| 2703 | typedef union | ||
| 2704 | { | ||
| 2705 | IntersectionMaskRectangle_t m_Rectangle; | ||
| 2706 | IntersectionMaskCircle_t m_Circle; | ||
| 2707 | } VROverlayIntersectionMaskPrimitive_Data_t; | ||
| 2708 | |||
| 2709 | struct VROverlayIntersectionMaskPrimitive_t | ||
| 2710 | { | ||
| 2711 | EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; | ||
| 2712 | VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; | ||
| 2713 | }; | ||
| 2714 | |||
| 2715 | |||
| 2716 | // OpenVR Function Pointer Tables | ||
| 2717 | |||
| 2718 | struct VR_IVRSystem_FnTable | ||
| 2719 | { | ||
| 2720 | void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight); | ||
| 2721 | struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ); | ||
| 2722 | void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom); | ||
| 2723 | bool (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV, struct DistortionCoordinates_t * pDistortionCoordinates); | ||
| 2724 | struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye); | ||
| 2725 | bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter); | ||
| 2726 | int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)(); | ||
| 2727 | void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex); | ||
| 2728 | void (OPENVR_FNTABLE_CALLTYPE *GetOutputDevice)(uint64_t * pnDevice, ETextureType textureType, struct VkInstance_T * pInstance); | ||
| 2729 | bool (OPENVR_FNTABLE_CALLTYPE *IsDisplayOnDesktop)(); | ||
| 2730 | bool (OPENVR_FNTABLE_CALLTYPE *SetDisplayVisibility)(bool bIsVisibleOnDesktop); | ||
| 2731 | void (OPENVR_FNTABLE_CALLTYPE *GetDeviceToAbsoluteTrackingPose)(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, struct TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount); | ||
| 2732 | struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetSeatedZeroPoseToStandingAbsoluteTrackingPose)(); | ||
| 2733 | struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetRawZeroPoseToStandingAbsoluteTrackingPose)(); | ||
| 2734 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetSortedTrackedDeviceIndicesOfClass)(ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex); | ||
| 2735 | EDeviceActivityLevel (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceActivityLevel)(TrackedDeviceIndex_t unDeviceId); | ||
| 2736 | void (OPENVR_FNTABLE_CALLTYPE *ApplyTransform)(struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pTrackedDevicePose, struct HmdMatrix34_t * pTransform); | ||
| 2737 | TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceIndexForControllerRole)(ETrackedControllerRole unDeviceType); | ||
| 2738 | ETrackedControllerRole (OPENVR_FNTABLE_CALLTYPE *GetControllerRoleForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex); | ||
| 2739 | ETrackedDeviceClass (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceClass)(TrackedDeviceIndex_t unDeviceIndex); | ||
| 2740 | bool (OPENVR_FNTABLE_CALLTYPE *IsTrackedDeviceConnected)(TrackedDeviceIndex_t unDeviceIndex); | ||
| 2741 | bool (OPENVR_FNTABLE_CALLTYPE *GetBoolTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError); | ||
| 2742 | float (OPENVR_FNTABLE_CALLTYPE *GetFloatTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError); | ||
| 2743 | int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError); | ||
| 2744 | uint64_t (OPENVR_FNTABLE_CALLTYPE *GetUint64TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError); | ||
| 2745 | struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetMatrix34TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError); | ||
| 2746 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetArrayTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, PropertyTypeTag_t propType, void * pBuffer, uint32_t unBufferSize, ETrackedPropertyError * pError); | ||
| 2747 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetStringTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError); | ||
| 2748 | char * (OPENVR_FNTABLE_CALLTYPE *GetPropErrorNameFromEnum)(ETrackedPropertyError error); | ||
| 2749 | bool (OPENVR_FNTABLE_CALLTYPE *PollNextEvent)(struct VREvent_t * pEvent, uint32_t uncbVREvent); | ||
| 2750 | bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPose)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose); | ||
| 2751 | char * (OPENVR_FNTABLE_CALLTYPE *GetEventTypeNameFromEnum)(EVREventType eType); | ||
| 2752 | struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye, EHiddenAreaMeshType type); | ||
| 2753 | bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize); | ||
| 2754 | bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize, struct TrackedDevicePose_t * pTrackedDevicePose); | ||
| 2755 | void (OPENVR_FNTABLE_CALLTYPE *TriggerHapticPulse)(TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec); | ||
| 2756 | char * (OPENVR_FNTABLE_CALLTYPE *GetButtonIdNameFromEnum)(EVRButtonId eButtonId); | ||
| 2757 | char * (OPENVR_FNTABLE_CALLTYPE *GetControllerAxisTypeNameFromEnum)(EVRControllerAxisType eAxisType); | ||
| 2758 | bool (OPENVR_FNTABLE_CALLTYPE *IsInputAvailable)(); | ||
| 2759 | bool (OPENVR_FNTABLE_CALLTYPE *IsSteamVRDrawingControllers)(); | ||
| 2760 | bool (OPENVR_FNTABLE_CALLTYPE *ShouldApplicationPause)(); | ||
| 2761 | bool (OPENVR_FNTABLE_CALLTYPE *ShouldApplicationReduceRenderingWork)(); | ||
| 2762 | EVRFirmwareError (OPENVR_FNTABLE_CALLTYPE *PerformFirmwareUpdate)(TrackedDeviceIndex_t unDeviceIndex); | ||
| 2763 | void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)(); | ||
| 2764 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetAppContainerFilePaths)(char * pchBuffer, uint32_t unBufferSize); | ||
| 2765 | char * (OPENVR_FNTABLE_CALLTYPE *GetRuntimeVersion)(); | ||
| 2766 | }; | ||
| 2767 | |||
| 2768 | struct VR_IVRExtendedDisplay_FnTable | ||
| 2769 | { | ||
| 2770 | void (OPENVR_FNTABLE_CALLTYPE *GetWindowBounds)(int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight); | ||
| 2771 | void (OPENVR_FNTABLE_CALLTYPE *GetEyeOutputViewport)(EVREye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight); | ||
| 2772 | void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex); | ||
| 2773 | }; | ||
| 2774 | |||
| 2775 | struct VR_IVRTrackedCamera_FnTable | ||
| 2776 | { | ||
| 2777 | char * (OPENVR_FNTABLE_CALLTYPE *GetCameraErrorNameFromEnum)(EVRTrackedCameraError eCameraError); | ||
| 2778 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *HasCamera)(TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera); | ||
| 2779 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraFrameSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize); | ||
| 2780 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinsics)(TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter); | ||
| 2781 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraProjection)(TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection); | ||
| 2782 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *AcquireVideoStreamingService)(TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle); | ||
| 2783 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamingService)(TrackedCameraHandle_t hTrackedCamera); | ||
| 2784 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamFrameBuffer)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize); | ||
| 2785 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, VRTextureBounds_t * pTextureBounds, uint32_t * pnWidth, uint32_t * pnHeight); | ||
| 2786 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureD3D11)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize); | ||
| 2787 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize); | ||
| 2788 | EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, glUInt_t glTextureId); | ||
| 2789 | void (OPENVR_FNTABLE_CALLTYPE *SetCameraTrackingSpace)(ETrackingUniverseOrigin eUniverse); | ||
| 2790 | ETrackingUniverseOrigin (OPENVR_FNTABLE_CALLTYPE *GetCameraTrackingSpace)(); | ||
| 2791 | }; | ||
| 2792 | |||
| 2793 | struct VR_IVRApplications_FnTable | ||
| 2794 | { | ||
| 2795 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *AddApplicationManifest)(char * pchApplicationManifestFullPath, bool bTemporary); | ||
| 2796 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *RemoveApplicationManifest)(char * pchApplicationManifestFullPath); | ||
| 2797 | bool (OPENVR_FNTABLE_CALLTYPE *IsApplicationInstalled)(char * pchAppKey); | ||
| 2798 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationCount)(); | ||
| 2799 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByIndex)(uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen); | ||
| 2800 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByProcessId)(uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen); | ||
| 2801 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplication)(char * pchAppKey); | ||
| 2802 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchTemplateApplication)(char * pchTemplateAppKey, char * pchNewAppKey, struct AppOverrideKeys_t * pKeys, uint32_t unKeys); | ||
| 2803 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplicationFromMimeType)(char * pchMimeType, char * pchArgs); | ||
| 2804 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchDashboardOverlay)(char * pchAppKey); | ||
| 2805 | bool (OPENVR_FNTABLE_CALLTYPE *CancelApplicationLaunch)(char * pchAppKey); | ||
| 2806 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *IdentifyApplication)(uint32_t unProcessId, char * pchAppKey); | ||
| 2807 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationProcessId)(char * pchAppKey); | ||
| 2808 | char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsErrorNameFromEnum)(EVRApplicationError error); | ||
| 2809 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyString)(char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError); | ||
| 2810 | bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyBool)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError); | ||
| 2811 | uint64_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyUint64)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError); | ||
| 2812 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetApplicationAutoLaunch)(char * pchAppKey, bool bAutoLaunch); | ||
| 2813 | bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationAutoLaunch)(char * pchAppKey); | ||
| 2814 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetDefaultApplicationForMimeType)(char * pchAppKey, char * pchMimeType); | ||
| 2815 | bool (OPENVR_FNTABLE_CALLTYPE *GetDefaultApplicationForMimeType)(char * pchMimeType, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen); | ||
| 2816 | bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationSupportedMimeTypes)(char * pchAppKey, char * pchMimeTypesBuffer, uint32_t unMimeTypesBuffer); | ||
| 2817 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationsThatSupportMimeType)(char * pchMimeType, char * pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer); | ||
| 2818 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationLaunchArguments)(uint32_t unHandle, char * pchArgs, uint32_t unArgs); | ||
| 2819 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetStartingApplication)(char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen); | ||
| 2820 | EVRSceneApplicationState (OPENVR_FNTABLE_CALLTYPE *GetSceneApplicationState)(); | ||
| 2821 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey); | ||
| 2822 | char * (OPENVR_FNTABLE_CALLTYPE *GetSceneApplicationStateNameFromEnum)(EVRSceneApplicationState state); | ||
| 2823 | EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchInternalProcess)(char * pchBinaryPath, char * pchArguments, char * pchWorkingDirectory); | ||
| 2824 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneProcessId)(); | ||
| 2825 | }; | ||
| 2826 | |||
| 2827 | struct VR_IVRChaperone_FnTable | ||
| 2828 | { | ||
| 2829 | ChaperoneCalibrationState (OPENVR_FNTABLE_CALLTYPE *GetCalibrationState)(); | ||
| 2830 | bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaSize)(float * pSizeX, float * pSizeZ); | ||
| 2831 | bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaRect)(struct HmdQuad_t * rect); | ||
| 2832 | void (OPENVR_FNTABLE_CALLTYPE *ReloadInfo)(); | ||
| 2833 | void (OPENVR_FNTABLE_CALLTYPE *SetSceneColor)(struct HmdColor_t color); | ||
| 2834 | void (OPENVR_FNTABLE_CALLTYPE *GetBoundsColor)(struct HmdColor_t * pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, struct HmdColor_t * pOutputCameraColor); | ||
| 2835 | bool (OPENVR_FNTABLE_CALLTYPE *AreBoundsVisible)(); | ||
| 2836 | void (OPENVR_FNTABLE_CALLTYPE *ForceBoundsVisible)(bool bForce); | ||
| 2837 | void (OPENVR_FNTABLE_CALLTYPE *ResetZeroPose)(ETrackingUniverseOrigin eTrackingUniverseOrigin); | ||
| 2838 | }; | ||
| 2839 | |||
| 2840 | struct VR_IVRChaperoneSetup_FnTable | ||
| 2841 | { | ||
| 2842 | bool (OPENVR_FNTABLE_CALLTYPE *CommitWorkingCopy)(EChaperoneConfigFile configFile); | ||
| 2843 | void (OPENVR_FNTABLE_CALLTYPE *RevertWorkingCopy)(); | ||
| 2844 | bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaSize)(float * pSizeX, float * pSizeZ); | ||
| 2845 | bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaRect)(struct HmdQuad_t * rect); | ||
| 2846 | bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount); | ||
| 2847 | bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount); | ||
| 2848 | bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose); | ||
| 2849 | bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose); | ||
| 2850 | void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPlayAreaSize)(float sizeX, float sizeZ); | ||
| 2851 | void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount); | ||
| 2852 | void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPerimeter)(struct HmdVector2_t * pPointBuffer, uint32_t unPointCount); | ||
| 2853 | void (OPENVR_FNTABLE_CALLTYPE *SetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose); | ||
| 2854 | void (OPENVR_FNTABLE_CALLTYPE *SetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose); | ||
| 2855 | void (OPENVR_FNTABLE_CALLTYPE *ReloadFromDisk)(EChaperoneConfigFile configFile); | ||
| 2856 | bool (OPENVR_FNTABLE_CALLTYPE *GetLiveSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose); | ||
| 2857 | bool (OPENVR_FNTABLE_CALLTYPE *ExportLiveToBuffer)(char * pBuffer, uint32_t * pnBufferLength); | ||
| 2858 | bool (OPENVR_FNTABLE_CALLTYPE *ImportFromBufferToWorking)(char * pBuffer, uint32_t nImportFlags); | ||
| 2859 | void (OPENVR_FNTABLE_CALLTYPE *ShowWorkingSetPreview)(); | ||
| 2860 | void (OPENVR_FNTABLE_CALLTYPE *HideWorkingSetPreview)(); | ||
| 2861 | void (OPENVR_FNTABLE_CALLTYPE *RoomSetupStarting)(); | ||
| 2862 | }; | ||
| 2863 | |||
| 2864 | struct VR_IVRCompositor_FnTable | ||
| 2865 | { | ||
| 2866 | void (OPENVR_FNTABLE_CALLTYPE *SetTrackingSpace)(ETrackingUniverseOrigin eOrigin); | ||
| 2867 | ETrackingUniverseOrigin (OPENVR_FNTABLE_CALLTYPE *GetTrackingSpace)(); | ||
| 2868 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *WaitGetPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); | ||
| 2869 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); | ||
| 2870 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pOutputGamePose); | ||
| 2871 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *Submit)(EVREye eEye, struct Texture_t * pTexture, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); | ||
| 2872 | void (OPENVR_FNTABLE_CALLTYPE *ClearLastSubmittedFrame)(); | ||
| 2873 | void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)(); | ||
| 2874 | bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); | ||
| 2875 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetFrameTimings)(struct Compositor_FrameTiming * pTiming, uint32_t nFrames); | ||
| 2876 | float (OPENVR_FNTABLE_CALLTYPE *GetFrameTimeRemaining)(); | ||
| 2877 | void (OPENVR_FNTABLE_CALLTYPE *GetCumulativeStats)(struct Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes); | ||
| 2878 | void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); | ||
| 2879 | struct HmdColor_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentFadeColor)(bool bBackground); | ||
| 2880 | void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeGridIn); | ||
| 2881 | float (OPENVR_FNTABLE_CALLTYPE *GetCurrentGridAlpha)(); | ||
| 2882 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount); | ||
| 2883 | void (OPENVR_FNTABLE_CALLTYPE *ClearSkyboxOverride)(); | ||
| 2884 | void (OPENVR_FNTABLE_CALLTYPE *CompositorBringToFront)(); | ||
| 2885 | void (OPENVR_FNTABLE_CALLTYPE *CompositorGoToBack)(); | ||
| 2886 | void (OPENVR_FNTABLE_CALLTYPE *CompositorQuit)(); | ||
| 2887 | bool (OPENVR_FNTABLE_CALLTYPE *IsFullscreen)(); | ||
| 2888 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneFocusProcess)(); | ||
| 2889 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetLastFrameRenderer)(); | ||
| 2890 | bool (OPENVR_FNTABLE_CALLTYPE *CanRenderScene)(); | ||
| 2891 | void (OPENVR_FNTABLE_CALLTYPE *ShowMirrorWindow)(); | ||
| 2892 | void (OPENVR_FNTABLE_CALLTYPE *HideMirrorWindow)(); | ||
| 2893 | bool (OPENVR_FNTABLE_CALLTYPE *IsMirrorWindowVisible)(); | ||
| 2894 | void (OPENVR_FNTABLE_CALLTYPE *CompositorDumpImages)(); | ||
| 2895 | bool (OPENVR_FNTABLE_CALLTYPE *ShouldAppRenderWithLowResources)(); | ||
| 2896 | void (OPENVR_FNTABLE_CALLTYPE *ForceInterleavedReprojectionOn)(bool bOverride); | ||
| 2897 | void (OPENVR_FNTABLE_CALLTYPE *ForceReconnectProcess)(); | ||
| 2898 | void (OPENVR_FNTABLE_CALLTYPE *SuspendRendering)(bool bSuspend); | ||
| 2899 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView); | ||
| 2900 | void (OPENVR_FNTABLE_CALLTYPE *ReleaseMirrorTextureD3D11)(void * pD3D11ShaderResourceView); | ||
| 2901 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle); | ||
| 2902 | bool (OPENVR_FNTABLE_CALLTYPE *ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle); | ||
| 2903 | void (OPENVR_FNTABLE_CALLTYPE *LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle); | ||
| 2904 | void (OPENVR_FNTABLE_CALLTYPE *UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle); | ||
| 2905 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize); | ||
| 2906 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanDeviceExtensionsRequired)(struct VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); | ||
| 2907 | void (OPENVR_FNTABLE_CALLTYPE *SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode); | ||
| 2908 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SubmitExplicitTimingData)(); | ||
| 2909 | bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingEnabled)(); | ||
| 2910 | bool (OPENVR_FNTABLE_CALLTYPE *IsMotionSmoothingSupported)(); | ||
| 2911 | bool (OPENVR_FNTABLE_CALLTYPE *IsCurrentSceneFocusAppLoading)(); | ||
| 2912 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetStageOverride_Async)(char * pchRenderModelPath, struct HmdMatrix34_t * pTransform, struct Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings); | ||
| 2913 | void (OPENVR_FNTABLE_CALLTYPE *ClearStageOverride)(); | ||
| 2914 | bool (OPENVR_FNTABLE_CALLTYPE *GetCompositorBenchmarkResults)(struct Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults); | ||
| 2915 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPosePredictionIDs)(uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID); | ||
| 2916 | EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetPosesForFrame)(uint32_t unPosePredictionID, struct TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount); | ||
| 2917 | }; | ||
| 2918 | |||
| 2919 | struct VR_IVROverlay_FnTable | ||
| 2920 | { | ||
| 2921 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *FindOverlay)(char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); | ||
| 2922 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateOverlay)(char * pchOverlayKey, char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); | ||
| 2923 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *DestroyOverlay)(VROverlayHandle_t ulOverlayHandle); | ||
| 2924 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); | ||
| 2925 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); | ||
| 2926 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchName); | ||
| 2927 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight); | ||
| 2928 | char * (OPENVR_FNTABLE_CALLTYPE *GetOverlayErrorNameFromEnum)(EVROverlayError error); | ||
| 2929 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID); | ||
| 2930 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle); | ||
| 2931 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); | ||
| 2932 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled); | ||
| 2933 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); | ||
| 2934 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue); | ||
| 2935 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue); | ||
| 2936 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha); | ||
| 2937 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha); | ||
| 2938 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect); | ||
| 2939 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect); | ||
| 2940 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder); | ||
| 2941 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder); | ||
| 2942 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters); | ||
| 2943 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters); | ||
| 2944 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float fCurvature); | ||
| 2945 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float * pfCurvature); | ||
| 2946 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayPreCurvePitch)(VROverlayHandle_t ulOverlayHandle, float fRadians); | ||
| 2947 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayPreCurvePitch)(VROverlayHandle_t ulOverlayHandle, float * pfRadians); | ||
| 2948 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace); | ||
| 2949 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace); | ||
| 2950 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds); | ||
| 2951 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds); | ||
| 2952 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType); | ||
| 2953 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); | ||
| 2954 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); | ||
| 2955 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); | ||
| 2956 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); | ||
| 2957 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, char * pchComponentName); | ||
| 2958 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); | ||
| 2959 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform); | ||
| 2960 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, struct HmdMatrix34_t * pmatParentOverlayToOverlayTransform); | ||
| 2961 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, struct HmdVector2_t * pvHotspot); | ||
| 2962 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvHotspot); | ||
| 2963 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformProjection)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform, struct VROverlayProjection_t * pProjection, EVREye eEye); | ||
| 2964 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle); | ||
| 2965 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle); | ||
| 2966 | bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle); | ||
| 2967 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdVector2_t coordinatesInOverlay, struct HmdMatrix34_t * pmatTransform); | ||
| 2968 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *WaitFrameSync)(uint32_t nTimeoutMs); | ||
| 2969 | bool (OPENVR_FNTABLE_CALLTYPE *PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pEvent, uint32_t uncbVREvent); | ||
| 2970 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod); | ||
| 2971 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod); | ||
| 2972 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale); | ||
| 2973 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale); | ||
| 2974 | bool (OPENVR_FNTABLE_CALLTYPE *ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults); | ||
| 2975 | bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle); | ||
| 2976 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize); | ||
| 2977 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *TriggerLaserMouseHapticVibration)(VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude); | ||
| 2978 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCursor)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle); | ||
| 2979 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvCursor); | ||
| 2980 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle); | ||
| 2981 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture); | ||
| 2982 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle); | ||
| 2983 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel); | ||
| 2984 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath); | ||
| 2985 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, struct VRTextureBounds_t * pTextureBounds); | ||
| 2986 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle); | ||
| 2987 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight); | ||
| 2988 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateDashboardOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle); | ||
| 2989 | bool (OPENVR_FNTABLE_CALLTYPE *IsDashboardVisible)(); | ||
| 2990 | bool (OPENVR_FNTABLE_CALLTYPE *IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle); | ||
| 2991 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId); | ||
| 2992 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId); | ||
| 2993 | void (OPENVR_FNTABLE_CALLTYPE *ShowDashboard)(char * pchOverlayToShow); | ||
| 2994 | TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetPrimaryDashboardDevice)(); | ||
| 2995 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, char * pchDescription, uint32_t unCharMax, char * pchExistingText, uint64_t uUserValue); | ||
| 2996 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, char * pchDescription, uint32_t unCharMax, char * pchExistingText, uint64_t uUserValue); | ||
| 2997 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetKeyboardText)(char * pchText, uint32_t cchText); | ||
| 2998 | void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)(); | ||
| 2999 | void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform); | ||
| 3000 | void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect); | ||
| 3001 | VRMessageOverlayResponse (OPENVR_FNTABLE_CALLTYPE *ShowMessageOverlay)(char * pchText, char * pchCaption, char * pchButton0Text, char * pchButton1Text, char * pchButton2Text, char * pchButton3Text); | ||
| 3002 | void (OPENVR_FNTABLE_CALLTYPE *CloseMessageOverlay)(); | ||
| 3003 | }; | ||
| 3004 | |||
| 3005 | struct VR_IVROverlayView_FnTable | ||
| 3006 | { | ||
| 3007 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *AcquireOverlayView)(VROverlayHandle_t ulOverlayHandle, struct VRNativeDevice_t * pNativeDevice, struct VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize); | ||
| 3008 | EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseOverlayView)(struct VROverlayView_t * pOverlayView); | ||
| 3009 | void (OPENVR_FNTABLE_CALLTYPE *PostOverlayEvent)(VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pvrEvent); | ||
| 3010 | bool (OPENVR_FNTABLE_CALLTYPE *IsViewingPermitted)(VROverlayHandle_t ulOverlayHandle); | ||
| 3011 | }; | ||
| 3012 | |||
| 3013 | struct VR_IVRHeadsetView_FnTable | ||
| 3014 | { | ||
| 3015 | void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewSize)(uint32_t nWidth, uint32_t nHeight); | ||
| 3016 | void (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewSize)(uint32_t * pnWidth, uint32_t * pnHeight); | ||
| 3017 | void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewMode)(HeadsetViewMode_t eHeadsetViewMode); | ||
| 3018 | HeadsetViewMode_t (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewMode)(); | ||
| 3019 | void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewCropped)(bool bCropped); | ||
| 3020 | bool (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewCropped)(); | ||
| 3021 | float (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewAspectRatio)(); | ||
| 3022 | void (OPENVR_FNTABLE_CALLTYPE *SetHeadsetViewBlendRange)(float flStartPct, float flEndPct); | ||
| 3023 | void (OPENVR_FNTABLE_CALLTYPE *GetHeadsetViewBlendRange)(float * pStartPct, float * pEndPct); | ||
| 3024 | }; | ||
| 3025 | |||
| 3026 | struct VR_IVRRenderModels_FnTable | ||
| 3027 | { | ||
| 3028 | EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadRenderModel_Async)(char * pchRenderModelName, struct RenderModel_t ** ppRenderModel); | ||
| 3029 | void (OPENVR_FNTABLE_CALLTYPE *FreeRenderModel)(struct RenderModel_t * pRenderModel); | ||
| 3030 | EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTexture_Async)(TextureID_t textureId, struct RenderModel_TextureMap_t ** ppTexture); | ||
| 3031 | void (OPENVR_FNTABLE_CALLTYPE *FreeTexture)(struct RenderModel_TextureMap_t * pTexture); | ||
| 3032 | EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTextureD3D11_Async)(TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D); | ||
| 3033 | EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadIntoTextureD3D11_Async)(TextureID_t textureId, void * pDstTexture); | ||
| 3034 | void (OPENVR_FNTABLE_CALLTYPE *FreeTextureD3D11)(void * pD3D11Texture2D); | ||
| 3035 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelName)(uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen); | ||
| 3036 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelCount)(); | ||
| 3037 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentCount)(char * pchRenderModelName); | ||
| 3038 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentName)(char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen); | ||
| 3039 | uint64_t (OPENVR_FNTABLE_CALLTYPE *GetComponentButtonMask)(char * pchRenderModelName, char * pchComponentName); | ||
| 3040 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentRenderModelName)(char * pchRenderModelName, char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen); | ||
| 3041 | bool (OPENVR_FNTABLE_CALLTYPE *GetComponentStateForDevicePath)(char * pchRenderModelName, char * pchComponentName, VRInputValueHandle_t devicePath, RenderModel_ControllerMode_State_t * pState, RenderModel_ComponentState_t * pComponentState); | ||
| 3042 | bool (OPENVR_FNTABLE_CALLTYPE *GetComponentState)(char * pchRenderModelName, char * pchComponentName, VRControllerState_t * pControllerState, struct RenderModel_ControllerMode_State_t * pState, struct RenderModel_ComponentState_t * pComponentState); | ||
| 3043 | bool (OPENVR_FNTABLE_CALLTYPE *RenderModelHasComponent)(char * pchRenderModelName, char * pchComponentName); | ||
| 3044 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelThumbnailURL)(char * pchRenderModelName, char * pchThumbnailURL, uint32_t unThumbnailURLLen, EVRRenderModelError * peError); | ||
| 3045 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelOriginalPath)(char * pchRenderModelName, char * pchOriginalPath, uint32_t unOriginalPathLen, EVRRenderModelError * peError); | ||
| 3046 | char * (OPENVR_FNTABLE_CALLTYPE *GetRenderModelErrorNameFromEnum)(EVRRenderModelError error); | ||
| 3047 | }; | ||
| 3048 | |||
| 3049 | struct VR_IVRNotifications_FnTable | ||
| 3050 | { | ||
| 3051 | EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *CreateNotification)(VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, char * pchText, EVRNotificationStyle style, struct NotificationBitmap_t * pImage, VRNotificationId * pNotificationId); | ||
| 3052 | EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *RemoveNotification)(VRNotificationId notificationId); | ||
| 3053 | }; | ||
| 3054 | |||
| 3055 | struct VR_IVRSettings_FnTable | ||
| 3056 | { | ||
| 3057 | char * (OPENVR_FNTABLE_CALLTYPE *GetSettingsErrorNameFromEnum)(EVRSettingsError eError); | ||
| 3058 | void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError); | ||
| 3059 | void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError); | ||
| 3060 | void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError); | ||
| 3061 | void (OPENVR_FNTABLE_CALLTYPE *SetString)(char * pchSection, char * pchSettingsKey, char * pchValue, EVRSettingsError * peError); | ||
| 3062 | bool (OPENVR_FNTABLE_CALLTYPE *GetBool)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError); | ||
| 3063 | int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError); | ||
| 3064 | float (OPENVR_FNTABLE_CALLTYPE *GetFloat)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError); | ||
| 3065 | void (OPENVR_FNTABLE_CALLTYPE *GetString)(char * pchSection, char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError); | ||
| 3066 | void (OPENVR_FNTABLE_CALLTYPE *RemoveSection)(char * pchSection, EVRSettingsError * peError); | ||
| 3067 | void (OPENVR_FNTABLE_CALLTYPE *RemoveKeyInSection)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError); | ||
| 3068 | }; | ||
| 3069 | |||
| 3070 | struct VR_IVRScreenshots_FnTable | ||
| 3071 | { | ||
| 3072 | EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *RequestScreenshot)(ScreenshotHandle_t * pOutScreenshotHandle, EVRScreenshotType type, char * pchPreviewFilename, char * pchVRFilename); | ||
| 3073 | EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *HookScreenshot)(EVRScreenshotType * pSupportedTypes, int numTypes); | ||
| 3074 | EVRScreenshotType (OPENVR_FNTABLE_CALLTYPE *GetScreenshotPropertyType)(ScreenshotHandle_t screenshotHandle, EVRScreenshotError * pError); | ||
| 3075 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetScreenshotPropertyFilename)(ScreenshotHandle_t screenshotHandle, EVRScreenshotPropertyFilenames filenameType, char * pchFilename, uint32_t cchFilename, EVRScreenshotError * pError); | ||
| 3076 | EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *UpdateScreenshotProgress)(ScreenshotHandle_t screenshotHandle, float flProgress); | ||
| 3077 | EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *TakeStereoScreenshot)(ScreenshotHandle_t * pOutScreenshotHandle, char * pchPreviewFilename, char * pchVRFilename); | ||
| 3078 | EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *SubmitScreenshot)(ScreenshotHandle_t screenshotHandle, EVRScreenshotType type, char * pchSourcePreviewFilename, char * pchSourceVRFilename); | ||
| 3079 | }; | ||
| 3080 | |||
| 3081 | struct VR_IVRResources_FnTable | ||
| 3082 | { | ||
| 3083 | uint32_t (OPENVR_FNTABLE_CALLTYPE *LoadSharedResource)(char * pchResourceName, char * pchBuffer, uint32_t unBufferLen); | ||
| 3084 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetResourceFullPath)(char * pchResourceName, char * pchResourceTypeDirectory, char * pchPathBuffer, uint32_t unBufferLen); | ||
| 3085 | }; | ||
| 3086 | |||
| 3087 | struct VR_IVRDriverManager_FnTable | ||
| 3088 | { | ||
| 3089 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverCount)(); | ||
| 3090 | uint32_t (OPENVR_FNTABLE_CALLTYPE *GetDriverName)(DriverId_t nDriver, char * pchValue, uint32_t unBufferSize); | ||
| 3091 | DriverHandle_t (OPENVR_FNTABLE_CALLTYPE *GetDriverHandle)(char * pchDriverName); | ||
| 3092 | bool (OPENVR_FNTABLE_CALLTYPE *IsEnabled)(DriverId_t nDriver); | ||
| 3093 | }; | ||
| 3094 | |||
| 3095 | struct VR_IVRInput_FnTable | ||
| 3096 | { | ||
| 3097 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *SetActionManifestPath)(char * pchActionManifestPath); | ||
| 3098 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionSetHandle)(char * pchActionSetName, VRActionSetHandle_t * pHandle); | ||
| 3099 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionHandle)(char * pchActionName, VRActionHandle_t * pHandle); | ||
| 3100 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetInputSourceHandle)(char * pchInputSourcePath, VRInputValueHandle_t * pHandle); | ||
| 3101 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *UpdateActionState)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount); | ||
| 3102 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetDigitalActionData)(VRActionHandle_t action, struct InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); | ||
| 3103 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetAnalogActionData)(VRActionHandle_t action, struct InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); | ||
| 3104 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); | ||
| 3105 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetPoseActionDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, struct InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); | ||
| 3106 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalActionData)(VRActionHandle_t action, struct InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); | ||
| 3107 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetDominantHand)(ETrackedControllerRole * peDominantHand); | ||
| 3108 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *SetDominantHand)(ETrackedControllerRole eDominantHand); | ||
| 3109 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount); | ||
| 3110 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); | ||
| 3111 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize); | ||
| 3112 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalReferenceTransforms)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); | ||
| 3113 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalTrackingLevel)(VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel); | ||
| 3114 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalBoneData)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); | ||
| 3115 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalSummaryData)(VRActionHandle_t action, EVRSummaryType eSummaryType, struct VRSkeletalSummaryData_t * pSkeletalSummaryData); | ||
| 3116 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetSkeletalBoneDataCompressed)(VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize); | ||
| 3117 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *DecompressSkeletalBoneData)(void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, struct VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); | ||
| 3118 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *TriggerHapticVibrationAction)(VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice); | ||
| 3119 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); | ||
| 3120 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); | ||
| 3121 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, struct InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); | ||
| 3122 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetActionBindingInfo)(VRActionHandle_t action, struct InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount); | ||
| 3123 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); | ||
| 3124 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *ShowBindingsForActionSet)(struct VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); | ||
| 3125 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetComponentStateForBinding)(char * pchRenderModelName, char * pchComponentName, struct InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState); | ||
| 3126 | bool (OPENVR_FNTABLE_CALLTYPE *IsUsingLegacyInput)(); | ||
| 3127 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *OpenBindingUI)(char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop); | ||
| 3128 | EVRInputError (OPENVR_FNTABLE_CALLTYPE *GetBindingVariant)(VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize); | ||
| 3129 | }; | ||
| 3130 | |||
| 3131 | struct VR_IVRIOBuffer_FnTable | ||
| 3132 | { | ||
| 3133 | EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Open)(char * pchPath, EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, IOBufferHandle_t * pulBuffer); | ||
| 3134 | EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Close)(IOBufferHandle_t ulBuffer); | ||
| 3135 | EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Read)(IOBufferHandle_t ulBuffer, void * pDst, uint32_t unBytes, uint32_t * punRead); | ||
| 3136 | EIOBufferError (OPENVR_FNTABLE_CALLTYPE *Write)(IOBufferHandle_t ulBuffer, void * pSrc, uint32_t unBytes); | ||
| 3137 | PropertyContainerHandle_t (OPENVR_FNTABLE_CALLTYPE *PropertyContainer)(IOBufferHandle_t ulBuffer); | ||
| 3138 | bool (OPENVR_FNTABLE_CALLTYPE *HasReaders)(IOBufferHandle_t ulBuffer); | ||
| 3139 | }; | ||
| 3140 | |||
| 3141 | struct VR_IVRSpatialAnchors_FnTable | ||
| 3142 | { | ||
| 3143 | EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *CreateSpatialAnchorFromDescriptor)(char * pchDescriptor, SpatialAnchorHandle_t * pHandleOut); | ||
| 3144 | EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *CreateSpatialAnchorFromPose)(TrackedDeviceIndex_t unDeviceIndex, ETrackingUniverseOrigin eOrigin, struct SpatialAnchorPose_t * pPose, SpatialAnchorHandle_t * pHandleOut); | ||
| 3145 | EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *GetSpatialAnchorPose)(SpatialAnchorHandle_t unHandle, ETrackingUniverseOrigin eOrigin, struct SpatialAnchorPose_t * pPoseOut); | ||
| 3146 | EVRSpatialAnchorError (OPENVR_FNTABLE_CALLTYPE *GetSpatialAnchorDescriptor)(SpatialAnchorHandle_t unHandle, char * pchDescriptorOut, uint32_t * punDescriptorBufferLenInOut); | ||
| 3147 | }; | ||
| 3148 | |||
| 3149 | struct VR_IVRDebug_FnTable | ||
| 3150 | { | ||
| 3151 | EVRDebugError (OPENVR_FNTABLE_CALLTYPE *EmitVrProfilerEvent)(char * pchMessage); | ||
| 3152 | EVRDebugError (OPENVR_FNTABLE_CALLTYPE *BeginVrProfilerEvent)(VrProfilerEventHandle_t * pHandleOut); | ||
| 3153 | EVRDebugError (OPENVR_FNTABLE_CALLTYPE *FinishVrProfilerEvent)(VrProfilerEventHandle_t hHandle, char * pchMessage); | ||
| 3154 | uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize); | ||
| 3155 | }; | ||
| 3156 | |||
| 3157 | struct VR_IVRProperties_FnTable | ||
| 3158 | { | ||
| 3159 | ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *ReadPropertyBatch)(PropertyContainerHandle_t ulContainerHandle, struct PropertyRead_t * pBatch, uint32_t unBatchEntryCount); | ||
| 3160 | ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *WritePropertyBatch)(PropertyContainerHandle_t ulContainerHandle, struct PropertyWrite_t * pBatch, uint32_t unBatchEntryCount); | ||
| 3161 | char * (OPENVR_FNTABLE_CALLTYPE *GetPropErrorNameFromEnum)(ETrackedPropertyError error); | ||
| 3162 | PropertyContainerHandle_t (OPENVR_FNTABLE_CALLTYPE *TrackedDeviceToPropertyContainer)(TrackedDeviceIndex_t nDevice); | ||
| 3163 | }; | ||
| 3164 | |||
| 3165 | struct VR_IVRPaths_FnTable | ||
| 3166 | { | ||
| 3167 | ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *ReadPathBatch)(PropertyContainerHandle_t ulRootHandle, struct PathRead_t * pBatch, uint32_t unBatchEntryCount); | ||
| 3168 | ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *WritePathBatch)(PropertyContainerHandle_t ulRootHandle, struct PathWrite_t * pBatch, uint32_t unBatchEntryCount); | ||
| 3169 | ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *StringToHandle)(PathHandle_t * pHandle, char * pchPath); | ||
| 3170 | ETrackedPropertyError (OPENVR_FNTABLE_CALLTYPE *HandleToString)(PathHandle_t pHandle, char * pchBuffer, uint32_t unBufferSize, uint32_t * punBufferSizeUsed); | ||
| 3171 | }; | ||
| 3172 | |||
| 3173 | struct VR_IVRBlockQueue_FnTable | ||
| 3174 | { | ||
| 3175 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *Create)(PropertyContainerHandle_t * pulQueueHandle, char * pchPath, uint32_t unBlockDataSize, uint32_t unBlockHeaderSize, uint32_t unBlockCount, uint32_t unFlags); | ||
| 3176 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *Connect)(PropertyContainerHandle_t * pulQueueHandle, char * pchPath); | ||
| 3177 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *Destroy)(PropertyContainerHandle_t ulQueueHandle); | ||
| 3178 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *AcquireWriteOnlyBlock)(PropertyContainerHandle_t ulQueueHandle, PropertyContainerHandle_t * pulBlockHandle, void ** ppvBuffer); | ||
| 3179 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *ReleaseWriteOnlyBlock)(PropertyContainerHandle_t ulQueueHandle, PropertyContainerHandle_t ulBlockHandle); | ||
| 3180 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *WaitAndAcquireReadOnlyBlock)(PropertyContainerHandle_t ulQueueHandle, PropertyContainerHandle_t * pulBlockHandle, void ** ppvBuffer, EBlockQueueReadType eReadType, uint32_t unTimeoutMs); | ||
| 3181 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *AcquireReadOnlyBlock)(PropertyContainerHandle_t ulQueueHandle, PropertyContainerHandle_t * pulBlockHandle, void ** ppvBuffer, EBlockQueueReadType eReadType); | ||
| 3182 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *ReleaseReadOnlyBlock)(PropertyContainerHandle_t ulQueueHandle, PropertyContainerHandle_t ulBlockHandle); | ||
| 3183 | EBlockQueueError (OPENVR_FNTABLE_CALLTYPE *QueueHasReader)(PropertyContainerHandle_t ulQueueHandle, bool * pbHasReaders); | ||
| 3184 | }; | ||
| 3185 | |||
| 3186 | |||
| 3187 | #if 0 | ||
| 3188 | // Global entry points | ||
| 3189 | S_API intptr_t VR_InitInternal( EVRInitError *peError, EVRApplicationType eType ); | ||
| 3190 | S_API void VR_ShutdownInternal(); | ||
| 3191 | S_API bool VR_IsHmdPresent(); | ||
| 3192 | S_API intptr_t VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); | ||
| 3193 | S_API bool VR_IsRuntimeInstalled(); | ||
| 3194 | S_API const char * VR_GetVRInitErrorAsSymbol( EVRInitError error ); | ||
| 3195 | S_API const char * VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); | ||
| 3196 | #endif | ||
| 3197 | |||
| 3198 | #endif // __OPENVR_API_FLAT_H__ | ||
| 3199 | |||
| 3200 | |||
